-
Notifications
You must be signed in to change notification settings - Fork 178
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 python support for 2.7, 3.4 and 3.5 #321
Conversation
a89a551
to
243e043
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
Please see my inline comments, I think that we need few minor adjustements.
Else everything seems ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usage of f-string LGTM. This feature has been introduced with python 3.6 and we drop the previous versions (3.4, 3.5).
Very exciting that we're finally dropping support. Also, if things are missing, I wouldn't find those, but changes made all LGTM. |
7e7742a
to
d03a6d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me overall. I'd still like to hold off on merging it for a few days since we just released v3.5.0. If nothing significant pops up from that release, we can proceed with a Python 3-only v4 and create a v3.x branch if necessary.
pymemcache/test/test_benchmark.py
Outdated
@@ -103,7 +102,7 @@ def test_bench_set_multi(request, client, pairs, count): | |||
|
|||
@pytest.mark.benchmark() | |||
def test_bench_delete(request, client, pairs, count): | |||
benchmark(count, client.delete, six.next(six.iterkeys(pairs))) | |||
benchmark(count, client.delete, next(pairs.keys())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be just next(pairs)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it could be https://six.readthedocs.io/#six.iterkeys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could drop the .keys()
here.
Creating a branch 3.X seems a good idea to backport and fix issues. |
pymemcache/test/test_benchmark.py
Outdated
@@ -103,7 +102,7 @@ def test_bench_set_multi(request, client, pairs, count): | |||
|
|||
@pytest.mark.benchmark() | |||
def test_bench_delete(request, client, pairs, count): | |||
benchmark(count, client.delete, six.next(six.iterkeys(pairs))) | |||
benchmark(count, client.delete, next(pairs.keys())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could drop the .keys()
here.
Add Python 3 only classifier Stop running Python 2 tests End of Life information: * 3.5 https://www.python.org/downloads/release/python-350/ * 3.4 https://www.python.org/downloads/release/python-340/ * 2.7 https://www.python.org/doc/sunset-python-2/
Now that we don't require Python 2 support no need for six. Code upgraded with pyupgrade and manual fixes to remove remaining six usage.
* future was needed for some python 2 specific tests * use mock from unittest.mock instead of the 3rd party mock library
End of Life information:
Remove six dependency and run pyupgrade to start using native python 3 syntax