Python3 plugin development

Hi! :slightly_smiling_face:

I’m trying to develop a plugin for Indico but the available documentation is for Python 2.7.
Yet, all the plugins from the plugin repository require Python 3.9 and Indico 3.0dev0.

Is there a way to install this version in order to build a new plugin? PyPI and the Github repository of Indico only provide versions up to 2.3.4.

Sorry if my question seems silly.

Have a nice day!

Use the 2.3-maintenance branch if you are developing for the current stable version (v2.3.x).

Thanks for the quick response!

The 2.3-maintenance branch still requires Python 2.7 as far as I can tell from the setup.py.
So if I want to use Python 3+, I have to use the search or master branch is that right?

Yes, use master in both indico and plugins if you want Python 3.

There’s a (dev) setup guide for v3 here: Installation guide (development) — Indico 3.0-dev documentation

But please note that while 3.0 is already pretty stable (we’ll likely deploy it at CERN once we finished the development related to search), we do not yet recommend using it in production.

1 Like

Oh thanks, I did not see that the dev installation instruction were for Python 3+.
Do you have an approximate date for the release?
I’m currently considering using Indico but I need a way to manage hardware and machines in addition to rooms (thus the need for a plugin).

We plan to deploy it at CERN this month; at that point we will fix any issues we found quickly (because it’ll be used in production)… once we feel it’s stable enough so we don’t have to bother others with updates every few days and we updated the prod setup docs, we’ll probably make the “public” release.

But tbh, if you have the technical skills to deploy Python 3.9 (usually via pyenv), and adapt the instructions from the setup guide (such as not installing anything related to Python 2 and installing uwsgi via pip and adding the systemd unit for it yourself), and are willing to build your own Python wheel, then you could probably start using 3.0 without many issues about a week after we started using it at CERN - the first few hours/days are where Googlebot crawlers and users tend to find the majority of issues.

Depending on your exact workflow, you may want to add those as “rooms” as well and then just use the room booking module. If you do not need rooms but just machines, then have a look at the burotel plugin in the indico-plugins-cern repo; it’s for booking desks, but should give you a good example on how to repurpose the room booking module.

1 Like

This is an almost perfect timing for our usage! I might wait a bit then.

I considered the “add them as rooms” option but it might conflict with the actual rooms in our case. I’ll take a look at the burotel plugin, thanks for the hint :slightly_smiling_face:

Hi :slight_smile:

I just update to thread to check if the 3.0 release is now in use at CERN.
I see that the repository is very active so I suppose that the latest version should soon get published?

Have a nice day!

Indeed, 3.0 is in use at CERN since pretty much exactly one month and very stable.

I’m actually thinking about making a prerelease for 3.0 later this week. There are a few open PRs I’d like to merge first but nothing major.

1 Like

Great news! :partying_face:
I’ll give it try then.