Comment 0 for bug 1838521

Revision history for this message
Kevin Phillips (thefriendlycoder) wrote :

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 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 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.