Commit Graph

28558 Commits

Author SHA1 Message Date
Itamar Oren 178919cf21
gh-113258: Write frozen modules to the build tree on Windows (GH-113303)
This ensures the source directory is not modified at build time, and different builds (e.g. different versions or GIL vs no-GIL) do not have conflicts.
2024-01-03 17:30:20 +00:00
Irit Katriel 7d01fb4808
gh-113603: Compiler no longer tries to maintain the no-empty-block invariant (#113636) 2024-01-03 16:57:48 +00:00
Hugo van Kemenade fab7ad62ce
gh-101100: Fix Sphinx warnings for removed dead batteries (#113669)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-01-03 13:04:26 +00:00
Ege Akman ea978c645e
gh-113637: Let c_annotations.py to handle the spacing of Limited/Unstable API & Stable ABI translation strings (#113638) 2024-01-03 13:22:38 +02:00
Brandt Bucher b0fb074d59
GH-113657: Add back missing _SET_IP uops in tier two (GH-113662) 2024-01-02 14:09:57 -08:00
Pablo Galindo Salgado 9ed36d533a
gh-113602: Bail out when the parser tries to override existing errors (#113607)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2024-01-02 13:00:52 +00:00
Hugo van Kemenade 7595380347
gh-101100: Fix Sphinx warnings from removed `~!` references (#113629)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-01-02 00:37:37 -07:00
Neil Schemenauer b2566d89ce
GH-113633: Use module state structure for _testcapi. (GH-113634)
Use module state structure for _testcapi.
2024-01-01 23:04:09 +00:00
AN Long b4b2cc1012
gh-53502: add a new option aware_datetime in plistlib to loads or dumps aware datetime. (#113363)
* add options to loads and dumps aware datetime in plistlib
2024-01-01 19:51:24 +01:00
Ronald Oussoren d0b0e3d2ef
gh-113536: Expose `os.waitid` on macOS (#113542)
* gh-113536: Expose `os.waitid` on macOS

This API has been available on macOS for a long time, but was
explicitly excluded due to unspecified problems with the API
in ancient versions of macOS.

* Document that the API is available on macOS starting in Python 3.13
2024-01-01 19:38:29 +01:00
Jeffrey Kintscher 5f3cc90a12
gh-62260: Fix ctypes.Structure subclassing with multiple layers (GH-13374)
The length field of StgDictObject for Structure class contains now
the total number of items in ffi_type_pointer.elements (excluding
the trailing null).

The old behavior of using the number of elements in the parent class can
cause the array to be truncated when it is copied, especially when there
are multiple layers of subclassing.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-01 18:24:24 +02:00
Hugo van Kemenade 30a6d79fb8
gh-101100: Fix Sphinx warnings in `library/configparser.rst` (#113598)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-31 10:57:33 -07:00
Samet YASLAN 88cb972000
gh-112536: Add support for thread sanitizer (TSAN) (gh-112648) 2023-12-30 17:17:02 +09:00
Ankit Kumar Pandey f46987b828
gh-103708: Make directory layout in sysconfig implementation configurable (#103709) 2023-12-29 17:55:17 +00:00
Nikita Sobolev fba324154e
gh-113543: Make sure that `MacOSXOSAScript` sends `webbrowser.open` audit event (#113544) 2023-12-28 19:58:06 +01:00
Zackery Spytz f108468970
bpo-11102: Make configure enable major(), makedev(), and minor() on HP-UX (GH-19856)
Always include <sys/types.h> before <sys/sysmacros.h>.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-28 12:47:44 +02:00
Ronald Oussoren cc13eabc7c
gh-110459: Make sure --with-openssl-rpath works on macOS (#113441)
* gh-110459: Make sure --with-openssl-rpath works on macOS

On macOS the `-rpath` linker flag is spelled differently
than on on platforms.
2023-12-28 09:42:05 +01:00
Inada Naoki bfee2f77e1
gh-73427: deprecate `_enablelegacywindowsfsencoding` (#107729) 2023-12-28 17:31:19 +09:00
Jeffrey Kintscher c66b577d9f
bpo-26791: Update shutil.move() to provide the same symlink move behavior as the mv shell when moving a symlink into a directory that is the target of the symlink (GH-21759) 2023-12-27 16:23:42 +00:00
Zackery Spytz 712afab5ac
gh-57795: IDLE: Enter the selected text when opening the "Replace" dialog (GH-17593)
Co-authored-by: Roger Serwy <roger.serwy@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-27 16:27:40 +02:00
Zackery Spytz 1ddd773293
gh-64020: Deprecate pydoc.ispackage() (GH-20908)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-27 14:04:31 +00:00
Vinay Sajip 67655d8ad5
gh-111615: Fix regression in QueueHandler configuration. (GH-111638) 2023-12-27 09:35:15 +00:00
Gordon P. Hemsley 4b2c3e8e43
bpo-36959: Fix error messages for invalid ISO format string in _strptime() (GH-13408)
Previously some error messages complained about incompatible
combinations of directives that are not contained in the format string.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-26 19:26:17 +00:00
Serhiy Storchaka e87cadc1ce
gh-66515: mailbox.MH now supports folders withou the ".mh_sequences" file (GH-804)
(for example Claws Mail IMAP-cache folders).
2023-12-26 11:15:14 +02:00
Yilei Yang 48c49739f5
gh-106905: Use separate structs to track recursion depth in each PyAST_mod2obj call. (GH-113035)
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2023-12-25 19:36:59 +02:00
Zackery Spytz 3f5eb3e6c7
bpo-21360: mailbox.Maildir now ignores files with a leading dot (GH-11833)
The maildir format specification states that files with a leading dot
should be ignored.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-25 17:07:51 +02:00
Serhiy Storchaka 0c574540e0
gh-113407: Fix import of unittest.mock when CPython is built without docstrings (GH-113408) 2023-12-24 13:38:56 +02:00
Serhiy Storchaka 1f06baeabd
gh-113191: Add support of os.fchmod() on Windows (GH-113192)
Also support a file descriptor in os.chmod().
2023-12-24 10:57:11 +00:00
Xu Song ce77ee5035
gh-113421: Fix multiprocessing logger for "%(filename)s" (GH-113423) 2023-12-24 12:04:12 +02:00
Jeff Allen 08398631a0
gh-113028: Correctly memoize str in pickle when escapes added (GH-113436)
This fixes a divergence between the Python and C implementations of pickle
for protocol 0, such that it pickle.py fails to re-use the first pickled
representation of strings involving characters that have to be escaped.
2023-12-24 11:43:44 +02:00
Kirill Podoprigora 894f0e573d
gh-111784: Fix two segfaults in the elementtree module (GH-113405)
First fix resolve situation when pyexpat module (which contains expat_CAPI
capsule) deallocates before _elementtree, so we need to hold a strong
reference to pyexpat module to.

Second fix resolve situation when module state is deallocated before
deallocation of XMLParser instances, which uses module state to clear
some stuff.
2023-12-24 10:57:41 +02:00
Yilei Yang 050783cb37
gh-112559: Avoid unnecessary conversion attempts to enum_klass in signal.py (#113040) 2023-12-23 17:07:52 -08:00
Allison Karlitskaya 0187a7e4ec
gh-112800: Ignore PermissionError on SubprocessTransport.close() in asyncio (#112803)
In case the spawned process is setuid, we may not be able to send
signals to it, in which case our .kill() call will raise
PermissionError.

Ignore that in order to avoid .close() raising an exception.  Hopefully
the process will exit as a result of receiving EOF on its stdin.
2023-12-23 16:43:39 -08:00
Ronald Oussoren 593b4d81d2
gh-74573: document that ndbm can silently corrupt databases on macOS (#113354)
* gh-74573: document that ndbm can silently corrupt databases on macOS

The system ndbm implementation on macOS has an undocumented limitation
on the size of values and can silently corrupt database files when those
are exceeded.

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-12-23 13:33:34 +01:00
Serhiy Storchaka 6e02d79f96
gh-113188: Fix shutil.copymode() on Windows (GH-113189)
Previously it worked differently if dst is a symbolic link:
it modified the permission bits of dst itself rather than the file
it points to if follow_symlinks is true or src is not a symbolic link,
and did nothing if follow_symlinks is false and src is a symbolic link.

Also document similar changes in shutil.copystat().
2023-12-23 11:07:54 +00:00
Yan Yanchii 4a3d2419bb
gh-113212: Improve error message & document zero-arg super inside nested functions and generator expressions (GH-113307) 2023-12-22 17:12:08 +02:00
Mark Shannon 45e09f921b
GH-112215: Increase C recursion limit for non debug builds (GH-113397) 2023-12-22 14:25:25 +00:00
Irit Katriel c31943af16
gh-113297: Fix segfault in compiler for with statement with 19 context managers (#113327) 2023-12-22 01:50:26 +00:00
Shantanu 61e8184095
gh-95754: Better AttributeError on partially initialised module (#112577)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-21 13:24:10 -08:00
Jason R. Coombs 2d91409c69
gh-113174: Sync with importlib_metadata 7.0 (#113175)
* Sync with importlib_metadata 7.0.0

* Add blurb

* Update docs to reflect changes.

* Link datamodel docs for object.__getitem__

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Add what's new for removed __getattr__

* Link datamodel docs for object.__getitem__

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

* Add exclamation point, as that seems to be used for other classes.

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-21 15:04:05 -05:00
Ronald Oussoren df1eec3dae
gh-65701: document that freeze doesn't work with framework builds on macOS (#113352)
* gh-65701: document that freeze doesn't work with framework builds on macOS

The framework install is inherently incompatible with freeze. Document
that that freeze doesn't work with framework builds and bail out
early when trying to run freeze anyway.

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-12-21 16:28:00 +01:00
Ronald Oussoren ca8b1d0958
gh-87277: Don't look for X11 browsers on macOS in webbrowser (#24480)
The installation of XQuartz on macOS will unconditionally
set the $DISPLAY variable. The X11 server will be launched
when a program tries to access the display.  This results
in launching the X11 server when using the webbrowser module,
even though X11 browsers won't be used in practice.
2023-12-21 14:43:38 +01:00
Gregory P. Smith 103c4ea274
gh-112305: Fix check-clean-src to detect frozen_modules .h files. (#113344)
A typo left this check broken so many of us who do out-of-tree builds
were seeing strange failures due to bad `Python/frozen_modules/*.h`
files being picked up from the source tree and used at build time from
different Python versions leading to errors like:

`Fatal Python error: _PyImport_InitCore: failed to initialize importlib`

Or similar once our build got to an "invoke the interpreter"
bootstrapping step due to incorrect bytecode being embedded.
2023-12-20 23:32:13 -08:00
Carey Metcalfe a2dd0e7038
gh-111375: Use `NULL` rather than `None` in the exception stack to indicate that an exception was handled (#113302) 2023-12-21 01:46:41 +00:00
Martijn Pieters 1ff0238594
GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios (#113334)
When wrapped, `_SSLProtocolTransport._force_close(exc)` is called just like in the unwrapped scenario `_SelectorTransport._force_close(exc)` or `_ProactorBasePipeTransport._force_close(exc)` would be called, except here the exception needs to be passed through the `SSLProtocol._abort()` method, which didn't accept an exception object.

This commit ensures that this path works, in the same way that the uvloop implementation of SSLProto passes on the exception (on which the current implementation of SSLProto is based).
2023-12-20 15:09:01 -08:00
Seth Michael Larson b221e03010
gh-113257: Automatically generate pip SBOM metadata from wheel (#113295)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-20 17:28:20 +00:00
Ethan Furman 4afa7be32d
add Ujan to ACKS for work on enum docs (GH-113301) 2023-12-19 17:55:24 -08:00
Erlend E. Aasland 14d4c7742a
gh-111973: Update Windows installer to use SQLite 3.44.2 (#113281) 2023-12-19 23:31:52 +01:00
Marat Idrisov e1117cb886
gh-87264: Convert tarinfo type to stat type (GH-113230)
Co-authored-by: val-shkolnikov <val@nvsoft.net>
2023-12-19 11:04:43 -08:00
Erlend E. Aasland 6a1d5a4c0f
gh-111973: Update macOS installer to use SQLite 3.44.2 (GH-113279) 2023-12-19 13:23:52 -05:00