Skip to content

gh-119180: PEP 649 compiler changes #119361

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 77 commits into from
Jun 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
985f8df
Add __annotate__ descriptors
JelleZijlstra May 20, 2024
c822ffa
fix refleaks
JelleZijlstra May 20, 2024
e80095e
blurb
JelleZijlstra May 20, 2024
90ff2c4
Fix some tests
JelleZijlstra May 20, 2024
026c0ff
regen globals
JelleZijlstra May 20, 2024
7968744
Some initial work
JelleZijlstra May 20, 2024
4e54197
Add bytecode for adding annotate
JelleZijlstra May 20, 2024
4469b32
compiler changes
JelleZijlstra May 20, 2024
47d672e
Functions work
JelleZijlstra May 21, 2024
ab9359c
Raise AssertionError on the wrong format
JelleZijlstra May 21, 2024
e65d55a
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra May 21, 2024
e50cd62
Modules and classes
JelleZijlstra May 21, 2024
afae5c0
attempts
JelleZijlstra May 21, 2024
e5a7b1a
Fixes
JelleZijlstra May 21, 2024
3f26d44
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra May 21, 2024
31a4471
Fix code object name
JelleZijlstra May 21, 2024
fbb1d88
Start fixing test_type_annotations
JelleZijlstra May 22, 2024
f452eb2
Fix class scoping
JelleZijlstra May 22, 2024
8c4b4e3
unyielding
JelleZijlstra May 22, 2024
cbf9a3d
Fix test_typing
JelleZijlstra May 22, 2024
5d182fc
Fix test_type_parmas
JelleZijlstra May 22, 2024
ce98c19
Add test, add to inspect
JelleZijlstra May 22, 2024
e0578fc
Use inspect constants
JelleZijlstra May 22, 2024
ed16167
test_grammar tweaks
JelleZijlstra May 22, 2024
f38de20
fix test_positional_only_arg
JelleZijlstra May 22, 2024
87baca2
Fix test_module
JelleZijlstra May 22, 2024
355d3df
Fix symtable tests
JelleZijlstra May 22, 2024
f9d81b6
fix test_pydoc
JelleZijlstra May 22, 2024
dd1f64a
fix test_traceback
JelleZijlstra May 22, 2024
62f5b3b
fix test_opcodes
JelleZijlstra May 22, 2024
b66ad8b
Merge branch 'main' into pep649-compile
JelleZijlstra May 22, 2024
1a63f5d
Raise NotImplementedError
JelleZijlstra May 22, 2024
82c0dbc
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra May 22, 2024
a0c39b5
blurb
JelleZijlstra May 22, 2024
083bbc5
Fix test_dis
JelleZijlstra May 22, 2024
de1b235
Remove broken tests
JelleZijlstra May 22, 2024
1c98fe5
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra May 24, 2024
5f5cf11
No deferred evaluation in interactive mode
JelleZijlstra May 24, 2024
77f3b1c
gh-119443: Turn off from __future__ import annotations in REPL
JelleZijlstra May 24, 2024
4217830
Fix refleak
JelleZijlstra May 24, 2024
13f5d76
Fix another refleak
JelleZijlstra May 24, 2024
a121e1a
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra May 24, 2024
242301c
Exit scope correctly on error
JelleZijlstra May 24, 2024
239ba23
fix test
JelleZijlstra May 24, 2024
b62e04c
Initialize field
JelleZijlstra May 25, 2024
c8a9294
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra May 25, 2024
5ae206d
self-review
JelleZijlstra May 25, 2024
24fd328
Fix crash found by CIFuzz
JelleZijlstra May 25, 2024
0f9d0c5
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra May 29, 2024
c181864
fix merge
JelleZijlstra May 29, 2024
0befff5
Name the function as __annotate__
JelleZijlstra May 29, 2024
ada6573
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra May 29, 2024
ae7714c
Replace find_ann()
JelleZijlstra May 29, 2024
431811a
fix test
JelleZijlstra May 29, 2024
7ca24d3
Remove second compiler pass
JelleZijlstra May 29, 2024
2ab5d07
Fix refleak
JelleZijlstra May 29, 2024
3b4a645
Fix a test
JelleZijlstra May 29, 2024
1dfd02b
Fix bug when there are only non-simple annotations
JelleZijlstra May 29, 2024
daba318
Fix more tests
JelleZijlstra May 29, 2024
0daf0b1
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra May 29, 2024
b066b3d
Remove REPL special case
JelleZijlstra May 29, 2024
7669361
no docstrings in the repl
JelleZijlstra May 29, 2024
c6a1b80
Fix pyrepl test
JelleZijlstra May 29, 2024
5cdbdd7
CR feedback
JelleZijlstra May 30, 2024
e748feb
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra May 31, 2024
a2b4f9e
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra Jun 1, 2024
bd469ab
Still generate __annotate__ if "from __future__ import annotations" i…
JelleZijlstra Jun 1, 2024
278de22
Regen globals
JelleZijlstra Jun 1, 2024
487ea34
Merge branch 'main' into pep649-compile
JelleZijlstra Jun 7, 2024
8f486ba
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra Jun 8, 2024
6b563db
Feedback from Bénédikt Tran
JelleZijlstra Jun 8, 2024
0058b82
add test
JelleZijlstra Jun 9, 2024
517fb56
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra Jun 9, 2024
21f93b6
Merge remote-tracking branch 'upstream/main' into pep649-compile
JelleZijlstra Jun 11, 2024
f72dbca
Undo changes to inspect that we do not want
JelleZijlstra Jun 11, 2024
8674eab
fix
JelleZijlstra Jun 11, 2024
ee11fd9
Fix more tests
JelleZijlstra Jun 11, 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
Prev Previous commit
Next Next commit
fix test_pydoc
  • Loading branch information
JelleZijlstra committed May 22, 2024
commit f9d81b676a366ce6bccbcaeadac6cd1c85c91d8c
11 changes: 8 additions & 3 deletions Lib/test/test_pydoc/test_pydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ class A(builtins.object)
| __weakref__%s

class B(builtins.object)
| Methods defined here:
|
| __annotate__ = <annotations of B>(...)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__%s
Expand All @@ -86,8 +91,6 @@ class B(builtins.object)
| Data and other attributes defined here:
|
| NO_MEANING = 'eggs'
|
| __annotations__ = {'NO_MEANING': <class 'str'>}

class C(builtins.object)
| Methods defined here:
Expand Down Expand Up @@ -175,6 +178,9 @@ class A(builtins.object)
list of weak references to the object

class B(builtins.object)
Methods defined here:
__annotate__ = (...)
----------------------------------------------------------------------
Data descriptors defined here:
__dict__
dictionary for instance variables
Expand All @@ -183,7 +189,6 @@ class B(builtins.object)
----------------------------------------------------------------------
Data and other attributes defined here:
NO_MEANING = 'eggs'
__annotations__ = {'NO_MEANING': <class 'str'>}


class C(builtins.object)
Expand Down