ufw

Uses deprecated distutils

Bug #1962732 reported by Ross Burton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ufw
Triaged
Medium
Unassigned

Bug Description

distutils is deprecated in Python 3.10 and will be *removed* in 3.12:

https://docs.python.org/3/whatsnew/3.10.html#distutils-deprecated

The easiest port is to setuptools, but the entirely custom install function makes the migration not as trivial as simply changing the import from distutils to setuptools.

Related branches

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thanks for the report! :)

Changed in ufw:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Ross Burton (ross) wrote :

A related bug: wheels built by ufw don't work, as you have a custom install command.

You can test this by 'setup.py bdist_wheel' and then 'pip install ufw.wheel'. Almost everything is installed into the wrong places.

Revision history for this message
Ross Burton (ross) wrote :

Update: I've been talking to the Python Packaging Authority and they basically say that if you want to install files outside of a Python module or the limited files they support then use a non-Python build system like autotools/Meson/etc.

"Given that setup.py install is deprecated and will not be un-deprecated, developers of Python software that performs Unixy integration are advised to migrate to a non-python build system."

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

The current setup.py is ancient. I need to take a hard look at it and survey my options. My priorities are to have a similar if not equivalent install experience (quite a few distros package ufw) while also doing the right thing wrt Debian python packaging. Any other niceties for development I can just change as needed. Thanks for the additional info.

Revision history for this message
Ross Burton (ross) wrote (last edit ): Re: [Bug 1962732] Re: Uses deprecated distutils

Personally I’d say just port to Meson. It installs python nicely and works well with distribution tooling.

In the immediate short-term, Trevor's patch at least silences warnings for now.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.