]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Diego Russo [Tue, 5 Dec 2023 15:07:50 +0000 (15:07 +0000)]
gh-110190: Fix ctypes structs with array on Arm (#112604)
Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms.
This because on Arm platforms structs with at most 4 elements of any
floating point type values can be passed through registers. If the type
is double the maximum size of the struct is 32 bytes.
On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate.
Tian Gao [Tue, 5 Dec 2023 14:52:28 +0000 (05:52 -0900)]
gh-105323: Remove `WITH_APPLE_EDITLINE` to use the same declaration for all editline (gh-112513)
Ken Jin [Tue, 5 Dec 2023 13:30:59 +0000 (21:30 +0800)]
bpo-43153: Don't mask `PermissionError` with `NotADirectoryError` during tempdirectory cleanup (GH-29940)
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Donghee Na [Tue, 5 Dec 2023 10:44:19 +0000 (10:44 +0000)]
gh-112535: Add comment for ppc32/64 registers (gh-112746)
Alex Waygood [Tue, 5 Dec 2023 09:59:52 +0000 (09:59 +0000)]
gh-101100: Fix many easily solvable Sphinx nitpicks in the datamodel docs (#112737)
Jeffrey Kintscher [Tue, 5 Dec 2023 09:33:51 +0000 (01:33 -0800)]
gh-81441: shutil.rmtree() FileNotFoundError race condition (GH-14064)
Ignore missing files and directories while enumerating
directory entries in shutil.rmtree().
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Rune Tynan [Tue, 5 Dec 2023 09:21:09 +0000 (04:21 -0500)]
gh-62897: Update PyUnicode C API parameter names (GH-12680)
Standardize PyUnicode C API parameter names across the documentation.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Donghee Na [Tue, 5 Dec 2023 09:03:32 +0000 (09:03 +0000)]
gh-112535: Update _Py_ThreadId() to support PowerPC (gh-112624)
pan324 [Tue, 5 Dec 2023 08:11:44 +0000 (09:11 +0100)]
gh-82300: Add track parameter to multiprocessing.shared_memory (#110778)
Add a track parameter to shared memory to allow resource tracking via the side-launched resource tracker process to be disabled on platforms that use it (POSIX).
This allows people who do not want automated cleanup at process exit because they are using the shared memory with processes not participating in Python's resource tracking to use the shared_memory API.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Sergey B Kirpichev [Tue, 5 Dec 2023 07:34:13 +0000 (10:34 +0300)]
Minor refactoring of Object/abstract.c (UNARY_FUNC macro and more cases for BINARY_FUNC) (GH-112145)
* Use BINARY_FUNC macro for some remaining ops
* Add UNARY_FUNC macro to define unary PyNumber_* functions
Constantin Hong [Tue, 5 Dec 2023 07:24:56 +0000 (16:24 +0900)]
gh-102130: Support tab completion in cmd for Libedit. (GH-107748)
---
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Russell Keith-Magee [Tue, 5 Dec 2023 04:23:17 +0000 (12:23 +0800)]
gh-112736: Refactor del-safe symbol handling in subprocess (#112738)
Refactor delete-safe symbol handling in subprocess.
Only module globals are force-cleared during interpreter finalization, using a class reference instead of individually listing the constants everywhere is simpler.
Barney Gale [Mon, 4 Dec 2023 23:21:39 +0000 (23:21 +0000)]
GH-112727: Speed up `pathlib.Path.absolute()` (#112728)
Use `_from_parsed_parts()` to create a pre-joined/pre-parsed path, rather
than passing multiple arguments to `with_segments()`
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Gregory P. Smith [Mon, 4 Dec 2023 23:08:19 +0000 (15:08 -0800)]
gh-112334: Restore subprocess's use of `vfork()` & fix `extra_groups=[]` behavior (#112617)
Restore `subprocess`'s intended use of `vfork()` by default for performance on Linux;
also fixes the behavior of `extra_groups=[]` which was unintentionally broken in 3.12.0:
Fixed a performance regression in 3.12's :mod:`subprocess` on Linux where it
would no longer use the fast-path ``vfork()`` system call when it could have
due to a logic bug, instead falling back to the safe but slower ``fork()``.
Also fixed a security bug introduced in 3.12.0. If a value of ``extra_groups=[]``
was passed to :mod:`subprocess.Popen` or related APIs, the underlying
``setgroups(0, NULL)`` system call to clear the groups list would not be made
in the child process prior to ``exec()``.
The security issue was identified via code inspection in the process of
fixing the first bug. Thanks to @vain for the detailed report and
analysis in the initial bug on Github.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Victor Stinner [Mon, 4 Dec 2023 22:40:06 +0000 (23:40 +0100)]
gh-112535: Add test on _Py_ThreadId() (#112709)
Add also test.support.Py_GIL_DISABLED constant.
Amioplk [Mon, 4 Dec 2023 20:52:06 +0000 (21:52 +0100)]
gh-112671: Fixing typo in the Macro Docs (GH-112715)
Replace Py_T_STRING_INLINE with Py_T_STRING_INPLACE
Gregory P. Smith [Mon, 4 Dec 2023 20:04:05 +0000 (12:04 -0800)]
gh-105967: Work around a macOS bug, limit zlib C library crc32 API calls to 1gig (#112615)
Work around a macOS bug, limit zlib crc32 calls to 1GiB.
Without this, `zlib.crc32` and `binascii.crc32` could produce incorrect
results on multi-gigabyte inputs depending on the macOS version's Apple
supplied zlib implementation.
Kamil Turek [Mon, 4 Dec 2023 19:42:01 +0000 (20:42 +0100)]
gh-103363: Add follow_symlinks argument to `pathlib.Path.owner()` and `group()` (#107962)
Alex Waygood [Mon, 4 Dec 2023 19:35:46 +0000 (19:35 +0000)]
gh-74690: Avoid a costly type check where possible in `_ProtocolMeta.__subclasscheck__` (#112717)
Thomas Bininda [Mon, 4 Dec 2023 17:27:57 +0000 (18:27 +0100)]
gh-112516: Update bundled pip version to 23.3.1 (gh-112517)
Serhiy Storchaka [Mon, 4 Dec 2023 15:43:27 +0000 (17:43 +0200)]
gh-108927: Fix removing testing modules from sys.modules (GH-108952)
It breaks import machinery if the test module has submodules used in
other tests.
Alex Waygood [Mon, 4 Dec 2023 15:41:41 +0000 (15:41 +0000)]
gh-74690: Optimise `isinstance()` and `issubclass()` calls against runtime-checkable protocols by avoiding costly `super()` calls (#112708)
Alex Waygood [Mon, 4 Dec 2023 12:42:24 +0000 (12:42 +0000)]
gh-101100: Fix Sphinx nitpicks in `library/abc.rst` (#112703)
Serhiy Storchaka [Mon, 4 Dec 2023 11:47:55 +0000 (13:47 +0200)]
gh-109786: Fix leaks and crash when re-enter itertools.pairwise.__next__() (GH-109788)
Serhiy Storchaka [Mon, 4 Dec 2023 11:30:32 +0000 (13:30 +0200)]
gh-110275: Named tuple's __replace__() now raises TypeError for invalid arguments (GH-110299)
Serhiy Storchaka [Mon, 4 Dec 2023 11:14:56 +0000 (13:14 +0200)]
gh-65210: Add const qualifiers in PyArg_VaParseTupleAndKeywords() (GH-105958)
Change the declaration of the keywords parameter in functions
PyArg_ParseTupleAndKeywords() and PyArg_VaParseTupleAndKeywords() from `char **`
to `char * const *` in C and `const char * const *` in C++.
It makes these functions compatible with argument of type `const char * const *`,
`const char **` or `char * const *` in C++ and `char * const *` in C
without explicit type cast.
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Alex Waygood [Mon, 4 Dec 2023 11:05:20 +0000 (11:05 +0000)]
gh-101100: Fix Sphinx nitpicks in `library/functions.rst` (#112669)
Victor Stinner [Mon, 4 Dec 2023 10:42:58 +0000 (11:42 +0100)]
gh-106550: Fix sign conversion in pycore_code.h (#112613)
Fix sign conversion in pycore_code.h: use unsigned integers and cast
explicitly when needed.
Serhiy Storchaka [Mon, 4 Dec 2023 09:09:06 +0000 (11:09 +0200)]
bpo-34392: Add sys. _is_interned() (GH-8755)
chilaxan [Mon, 4 Dec 2023 08:15:43 +0000 (03:15 -0500)]
gh-112625: Protect bytearray from being freed by misbehaving iterator inside bytearray.join (GH-112626)
Christopher Chavez [Mon, 4 Dec 2023 08:00:27 +0000 (02:00 -0600)]
gh-112678: Declare `Tkapp_CallDeallocArgs()` as `static` (GH-112679)
Terry Jan Reedy [Mon, 4 Dec 2023 06:36:40 +0000 (01:36 -0500)]
gh-66819: More IDLE htest updates(4) (#112686)
Mostly double spacing before 'if __name__...'.
Terry Jan Reedy [Mon, 4 Dec 2023 04:45:56 +0000 (23:45 -0500)]
gh-66819: More IDLE htest updates(3) (#112683)
Revise spec-callable pairs from percolator to end.
Barney Gale [Sun, 3 Dec 2023 20:35:10 +0000 (20:35 +0000)]
GH-106747: Improve `Path.glob()` expectations in pathlib tests (#112365)
Add trailing slashes to expected `Path.glob()` results wherever a pattern
has a trailing slash. This matches what `glob.glob()` produces.
Due to another bug (GH-65238) pathlib strips all trailing slashes, so this
change is academic for now.
Hugo van Kemenade [Sun, 3 Dec 2023 20:23:09 +0000 (22:23 +0200)]
gh-101100: Fix Sphinx warning in `library/gettext.rst` (#112668)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Alex Waygood [Sun, 3 Dec 2023 17:32:49 +0000 (17:32 +0000)]
gh-101100: Fix most Sphinx nitpicks in `inspect.rst` (#112662)
Marco Aurélio A. Barbosa [Sun, 3 Dec 2023 15:14:14 +0000 (12:14 -0300)]
Fix link to 'The Perils of Floating Point', on the tutorial (GH-112499)
Use author link to 'The Perils of Floating Point'.
Irit Katriel [Sun, 3 Dec 2023 14:02:37 +0000 (14:02 +0000)]
gh-112645: remove deprecation warning for use of onerror in shutil.rmtree (#112659)
Irit Katriel [Sun, 3 Dec 2023 12:12:49 +0000 (12:12 +0000)]
gh-112620: Fix dis error on show_cache with labels (#112621)
Alex Waygood [Sun, 3 Dec 2023 11:50:22 +0000 (11:50 +0000)]
Run more `inspect.rst` code snippets in CI (#112654)
Victor Stinner [Sun, 3 Dec 2023 11:21:48 +0000 (12:21 +0100)]
gh-111545: Mention PEP 456 in PyHash_GetFuncDef() doc (#112647)
Victor Stinner [Sun, 3 Dec 2023 11:18:24 +0000 (12:18 +0100)]
gh-106560: Fix redundant declarations in Python/frozen.c (#112612)
Avoid duplicated declarations of "extern" functions in
Python/frozen.c.
Compiler warnings seen by building Python with gcc -Wredundant-decls.
Victor Stinner [Sun, 3 Dec 2023 11:16:31 +0000 (12:16 +0100)]
gh-106560: Fix redundant declarations in Include/ (#112611)
Don't declare PyBool_Type, PyLong_Type and PySys_Audit() twice, but
only once.
Compiler warnings seen by building Python with gcc -Wredundant-decls.
Shantanu [Sun, 3 Dec 2023 11:09:29 +0000 (03:09 -0800)]
gh-112578: Fix RuntimeWarning when running zipfile (GH-112579)
Alex Waygood [Sun, 3 Dec 2023 09:37:34 +0000 (09:37 +0000)]
gh-112316: improve docs for `inspect.signature` and `inspect.Signature` (#112631)
Terry Jan Reedy [Sun, 3 Dec 2023 09:28:37 +0000 (04:28 -0500)]
gh-66819: More IDLE htest updates(2) (#112642)
Examine and update spec -- callable pairs.
Revise run method.
Nikita Sobolev [Sat, 2 Dec 2023 23:39:43 +0000 (02:39 +0300)]
gh-112139: Add `inspect.Signature.format` and use it in `pydoc` (#112143)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Hugo van Kemenade [Sat, 2 Dec 2023 17:41:40 +0000 (19:41 +0200)]
Docs: Use sphinx-notfound-page to show a nicer 404 page (#111084)
Nikita Sobolev [Sat, 2 Dec 2023 16:10:19 +0000 (19:10 +0300)]
gh-112618: Make `Annotated` cache typed (#112619)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Nikita Sobolev [Sat, 2 Dec 2023 13:13:44 +0000 (16:13 +0300)]
gh-112316: Improve docs of `inspect.signature` and `Signature.from_callable` (#112317)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
William Wen [Fri, 1 Dec 2023 22:18:16 +0000 (14:18 -0800)]
gh-106922: Support multi-line error locations in traceback (attempt 2) (#112097)
Victor Stinner [Fri, 1 Dec 2023 18:50:10 +0000 (19:50 +0100)]
gh-112567: Add _PyTimeFraction C API (#112568)
Use a fraction internally in the _PyTime API to reduce the risk of
integer overflow: simplify the fraction using Greatest Common
Divisor (GCD). The fraction API is used by time functions:
perf_counter(), monotonic() and process_time().
For example, QueryPerformanceFrequency() usually returns 10 MHz on
Windows 10 and newer. The fraction SEC_TO_NS / frequency =
1_000_000_000 / 10_000_000 can be simplified to 100 / 1.
* Add _PyTimeFraction type.
* Add functions:
* _PyTimeFraction_Set()
* _PyTimeFraction_Mul()
* _PyTimeFraction_Resolution()
* No longer check "numer * denom <= _PyTime_MAX" in
_PyTimeFraction_Set(). _PyTimeFraction_Mul() uses _PyTime_Mul()
which handles integer overflow.
Victor Stinner [Fri, 1 Dec 2023 16:05:56 +0000 (17:05 +0100)]
gh-112567: Add _Py_GetTicksPerSecond() function (#112587)
* Move _PyRuntimeState.time to _posixstate.ticks_per_second and
time_module_state.ticks_per_second.
* Add time_module_state.clocks_per_second.
* Rename _PyTime_GetClockWithInfo() to py_clock().
* Rename _PyTime_GetProcessTimeWithInfo() to py_process_time().
* Add process_time_times() helper function, called by
py_process_time().
* os.times() is now always built: no longer rely on HAVE_TIMES.
Victor Stinner [Fri, 1 Dec 2023 15:54:40 +0000 (16:54 +0100)]
gh-110481: Fix typo in Py_SET_REFCNT() (#112595)
Zackery Spytz [Fri, 1 Dec 2023 15:16:49 +0000 (07:16 -0800)]
bpo-37013: Fix the error handling in socket.if_indextoname() (GH-13503)
* Fix a crash when pass UINT_MAX.
* Fix an integer overflow on 64-bit non-Windows platforms.
Alex Waygood [Fri, 1 Dec 2023 14:54:33 +0000 (14:54 +0000)]
gh-109413: libregrtest: enable mypy's `--strict-optional` check on most files (#112586)
Co-authored-by: Victor Stinner <vstinner@python.org>
Victor Stinner [Fri, 1 Dec 2023 14:50:16 +0000 (15:50 +0100)]
gh-110481: Fix Py_SET_REFCNT() integer overflow (#112174)
If Py_NOGIL is defined and Py_SET_REFCNT() is called with a reference
count larger than UINT32_MAX, make the object immortal.
Set _Py_IMMORTAL_REFCNT constant type to Py_ssize_t to fix the
following compiler warning:
Include/internal/pycore_global_objects_fini_generated.h:14:24:
warning: comparison of integers of different signs: 'Py_ssize_t'
(aka 'long') and 'unsigned int' [-Wsign-compare]
if (Py_REFCNT(obj) < _Py_IMMORTAL_REFCNT) {
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
Tian Gao [Fri, 1 Dec 2023 14:05:55 +0000 (05:05 -0900)]
gh-112510: Add `readline.backend` for the backend readline uses (GH-112511)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Donghee Na <donghee.na92@gmail.com>
Victor Stinner [Fri, 1 Dec 2023 13:46:50 +0000 (14:46 +0100)]
gh-109413: regrtest: add WorkerRunTests class (#112588)
Zackery Spytz [Fri, 1 Dec 2023 13:36:37 +0000 (05:36 -0800)]
gh-82565: Add tests for pickle and unpickle with bad files (GH-16606)
Pablo Galindo Salgado [Fri, 1 Dec 2023 13:20:51 +0000 (13:20 +0000)]
gh-112367: Only free perf trampoline arenas at shutdown (#112368)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Irit Katriel [Fri, 1 Dec 2023 12:57:31 +0000 (12:57 +0000)]
gh-111058: Change coro.cr_frame/gen.gi_frame to be None for a closed coroutine/generator. (#112428)
Rémi Lapeyre [Fri, 1 Dec 2023 11:17:47 +0000 (12:17 +0100)]
bpo-39912: Raise appropriate exceptions in filterwarnings() and simplefilter() (GH-18878)
dependabot[bot] [Fri, 1 Dec 2023 11:17:24 +0000 (11:17 +0000)]
build(deps): bump hypothesis from 6.88.1 to 6.91.0 in /Tools (#112580)
Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.88.1 to 6.91.0.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.88.1...hypothesis-python-6.91.0)
---
updated-dependencies:
- dependency-name: hypothesis
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot[bot] [Fri, 1 Dec 2023 10:41:09 +0000 (11:41 +0100)]
build(deps): bump actions/github-script from 6 to 7 (#112584)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6...v7)
---
updated-dependencies:
- dependency-name: actions/github-script
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Yang Hau [Fri, 1 Dec 2023 09:37:40 +0000 (17:37 +0800)]
Fix typos in variable names, function names, and comments (GH-101868)
dependabot[bot] [Fri, 1 Dec 2023 09:29:04 +0000 (09:29 +0000)]
build(deps-dev): bump types-setuptools from 68.2.0.0 to 69.0.0.0 in /Tools (#112582)
build(deps-dev): bump types-setuptools in /Tools
Bumps [types-setuptools](https://github.com/python/typeshed) from 68.2.0.0 to 69.0.0.0.
- [Commits](https://github.com/python/typeshed/commits)
---
updated-dependencies:
- dependency-name: types-setuptools
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot[bot] [Fri, 1 Dec 2023 09:21:45 +0000 (09:21 +0000)]
build(deps-dev): bump mypy from 1.7.0 to 1.7.1 in /Tools (#112581)
Bumps [mypy](https://github.com/python/mypy) from 1.7.0 to 1.7.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.7.0...v1.7.1)
---
updated-dependencies:
- dependency-name: mypy
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
William Andrea [Fri, 1 Dec 2023 08:41:11 +0000 (03:41 -0500)]
Add links under "generator expression" in glossary (#112537)
Terry Jan Reedy [Fri, 1 Dec 2023 07:02:31 +0000 (02:02 -0500)]
gh-66819: More IDLE htest updates (#112574)
Revise htest.py docstring and move 2 specs to alphabetical position.
Donghee Na [Thu, 30 Nov 2023 23:37:30 +0000 (23:37 +0000)]
gh-112205: Update stringio module to use AC for the thread-safe (gh-112549)
Alex Waygood [Thu, 30 Nov 2023 23:00:14 +0000 (23:00 +0000)]
gh-109413: Run mypy on `libregrtest` in CI (#112558)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Brett Cannon [Thu, 30 Nov 2023 21:38:10 +0000 (13:38 -0800)]
Clarify a comment for `test.support.Py_C_RECURSION_LIMIT` to point out where a value came from but that it doesn't need to stay in sync (#112224)
Alperen Serkan Aksöz [Thu, 30 Nov 2023 21:04:00 +0000 (00:04 +0300)]
gh-112502: Docs: Improve docs for gc.collect method (#112562)
* Docs: Improve docs for gc.collect method
* Update gc.rst
Brett Cannon [Thu, 30 Nov 2023 21:01:07 +0000 (13:01 -0800)]
Clarify that WASI tool requirements are included in the devcontainer (GH-112561)
Serhiy Storchaka [Thu, 30 Nov 2023 15:22:04 +0000 (17:22 +0200)]
gh-104231: Add more tests for str(), repr(), ascii(), and bytes() (GH-112551)
Matt Prodani [Thu, 30 Nov 2023 12:53:19 +0000 (07:53 -0500)]
gh-111699: Move smtpd note to dedicated section in What's New Python 3.12 doc (GH-112544)
Relocate smtpd deprecation notice to it's own section rather than under
'locale' in docs for What's New in Python 3.12 doc
Irit Katriel [Thu, 30 Nov 2023 11:03:30 +0000 (11:03 +0000)]
gh-112519: Make it possible to specify instruction flags for pseudo instructions in bytecodes.c (#112520)
Donghee Na [Thu, 30 Nov 2023 10:40:53 +0000 (10:40 +0000)]
gh-112205: Support @getter annotation from AC (gh-112396)
Kirill Podoprigora [Thu, 30 Nov 2023 10:12:49 +0000 (13:12 +0300)]
gh-111972: Make Unicode name C APIcapsule initialization thread-safe (#112249)
Terry Jan Reedy [Thu, 30 Nov 2023 07:08:44 +0000 (02:08 -0500)]
IDLE: fix config_key htest (#112545)
Change 'Dialog' to 'Window' in two places to match the name of the config_key class being tested.
Brett Cannon [Thu, 30 Nov 2023 00:18:25 +0000 (16:18 -0800)]
GH-103065, GH-106704, GH-105253: Provide a `Tools/wasm/wasi.py` script to simplify doing a WASI build (GH-112473)
Jelle Zijlstra [Wed, 29 Nov 2023 17:38:29 +0000 (09:38 -0800)]
gh-104003: Implement PEP 702 (#104004)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Jelle Zijlstra [Wed, 29 Nov 2023 17:36:48 +0000 (09:36 -0800)]
gh-112509: Fix keys being present in both required_keys and optional_keys in TypedDict (#112512)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Serhiy Storchaka [Wed, 29 Nov 2023 15:37:05 +0000 (17:37 +0200)]
Add more C API tests (GH-112522)
Add tests for PyObject_Str(), PyObject_Repr(), PyObject_ASCII() and
PyObject_Bytes().
Ethan Furman [Wed, 29 Nov 2023 04:40:12 +0000 (20:40 -0800)]
[Enum] update class creation for RuntimeError changes (GH-111815)
Guido van Rossum [Wed, 29 Nov 2023 01:10:11 +0000 (10:10 +0900)]
Rename ...Uop... to ...UOp... (uppercase O) for consistency (#112327)
* Rename _PyUopExecute to _PyUOpExecute (uppercase O) for consistency
* Also rename _PyUopName and _PyUOp_Replacements, and some output strings
Grant Ramsay [Wed, 29 Nov 2023 00:15:39 +0000 (13:15 +1300)]
gh-112454: Disable TLS-PSK if OpenSSL was built without PSK support (#112491)
If OpenSSL was built without PSK support, the python TLS-PSK
methods will raise "NotImplementedError" if called.
Add a constant "ssl.HAS_PSK" to check if TLS-PSK is supported
Itamar Oren [Tue, 28 Nov 2023 15:45:03 +0000 (07:45 -0800)]
GH-112245: Promote free threaded CI (#112246)
Hugo van Kemenade [Tue, 28 Nov 2023 14:46:00 +0000 (16:46 +0200)]
gh-110930: Correct book title by Alan D. Moore (#112490)
James Morris [Tue, 28 Nov 2023 09:24:59 +0000 (04:24 -0500)]
gh-112431: Unconditionally call `hash -r` (GH-112432)
The `activate` script calls `hash -r` in two places to make sure the shell picks
up the environment changes the script makes. Before that, it checks to
see if the shell running the script is bash or zsh.
`hash -r` is specified by POSIX and is not exclusive to bash and zsh.
This guard prevents the script from calling `hash -r` in other
`#!/bin/sh`-compatible shells like dash.
Sergey B Kirpichev [Tue, 28 Nov 2023 08:18:33 +0000 (11:18 +0300)]
gh-109802: Increase test coverage for complexobject.c (GH-112452)
Irit Katriel [Tue, 28 Nov 2023 08:03:25 +0000 (08:03 +0000)]
gh-112332: Deprecate TracebackException.exc_type, add exc_type_str. (#112333)
Tian Gao [Tue, 28 Nov 2023 06:23:23 +0000 (21:23 -0900)]
gh-112105: Make completer delims work on libedit (gh-112106)
Radislav Chugunov [Tue, 28 Nov 2023 03:27:39 +0000 (06:27 +0300)]
gh-112071: Make `_random.Random` methods thread-safe in `--disable-gil` builds (gh-112128)
Co-authored-by: Donghee Na <donghee.na@python.org>
Anthony Shaw [Tue, 28 Nov 2023 01:58:53 +0000 (12:58 +1100)]
gh-112292 : Catch import error conditions with readline hooks (gh-112313)
Prevents a segmentation fault in registered hooks for the readline library, but only when the readline module is loaded inside an isolated sub interpreter. The module is single-phase init so loading it fails, but not until the module init function has already run, where the readline hooks get registered.
The readlinestate_global macro was error-prone to PyImport_FindModule returning NULL and crashing in about 18 places. I could reproduce 1 easily, but this PR replaces the macro with a function and adds error conditions to the other functions.
Alex Waygood [Tue, 28 Nov 2023 00:15:23 +0000 (00:15 +0000)]
Docs: fix markup for `importlib.machinery.NamespaceLoader` (#112479)
Alex Waygood [Tue, 28 Nov 2023 00:09:59 +0000 (00:09 +0000)]
gh-112414: Add additional unit tests for calling `repr()` on a namespace package (#112475)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Eugene Toder [Mon, 27 Nov 2023 23:42:37 +0000 (18:42 -0500)]
Correct documentation for AF_PACKET (#112339)
Protocol in the address tuple should *not* be in the network-byte-order, because it is converted internally[1].
[1] https://github.com/python/cpython/blob/
89ddea4886942b0c27a778a0ad3f0d5ac5f518f0 /Modules/socketmodule.c#L2144
network byte order doesn't make sense for a python level int anyways. It's a fixed size C serialization concept.
Tian Gao [Mon, 27 Nov 2023 23:11:40 +0000 (14:11 -0900)]
gh-99367: Do not mangle sys.path[0] in pdb if safe_path is set (#111762)
Co-authored-by: Christian Walther <cwalther@users.noreply.github.com>