Skip to content

Supporting Python 3.9 #3954

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

Closed
3 tasks
hauntsaninja opened this issue Apr 29, 2020 · 4 comments
Closed
3 tasks

Supporting Python 3.9 #3954

hauntsaninja opened this issue Apr 29, 2020 · 4 comments

Comments

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Apr 29, 2020

It looks like we're still a couple weeks away from beta, so maybe this is a little early, but thought I'd make a list of things we could do and we can start chipping away at it:

  • Update typeshed for changes in py39.
  • Update typeshed for additions in py39.
    We can use https://gist.github.com/hauntsaninja/6870c77b502c0d19e33c831adac976ac as a starting point. Note if you're looking to regenerate this you'll need to use stubtest from mypy master.
    Note that this might not be a complete list of changes. Two relatively major things stubtest won't catch are a) changes to argument types if their names haven't changed and they don't have default values that relate to the change, b) changes to return types.
    Grepping for 3.9 in cpython/Doc is also relatively efficient for documented changes.
  • Update typeshed CI
    We should add a stubtest test for py39. As per How much do we care about positional-only args? #3693 we should switch checking positional-only args in py38 to checking them in py39. Make whitelist changes as necessary.
    At some point, probably only after release, we can bump the default Python version we use for the rest of CI.
@srittau
Copy link
Collaborator

srittau commented Apr 30, 2020

Sounds good. One problem is that Travis CI often lags a bit behind on new Python versions.

I think we can already include Python 3.9 changes if someone submits them (and I think we already have a few), but for a concentrated effort I would wait for beta 1. Otherwise it's easy to miss something or change something that is later changed again.

If we enable 3.9 in CI, we should make the 3.9 checks not fail CI, until the beta is released and available in CI. Otherwise we risk having builds fail for changes not related to the PR. That said, I'm +1 for enabling 3.9 in CI in a non-required way rather sooner than later.

@CraftSpider
Copy link
Contributor

With the new windows Travis builds:

  • Add win32-py39 whitelist / fix windows inconsistencies
  • Setup windows build with 3.9 version

@hauntsaninja
Copy link
Collaborator Author

Python 3.9 got kicked in and out of CI a little bit. #4494 contains what we'd need to add Python 3.9 stubtest to Github Actions (including for Windows). However, in the meantime, a couple more errors have cropped up.
We should also do another pass of the already whitelisted errors (https://github.com/python/typeshed/blob/master/tests/stubtest_whitelists/py39.txt) — there's a dearth of comments, so can only assume a number of them are fixable :-)

Note, because we only check positional-only args on the latest Python version (#3693), a number of the Python 3.9 only complaints are just about positional-only args.

@hauntsaninja
Copy link
Collaborator Author

I think overall the state here is good enough that we can close this issue.
With the caveat that we've relied pretty heavily on stubtest, so the limitations of stubtest mentioned in the initial post still apply. (For Python 3.8, I grepped the documentation, and while overall recall was lower it's still a pretty effective strategy, if someone has extra time)
As before, you can see extant errors at https://github.com/python/typeshed/blob/master/tests/stubtest_whitelists/py39.txt
That of course does not capture missing additions, for that refer to the below:

_ast.Tuple.dims is not present in stub
ast.Tuple.dims is not present in stub
asyncio.PidfdChildWatcher is not present in stub
asyncio.unix_events.PidfdChildWatcher is not present in stub
hmac.HMAC.digest_cons is not present in stub
hmac.HMAC.inner is not present in stub
hmac.HMAC.outer is not present in stub
imaplib.IMAP4.unselect is not present in stub
importlib.metadata.EntryPoint.attr is not present in stub
importlib.metadata.EntryPoint.module is not present in stub
importlib.resources.as_file is not present in stub
importlib.resources.files is not present in stub
ipaddress.IPv6Address.scope_id is not present in stub
logging.handlers.HTTPHandler.getConnection is not present in stub
multiprocessing.queues.SimpleQueue.close is not present in stub
os.CLD_KILLED is not present in stub
os.CLD_STOPPED is not present in stub
os.waitstatus_to_exitcode is not present in stub
pstats.FunctionProfile is not present in stub
pstats.Stats.get_stats_profile is not present in stub
pstats.StatsProfile is not present in stub
tkinter.EventType.Button is not present in stub
tkinter.EventType.Key is not present in stub
tkinter.Grid.bbox is not present in stub
tkinter.Grid.columnconfigure is not present in stub
tkinter.Grid.config is not present in stub
tkinter.Grid.configure is not present in stub
tkinter.Grid.forget is not present in stub
tkinter.Grid.grid_bbox is not present in stub
tkinter.Grid.grid_columnconfigure is not present in stub
tkinter.Grid.grid_location is not present in stub
tkinter.Grid.grid_propagate is not present in stub
tkinter.Grid.grid_rowconfigure is not present in stub
tkinter.Grid.grid_size is not present in stub
tkinter.Grid.grid_slaves is not present in stub
tkinter.Grid.info is not present in stub
tkinter.Grid.propagate is not present in stub
tkinter.Grid.rowconfigure is not present in stub
tkinter.Grid.slaves is not present in stub
tkinter.Misc.bbox is not present in stub
tkinter.Misc.cget is not present in stub
tkinter.Misc.config is not present in stub
tkinter.Misc.configure is not present in stub
tkinter.Pack.config is not present in stub
tkinter.Pack.configure is not present in stub
tkinter.Pack.info is not present in stub
tkinter.Pack.pack_propagate is not present in stub
tkinter.Pack.pack_slaves is not present in stub
tkinter.Pack.slaves is not present in stub
tkinter.Place.config is not present in stub
tkinter.Place.configure is not present in stub
tkinter.Place.forget is not present in stub
tkinter.Place.place_slaves is not present in stub
tkinter.Place.slaves is not present in stub
tkinter.font.Font.counter is not present in stub
turtle.RawTurtle.screens is not present in stub
turtle.ScrolledCanvas is not present in stub
turtle.TNavigator.speed is not present in stub
turtle.bye is not present in stub
turtle.exitonclick is not present in stub
turtle.setup is not present in stub
turtle.title is not present in stub
types.GenericAlias.__call__ is not present in stub
urllib.response.addinfourl.status is not present in stub
xml.etree.ElementTree.indent is not present in stub

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

No branches or pull requests

3 participants