Skip to content

Drop python support for 2.7, 3.4 and 3.5 - #321

Merged
jparise merged 4 commits into
pinterest:masterfrom
jogo:EOL
Jul 20, 2021
Merged

jparise merged 4 commits into
pinterest:masterfrom
jogo:EOL

Conversation

@jogo

@jogo jogo commented May 27, 2021

Copy link
Copy Markdown
Contributor

End of Life information:

Remove six dependency and run pyupgrade to start using native python 3 syntax

@jogo
jogo requested review from cgordon and jparise as code owners May 27, 2021 16:52
@jogo
jogo force-pushed the EOL branch 2 times, most recently from a89a551 to 243e043 Compare May 27, 2021 17:04
@jparise jparise added this to the 4.0 milestone May 27, 2021

@4383 4383 left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread pymemcache/test/test_serde.py Outdated
Comment thread pymemcache/serde.py
Comment thread pymemcache/serde.py Outdated

@4383 4383 left a comment

Copy link
Copy Markdown
Contributor

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).

Comment thread pymemcache/client/base.py Outdated
@nichochar

Copy link
Copy Markdown
Collaborator

Very exciting that we're finally dropping support.
Looked at the changes, and LGTM, but haven't been as close to the repo in a while so I'll let someone else gatekeep.

Also, if things are missing, I wouldn't find those, but changes made all LGTM.

@jogo
jogo force-pushed the EOL branch 2 times, most recently from 7e7742a to d03a6d6 Compare July 13, 2021 23:27

@jparise jparise left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread pymemcache/client/rendezvous.py Outdated
Comment thread pymemcache/test/test_benchmark.py Outdated
@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()))

Copy link
Copy Markdown
Collaborator

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)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

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.

@4383

4383 commented Jul 15, 2021

Copy link
Copy Markdown
Contributor

Creating a branch 3.X seems a good idea to backport and fix issues.
It could even be created later by referring to the right hash if something happen with previous features in the case it will require backward compatibility.

Comment thread pymemcache/client/base.py
Comment thread pymemcache/test/test_benchmark.py Outdated
@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()))

Copy link
Copy Markdown
Collaborator

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.

jogo added 4 commits July 20, 2021 11:46
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
@jparise
jparise merged commit b6d83f8 into pinterest:master Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants