Skip to content

Rework PEP489: multi-phase module initialization, heap based types #301

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
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f365aff
refactor: one static decl per line
tseaver May 23, 2024
c2f31b1
feat: add struct for module state
tseaver May 23, 2024
14a68b1
feat: wire module state into module def
tseaver May 23, 2024
7d003c1
refactor: return state pointer from 'zic_state_init'
tseaver May 23, 2024
61c3abb
refactor: outline multi-phase initialization
tseaver May 23, 2024
de30f27
fix: store types in module state as PyTypeObject
tseaver May 23, 2024
f2e6838
feat: add module-state version of 'import_declarations'
tseaver May 23, 2024
7b092d9
chore: reformat to Mozilla style w/ indent == 4
tseaver May 23, 2024
fc38083
refactor: use 'PyObject_GetAttrString'
tseaver May 23, 2024
4f5814d
refactor: move docstring decls to just before their functions
tseaver May 23, 2024
6fc0d08
chore: restore compat w/ Python < 3.10
tseaver May 23, 2024
6e1387e
refactor: convert PyType decls to use named members
tseaver May 23, 2024
2c4d70c
refactor: use 'PyDict_GetItemString'
tseaver May 23, 2024
011a705
chore: note reason for avoiding 'PyDict_GetString'
tseaver May 23, 2024
5638a90
refactor: always pass the module to the module-scope functions
tseaver May 23, 2024
f7b2889
refactor: move module-scope functions to end
tseaver May 23, 2024
2b331f9
fix: use API to get initialized module from spec
tseaver May 23, 2024
8b55439
refactor: remove statics loaded from 'z.i.declarations'
tseaver May 23, 2024
02f56e0
chore: cleanups
tseaver May 23, 2024
c573b27
refactor: remove global static 'adapter_hooks'
tseaver May 23, 2024
80ed5e1
refactor: reorder statics above forwards
tseaver May 23, 2024
baf7991
refactor: disuse static 'SpecificationBaseType'
tseaver May 23, 2024
1c5e0ea
refactor: move util funcs out of module init space
tseaver May 23, 2024
e3f947b
refactor: multi-phase module init + heap types
tseaver May 23, 2024
0e315d8
chore: work around 'InterfaceBase.__module__' returning descriptor
tseaver May 23, 2024
4b3e9db
refactor: use 'Py_TPFLAGS_MANAGED_WEAKREF' everywhere
tseaver May 23, 2024
5de904c
refactor: macros for type flags
tseaver May 23, 2024
c642bb0
refactor: use better name for the C base classes
tseaver May 23, 2024
8d9086c
refactor: restore use of static types for Python < 3.11
tseaver May 25, 2024
a03b255
Merge branch 'master' into tseaver-rework_pep_489
tseaver May 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Loading