8000 bpo-42202: Store func annotations as single tuple at bytecode level by uriyyo · Pull Request #23316 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-42202: Store func annotations as single tuple at bytecode level #23316

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

Merged
merged 33 commits into from
Nov 25, 2020
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b4937e9
Add co_annotations field to codeobject
uriyyo Nov 16, 2020
7ff803e
Update Objects/codeobject.c
uriyyo Nov 16, 2020
b3bca0e
Update Objects/codeobject.c
uriyyo Nov 16, 2020
ec0e565
Update Objects/funcobject.c
uriyyo Nov 16, 2020
6abc7e7
Update Python/compile.c
uriyyo Nov 16, 2020
4c09965
Add PyCode_NewWithAnnotations function in order to create CodeObject …
uriyyo Nov 16, 2020
5e03c3e
Use co_annotations for module and class annotations
uriyyo Nov 16, 2020
1fc24f4
Change format of co_annotations to single tuple of string
uriyyo Nov 17, 2020
da237df
Regenerate importlib
uriyyo Nov 17, 2020
201a816
Simplify compiler_add_annotation function
uriyyo Nov 17, 2020
9f7a4eb
Merge remote-tracking branch 'upstream/master' into fix-issue-42202
uriyyo Nov 18, 2020
6742c42
Remove co_annotations. Store func annotations as single tuple at byte…
uriyyo Nov 18, 2020
a71ad66
Update Python/compile.c
uriyyo Nov 18, 2020
3ebf232
Update Objects/funcobject.c
uriyyo Nov 18, 2020
fde6f39
Update Objects/funcobject.c
uriyyo Nov 18, 2020
bb21767
Update Objects/funcobject.c
uriyyo Nov 18, 2020
be73760
Update Objects/funcobject.c
uriyyo Nov 18, 2020
b273dc8
Change local variable name from annotations to anns
uriyyo Nov 18, 2020
b54f9ff
Use correct variable name
uriyyo Nov 18, 2020
34b1c4f
Update Objects/funcobject.c
< 8000 span class="description"> methane Nov 18, 2020
fa67386
Replace PyTuple_Size with PyTuple_GET_SIZE
uriyyo Nov 19, 2020
9e61756
Fix bug with partially inited annotations dict
uriyyo Nov 20, 2020
0a3ddda
Update docs and bytecode MAGIC_NUMBER
uriyyo Nov 23, 2020
52bda16
Merge branch 'master' into fix-issue-42202
uriyyo Nov 23, 2020
97f51f4
Regenerate importlib
uriyyo Nov 23, 2020
f39234a
Update Doc/library/dis.rst
methane Nov 24, 2020
cd12313
Simplify annotations tuple creation
uriyyo Nov 24, 2020
c12fc1c
Remove unnecessary goto, cleanup code
uriyyo Nov 24, 2020
b233f2c
Update Doc/whatsnew/3.10.rst
uriyyo Nov 24, 2020
85b354b
Remove trailing whitespaces
uriyyo Nov 24, 2020
5409fad
Add Inada to list of contributors
uriyyo Nov 25, 2020
1bc9561
Update _bootstrap_external.py
methane Nov 25, 2020
957ce6d
Regenerate importlib
uriyyo Nov 25, 2020
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
Prev Previous commit
Next Next commit
Update Objects/codeobject.c
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
  • Loading branch information
uriyyo and serhiy-storchaka committed Nov 17, 2020
commit b3bca0ef5a7ad5dbca0334912e50abaad53ac681
2 changes: 1 addition & 1 deletion Objects/codeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ code_new_impl(PyTypeObject *type, int argcount, int posonlyargcount,
if (annotations && annotations != Py_None && !PyTuple_Check(annotations)) {
PyErr_SetString(
PyExc_ValueError,
"code: annotations must not be tuple or None");
"code: annotations must be tuple or None");
goto cleanup;
}

Expand Down
0