Commit Graph

129007 Commits

Author SHA1 Message Date
Edward Xu
b83f379a97 gh-133467: Fix typeobject tp_base race in free threading (gh-140549) 2025-11-05 16:20:40 -05:00
Victor Stinner
986bb0a1a2 gh-83714: Fix stat_nanosecond_timestamp() for 32-bit time_t (#141069) 2025-11-05 21:16:37 +01:00
Victor Stinner
f458ac01ba Fix compiler warnings in remote debugging (#141060)
Example of fixed warnings on 32-bit Windows:

    Python\remote_debugging.c(24,53): warning C4244: 'function':
    conversion from 'uint64_t' to 'uintptr_t', possible loss of data

    Modules\_remote_debugging_module.c(789,44): warning C4244:
    'function': conversion from 'uint64_t' to 'size_t', possible loss
    of data
2025-11-05 20:18:45 +01:00
Sachin Shah
1d25b751c5 gh-140650: Fix write(), flush() and close() methods of io.BufferedWriter (GH-140653)
They could raise SystemError or crash when getting the "closed" attribute
or converting it to boolean raises an exception.
2025-11-05 21:15:27 +02:00
Mikhail Efimov
3cb1ab0e5d gh-131527: Stackref debug borrow checker (#140599)
Add borrow checking to the stackref debug mode

---------

Co-authored-by: mpage <mpage@meta.com>
2025-11-05 11:12:56 -08:00
Sebastian Pipping
baa9f33897 gh-139313: Improve docs on XML security (GH-139460)
Clarify that:
- it takes parsing for an attack
- that some doors are closed by default
- only Expat version 2.7.2 has all the fixes
- use of the bundle depends on configuration
2025-11-05 20:59:59 +02:00
Victor Stinner
4ac16dd109 Fix a compiler warning in _randommodule.c (#141058)
The test just before the cast ensures that the cast cannot overflow.

Fix the warning on 32-bit Windows:

    Modules\_randommodule.c(525,28): warning C4244: '=': conversion
    from 'uint64_t' to 'Py_ssize_t', possible loss of data
2025-11-05 18:00:32 +00:00
Victor Stinner
8d55faf2d6 Remove internal _PyTime_AsLong() function (#141053)
* Replace _PyTime_AsLong() with PyLong_FromInt64()
* Replace _PyTime_FromLong() with PyLong_AsInt64().
2025-11-05 18:37:06 +01:00
Victor Stinner
30ab627aab gh-83714: Fix a compiler warning in stat_nanosecond_timestamp() (#141043)
Disable the fast path on systems with 32-bit long.
2025-11-05 18:31:35 +01:00
Victor Stinner
579b2f8910 gh-140550: Run make regen-limited-abi (#141056) 2025-11-05 16:57:06 +00:00
Peter Bierma
3f6aca1be4 gh-141004: Document PyMemoryView_Type (GH-141034) 2025-11-05 11:45:13 -05:00
Peter Bierma
35528fccdc gh-141004: Document missing iterator types in the C API (GH-141010)
Add documentation for each of the following:

- PyByteArrayIter_Type
- PyBytesIter_Type
- PyListIter_Type
- PyListRevIter_Type
- PySetIter_Type
- PyTupleIter_Type
- PyRangeIter_Type
- PyLongRangeIter_Type
- PyDictIterKey_Type
- PyDictRevIterKey_Type
- PyDictIterValue_Type
- PyDictRevIterValue_Type
- PyDictIterItem_Type
- PyDictRevIterItem_Type

---------

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-11-05 09:13:57 -05:00
Petr Viktorin
589a03a8ce gh-140550: Initial implementation of PEP 793 – PyModExport (GH-140556)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-11-05 12:31:42 +01:00
Petr Viktorin
f2bce51b98 gh-140691: urllib.request: Close FTP control socket if data socket can't connect (GH-140835)
Co-authored-by: codenamenam <bluetire27@gmail.com>
2025-11-05 11:52:11 +01:00
Lê Nam Khánh
335d83ec04 Fix typo in Apple/__main__.py (#141038)
Corrected a typo in a return value docstring.
2025-11-05 15:23:25 +08:00
Clifford Gama
1ae900424b Docs: Fix cached calls count in factorial example (gh-140882) 2025-11-05 00:29:25 +00:00
alex
fa02422918 gh-141007: update string module source code link (#141008)
In 3.14, the former string.py became `__init__.py` within a new `string` directory that also contains a new submodule file, `templatelib.py`.
2025-11-04 19:05:49 -05:00
Miro Hrončok
d5b00c74b3 gh-140454: Normalize the JIT stencils filename on Linux to avoid mismatches between the Makefile and the generator (#140823) 2025-11-04 14:29:15 -08:00
Petr Viktorin
d81e1ef0f3 gh-138189: Document type slots, and other constants, as part of Limited API (GH-138190)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-11-04 22:58:53 +01:00
Stan Ulbrych
bfe54810c4 gh-141004: Document Py_UNICODE_{HIGH, LOW}_SURROGATE functions (GH-141019) 2025-11-04 16:19:06 -05:00
Filip Łajszczak
ce1bb85d28 gh-139434: Update selected RFC 2822 references to RFC 5322 (#139435)
Update selected RFC 2822 references to RFC 5322

RFC 2822 was obsoleted by RFC 5322 in 2008. This updates references
to use the current standard in documentation, docstrings, and comments.

It preserves RFC 2822 references in legacy API components to maintain their
historical context.

RFC 822 → RFC 2822 → RFC 5322 progression is explained where relevant.

In some places specific sections of RFC are referenced where it seems helpful.

Scout rule was applied in some places and RFC mentions format was
normalized in doc strings and comments.
2025-11-04 14:46:07 -05:00
Guo Ci
97d8dda980 Docs: Fix typo in email.headerregistry.rst (#140965)
Fix missing 'Header' suffix on header class name in `email.headerregistry.rst`
2025-11-04 14:29:13 -05:00
Vinay Sajip
66c86c6563 gh-134817: Restore accidentally deleted line in documentation. (GH-141013) 2025-11-04 18:29:44 +00:00
Brett Cannon
8a7dbb7a68 Document that returning sys.monitoring.DISABLE in response to a global event raises ValueError (#140726)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-04 10:28:17 -08:00
Savannah Ostrowski
40096da95a GH-139946: Colorize error and warning messages in argparse (#140695)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-11-04 16:31:35 +00:00
Serhiy Storchaka
1326d2a808 gh-140979: Fix off-by-one error in the RE code validator (GH-140984)
It was too lenient and allowed MARK opcodes with too large value.
2025-11-04 17:49:44 +02:00
Abhishek Tiwari
fa9c3eefd4 gh-140797: Forbid capturing groups in re.Scanner lexicon patterns (GH-140944) 2025-11-04 12:54:28 +02:00
Victor Stinner
a84181c31b gh-140815: Fix faulthandler for invalid/freed frame (#140921)
faulthandler now detects if a frame or a code object is invalid or
freed.

Add helper functions:

* _PyCode_SafeAddr2Line()
* _PyFrame_SafeGetCode()
* _PyFrame_SafeGetLasti()

_PyMem_IsPtrFreed() now detects pointers in [-0xff, 0xff] range
as freed.
2025-11-04 11:48:28 +01:00
commitWithTisha
08115d241a Fix minor typo: 'web site' -> 'website' (GH-140561) 2025-11-04 10:23:49 +01:00
Ken Jin
947bb4642c gh-140889: Bump tailcall and JIT CI to llvm 20 (#140963) 2025-11-03 12:37:29 -08:00
Petr Viktorin
3f2b83e959 Fix minor typos and wording in C API docs (#140955) 2025-11-03 22:04:46 +02:00
Savannah Ostrowski
57f4d09a6f JIT: Fix compiler warning from visibility attribute in typedef (#139981) 2025-11-03 19:46:53 +00:00
Neil Schemenauer
c98c5b3449 gh-131253: free-threaded build support for pystats (gh-137189)
Allow the --enable-pystats build option to be used with free-threading.  The
stats are now stored on a per-interpreter basis, rather than process global.
For free-threaded builds, the stats structure is allocated per-thread and
then periodically merged into the per-interpreter stats structure (on thread
exit or when the reporting function is called). Most of the pystats related
code has be moved into the file Python/pystats.c.
2025-11-03 11:36:37 -08:00
Hugo van Kemenade
cf1a2c1ee4 gh-133600: Run Tools/wasm/wasi on CI instead of deprecated Tools/wasm/wasi.py (#140907) 2025-11-03 21:26:09 +02:00
Ken Jin
9791a506c2 gh-140889: Test tailcall and JIT in CI (GH-140891) 2025-11-03 19:07:55 +00:00
Savannah Ostrowski
4e2ff4ac4c GH-136895: Update JIT builds to use LLVM 20 (#140329)
Co-authored-by: Emma Harper Smith <emma@emmatyping.dev>
2025-11-03 10:01:44 -08:00
Yongzi Li
b373d3494c Docs: Fix a typo in idle.rst (Chitespace -> Whitespace) (GH-140946)
Fix typo in idle.rst
2025-11-03 16:48:10 +01:00
Stan Ulbrych
478b8dab0b Docs: Fix typo in codecs documentation (GH-140883) 2025-11-03 16:47:52 +01:00
Jelle Zijlstra
b1027d4762 gh-138151: Fix annotationlib handling of multiple nonlocals (#138164) 2025-11-03 07:22:32 -08:00
Jelle Zijlstra
d590685297 gh-133879: Clean up What's New for 3.15 (#140435)
Clean up What's New for 3.15

A bit early but I was reading through it and noticed some issues:

- A few improvements were listed in the removals section
- The "Porting to 3.15" section in the C API chapter had some
  changes that aren't about the C API
- Some other typos and wording fixes
2025-11-03 06:54:23 -08:00
Jelle Zijlstra
7a9437d986 gh-140348: Fix using | on unusual objects plus Unions (#140383) 2025-11-03 06:50:37 -08:00
AN Long
248ce9fa8c gh-140826: Compare winreg.HKEYType by the internal handle value (GH-140843) 2025-11-03 10:14:22 +02:00
Jelle Zijlstra
349de57839 Revert "gh-137969: Fix evaluation of ref.evaluate(format=Format.FORWARDREF) objects (#138075)" (#140930)
This reverts commit 63e01d6bae.
2025-11-02 21:35:15 -08:00
Frost Ming
121c219e30 Remove redundant sys.exit(2) call in pdb CLI (#139948) 2025-11-02 18:47:18 -08:00
dr-carlos
63e01d6bae gh-137969: Fix evaluation of ref.evaluate(format=Format.FORWARDREF) objects (#138075)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-11-02 17:20:30 -08:00
dr-carlos
e66f87ca73 gh-138425: Correctly partially evaluate global generics with undefined params in ref.evaluate(format=Format.FORWARDREF) (#138430)
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-11-02 15:15:47 -08:00
Krishna Chaitanya
31de83d5e2 gh-140693: Improve argparse documentation about controlling color (#140737) 2025-11-02 13:58:16 -08:00
Sebastian Rittau
9e5628ad68 gh-140808: Remove __class_getitem__ from mailbox._ProxyFile (#140838)
Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-11-02 13:56:59 -08:00
Jiucheng(Oliver)
6d45cd8dbb gh-135307: Fix email error when policy max_line_length is set to 0 or None (#135367)
RDM: Like the change made in a earlier PR to the folder, we can/must use 'maxlen' as a stand in for 'unlimited' when computing line lengths when max_line_length is 0 or None; otherwise the computation results in a traceback.
2025-11-02 09:32:14 -05:00
RayXu
173cc53d9f Docs: avoid informal formulation in Doc/c-api/conversion.rst (#140898) 2025-11-02 13:49:49 +00:00