127095 Commits

Author SHA1 Message Date
Serhiy Storchaka
871d269875
gh-117596: Add more tests for os.path with invalid paths (GH-134189) 2025-05-19 21:17:58 +03:00
Victor Stinner
e79f640eb6
Simplify interp_look_up_id() (#134257)
Don't use PyInterpreterState_GetID() but get directly the interpreter
'id' member which cannot fail.
2025-05-19 18:09:10 +00:00
Semyon Moroz
71c42b778d
gh-126883: Add check that timezone fields are in range for datetime.fromisoformat (#127242)
It was previously possible to specify things like `+00:90:00` which would be equivalent to `+01:30:00`, but is not a valid ISO8601 string.

---------

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
2025-05-19 14:07:11 -04:00
Tomas R.
8d490b3687
GH-131798: Narrow the return type of isinstance for some known arguments in the JIT (GH-133172) 2025-05-19 13:19:24 -04:00
Peter Bierma
9859791f9e
gh-128639: Don't assume one thread in subinterpreter finalization (gh-128640)
Incidentally, this also fixed the warning not showing up if a subinterpreter wasn't
cleaned up via _interpreters.destroy. I had to update some of the tests as a result.
2025-05-19 10:24:08 -06:00
László Kiss Kollár
c4ad92e155
Fix typo in get_stack_trace docstring (#134246) 2025-05-19 16:07:39 +00:00
sobolevn
a36ce264a9
GH-134236: make regen-all (GH-134237) 2025-05-19 11:39:43 -04:00
naya451
c45e661226
gh-131505: Move len boundary assertions before using len. (#131536)
Move len boundary assertions before using len.
2025-05-19 08:10:23 -07:00
Dino Viehland
3fa30d9e9c
gh-128045: Syncs w/ latest opcode metadata (#134231)
Fix opcode metadata
2025-05-19 11:08:50 -04:00
Duprat
de70614c13
gh-132795: Add docs for multiprocessing.Semaphore.locked (#133299) 2025-05-19 20:06:09 +05:30
Jessica Temporal
faebf87b37
gh-134214: Fix test case in pyrepl (gh-134223) 2025-05-19 16:26:04 +02:00
Dino Viehland
cc9add695d
gh-128045: Mark unknown opcodes as deopting to themselves (#128044)
* Mark unknown opcodes as deopting to themselves
2025-05-19 10:15:16 -04:00
Loïc Simon
71ea6a6798
gh-134158: Fix PyREPL coloring of double braces in f/t-strings (gh-134159)
Co-authored-by: Loïc Simon <loic.simon@napta.io>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-19 16:12:23 +02:00
Étienne Pelletier
b22460c44d
gh-125225: Fix column misalignment in help('topics') output (gh-125226)
The 'help("topics")' output was misaligned due to "ASSIGNMENTEXPRESSIONS"
exceeding the implicit maximum default column width of 19 characters.

Reduced the number of columns from 4 to 3 in the listtopics()
function to allow more space for longer topic names.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-19 16:10:17 +02:00
Bénédikt Tran
ee36db5500
gh-125843: indicate which C function caused a curses.error (#125844)
- Rename error helpers with a `curses_set_error_*` prefix instead of `PyCurses*`.
- Cleanly report both NULL and ERR cases.
- Raise `curses.error` in `is_linetouched` instead of a `TypeError`.
2025-05-19 15:53:39 +02:00
Kirill Podoprigora
c31547a591
gh-134097: Print number of refs & blocks after each statement in new REPL (gh-134136)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-19 15:30:43 +02:00
Serhiy Storchaka
44b73d3cd4
gh-122055: Clarify documentation for empty matches in RE (GH-133169) 2025-05-19 15:27:50 +02:00
ggqlq
605022aeb6
gh-131178: Add tests for http.server command-line interface (#132540) 2025-05-19 12:15:04 +00:00
Steve Dower
986c367028
gh-133779: Revert Windows generation of pyconfig.h and go back to a static header. (GH-133966)
Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds.
This was usually the case already, but this change guarantees it in all circumstances.
2025-05-19 11:35:22 +01:00
BecoKo
d55e11b804
gh-76023: Make os.path.realpath to ignore WinError 1005 in non-strict mode (GH-128328) 2025-05-19 09:33:15 +00:00
Bénédikt Tran
d6dc33ed80
gh-134087: enforce signature of threading.RLock (#134178)
- Reject positional and keyword arguments in `_thread.RLock.__new__`.
- Convert `_thread.lock.__new__` to AC.
2025-05-19 11:26:14 +02:00
Serhiy Storchaka
9983c7d441
gh-133890: Handle UnicodeEncodeError in tarfile (GH-134147)
UnicodeEncodeError is now handled the same way as OSError during
TarFile member extraction.
2025-05-18 22:21:06 +03:00
Serhiy Storchaka
5cbc8c632e
gh-133889: Only show the path of the URL in the SimpleHTTPRequestHandler page (GH-134135)
The query and fragment are ambiguous and not used.
2025-05-18 18:09:51 +00:00
da-woods
bb32f3c698
document Py_VISIT as a macro in the docs (#133688) 2025-05-18 21:58:43 +05:30
Nybblista
2cc99b3dd3
Docs: Fix the _PyGenObject_HEAD reference in the InternalDocs/generators.md (#133739) 2025-05-18 21:56:58 +05:30
Dave Jagoda
a1e2e6ca91
Fix example in Doc/howto/functional.rst (#133978) 2025-05-18 21:56:17 +05:30
Yongzi Li
4ce91871a9
fix indent in controlflow.rst docs (#134008) 2025-05-18 21:51:02 +05:30
Stan Ulbrych
b1c33294ca
gh-134114: Clarify FAQ note about dictonary keys (#134118) 2025-05-18 15:59:20 +00:00
J. Nick Koston
53da1e8c8c
gh-134173: optimize state transfer between concurrent.futures.Future and asyncio.Future (#134174)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-18 21:26:20 +05:30
b-pass
f2de1e6861
gh-134144: Fix use-after-free in zapthreads() (#134145) 2025-05-18 20:32:29 +05:30
Bénédikt Tran
0a160bf14c
gh-133157: remove usage of _Py_NO_SANITIZE_UNDEFINED in faulthandler (#134047)
In `faulthandler_sigfpe()`, instead of using 1/0 arithmetic, we explicitly raise SIGFPE.
We also remove `faulthandler._read_null()` since reading from NULL is an undefined
behavior and `faulthandler` should not check for low-level C undefined behaviors.
2025-05-18 10:16:10 +02:00
Bénédikt Tran
22e4a40d90
gh-134082: modernize string.Formatter class docstring (#134125)
fixup Formatter class docstring
2025-05-18 10:10:54 +02:00
Nico-Posada
4e9005d32f
gh-134100: Fix use-after-free in PyImport_ImportModuleLevelObject (#134117) 2025-05-18 12:41:38 +05:30
Micha Albert
fa4e088668
gh-134150: Clarify distinction between JSON and Python objects (#134154)
* gh-134150: Clarify distinction between JSON objects and Python objects in json module docs

* Revert change to JSON introduction

* Clarify occurrences of "object literal" as JSON
2025-05-17 21:47:37 -04:00
Victor Stinner
009e7b3698
gh-134064: Fix sys.remote_exec() error checking (#134067) 2025-05-18 00:24:40 +02:00
Jelle Zijlstra
fc7f4c3666
gh-134119: Fix crash from calling next() on exhausted template iterator (#134120)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-17 12:23:19 -07:00
sobolevn
84914ad0e5
gh-133999: Fix except parsing regression in 3.14 (#134035) 2025-05-17 17:57:02 +03:00
Kirill Podoprigora
7a9d46295a
gh-88275: Add missing __init__ method to match example (#120281) 2025-05-17 15:11:19 +02:00
Clifford Gama
b41d79c776
Docs: fix spelling of "test case" in unittest documentation (#134137) 2025-05-17 13:36:38 +02:00
Peter Bierma
af6b3b825f
Docs: C API: Improve documentation around non-Python threads with subinterpreters (GH-131087)
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-05-17 10:58:41 +02:00
Victorien
9d73875072
gh-113878: fix versionadded in dataclasses.field() documentation (#134065) 2025-05-17 10:00:13 +02:00
Oleg Burnaev
c1c9ad1d5a
gh-133881: add forward reference to list.sort() in lambda expression tutorial (#133910) 2025-05-17 09:59:37 +02:00
Bénédikt Tran
faac627e47
gh-133810: remove http.server.CGIHTTPRequestHandler and --cgi flag (#133811)
The CGI HTTP request handler has been deprecated since Python 3.13.
2025-05-17 09:58:16 +02:00
Serhiy Storchaka
2f1ecb3bc4
gh-134098: Fix handling %-encoded trailing slash in SimpleHTTPRequestHandler (GH-134099) 2025-05-17 10:11:34 +03:00
Serhiy Storchaka
fcaf009907
gh-133889: Improve tests for SimpleHTTPRequestHandler (GH-134102) 2025-05-17 10:00:56 +03:00
Serhiy Storchaka
71cf4dd622
gh-134109: Fix showing comments in pydoc output for argparse (GH-134110)
Comments immediately preceding the object's source code are used
if the object has no docstring.
Comments that do not describe the object should be separated from
the following source code by an empty line.
2025-05-16 23:29:14 +03:00
Saleh Dehqanpour
ea2d707bd5
gh-117026: Remove outdated sentence in SimpleHTTPRequestHandler docs (GH-117027)
The code was changed in 0f7cddc308b297e6a1c2dd61503acea38401656f (bpo-839496/gh-39531).
2025-05-16 19:12:40 +00:00
alexey semenyuk
ac8df4b589
gh-133286: add explanation about seq for pathlib Pattern Language (#133340) 2025-05-16 18:42:06 +00:00
Bénédikt Tran
b5febf73b9
gh-134082: modernize docstrings in string.Formatter (#134083) 2025-05-16 18:36:48 +00:00
Kumar Aditya
d94b1e9cac
gh-133515: fix docs for unawaited coroutines in debug mode (#134081) 2025-05-16 21:01:15 +05:30