Irit Katriel
97b69db167
gh-93691: fix too broad source locations of for statement iterators ( #120330 )
2024-06-12 12:53:19 +01:00
Bénédikt Tran
755dab719d
gh-120029: make `symtable.Symbol.__repr__` correctly reflect the compiler's flags, add methods ( #120099 )
...
Expose :class:`symtable.Symbol` methods :meth:`~symtable.Symbol.is_free_class`,
:meth:`~symtable.Symbol.is_comp_iter` and :meth:`~symtable.Symbol.is_comp_cell`.
---------
Co-authored-by: Carl Meyer <carl@oddbird.net>
2024-06-12 05:14:50 -06:00
Nikita Sobolev
f5a9c34f38
gh-120056: Add `IP_RECVERR`, `IP_RECVORIGDSTADDR`, `IP_RECVTTL` to `socket` module ( #120058 )
...
* gh-120056: Add `IP_RECVERR` and `IP_RECVTTL` to `socket` module
* Fix news
* Address review
* Update NEWS
2024-06-11 21:00:56 -04:00
Pablo Galindo Salgado
34e4d3287e
gh-120221: Deliver real singals on Ctrl-C and Ctrl-Z in the new REPL ( #120354 )
2024-06-11 20:20:25 +01:00
Ken Jin
203565b2f9
gh-120198: Fix race condition when editing __class__ with an audit hook active (GH-120195)
2024-06-11 20:10:23 +01:00
Kirill Podoprigora
939c201e00
gh-120326: Include <intrin.h> on Windows with Free Threading ( #120329 )
2024-06-11 19:50:21 +02:00
Eugene Triguba
86a8a1c57a
gh-118908: Limit exposed globals from internal imports and definitions on new REPL startup ( #119547 )
2024-06-11 17:40:31 +00:00
Lysandros Nikolaou
1b62bcee94
gh-120343: Do not reset byte_col_offset_diff after multiline tokens ( #120352 )
...
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-06-11 17:00:53 +00:00
Pablo Galindo Salgado
ec3af291fe
gh-120346: Respect PYTHON_BASIC_REPL when running in interactive inspect mode ( #120349 )
2024-06-11 16:15:01 +00:00
Jelle Zijlstra
9b8611eeea
gh-119180: PEP 649 compiler changes ( #119361 )
2024-06-11 13:06:49 +00:00
Michał Górny
7d2447137e
gh-120291: Fix a bashism in python-config.sh.in ( #120292 )
...
gh-120291: Fix bashisms in python-config.sh.in
Replace the use of bash-specific `[[ ... ]]` with POSIX-compliant
`[ ... ]` to make the `python-config` shell script work with non-bash
shells again. While at it, use `local` in a safer way, since it is
not in POSIX either (though universally supported).
Fixes #120291
2024-06-11 10:11:13 +03:00
Nikita Sobolev
141babad9b
gh-120298: Fix use-after-free in `list_richcompare_impl` ( #120303 )
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-11 10:04:27 +03:00
blhsing
9e9ee50421
gh-65454: avoid triggering call to a PropertyMock in NonCallableMock.__setattr__ ( #120019 )
2024-06-11 05:42:49 +00:00
Robert Collins
422c4fc855
gh-119600: mock: do not access attributes of original when new_callable is set ( #119601 )
...
In order to patch flask.g e.g. as in #84982 , that
proxies getattr must not be invoked. For that,
mock must not try to read from the original
object. In some cases that is unavoidable, e.g.
when doing autospec. However, patch("flask.g",
new_callable=MagicMock) should be entirely safe.
2024-06-11 06:41:12 +01:00
Victor Stinner
7aff2de62b
gh-120057: Add os.environ.refresh() method ( #120059 )
2024-06-10 16:34:17 +00:00
Pieter Eendebak
c3b6dbff2c
gh-115801: Only allow sequence of strings as input for difflib.unified_diff (GH-118333)
2024-06-10 14:06:18 +03:00
E. M. Bray
4829522b8d
bpo-24766: doc= argument to subclasses of property not handled correctly (GH-2487)
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-10 08:55:49 +00:00
Carl Meyer
0ae8579b85
gh-119666: fix multiple class-scope comprehensions referencing __class__ ( #120295 )
2024-06-09 22:23:30 -04:00
Kirill Podoprigora
34f5ae69fe
gh-120268: Prohibit passing ``None`` to ``_pydatetime.date.fromtimestamp`` ( #120269 )
...
This makes the pure Python implementation consistent with the C implementation.
2024-06-08 16:45:57 -04:00
AN Long
5d59b870ef
gh-120121: Add InvalidStateError to concurrent.futures.__all__ ( #120123 )
...
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-06-08 21:41:19 +05:30
neonene
38a25e9560
gh-120244: Fix re.sub() reference leak (GH-120245)
2024-06-08 10:22:07 +00:00
Saul Shanabrook
55402d3232
gh-119258: Eliminate Type Guards in Tier 2 Optimizer with Watcher (GH-119365)
...
Co-authored-by: parmeggiani <parmeggiani@spaziodati.eu>
Co-authored-by: dpdani <git@danieleparmeggiani.me>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
Co-authored-by: Ken Jin <kenjin@python.org>
2024-06-08 17:41:45 +08:00
Enrico Tröger
2080425154
bpo-37755: Use configured output in pydoc instead of pager (GH-15105)
...
If the Helper() class was initialized with an output, the topics, keywords
and symbols help still use the pager instead of the output.
Change the behavior so the output is used if available while keeping the
previous behavior if no output was configured.
2024-06-08 09:19:13 +00:00
Irit Katriel
4fc82b6d3b
gh-120225: fix crash in compiler on empty block at end of exception handler ( #120235 )
2024-06-07 22:37:35 +01:00
Pieter Eendebak
9d6604222e
gh-114264: Optimize performance of copy.deepcopy by adding a fast path for atomic types (GH-114266)
2024-06-07 18:42:01 +03:00
Irit Katriel
eca3f7762c
gh-93691: fix too broad source locations of with-statement instructions ( #120125 )
2024-06-07 14:06:24 +01:00
Serhiy Storchaka
d68a22e7a6
gh-120211: Fix tkinter.ttk with Tcl/Tk 9.0 (GH-120213)
...
* Use new methods for tracing Tcl variable.
* Fix Combobox.current() for empty combobox.
2024-06-07 10:49:07 +00:00
Kirill Podoprigora
57ad769076
gh-120080: Accept ``None`` as a valid argument for direct call of the ``int.__round__`` ( #120088 )
...
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-06-07 10:03:28 +02:00
Clinton
bd826b9c77
gh-120157: Remove unused code in concurrent.future (gh-120187)
2024-06-07 16:39:19 +09:00
Jacob Walls
6b606522ca
gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762)
...
Adjust DeprecationWarning when testing element truth values in ElementTree, we're planning to go with the more natural True return rather than a disruptive harder to code around exception raise, and are deferring the behavior change for a few more releases.
2024-06-06 20:18:30 -07:00
Tian Gao
417bec733c
Add Tian Gao to CODEOWNERS and ACKS (GH-120166)
2024-06-06 10:20:37 -07:00
benchatt
14e3c7071b
gh-115225: Raise error on unsupported ISO 8601 time strings ( #119339 )
...
Some time strings that contain fractional hours or minutes are permitted
by ISO 8601, but such strings are very unlikely to be intentional. The
current parser does not parse such strings correctly or raise an error.
This change raises a ValueError when hours or minutes contain a decimal mark.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-06-05 13:35:40 -04:00
Pablo Galindo Salgado
d9095194dd
gh-119842: Honor PyOS_InputHook in the new REPL (GH-119843)
...
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
2024-06-04 20:32:43 +02:00
Christopher Chavez
e079935282
gh-112672: Fix builtin Tkinter with Tcl 9.0 (GH-112681)
...
* Add declaration of Tcl_AppInit(), missing in Tcl 9.0.
* Use Tcl_Size instead of int where needed.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-06-04 19:47:15 +03:00
Serhiy Storchaka
7111d9605f
gh-89928: Fix integer conversion of device numbers (GH-31794)
...
Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).
2024-06-04 19:36:37 +03:00
Bénédikt Tran
ff1857d6ed
gh-120029: export `DEF_TYPE_PARAM` compiler flag ( #120028 )
2024-06-04 07:24:22 -07:00
Vinay Sajip
99d945c0c0
gh-119819: Fix regression to allow logging configuration with multipr… (GH-120030)
2024-06-04 13:20:50 +01:00
Kaundur
dce14bb2dc
gh-118868: logging QueueHandler fix passing of kwargs (GH-118869)
...
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2024-06-04 12:48:05 +01:00
Victor Stinner
26e5c6e835
gh-119613: Soft deprecate the Py_MEMCPY() macro ( #120020 )
...
Use directly memcpy() instead.
2024-06-04 09:23:55 +00:00
d.grigonis
a8f1152b70
gh-119879: str.find(): Utilize last character gap for two-way periodic needles ( #119880 )
2024-06-04 03:44:49 -04:00
Jason R. Coombs
8d63c8d47b
gh-106531: Apply changes from importlib_resources 6.3.2 ( #117054 )
...
Apply changes from importlib_resources 6.3.2.
2024-06-04 06:36:28 +00:00
Petr Viktorin
31a4fb3c74
gh-119724: Revert "bpo-45759: Better error messages for non-matching 'elif'/'else' statements ( #29513 )" ( #119974 )
...
This reverts commit 1c8f912ebd
.
2024-06-03 18:10:15 -07:00
Eric Snow
105f22ea46
gh-117398: Use Per-Interpreter State for the _datetime Static Types (gh-119929)
...
We make use of the same mechanism that we use for the static builtin types. This required a few tweaks.
The relevant code could use some cleanup but I opted to avoid the significant churn in this change. I'll tackle that separately.
This change is the final piece needed to make _datetime support multiple interpreters. I've updated the module slot accordingly.
2024-06-03 17:09:18 -06:00
Eric Snow
dba7a167db
gh-117142: Support Importing ctypes in Isolated Interpreters (gh-119991)
...
This makes the support official.
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-06-03 16:42:48 -06:00
Daniel Hollas
2e0aa731ae
gh-118835: pyrepl: Fix prompt length computation for custom prompts containing ANSI escape codes ( #119942 )
2024-06-03 18:07:06 +01:00
Victor Stinner
4e8aa32245
gh-119727: Add --single-process option to regrtest ( #119728 )
2024-06-03 16:34:36 +00:00
Nikita Sobolev
1d4c2e4a87
gh-119057: Use better error messages for zero division ( #119066 )
2024-06-03 19:03:56 +03:00
Jason R. Coombs
42a34ddb0b
gh-119588: Implement zipfile.Path.is_symlink (zipp 3.19.0). ( #119591 )
2024-06-03 11:13:07 -04:00
Steve Dower
fd01271366
gh-119679: Ensures correct import libraries are included in Windows install packages (GH-119790)
2024-06-03 15:42:45 +01:00
Nice Zombies
4765e1fa29
gh-102511: Amend 3.13.0b1.rst (GH-119895)
2024-06-03 14:27:44 +01:00