ross / requests-futures

Asynchronous Python HTTP Requests for Humans using Futures
Other
2.11k stars 152 forks source link

Use Environment Markers instead of version_info. #78

Closed matt2000 closed 5 years ago

matt2000 commented 5 years ago

PEP-508 recommends Environment markers for better compatibility with modern build tools and dependency managers such as Poetry.

https://www.python.org/dev/peps/pep-0508/#environment-markers

E.g., See also:

sdispater/poetry#844 sdispater/poetry#881

ross commented 5 years ago

Hi @matt2000. I get these sorts of setup.py PRs to public stuff I have from time to time, but to be honest I lean towards not merging them as 99% of the time they end up breaking things in ways that confuse and hinder people that are just trying to use the libraries. For example if I try to install the package on my laptop using this branch I get the following:

(env)otter:requests-futures ross$ python setup.py install
error in requests-futures setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected ',' or end-of-list in futures>=2.1.3; python_version<'3.2' at ; python_version<'3.2'

Obviously to you and me the fix is to pip instal -U setuptools and try again, but that's not obvious to most people and they either open up an issue on the repo or just assume the library is crap. I'd happily look at a PR that tries to fix things in a way that works for Poetry that doesn't break the standard flow for most users. It's annoying that setuptools has chosen to take paths that break for old versions in ways that don't give random users that hit the problems any help figuring out what to do.

ross commented 5 years ago

Replaced by https://github.com/ross/requests-futures/pull/79