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

Updated DEFAULT_PROTOCOL to 3. #50

Merged
merged 5 commits into from
Jun 5, 2020
Merged

Conversation

carltongibson
Copy link

@carltongibson carltongibson commented Jun 5, 2020

Protocol version 3 was added in Python 3.0. It has explicit support for bytes objects and cannot be unpickled by Python 2.x. This was the default protocol in Python 3.0–3.7.

Not sure it dropping PY2 is on the cards now that it's EOL but, if so I think it would be fair to bump the default protocol version.

WIP because they'll be lots that breaks on tox/travis. I will check back on that later.

@coveralls
Copy link

coveralls commented Jun 5, 2020

Coverage Status

Coverage remained the same at 98.901% when pulling 5bc1900 on carltongibson:patch-1 into 44dfeb9 on gintas:master.

@charettes
Copy link
Collaborator

Hey @carltongibson 👋

Looks like it only breaks the Python 2 build which is expected. Given tests already pass on Python 2 simply removing tested support (tox.ini, .travis.yml, setup.py) and adding a section for in the README.rst release notes under a new 3.0 section would do.

Removal of Python support code can be done in a following PR.

setup.py Show resolved Hide resolved
@carltongibson carltongibson force-pushed the patch-1 branch 2 times, most recently from 40352c1 to a52948e Compare June 5, 2020 13:27
@carltongibson carltongibson marked this pull request as ready for review June 5, 2020 13:27
@carltongibson
Copy link
Author

Hi @charettes 👋

I dropped PY2 in a separate commit, if you're happy to take that.

If you're happy with these I can rebase and drop 1.11 too whilst I'm here.

@@ -26,8 +26,7 @@
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3 :: Only',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Didn't know about that :: Only classifier, TIL!

Copy link
Author

Choose a reason for hiding this comment

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

Angry people tell me about these things when I forget to use them... 😀

@charettes
Copy link
Collaborator

charettes commented Jun 5, 2020

If you're happy with these I can rebase and drop 1.11 too whilst I'm here.

Totally open to that if you're up to it! I can take care of releasing 3.0 afterwards. It looks like the tox.ini still has references to Django 2.0 and 2.1 if you want to remove these as well.

@carltongibson
Copy link
Author

OK, I'll add it here. 10 mins.

carltongibson and others added 4 commits June 5, 2020 15:37
> Protocol version 3 was added in Python 3.0. It has explicit support for bytes objects and cannot be unpickled by Python 2.x. This was the default protocol in Python 3.0–3.7.
@charettes
Copy link
Collaborator

Looks like Travis is taking a ☕ break.

@carltongibson
Copy link
Author

I don't blame it. 😀

I'll check back on this later. Hopefully the lint builds work with python3.6, apparently they couldn't find python3.7...

@charettes
Copy link
Collaborator

We could run it against 3.7 (or even 3.8) if the .travis-ci.yml file is adjusted

- { stage: lint, env: TOXENV=flake8, python: 3.6 }
- { stage: lint, env: TOXENV=isort, python: 3.6 }

@carltongibson
Copy link
Author

@charettes
Copy link
Collaborator

Perfect thanks!

@charettes charettes merged commit c615d9d into gintas:master Jun 5, 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.

None yet

3 participants