News for hackers. Stuff that matters.
Re:Ride the carousel of folly with a Python migration by pdonis on Monday January 23, 2017 @09:56PM (#13468449)
This statement in the article...

"there is nothing in the PyPI package description that actually indicates what version of Python is being targeted"

is incorrect. There are Trove classifiers[1] for both versions, and indeed for every minor version number of both versions. There are even Python 2 and 3 classifiers that end in "Only", which look like they would exactly fit the author's use case.

[1] https://pypi.python.org/pypi?%3Aaction=list_classifiers

Re:Ride the carousel of folly with a Python migration by mortoray on Tuesday January 24, 2017 @01:51AM (#13469342)
Okay, they are classified but I don't see that anything in the setup, or pip package management, seem to actually use them. Are they somehow used in actual package management, or just search qualifiers?
Re:Ride the carousel of folly with a Python migration by di on Tuesday January 24, 2017 @06:35AM (#13470562)
You are correct, the classifiers are just search qualifiers.

However, since pip 9.0.0, it will respect the Requires-Python[0] metadata, which can be specified via your setup.py file.

Since PyPI allows only a single source distribution per release, though, this will still not get you separate modules for separate codebases as it seems you originally desired. As mentioned in a previous comment, it's generally preferred to support multiple versions in a single codebase via six.

[0]: https://www.python.org/dev/peps/pep-0345/#requires-python