Skip to content

Use string type annotations for Python 3.11 not 3.10 - #420

Merged
pierreglaser merged 7 commits into
cloudpipe:masterfrom
frenzymadness:py3.10
Jun 19, 2021
Merged

Use string type annotations for Python 3.11 not 3.10#420
pierreglaser merged 7 commits into
cloudpipe:masterfrom
frenzymadness:py3.10

Conversation

@frenzymadness

Copy link
Copy Markdown
Contributor

PEP 563 has been postponed to Python 3.11
https://mail.python.org/archives/list/python-dev@python.org/thread/CLVXXPQ2T2LQ5MP2Y53VVQFCXYWQJHKZ/

Another possibility is to revert this commit: 8a278a1

It's basically up to you to decide whether you want to be ready for Python 3.11 and keep this in the codebase for a year and a half.

And finally, the last possibility might be to use from __future__ import annotations to enable the new feature for Python 3.7+.

@codecov

codecovBot commented May 10, 2021

Copy link
Copy Markdown

Codecov Report

Merging #420 (ebac5f5) into master (6e0f571) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@## master #420 +/- ##
=======================================
Coverage 91.76% 91.76% =======================================
Files 4 4 Lines 668 668 Branches 136 136 =======================================
Hits 613 613 Misses 34 34 Partials 21 21 

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e0f571...ebac5f5. Read the comment docs.

@ogriselogrisel 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.

LGTM. Maybe we want to explore the support for 3.7+ using the from __future__ pattern but I am not sure about the implications.

@ogrisel

Copy link
Copy Markdown
Contributor

We probably need to update the CI config to include a nightly build to test explicitly the future 3.11 from the the main branch of Python and the 3.10 pre-release separately.

@pierreglaser

pierreglaser commented Jun 15, 2021

Copy link
Copy Markdown
Member

Python 3.11 is now tested in nightly while Python 3.10 is tested in the 3.10-dev entry.
Now, testing against nightly fails, because of some change in the code constructor.

@pierreglaser

Copy link
Copy Markdown
Member

At the time when I am writing this message, the change in the code constructor has still an uncertain future. As discussed here: https://bugs.python.org/issue40222, the change might be reverted for the sake of backward compatibility, although it is not sure yet. For this reason, I suggest we make the CI entry using Python nightly (3.11 right now) optional until a final solution to the previous issue is decided.

@pierreglaserpierreglaser added the ci python-nightly Signal the CI to run the test suite of cloudpickle against the master branch of CPython label Jun 19, 2021
@pierreglaser

pierreglaser commented Jun 19, 2021

Copy link
Copy Markdown
Member

(Just making that labelling this PR using the python-nightly label triggers a run of the python-nightly CI entry)

@pierreglaserpierreglaser removed the ci python-nightly Signal the CI to run the test suite of cloudpickle against the master branch of CPython label Jun 19, 2021
@pierreglaser
pierreglaser merged commit eddd327 into cloudpipe:masterJun 19, 2021
@pierreglaser

pierreglaser commented Jun 19, 2021

Copy link
Copy Markdown
Member

(Skipping an entry in the changelog since this PR only affected tests and CI config)

EDIT: actually, a changelog entry was added for #400, So we need to update it since this PR updates changes from #400.

Sign up for freeto 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.

3 participants

@frenzymadness@ogrisel@pierreglaser