setup.py does not correctly specify supported Python versions

Bug #1838521 reported by Kevin Phillips
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxml
Fix Released
Low
Unassigned

Bug Description

I just tried installing some packages that depend on the lxml package in a Python 3.4 environment and I got an error that looks something like the following:

 ERROR: Complete output from command python setup.py egg_info:
    ERROR: This lxml version requires Python 2.7, 3.5 or later.

Given that I haven't touched the package in question nor any of it's transitive dependencies I was confused. After doing some digging I discovered that the latest version of lxml dropped support for Python 3.4. So I was curious to see why pip would be trying to install an unsupported version. After looking at the source code for lxml I realized that the package does not correctly specify the list of supported versions, which allows pip to attempt to deploy an unsupported version.

I would like to see the lxml package updated / fixed so it correctly specifies the list of supported versions. This should be as easy as adding the following line to the setup() method in the setup.py script:

python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"

Also, the following "classifier" should be removed from the package declaration as well:

'Programming Language :: Python :: 3.4'

Once these changes are made, future versions of the package should correctly resolve depending on the Python version being used. However there will still be problems with the 4.4.0 release because Python 3.4 deployments will still incorrectly attempt to deploy that unsupported version. Likely the only fix for this will be to delete that release from pypi ... or perhaps overwrite it with an updated package with the package metadata fixed (if that is still possible).

NOTE: This adversely affects so many projects - anything that depends directly or indirectly on lxml - that users may deploy into a Python 3.4 environment, including older packages that predate the 4.4.0 release. As such I am hoping the severity of this fix is taken into account so a fix can be made as soon as possible.

description: updated
Revision history for this message
scoder (scoder) wrote :
Changed in lxml:
importance: Undecided → Low
milestone: none → 4.4.1
status: New → Fix Committed
scoder (scoder)
Changed in lxml:
status: Fix Committed → Fix Released
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.