Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python version compatibility metadata #132

Merged
merged 2 commits into from Jan 8, 2020

Conversation

twm
Copy link
Contributor

@twm twm commented Jan 8, 2020

This PR adds packaging metadata that marks the package as only supporting Python 3.5+. This prevents Pip from installing it on Python 2.7.

You can find documentation here: https://setuptools.readthedocs.io/en/latest/setuptools.html#new-and-changed-setup-keywords (search in page for "python_requires").

I'm not sure how you do releases, but I'll note that you may need non-ancient (last four years or so) setuptools to generate a wheel that contains this metadata.

Fixes #131.

@coveralls
Copy link

coveralls commented Jan 8, 2020

Coverage Status

Coverage remained the same at ?% when pulling 7b09005 on twm:py2-setup-metadata into c7f0a80 on hamcrest:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at ?% when pulling fe00696 on twm:py2-setup-metadata into c7f0a80 on hamcrest:master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at ?% when pulling fe00696 on twm:py2-setup-metadata into c7f0a80 on hamcrest:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at ?% when pulling fe00696 on twm:py2-setup-metadata into c7f0a80 on hamcrest:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at ?% when pulling fe00696 on twm:py2-setup-metadata into c7f0a80 on hamcrest:master.

@offbyone
Copy link
Member

offbyone commented Jan 8, 2020

Not quite the point; the 1.x series should support Python 2, not the other way around.

@markrwilliams
Copy link

Not quite the point; the 1.x series should support Python 2, not the other way around.

python_requires corresponds to PEP 345's Requires-Python field:

This field specifies the Python version(s) that the distribution is guaranteed to be compatible with.
https://www.python.org/dev/peps/pep-0345/#requires-python

@twm's usage is correct.

@twm
Copy link
Contributor Author

twm commented Jan 8, 2020

Oh, I see: #130 (comment)

So should I retarget this at some other branch?

@offbyone
Copy link
Member

offbyone commented Jan 8, 2020

@markrwilliams I know their usage is correct, but it's not the right change.

@twm arguably yes, but honestly that needs to end up in the ball of commits that's gonna get yanked out and re-inserted into the 2.0 line. I'm inclined to let @brunns sort that stuff out and then see if this is still necessary then. If so, definitely re-target it there.

@twm
Copy link
Contributor Author

twm commented Jan 8, 2020

Okay, I'll leave it as-is for now. Let me know if there is anything I need to do. If it's obsolete feel free to close — I won't be offended. Thanks for PyHamcrest!

@brunns
Copy link
Collaborator

brunns commented Jan 8, 2020

I'm pretty sure we want this on master, at least, so I'll merge it. We wouldn't want it on any Python 2 compatible releases, but any such release would have to be cut from a much older commit.

@brunns brunns merged commit e07fa8a into hamcrest:master Jan 8, 2020
@twm twm deleted the py2-setup-metadata branch February 5, 2020 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants