Skip to content

Python version compatibility metadata#132

Merged
brunns merged 2 commits intohamcrest:masterfrom
twm:py2-setup-metadata
Jan 8, 2020
Merged

Python version compatibility metadata#132
brunns merged 2 commits intohamcrest:masterfrom
twm:py2-setup-metadata

Conversation

@twm
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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
Copy Markdown

Coverage Status

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

@coveralls
Copy link
Copy Markdown

Coverage Status

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

@coveralls
Copy link
Copy Markdown

Coverage Status

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

@offbyone
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Contributor Author

twm commented Jan 8, 2020

Oh, I see: #130 (comment)

So should I retarget this at some other branch?

@offbyone
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

Development

Successfully merging this pull request may close these issues.

PyHamcrest 1.10.0 is not py2-compatible. It should set python_requires>=3 to avoid breaking users who are still on Py2.

5 participants