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

Support Python 3.10 #126

Open
7 of 8 tasks
laike9m opened this issue May 23, 2021 · 4 comments
Open
7 of 8 tasks

Support Python 3.10 #126

laike9m opened this issue May 23, 2021 · 4 comments

Comments

@laike9m
Copy link
Owner

laike9m commented May 23, 2021

Python 3.10 changelog

Bytecode changes can be found by viewing magic number change history
image

  • Make 'annotations' future by default bpo-38605
    Undo making 'annotations' future by default bpo-38605
  • New line number table format -- PEP 626 bpo-42246: Bump magic number. python/cpython#23245
  • Function annotation for MAKE_FUNCTION is changed from dict to tuple bpo-42202
    • This should not affect Cb. It only changes how annotation is stored (from map to tuple), which are are all consts.
  • ❓ RERAISE restores f_lasti if oparg != 0 bpo-42246
    • Not sure if this affects anything, for now assume no. Will come to it if we hit any issues.
  • PEP 634: Structural Pattern Matching bpo-42128
  • Use instruction offsets (as opposed to byte offsets)
  • Add GEN_START bytecode bpo-43683
  • Safer line number table handling bpo-42739

Other bytecode related changes:

@victorjzsun
Copy link
Collaborator

victorjzsun commented May 23, 2021

Note: Python3.10 uses co_lines instead of co_lnotab for source code line numbers
There might be changes to source code linenos for events

@laike9m
Copy link
Owner Author

laike9m commented May 24, 2021

Currently the code does not use co_lnotab directly.

@laike9m
Copy link
Owner Author

laike9m commented Sep 12, 2021

I tried running the test suite under Python 3.10 rc2. Many tests failed as expected. Will try to fix them.

@laike9m
Copy link
Owner Author

laike9m commented Oct 10, 2021

Right now blocked by ultrajson/ultrajson#482. We need ujson 4.2.0 to support 3.10, but ujson 4.2.0 needs installer 0.3.0 (released in a few days) to be successfully installed. So we can just wait.

To be more specific, we need a pre-built ujson wheel for Python 3.10, otherwise GitHub Actions will fail to build it.

This is fixed.

laike9m added a commit that referenced this issue Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants