-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
gh-135700: Fix instructions in __annotate__ have incorrect code positions #135814
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
Closed
Changes from 1 commit
Commits
Show all changes
212 commits
Select commit
Hold shift + click to select a range
983ae79
fix instructions in __annotate__ have incorrect code positions
AndPuQing dd3bea2
📜🤖 Added by blurb_it.
blurb-it[bot] c2f0a4d
Update Misc/NEWS.d/next/Core_and_Builtins/2025-06-22-10-47-27.gh-issu…
AndPuQing b79060e
add unit tests
AndPuQing 2201864
fix test
AndPuQing aed06b7
fix test
AndPuQing d85247e
Update Lib/test/test_dis.py
AndPuQing eca9248
Apply suggestions from code review
AndPuQing e14cb29
fix test
AndPuQing f216c82
gh-135239: simpler use of mutexes in cryptographic modules (#135267)
picnixz c620360
gh-135815: skip `netrc` security checks if `os.getuid` is missing (#1…
picnixz a84a62b
gh-135532: cleanup clinic `module` directives for cryptographic modul…
picnixz 5b12e0b
add async generators section to asyncio internal docs (#135674)
kumaraditya303 0cc0aee
gh-134986: Catch PermissionError when trying to call perf in tests (#…
emmatyping 07bb428
gh-89488: Add warning about `Py_BuildValue("p")` needing exact `int` …
encukou f249c82
gh-135823: improve error message in `netrc` security checks (#135827)
picnixz bf25413
Bump mypy to 1.16.1 (#135720)
sobolevn 7b36de1
GH-124878: reenable `test_finalize_daemon_thread_hang` test under TSA…
kumaraditya303 a126c1a
gh-134584: Specialize POP_TOP by reference and type in JIT (GH-135761)
Fidget-Spinner aed1ed0
gh-131798: Optimize `_UNARY_NEGATIVE` (GH-135223)
noamcohen97 88222eb
gh-119786: Add InternalDocs/qsbr.md. (gh-135411)
nascheme c87b55b
Docs: Use `arguments` to replace `args` in `argparse.rst` (GH-135510)
Yzi-Li 62d59e3
Fix example according to PEP 750 in "What's new in 3.14" (GH-134727)
vpoulailleau f4bf6ab
gh-135648: Document that `shutil.copyfileobj` doesn't flush (#135737)
freakboy3742 e856bb9
gh-135532: use `defining_class` for copying BLAKE-2 and SHA-3 objects…
picnixz e081415
gh-123299: Update 'What's New in Python 3.14' from `3.14` branch (#13…
hugovk 9831101
GH-135106: Restrict trashcan to GC'ed objects (GH-135682)
markshannon 576fe7a
gh-135494: Fix python -m test --pgo -x test_re (#135713)
vstinner 1043b3e
gh-135487: fix `reprlib.Repr.repr_int` when given very large integers…
picnixz 1bf0089
gh-135878: Fix crash in `types.SimpleNamespace.__repr__` (#135889)
sobolevn c2e0003
gh-135805: Document the X option and env var for controlling thread-l…
mpage d76582d
gh-135855: Raise TypeError When Passing Non-dict Object to `_interpre…
brianschubert f49487f
GH-90117: Check for list and tuple before MappingView in pprint (GH-1…
brandtbucher 772467a
gh-91555: Revert disabling of logger while handling log record. (GH-1…
vsajip 412082d
GH-133136: Revise QSBR to reduce excess memory held (gh-135473)
nascheme cd18690
gh-135755: Docs: C API: Document missing `PyFunction_GET*` macros (GH…
ZeroIntensity c5c3851
gh-135839: Fix `module_traverse` and `module_clear` in `_interpchanne…
sobolevn 37b7efc
gh-135755: Move SPECIAL_ constants to a private header (GH-135922)
encukou cc611f8
gh-131591: Make --without-remote-debug work (GH-135925)
encukou abb6398
gh-135839: Fix `module_traverse` and `module_clear` in subinterp modu…
sobolevn 2d75283
Docs: Add cross-reference for `positional_item` in the `calls` produc…
HarryLHW d8d537a
gh-135927: Fix MSVC Clatest C builds (GH-135935)
Fidget-Spinner b7de590
Fix needless spinning in `_PyMutex_LockTimed` with zero timeout (gh-1…
jtibbertsma e613aee
Docs: Fix indentation in `slice` class of `functions.rst` (GH-134393)
reynoldsnlp 4f577c6
gh-125142: remove duplicated import in `Lib/pydoc.py` (gh-135215)
StanFromIreland 38ecbf9
Add whatsnew text for warnings module changes. (gh-135869)
nascheme cb689a3
gh-135956: Remove duplicate word in _pydatetime docstring (#135957)
terryjreedy 6bdea9a
gh-131591: Add Py_ prefix to MAX_SCRIPT_PATH_SIZE; remove unprefixed …
encukou 55e0336
gh-135755: Move `PyFunction_GET_BUILTINS` to the private API (GH-135938)
ZeroIntensity 5f3f5f9
gh-125206: Make _Py_FFI_SUPPORT_C_COMPLEX private (GH-135932)
encukou 8f8e6df
gh-135755: Use private names (_Py*) for header file guards new in 3.1…
encukou 807d99d
gh-135965: Delete duplicate word in isolating-extensions howto (#135964)
LamentXU123 11ce5c4
gh-129958: New syntax error in format spec applies to both f-strings …
dylwil3 9987678
gh-135110: Fix misleading `generator.close()` documentation (GH-135152)
cdenihan 48e72c0
gh-91555: add warning to docs about possibility of deadlock/infinite …
duaneg 36de3ef
gh-135927: Check _MSC_VER to define _Py_NULL macro (#135987)
vstinner e51e785
IDLE: Update NEWS2x.txt with 2.7.0 release date (#129908)
StanFromIreland d6f50a2
gh-135995: Fix missing char in palmos encoding (#135990)
nkorth 6d0ec7e
Docs: Fix duplicate word typos (GH-135958)
brianschubert ce39ffc
gh-135966: Modify iOS testbed to make app_packages a site directory (…
freakboy3742 b87d40c
gh-135551: Change how sorting picks minimum run length (#135553)
tim-one 1dc7ed8
gh-135968: Add iOS binary stubs for strip (#135970)
freakboy3742 91edb74
gh-53203: Fix strptime() for %c, %x and %X formats on some locales (#…
serhiy-storchaka eba2d4c
gh-136017: avoid decref in rich compare for bool objects (#136018)
eendebakpt 551f927
gh-128051: Fix tests if sys.float_repr_style is 'legacy' (#135908)
skirpichev 5ee1779
gh-78465: Fix error message for cls.__new__(cls, ...) where cls is no…
serhiy-storchaka a6a656f
gh-132732: Automatically constant evaluate pure operations (GH-132733)
Fidget-Spinner 9f48f74
gh-92266: Replace tabs with four spaces in Python files (#135983)
hugovk 9a3af56
gh-136028: Fix parsing month names containing "İ" (U+0130) in strptim…
serhiy-storchaka 22f7aed
gh-135571: Guard `_hashlib` usage in `test_hashlib.py` (#135572)
WillChilds-Klein 9597a3c
gh-135755: rename undocumented `HACL_CAN_COMPILE_SIMD{128,256}` macro…
picnixz dd67d75
gh-108765: fix comment about macro definitions in `_stat.c` post GH-1…
moreal d048a8c
GH-135904: Optimize the JIT's assembly control flow (GH-135905)
brandtbucher ce55d2c
gh-132732: JIT: Only allow compact ints in pure evaluation (GH-136040)
Fidget-Spinner d06bbe0
Fix a typo in Lib/unittest/mock.py (#136067)
LamentXU123 f8c108c
gh-132732: Fix up pure types in JIT (GH-136050)
Fidget-Spinner 820d7fc
gh-135853: add `math.signbit` (#135877)
picnixz b61ef62
gh-76595: Add note on `PyCapsule_Import` behavior (GH-134022)
NicolasT a2e39c2
gh-91048: Fix external inspection multi-threaded performance (#136005)
pablogsal a353c49
Doc: Fix duplicate words in idlelib (#136089)
LamentXU123 3e3caf2
gh-136053: Check error for TYPE_SLICE in marshal.c (GH-136054)
akshat62 dfdae6e
gh-136066: simplify `platform._platform()` (#136069)
picnixz c74b91b
gh-127604: Docs: Include a C stack in the `faulthandler` example (GH-…
ZeroIntensity f521cf1
gh-123299: Provide replacement for removed sqlite3 attributes in What…
fry69 c7b259d
Doc: fix duplicated words (#136086)
LamentXU123 d7c418b
gh-130160: use `.. program::` directive for documenting `venv` CLI (G…
Mr-Sunglasses b2d04ae
gh-136087: Remove `\r` from documented `os.linesep` values (#136088)
sobolevn 1dde428
gh-132813: Fix the csv documentation for quoting and escaping (#133209)
serhiy-storchaka 1f39dc4
gh-123471: Make itertools.chain thread-safe (#135689)
eendebakpt 19227f3
gh-135607: remove null checking of weakref list in dealloc of extensi…
xuantengh 9bfe4b5
gh-123471: Make itertools.product and itertools.combinations thread-s…
eendebakpt e8d7647
gh-131885: Update documented signatures for `csv.{writer,reader}` (GH…
adamtheturtle 5507f19
gh-48181: Document `codecs.charmap_build` (#135997)
StanFromIreland 702a874
gh-85702: Catch PermissionError in zoneinfo.load_tzdata() (#136117)
vstinner 08702b9
gh-136122: Fix video link for math.tau documentation (#136129)
sedram 1dc67db
gh-63207: Update `time.time` doc
10000
umentation after #116822 (#136068)
StanFromIreland 764ecdc
gh-134939: Fill Out the concurrent.interpreters Docs (gh-135902)
ericsnowcurrently 88c9480
gh-135422: Fix regression in `SyntaxError` messages after #134036 (#1…
sobolevn 3e5e8c9
gh-133982: Use implementation-specific `open` in `test_fileio.OtherFi…
cmaloney c73da53
gh-133157: remove usage of `_Py_NO_SANITIZE_UNDEFINED` in `pyexpat` (…
encukou 4878d87
gh-87135: threading.Lock: Raise rather than hang on Python finalizati…
encukou 892677f
gh-133447: Update `sqlite3` What's New 3.15 entry (GH-136079)
StanFromIreland 2ab5c67
gh-135836: Fix `IndexError` in `asyncio.create_connection` with empty…
heliang666s ba6bfaf
gh-130396: Move PYOS_LOG2_STACK_MARGIN to internal headers (#135928)
vstinner 3e29804
gh-136169: Update parameter name in fractions.from_float method (#136…
lazorikv 995f5ec
gh-87298: Add tests for find_in_strong_cache() bug in _zoneinfo (GH-2…
ZackerySpytz 558779f
gh-105456: Remove 3 deprecated `sre_*` modules (#135994)
StanFromIreland 5038d9a
gh-115119: Remove implicit fallback to the bundled libmpdec (#134078)
skirpichev 4034b20
gh-136125: Use `_PyObject_GetMethodStackRef` for `LOAD_ATTR` (GH-136…
Fidget-Spinner 32da324
gh-134280: Disable constant folding for ~ with a boolean argument (GH…
serhiy-storchaka 7dcf3ae
gh-134009: Expose `PyMutex_IsLocked` in the public C API (gh-134365)
colesbury 811b391
gh-136183: Deal with escapes in JIT optimizer's constant evaluator (G…
Fidget-Spinner d9021b2
gh-115119: Defer removal of bundled libmpdec to 3.16 (#133997)
skirpichev 7dec2ba
gh-134567: Add the formatter parameter in unittest.TestCase.assertLog…
garry-cairns 7dba304
gh-136193: Improve `TypeError` msg when comparing two `SimpleNamespac…
sobolevn 804ee99
gh-127705: Move Py_INCREF_MORTAL() to the internal C API (GH-136178)
vstinner 4eecde7
gh-136203: Improve `TypeError` msg when comparing two `MappingProxyTy…
sobolevn aac9be8
Replace `capi-sig` mailing list with `discuss.python.org` (#136211)
sobolevn 25a84a0
gh-136135: Doc: Fix some broken links (GH-136137)
LamentXU123 7ef2df6
gh-135836: Fix `IndexError` in `asyncio.create_connection()` (#135875)
serhiy-storchaka de025c0
gh-135640: Adds more type checking to ElementTree (GH-135643)
abstractedfox 8685f8d
Fix comments for `heapq.siftup_max` (#135359)
yoney 95d062f
gh-135069: Fix exception message in encodings.idna module (#135071)
danielhollas 531ed83
gh-133740: Fix regression in locale.nl_langinfo(ALT_DIGITS) (GH-136237)
serhiy-storchaka 26b57a7
gh-130664: Treat '0' fill character with align '=' as zero-padding fo…
skirpichev e977f81
`Python/gc.c`: Refer to `InternalDocs` instead of devguide. (#136243)
Eclips4 993d5dc
gh-115119: Recommend upstream libmpdec in build requirements (#136205)
skirpichev 4a7b37f
gh-135075: Make PyObject_SetAttr() fail with NULL value and exception…
vstinner b3e1b1f
gh-135252: Document Zstandard integration across zipfile, shutil, and…
emmatyping f0bc9e8
gh-135661: Fix parsing start and end tags in HTMLParser according to …
serhiy-storchaka 8c9b563
Clarify some details regarding `sys.monitoring` (#133981)
brettcannon 4a7eca3
gh-133982: Test _pyio.BytesIO in free-threaded tests (gh-136218)
cmaloney 55a5b18
gh-115999: remove redundant check in free-threading from `_STORE_ATTR…
kumaraditya303 612979d
gh-129824: fix data races in subinterpreters under TSAN (#135794)
kumaraditya303 b532bf7
gh-102555: Fix comment parsing in HTMLParser according to the HTML5 s…
serhiy-storchaka 7f1e57e
gh-135773: have pyvenv.cfg without home key anchor a venv and deduce …
rickeylev 4d4bec5
Docs: Move "or" outside monospace syntax in `tarfile.rst` (GH-136263)
rffontenelle 94d304f
gh-136288: Fix error message in `_testcapi/vectorcall.c` (GH-136258)
wsfulton d998fd4
gh-136297: Test all `pickle` protocols in `test_zoneinfo_property.py`…
sobolevn f54a660
gh-101100: Fix references in `http.cookiejar` docs (GH-136238)
LamentXU123 90c565f
gh-130870: Preserve `GenericAlias` subclasses in `typing.get_type_hin…
Viicos 1cd93eb
gh-136047: Allow typing._allow_reckless_class_checks to check `_py_ab…
youknowone 7da498b
gh-136315: Fix skipped multithreading test in test_zstd (#136320)
emmatyping 516d1ee
gh-136032: Fix `argparse.BooleanOptionalAction` doc (#136133)
mattwang44 47ce0d8
gh-136285: Improve `pickle` protocol testing in `test_interpreters` (…
sobolevn 3243ba1
gh-109700: fix memory error handling in `PyDict_SetDefault` (#136338)
kumaraditya303 d89e6f6
gh-109070: Document that get_context in multiprocessing have side eff…
aisk b1f5f61
gh-136021: Make `type_params` a required parameter for `typing._eval_…
sobolevn 68e3eac
gh-136316: Make typing.evaluate_forward_ref better at evaluating nest…
JelleZijlstra 9a21a39
gh-136289: Fix test_sqlite3 on platforms with strict UTF-8 filesystem…
serhiy-storchaka 25ca248
gh-109700: fix interpreter finalization while handling memory error (…
kumaraditya303 7736567
gh-87790: support thousands separators for formatting fractional part…
skirpichev d2730af
gh-87790: support thousands separators for formatting fractional part…
skirpichev a058841
gh-94503: Update logging cookbook with an example of uniformly handli…
vsajip cc60c3f
gh-127502: Remove XML vulnerability table (GH-135294)
vstinner 94ed50e
gh-135755: Document __future__.* and CO_* as proper Sphinx objects (G…
encukou edc395a
gh-101100: Fix sphinx warnings in `whatsnew/3.9` (#136163)
sobolevn 6d8ec54
gh-131591: Document Py_REMOTE_DEBUG (GH-135929)
encukou 4905390
gh-86682: Add versionadded for sys._getframemodulename (#136325)
asottile 5c1b4be
gh-135913: Document ob_refcnt, ob_type, ob_size (GH-135914)
encukou 984837d
gh-124486: Fix test_whichdb_ndbm in test_dbm on NetBSD (GH-136335)
serhiy-storchaka 93b9ae0
gh-136155: Docs: only add custom OpenGraph protocol meta tags for HTM…
m-aciek 8f7d86d
gh-120713: Make _Py_NORMALIZE_CENTURY private (GH-135933)
encukou e1ea753
gh-101100: Fix Sphinx warnings in library/email.compat32-message.rst …
LamentXU123 4e04ff5
gh-135906: Use `_PyObject_CAST` in internal headers (GH-135892)
clin1234 50baced
gh-98388: add tests for happy eyeballs (#136368)
kumaraditya303 af9f0cd
gh-102567: Add missing newline to `--help-all` (GH-136391)
hugovk 569d5cd
gh-101100: Fix sphinx warnings in `whatsnew/3.11.rst` (#136402)
LamentXU123 a1b5eec
gh-134043: use `_PyObject_GetMethodStackRef` in pattern matching (#13…
kumaraditya303 b96cb1d
gh-117657: enable `test_capi` under TSAN (#136269)
kumaraditya303 1b348c2
gh-136297: Fix `hypothesis` and `subTest` usage in `test_zoneinfo_pro…
sobolevn 7999793
gh-101100: Fix sphinx warnings in `Doc/library/exceptions.rst` (#136309)
koyuki7w c2a485f
gh-136186: Fix race condition in test_external_inspection.test_only_a…
pablogsal 272d235
gh-136380: Fix import behavior for `concurrent.futures.InterpreterPoo…
aisk ee3feab
gh-136156: Allow using linkat() with TemporaryFile (#136281)
vstinner e29e7c7
Update bytecode magic number in tests for the 3.14 release candidate …
hugovk 403847c
GH-91636: Clear weakrefs created by finalizers. (GH-136401)
nascheme 47d9ed6
gh-136162: Document `encodings` package functions (#136164)
StanFromIreland bd3210d
gh-92536: Fix comment about number of unicode string types (#136439)
senyai f8f0602
gh-91048: Revert the memory cache removal for remote debugging (#136440)
pablogsal 780041b
gh-136229: Remove Platform Emscripten is not supported warning (#136230)
hoodmane d4199c7
gh-119109: improve `functools.partial` vectorcall with keywords (#124…
dg-pb 35c3c2d
gh-94503: Update logging cookbook example with info on addressing log…
vsajip fc448ff
gh-53243: Document `codecs.readbuffer_encode()` (#136284)
StanFromIreland 43275ad
gh-134657: Remove newly added private names from asyncio.__all__ (#13…
JelleZijlstra 795dd84
gh-136447: Use `self.loop` instead of global `loop` variable in async…
injust fb49280
Docs: unittest.enterModuleContext is not a classmethod (#136464)
geofft 978b416
gh-131825: Fix `sqlite3` timezone-naive adapter recipe (GH-136270)
NekrodNIK 6be101d
gh-81520: Document unexpected `os.path.ismount` behaviour with btrfs …
bionade24 a317ea0
Minor edit: Move comments closer to the code they describe (gh-136477)
rhettinger 21b1d77
GH-115802: Optimize JIT stencils for size (GH-136393)
brandtbucher 4e75f78
Add Diego Russo as code owner of the JIT (#136460)
diegorusso 84ac4ca
gh-136145: Define 'standard library' and 'stdlib' in the glossary (GH…
zware 18eb5ff
gh-136156: Skip test_tempfile.test_link_tmpfile() on Android (#136430)
vstinner 391d651
gh-102740: Clarify time.monotonic() "system-wide" in the doc (#136431)
vstinner 892634d
gh-136476: Show the full stack in get_async_stack_trace in _remote_de…
pablogsal 53fbe1b
gh-135846: Add zstd dependency to Android build script (#136253)
emmatyping fecd270
gh-136476: Remove creation of unused list (GH-136494)
encukou 74291d2
gh-136438: Make sure `test_builtins` pass with all optimization level…
sobolevn 559b6a2
gh-136209: Add .. c:var:: declarations for C exception types (GH-136210)
encukou 77512cd
gh-82088: Improve performance of PyLong_As*() for multi-digit ints (#…
eendebakpt b0793d2
gh-136394: Fix race condition in test_zstd (GH-136432)
Rogdham 0f2138d
gh-132661: Add default value (of `""`) for `Interpolation.expression`…
davepeck d684224
gh-82663: Clarify `codecs.iterdecode/encode` docs (#136497)
StanFromIreland 27b12f0
gh-52876: Implement missing parameter in `codecs.StreamReaderWriter` …
StanFromIreland d58d9ae
gh-135953: Implement sampling tool under profile.sample (#135998)
lkollar 4af89d2
gh-136517: Print uncollectable objects if DEBUG_UNCOLLECTABLE mode wa…
sergey-miryanov 40da9d3
Omit `Python/perf_jit_trampoline.c` from the `**/*jit*` CODEOWNERS ru…
brandtbucher 87fdc0c
gh-107538: [Enum] fix handling of inverted/negative values (GH-132273)
ethanfurman 52ff16e
gh-101100: Fix sphinx warnings in `library/email.parser.rst` (#136475)
LamentXU123 960a247
gh-76637: Note that `undefined` Codec is for testing (#136531)
StanFromIreland 3dbba40
add test_pdb case
AndPuQing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Apply suggestions from code review
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
- Loading branch information
commit eca9248cf58b7073321a87567c39f673331f2502
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1125,7 +1125,7 @@ def test_bug_46724(self): | |
self.do_disassembly_test(bug46724, dis_bug46724) | ||
|
||
def test_annotate_source_locations(self): | ||
# Test that __annotate__ code doesn't inherit first AST node positions | ||
# See gh-135700 | ||
issue_135700 = "1\nx: int" | ||
issue_135700_class = "class A:\n 1\n x: int" | ||
|
||
|
@@ -1142,7 +1142,6 @@ def test_annotate_source_locations(self): | |
for case_name, annotate_code in test_cases: | ||
with self.subTest(case=case_name): | ||
instructions = list(dis.Bytecode(annotate_code)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use |
||
print(instructions) | ||
resume_pos = next( | ||
( | ||
inst.positions | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert here that
annotate_code
is a code object and thatannotate_code.co_name
is'__annotate__'
.