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

Drop support for Python 2 #116

Closed
wants to merge 1 commit into from
Closed

Conversation

bluetech
Copy link
Contributor

@bluetech bluetech commented Nov 18, 2020

Blocked on #115 / 0.12.0 release, will be updated afterwards.

Fixes #114.

Python 2 support in this library is not too onerous, the main reason for doing this is to allow using newer Python features like inline type annotations.

In the documentation/README updates I assume that this will be released in a 0.12.x series rather than the latest 0.11.x series which supports Python 2. I think it would be good to branch off 0.11.x just in case we ever want to backport some bug fixes to a Python 2-compatible version.

I updated whatever I could find except for the `ReceiveBuffer. According to the comment there it can be simplified after Python 2 is dropped but needs some care. I will look at it in a separate PR unless someone else wants to update this part.

@bluetech
Copy link
Contributor Author

(I added a change to remove an __ne__ implementation - since py3 it's auto implemented based on __eq__)

@bluetech bluetech mentioned this pull request Nov 18, 2020
Copy link
Member

@pgjones pgjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor versioning comments. I think we state 3.6+ given 3.5 is EOL.

Otherwise this is great, thanks!

@@ -44,7 +44,9 @@ whatever. But h11 makes it much easier to implement something like
Vital statistics
----------------

* Requirements: Python 2.7 or Python 3.5+ (PyPy works great)
* Requirements: Python 3.5+ (PyPy works great)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.6+

@@ -0,0 +1,2 @@
Python 2.7 and PyPy 2 support is removed. h11 now requires Python>=3.5 including PyPy 3.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.6+

@@ -17,15 +17,15 @@
# This means, just install *everything* you see under h11/, even if it
# doesn't look like a source file, so long as it appears in MANIFEST.in:
include_package_data=True,
python_requires=">=3.5",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.6

"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.5",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also remove this?

@bluetech
Copy link
Contributor Author

@pgjones

I think we state 3.6+ given 3.5 is EOL.

Sounds good to me, would definitely be a little nicer for typing. Should I open an issue for discussion or just add it here? (Maybe some dependents still want to support Python 3.5)

0.12.0, as I don't think the line change behavior counts as a bug fix.

I'll mark this PR as blocked on #115/0.12.0, will update after they're done.

@pquentin
Copy link

(It would be nice to test 3.9 in CI as well)

@tomchristie
Copy link
Contributor

tomchristie commented Nov 24, 2020

I'll mark this PR as blocked on #115/0.12.0, will update after they're done.

I reckon we should maybe get these done the other way around, no?

A progression that looks sensible to me is:

@pgjones
Copy link
Member

pgjones commented Nov 24, 2020

Yea, I think that is the better flow.

@pgjones
Copy link
Member

pgjones commented Dec 26, 2020

Merged via command line (fixing conflicts).

@pgjones pgjones closed this Dec 26, 2020
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.

Drop support for Python 2?
4 participants