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

Supporting Python 3.9 #9761

Closed
5 of 6 tasks
hauntsaninja opened this issue Nov 26, 2020 · 13 comments
Closed
5 of 6 tasks

Supporting Python 3.9 #9761

hauntsaninja opened this issue Nov 26, 2020 · 13 comments
Labels

Comments

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Nov 26, 2020

The next release needs to support Python 3.9

Here's my checklist of what's left:

To clarify the state of support for users stumbling upon this issue, mypy 0.790 will mostly work with Python 3.9.
There are two caveats to running mypy with 3.9:

  1. you won't be able to use list[int] syntax without mypy complaining,
  2. mypy will be slower since we haven't released mypyc compiled wheels for 3.9.

Note that typeshed in 0.790 has pretty good support for Python 3.9, so using new stdlib functionality should work fine.

PS: if you're getting error: syntax error in type comment with Python 3.9, it's because you're using a really old mypy and you should upgrade to a recent release.

@hauntsaninja hauntsaninja pinned this issue Nov 26, 2020
@intgr
Copy link
Contributor

intgr commented Dec 10, 2020

The next release needs to support Python 3.9

I wouldn't make all of these hard requirements. I'd very much like to see a mypy release with binary wheels for 3.9 even before all of these items are addressed.

@gvanrossum
Copy link
Member

Well, we still have the 0.790 release branch so we could just create wheels for that and push those. (Or make whatever tweak are necessary on that branch and push 0.791.)

@hauntsaninja
Copy link
Collaborator Author

hauntsaninja commented Dec 10, 2020

@intgr Agreed that I wouldn't block an otherwise scheduled release on this, but there isn't currently a scheduled release / at this point the checklist^ isn't much additional effort to complete.

If someone with the ability to release is interested in adding 3.9 wheels to 0.790, you'll need to cherry pick #9552 and #9562 (and merge the aforementioned mypyc wheel repo change). Note mypyc is broken in the 0.790 sdist so you should cherry pick #9587 as well (see #9290 (comment)).

@gvanrossum
Copy link
Member

Here's hoping someone wants to take a stab!

@JukkaL
Copy link
Collaborator

JukkaL commented Dec 11, 2020

We hopefully have a full release soonish, but again there are a lot of issues to address with Dropbox internal repos (previously these have mostly been typeshed issues). Otherwise there are no blockers for a new release.

I haven't had a lot of time to dedicate to mypy in the past weeks but I'm trying to carve out more time for it before the end of the year.

@bsolomon1124
Copy link
Contributor

bsolomon1124 commented Jan 1, 2021

Mypy looks to be chugging along okay on 3.9 but (as expected, I understand this support has not been implemented yet) throws a bunch of error: "<xxx>" is not subscriptable. Related to #7239, is there a way to blanket-silence all [misc] error codes in mypy.ini? (Even better would be the ability to silence by a pattern, such as is not subscriptable.)

Edit: have resorted to

set -o pipefail && python3 -m mypy | grep --color=always -E -v '(tuple|dict|list|set)" is not subscriptable'

though this will return a false-positive exit code if the false-positive on type-hinting generics is the only discovered issue.

@cdce8p
Copy link
Collaborator

cdce8p commented Jan 2, 2021

@bsolomon1124 I don't know if that's of any help, but you could try installing the latest mypy commit with:

pip install -U git+git://github.com/python/mypy.git@master  # or replace `master` with commit hash

The is not subscriptable error was fixed with #9564, so this might be a temporary fix until the next version is released.

hauntsaninja pushed a commit to hauntsaninja/mypy that referenced this issue Jan 7, 2021
Since my checklist in python#9761 is
almost complete, it's time to check off this box as well.
@hauntsaninja
Copy link
Collaborator Author

hauntsaninja commented Jan 7, 2021

Just to follow up, if people want 3.9 wheels from latest master, they're now available at https://github.com/mypyc/mypy_mypyc-wheels/releases/latest

JukkaL pushed a commit that referenced this issue Jan 7, 2021
Since my checklist in #9761 is
almost complete, it's time to check off this box as well.

Co-authored-by: hauntsaninja <>
@gvanrossum
Copy link
Member

gvanrossum commented Jan 7, 2021 via email

@hauntsaninja
Copy link
Collaborator Author

Not easily right now. We'd need 3.10 support in https://github.com/pypa/manylinux and https://github.com/joerick/cibuildwheel. But once that happens, it should be a two-liner.

ilevkivskyi pushed a commit that referenced this issue Jan 19, 2021
Since my checklist in #9761 is
almost complete, it's time to check off this box as well.

Co-authored-by: hauntsaninja <>
@hauntsaninja
Copy link
Collaborator Author

mypy 0.800 has been released and includes all of^

@hauntsaninja hauntsaninja unpinned this issue Jan 22, 2021
@Hultner
Copy link

Hultner commented Jan 22, 2021

mypy 0.800 has been released and includes all of^

Woho! Looking forward to try it out!

@wbadart
Copy link

wbadart commented Jan 25, 2021

Hey all- cross-posting my comment from #9564 in case anyone else has had issues with PEP 585 in type aliases on 0.800: #9564 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants