]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years agogh-85283: Build _uuid extension with limited C API (#111010)
Victor Stinner [Tue, 17 Oct 2023 23:07:12 +0000 (01:07 +0200)] 
gh-85283: Build _uuid extension with limited C API (#111010)

2 years agogh-84570: Add Timeouts to SendChannel.send() and RecvChannel.recv() (gh-110567)
Eric Snow [Tue, 17 Oct 2023 23:05:49 +0000 (17:05 -0600)] 
gh-84570: Add Timeouts to SendChannel.send() and RecvChannel.recv() (gh-110567)

2 years agogh-85283: Build _scproxy extension with limited C API (#111008)
Victor Stinner [Tue, 17 Oct 2023 22:32:53 +0000 (00:32 +0200)] 
gh-85283: Build _scproxy extension with limited C API (#111008)

* Replace Py_SETREF(v, NULL) with Py_CLEAR(v).
* Reformat the code.

2 years agogh-84570: Send-Wait Fixes for _xxinterpchannels (gh-111006)
Eric Snow [Tue, 17 Oct 2023 22:32:00 +0000 (16:32 -0600)] 
gh-84570: Send-Wait Fixes for _xxinterpchannels (gh-111006)

There were a few things I did in gh-110565 that need to be fixed. I also forgot to add tests in that PR.

(Note that this PR exposes a refleak introduced by gh-110246. I'll take care of that separately.)

2 years agogh-85283: Build resource extension with limited C API (#110989)
Victor Stinner [Tue, 17 Oct 2023 21:52:58 +0000 (23:52 +0200)] 
gh-85283: Build resource extension with limited C API (#110989)

* Replace PyStructSequence_SET_ITEM() with
  PyStructSequence_SetItem().
* Replace PyTuple_GET_SIZE() with PyTuple_Size().
* Replace PyTuple_GET_ITEM() with PyTuple_GetItem().

2 years agogh-85283: Fix _ctypes_test build on Windows in release mode (#111005)
Victor Stinner [Tue, 17 Oct 2023 21:45:24 +0000 (23:45 +0200)] 
gh-85283: Fix _ctypes_test build on Windows in release mode (#111005)

Define Py_BUILD_CORE to not attempt to link the extension to
python3.lib (which fails).

2 years agoAdd `.ruff_cache/` to `.gitignore` (#110983)
Nikita Sobolev [Tue, 17 Oct 2023 20:12:58 +0000 (23:12 +0300)] 
Add `.ruff_cache/` to `.gitignore` (#110983)

2 years agogh-110995: Fix test_gdb check_usable_gdb() (#110998)
Victor Stinner [Tue, 17 Oct 2023 18:19:14 +0000 (20:19 +0200)] 
gh-110995: Fix test_gdb check_usable_gdb() (#110998)

Fix detection of gdb built without Python scripting support.

* check_usable_gdb() doesn't check gdb exit code when calling
  run_gdb().
* Use shutil.which() to get the path to the gdb program.

2 years agogh-109693: Remove pycore_atomic.h (gh-110992)
Donghee Na [Tue, 17 Oct 2023 15:33:50 +0000 (00:33 +0900)] 
gh-109693: Remove pycore_atomic.h (gh-110992)

2 years agogh-85283: Add PySys_Audit() to the limited C API (#108571)
Victor Stinner [Tue, 17 Oct 2023 14:02:23 +0000 (16:02 +0200)] 
gh-85283: Add PySys_Audit() to the limited C API (#108571)

The PySys_Audit() function was added in Python 3.8 by the PEP 578
"Python Runtime Audit Hooks".

Add also PySys_AuditTuple() to the limited C API, function added
to Python 3.13.

Move non-limited "PerfMap" C API from Include/sysmodule.h to
Include/cpython/sysmodule.h.

2 years agogh-85283: Build winsound extension with limited C API (#110978)
Victor Stinner [Tue, 17 Oct 2023 13:57:10 +0000 (15:57 +0200)] 
gh-85283: Build winsound extension with limited C API (#110978)

Replace type->tp_name with PyType_GetQualName().

2 years agogh-107457: update dis documentation with changes in 3.12 (#108900)
Matthieu Dartiailh [Tue, 17 Oct 2023 12:59:34 +0000 (14:59 +0200)] 
gh-107457: update dis documentation with changes in 3.12 (#108900)

2 years agogh-110938: Fix error messages for indented blocks with functions and classes with...
Pablo Galindo Salgado [Tue, 17 Oct 2023 12:45:13 +0000 (13:45 +0100)] 
gh-110938: Fix error messages for indented blocks with functions and classes with generic type parameters (#110973)

2 years agogh-110964: Remove private _PyArg functions (#110966)
Victor Stinner [Tue, 17 Oct 2023 12:30:31 +0000 (14:30 +0200)] 
gh-110964: Remove private _PyArg functions (#110966)

Move the following private functions and structures to
pycore_modsupport.h internal C API:

* _PyArg_BadArgument()
* _PyArg_CheckPositional()
* _PyArg_NoKeywords()
* _PyArg_NoPositional()
* _PyArg_ParseStack()
* _PyArg_ParseStackAndKeywords()
* _PyArg_Parser structure
* _PyArg_UnpackKeywords()
* _PyArg_UnpackKeywordsWithVararg()
* _PyArg_UnpackStack()
* _Py_ANY_VARARGS()

Changes:

* Python/getargs.h now includes pycore_modsupport.h to export
  functions.
* clinic.py now adds pycore_modsupport.h when one of these functions
  is used.
* Add pycore_modsupport.h includes when a C extension uses one of
  these functions.
* Define Py_BUILD_CORE_MODULE in C extensions which now include
  directly or indirectly (via code generated by Argument Clinic)
  pycore_modsupport.h:

  * _csv
  * _curses_panel
  * _dbm
  * _gdbm
  * _multiprocessing.posixshmem
  * _sqlite.row
  * _statistics
  * grp
  * resource
  * syslog

* _testcapi: bad_get() no longer uses METH_FASTCALL calling
  convention but METH_VARARGS. Replace _PyArg_UnpackStack() with
  PyArg_ParseTuple().
* _testcapi: add PYTESTCAPI_NEED_INTERNAL_API macro which is defined
  by _testcapi sub-modules which need the internal C API
  (pycore_modsupport.h): exceptions.c, float.c, vectorcall.c,
  watchers.c.
* Remove Include/cpython/modsupport.h header file.
  Include/modsupport.h no longer includes the removed header file.
* Fix mypy clinic.py

2 years agogh-85283: Fix Argument Clinic for md5 extension (#110976)
Victor Stinner [Tue, 17 Oct 2023 11:46:16 +0000 (13:46 +0200)] 
gh-85283: Fix Argument Clinic for md5 extension (#110976)

Limited C API supports the defining class under some conditions.

2 years agogh-85283: Build md5 extension with limited C API (#110967)
Victor Stinner [Tue, 17 Oct 2023 10:57:41 +0000 (12:57 +0200)] 
gh-85283: Build md5 extension with limited C API (#110967)

* Replace _Py_strhex() with few lines of code.
* Replace _PyType_GetModuleState() with PyType_GetModuleState().
* Fix make check-c-globals.

2 years agoBump test deps: `ruff` and `pre-commit-hooks` (#110972)
Nikita Sobolev [Tue, 17 Oct 2023 10:32:29 +0000 (13:32 +0300)] 
Bump test deps: `ruff` and `pre-commit-hooks` (#110972)

2 years agogh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED new in 3.13. (#110969)
Victor Stinner [Tue, 17 Oct 2023 10:27:16 +0000 (12:27 +0200)] 
gh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED new in 3.13. (#110969)

* Only add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED to limited C API
  version 3.13.
* errno, xxlimited and _ctypes_test extensions now need the limited C
  API version 3.13 to get Py_MOD_PER_INTERPRETER_GIL_SUPPORTED.  They
  now include standard header files explicitly: <errno.h>, <string.h>
  and <stdio.h>.
* xxlimited_35: Remove Py_mod_multiple_interpreters slot,
  incompatible with limited C API version 3.5.

2 years agogh-110695: test_asyncio uses 50 ms for clock resolution (#110952)
Victor Stinner [Tue, 17 Oct 2023 09:34:04 +0000 (11:34 +0200)] 
gh-110695: test_asyncio uses 50 ms for clock resolution (#110952)

Before utils.CLOCK_RES constant was added (20 ms), test_asyncio
already used 50 ms.

2 years agoBump sphinx-lint to v0.8.1 (#110933)
Alex Waygood [Tue, 17 Oct 2023 05:26:06 +0000 (06:26 +0100)] 
Bump sphinx-lint to v0.8.1 (#110933)

2 years agogh-85283: Build errno and _ctypes_test with limited C API (#110955)
Victor Stinner [Tue, 17 Oct 2023 01:05:20 +0000 (03:05 +0200)] 
gh-85283: Build errno and _ctypes_test with limited C API (#110955)

_testimportmultiple is now built with limited C API version 3.2.

2 years agogh-85283: Add PyMem_RawMalloc() to the limited C API (#108570)
Victor Stinner [Tue, 17 Oct 2023 00:41:51 +0000 (02:41 +0200)] 
gh-85283: Add PyMem_RawMalloc() to the limited C API (#108570)

Add PyMem_RawMalloc(), PyMem_RawCalloc(), PyMem_RawRealloc() and
PyMem_RawFree() to the limited C API.

These functions were added by Python 3.4 and are needed to port
stdlib extensions to the limited C API, like grp and pwd.

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2 years agogh-85283: Build _testimportmultiple with limited C API (#110954)
Victor Stinner [Tue, 17 Oct 2023 00:27:15 +0000 (02:27 +0200)] 
gh-85283: Build _testimportmultiple with limited C API (#110954)

2 years agogh-109693: Update _gil_runtime_state.locked to use pyatomic.h (gh-110836)
Donghee Na [Mon, 16 Oct 2023 22:32:50 +0000 (07:32 +0900)] 
gh-109693: Update _gil_runtime_state.locked to use pyatomic.h (gh-110836)

2 years agogh-84570: Factor Out _channel_send_wait() (gh-110949)
Eric Snow [Mon, 16 Oct 2023 21:42:57 +0000 (15:42 -0600)] 
gh-84570: Factor Out _channel_send_wait() (gh-110949)

This makes several subsequent changes cleaner.

2 years agogh-107450: Remove unnecessary overflow check in parser error handler (#110940)
Lysandros Nikolaou [Mon, 16 Oct 2023 20:41:01 +0000 (22:41 +0200)] 
gh-107450: Remove unnecessary overflow check in parser error handler (#110940)

2 years agogh-110905: [Enum] minor fixes and cleanup (GH-110906)
Pieter Eendebak [Mon, 16 Oct 2023 20:37:54 +0000 (22:37 +0200)] 
gh-110905: [Enum] minor fixes and cleanup (GH-110906)

2 years agoC-API docs: Clarify the size of arenas (#110895)
Mienxiu [Mon, 16 Oct 2023 18:52:13 +0000 (03:52 +0900)] 
C-API docs: Clarify the size of arenas (#110895)

Clarify the size of arenas

From 3.10.0 alpha 7, the pymalloc allocator uses arenas with a fixed size of 1
MiB on 64-bit platforms instead of 256 KiB on 32-bit platforms.

2 years agogh-110864: TypeVar constructor: Partially revert gh-110784, `constraints` cannot...
Nikita Sobolev [Mon, 16 Oct 2023 15:01:04 +0000 (18:01 +0300)] 
gh-110864: TypeVar constructor: Partially revert gh-110784, `constraints` cannot be `NULL` (#110922)

2 years agoEnable ruff on several more files in `Lib/test` (#110929)
Alex Waygood [Mon, 16 Oct 2023 14:57:01 +0000 (15:57 +0100)] 
Enable ruff on several more files in `Lib/test` (#110929)

2 years agogh-107450: Check for overflow in the tokenizer and fix overflow test (#110832)
Lysandros Nikolaou [Mon, 16 Oct 2023 14:42:49 +0000 (16:42 +0200)] 
gh-107450: Check for overflow in the tokenizer and fix overflow test (#110832)

Co-authored-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agogh-110912: Correctly display tracebacks for MemoryError exceptions using the tracebac...
Pablo Galindo Salgado [Mon, 16 Oct 2023 14:39:23 +0000 (15:39 +0100)] 
gh-110912: Correctly display tracebacks for MemoryError exceptions using the traceback module (#110921)

2 years agogh-110907: AC: Disallow using `*` with vararg (#110908)
Nikita Sobolev [Mon, 16 Oct 2023 14:26:11 +0000 (17:26 +0300)] 
gh-110907: AC: Disallow using `*` with vararg (#110908)

2 years agogh-110923: Fix silently skipped tests in test__opcode.py (#110926)
Alex Waygood [Mon, 16 Oct 2023 13:30:35 +0000 (14:30 +0100)] 
gh-110923: Fix silently skipped tests in test__opcode.py (#110926)

2 years agogh-110527: Improve `PySet_Clear` docs (#110528)
Nikita Sobolev [Mon, 16 Oct 2023 13:05:09 +0000 (16:05 +0300)] 
gh-110527: Improve `PySet_Clear` docs (#110528)

2 years agogh-110864: Fix _PyArg_UnpackKeywordsWithVararg overwriting vararg with NULL (#110868)
Nikita Sobolev [Mon, 16 Oct 2023 11:42:44 +0000 (14:42 +0300)] 
gh-110864: Fix _PyArg_UnpackKeywordsWithVararg overwriting vararg with NULL (#110868)

2 years agosysconfig docs: fix broken link to the source code (#110920)
Karolina Surma [Mon, 16 Oct 2023 11:27:12 +0000 (13:27 +0200)] 
sysconfig docs: fix broken link to the source code (#110920)

It's now a package. See: https://github.com/python/cpython/commit/4a53a397c311567f05553bc25a28aebaba4f6f65

2 years agogh-108791: Fix `pdb` CLI invalid argument handling (#108816)
Radislav Chugunov [Mon, 16 Oct 2023 09:38:07 +0000 (12:38 +0300)] 
gh-108791: Fix `pdb` CLI invalid argument handling (#108816)

2 years agoregrtest: Prepend 'use' options in --{fast,slow}-ci (GH-110363)
Zachary Ware [Sun, 15 Oct 2023 18:34:28 +0000 (13:34 -0500)] 
regrtest: Prepend 'use' options in --{fast,slow}-ci (GH-110363)

This allows individual resources to be disabled without having to explicitly re-enable all others.

2 years agogh-110886 Doc: add a link to BNF Wikipedia article (#110887)
partev [Sun, 15 Oct 2023 16:52:13 +0000 (12:52 -0400)] 
gh-110886 Doc: add a link to BNF Wikipedia article (#110887)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years agoLint: Include test_monitoring.py for Ruff (#110898)
Hugo van Kemenade [Sun, 15 Oct 2023 16:48:00 +0000 (19:48 +0300)] 
Lint: Include test_monitoring.py for Ruff (#110898)

2 years agogh-84583: Make pdb enter post-mortem mode even for SyntaxError (#110883)
Tian Gao [Sun, 15 Oct 2023 10:55:00 +0000 (03:55 -0700)] 
gh-84583: Make pdb enter post-mortem mode even for SyntaxError (#110883)

2 years agogh-110722: Add PYTHON_PRESITE to import a module before site.py is run (#110769)
Łukasz Langa [Sat, 14 Oct 2023 21:32:57 +0000 (23:32 +0200)] 
gh-110722: Add PYTHON_PRESITE to import a module before site.py is run (#110769)

2 years agobpo-42663: Fix parsing TZ strings in zoneinfo module (GH-23825)
Serhiy Storchaka [Sat, 14 Oct 2023 20:24:33 +0000 (23:24 +0300)] 
bpo-42663: Fix parsing TZ strings in zoneinfo module (GH-23825)

zipinfo now supports the full range of values in the TZ string
determined by RFC 8536 and detects all invalid formats.
Both Python and C implementations now raise exceptions of the same
type on invalid data.

2 years agogh-101100: Fix sphinx warnings in `library/time.rst` (#110862)
Nikita Sobolev [Sat, 14 Oct 2023 14:20:19 +0000 (17:20 +0300)] 
gh-101100: Fix sphinx warnings in `library/time.rst` (#110862)

2 years agoremove redundant call to attach_loop in watcher (#110847)
Thomas Grainger [Sat, 14 Oct 2023 08:24:02 +0000 (01:24 -0700)] 
remove redundant call to attach_loop in watcher (#110847)

2 years agogh-110715: Add missing import in zipfile (gh-110822)
Kirill Podoprigora [Sat, 14 Oct 2023 07:17:47 +0000 (10:17 +0300)] 
gh-110715: Add missing import in zipfile (gh-110822)

2 years agogh-109747: Improve errors for unsupported look-behind patterns (GH-109859)
Serhiy Storchaka [Sat, 14 Oct 2023 06:13:02 +0000 (09:13 +0300)] 
gh-109747: Improve errors for unsupported look-behind patterns (GH-109859)

Now re.error is raised instead of OverflowError or RuntimeError for
too large width of look-behind pattern.

The limit is increased to 2**32-1 (was 2**31-1).

2 years agogh-107705: Fix file leak in test_tkinter in the C locale (GH-110507)
Serhiy Storchaka [Sat, 14 Oct 2023 06:09:07 +0000 (09:09 +0300)] 
gh-107705: Fix file leak in test_tkinter in the C locale (GH-110507)

2 years agogh-88434: Emit deprecation warnings for non-integer numbers in gettext if translation...
Serhiy Storchaka [Sat, 14 Oct 2023 06:07:02 +0000 (09:07 +0300)] 
gh-88434: Emit deprecation warnings for non-integer numbers in gettext if translation not found (GH-110574)

2 years agogh-101100: Fix sphinx warnings in `usage/cmdline.rst` (#110841)
Nikita Sobolev [Sat, 14 Oct 2023 06:05:46 +0000 (09:05 +0300)] 
gh-101100: Fix sphinx warnings in `usage/cmdline.rst` (#110841)

2 years agogh-110628: Add tests for PyLong C API (GH-110629)
Serhiy Storchaka [Sat, 14 Oct 2023 05:53:57 +0000 (08:53 +0300)] 
gh-110628: Add tests for PyLong C API (GH-110629)

2 years agogh-110392: Fix tty functions (GH-110642)
Serhiy Storchaka [Sat, 14 Oct 2023 05:50:41 +0000 (08:50 +0300)] 
gh-110392: Fix tty functions (GH-110642)

* tty.setraw() and tty.setcbreak() previously returned partially modified
  list of the original tty attributes. Now they return the correct list of
  the original tty attributes

* tty.cfmakeraw() and tty.cfmakecbreak() now make a copy of the list of
  special characters before modifying it.

2 years agogh-110815: Support non-ASCII keyword names in PyArg_ParseTupleAndKeywords() (GH-110816)
Serhiy Storchaka [Sat, 14 Oct 2023 05:50:03 +0000 (08:50 +0300)] 
gh-110815: Support non-ASCII keyword names in PyArg_ParseTupleAndKeywords() (GH-110816)

It already mostly worked, except in the case when invalid keyword
argument with non-ASCII name was passed to function with non-ASCII
parameter names. Then it crashed in the debug mode.

2 years agoregrtest: --fast-ci/slow-ci no longer imply --rerun-fail (#110849)
Victor Stinner [Sat, 14 Oct 2023 00:25:38 +0000 (02:25 +0200)] 
regrtest: --fast-ci/slow-ci no longer imply --rerun-fail (#110849)

2 years agogh-109693: Update pyruntimestate._finalizing to use pyatomic.h (gh-110837)
Donghee Na [Fri, 13 Oct 2023 16:40:15 +0000 (01:40 +0900)] 
gh-109693: Update pyruntimestate._finalizing to use pyatomic.h (gh-110837)

2 years agogh-110697: test_os TimerfdTests uses selectors (#110789)
Victor Stinner [Fri, 13 Oct 2023 14:20:18 +0000 (16:20 +0200)] 
gh-110697: test_os TimerfdTests uses selectors (#110789)

Replace select.epoll() with selectors.DefaultSelector to support
FreeBSD 14 and newer.

* Merge common code between test_timerfd_epoll()
  test_timerfd_ns_epoll().
* Replace "_ = func()" with "func()".
* Add TimerfdTests.read_count_signaled() method.

2 years agogh-110771: Decompose run_forever() into parts (#110773)
Russell Keith-Magee [Fri, 13 Oct 2023 14:12:32 +0000 (16:12 +0200)] 
gh-110771: Decompose run_forever() into parts (#110773)

Effectively introduce an unstable, private (really: protected) API for subclasses that want to override `run_forever()`.

2 years agoBump sphinx-lint to 0.7.0 (#110830)
Alex Waygood [Fri, 13 Oct 2023 13:58:26 +0000 (15:58 +0200)] 
Bump sphinx-lint to 0.7.0 (#110830)

2 years agogh-110703: Add asyncio.wait_for() change notes for 3.11 (GH-110818)
paskozdilar [Fri, 13 Oct 2023 13:15:28 +0000 (15:15 +0200)] 
gh-110703: Add asyncio.wait_for() change notes for 3.11 (GH-110818)

* Remove redundant versionchanged

* Add missing versionchanged

* Update Doc/library/asyncio-task.rst

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
---------

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 years agogh-110815: Improve tests for PyArg_ParseTupleAndKeywords() (GH-110817)
Serhiy Storchaka [Fri, 13 Oct 2023 13:05:01 +0000 (16:05 +0300)] 
gh-110815: Improve tests for PyArg_ParseTupleAndKeywords() (GH-110817)

2 years agogh-110803: Reorganize docs for what PyType_Slot doesn't cover (GH-110813)
Petr Viktorin [Fri, 13 Oct 2023 12:51:48 +0000 (14:51 +0200)] 
gh-110803: Reorganize docs for what PyType_Slot doesn't cover (GH-110813)

* gh-110803: Reorganize docs for what PyType_Slot doesn't cover

- Cover the offset fields first
- Mention the old alternative for MANAGED flags, which is needed
  to support older Pythons
- De-emphasize the internal flags: use an inline list.
- Add a note to PyMemberDef saying what to do with it

* Remove an older draft...

2 years agoMerge branch 'main' of https://github.com/python/cpython
Thomas Wouters [Fri, 13 Oct 2023 11:40:12 +0000 (13:40 +0200)] 
Merge branch 'main' of https://github.com/python/cpython

2 years agoPost 3.13.0a1
Thomas Wouters [Fri, 13 Oct 2023 11:39:00 +0000 (13:39 +0200)] 
Post 3.13.0a1

2 years agogh-110805: Fix test_peg_generator after the change in the parser for REPL tracebacks...
Pablo Galindo Salgado [Fri, 13 Oct 2023 11:04:23 +0000 (13:04 +0200)] 
gh-110805: Fix test_peg_generator after the change in the parser for REPL tracebacks (#110814)

Fix test_peg_generator after the change in the parser for REPL tracebacks

2 years agogh-110805: Allow the repl to show source code and complete tracebacks (#110775)
Pablo Galindo Salgado [Fri, 13 Oct 2023 09:25:37 +0000 (11:25 +0200)] 
gh-110805: Allow the repl to show source code and complete tracebacks (#110775)

2 years agogh-106212: Raise when using c-analyzer with clang on darwin (#110757)
Lysandros Nikolaou [Fri, 13 Oct 2023 08:52:30 +0000 (10:52 +0200)] 
gh-106212: Raise when using c-analyzer with clang on darwin (#110757)

2 years agoPython 3.13.0a1 v3.13.0a1
Thomas Wouters [Fri, 13 Oct 2023 08:50:46 +0000 (10:50 +0200)] 
Python 3.13.0a1

2 years agoFix the pyspecific SOURCE_URI (#110811)
T. Wouters [Fri, 13 Oct 2023 08:43:01 +0000 (10:43 +0200)] 
Fix the pyspecific SOURCE_URI (#110811)

2 years agogh-107450: Fix testMemoryErrorBigSource using the bigmemtest decorator (GH-110810)
Lysandros Nikolaou [Fri, 13 Oct 2023 08:30:56 +0000 (10:30 +0200)] 
gh-107450: Fix testMemoryErrorBigSource using the bigmemtest decorator (GH-110810)

2 years agogh-110525: Delete `test_c_api` method from `set` object (#110688)
Nikita Sobolev [Fri, 13 Oct 2023 08:06:25 +0000 (11:06 +0300)] 
gh-110525: Delete `test_c_api` method from `set` object (#110688)

2 years agogh-107450: Fix parser column offset overflow test on Windows (#110768)
Lysandros Nikolaou [Fri, 13 Oct 2023 07:41:00 +0000 (09:41 +0200)] 
gh-107450: Fix parser column offset overflow test on Windows (#110768)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years agoGH-110796: fix intermittent test failure in test_current_exceptions
Filipe Laíns [Fri, 13 Oct 2023 06:26:27 +0000 (07:26 +0100)] 
GH-110796: fix intermittent test failure in test_current_exceptions

2 years agoGH-110786: suppress BrokenPipeError on the sysconfig CLI (#110791)
Filipe Laíns [Fri, 13 Oct 2023 05:49:55 +0000 (06:49 +0100)] 
GH-110786: suppress BrokenPipeError on the sysconfig CLI (#110791)

2 years agoGH-103480: fix sysconfig package not being installed (#110792)
Filipe Laíns [Fri, 13 Oct 2023 01:13:28 +0000 (02:13 +0100)] 
GH-103480: fix sysconfig package not being installed (#110792)

2 years agogh-109693: Update _gil_runtime_state.last_holder to use pyatomic.h (#110605)
Donghee Na [Fri, 13 Oct 2023 01:07:27 +0000 (10:07 +0900)] 
gh-109693: Update _gil_runtime_state.last_holder to use pyatomic.h (#110605)

2 years agoGH-103480: make sysconfig a package (GH-110785)
Filipe Laíns [Thu, 12 Oct 2023 23:41:34 +0000 (00:41 +0100)] 
GH-103480: make sysconfig a package (GH-110785)

2 years agogh-110782: Fix crash when TypeVar is constructed with keyword args (#110784)
Jelle Zijlstra [Thu, 12 Oct 2023 23:00:12 +0000 (16:00 -0700)] 
gh-110782: Fix crash when TypeVar is constructed with keyword args (#110784)

2 years agoRemove unnecessary escape in Doc/library/enum.rst (GH-110780)
InSync [Thu, 12 Oct 2023 22:04:36 +0000 (05:04 +0700)] 
Remove unnecessary escape in Doc/library/enum.rst (GH-110780)

2 years agogh-109653: Improve the import time of `email.utils` (#109824)
Alex Waygood [Thu, 12 Oct 2023 22:03:20 +0000 (00:03 +0200)] 
gh-109653: Improve the import time of `email.utils` (#109824)

2 years agogh-110721: Use the traceback module for PyErr_Display() and fallback to the C impleme...
Pablo Galindo Salgado [Thu, 12 Oct 2023 14:52:14 +0000 (16:52 +0200)] 
gh-110721: Use the traceback module for PyErr_Display() and fallback to the C implementation (#110702)

2 years agogh-94597: Add asyncio.EventLoop (#110723)
Thomas Grainger [Thu, 12 Oct 2023 14:13:57 +0000 (07:13 -0700)] 
gh-94597: Add asyncio.EventLoop (#110723)

This is needed to pave the way for deprecating and eventually killing the event loop policy system (which is over-engineered and rarely used).

2 years agogh-110752: Reset `ceval.eval_breaker` to 0 in `interpreter_clear` (GH-110753)
Tian Gao [Thu, 12 Oct 2023 14:10:21 +0000 (07:10 -0700)] 
gh-110752: Reset `ceval.eval_breaker` to 0 in `interpreter_clear` (GH-110753)

2 years agogh-109409: Fix inheritance of frozen dataclass from non-frozen dataclass mixins ...
Nikita Sobolev [Thu, 12 Oct 2023 13:05:23 +0000 (16:05 +0300)] 
gh-109409: Fix inheritance of frozen dataclass from non-frozen dataclass mixins (gh-109437)

Fix inheritance of frozen dataclass from non-frozen dataclass mixins

2 years agogh-109094: remove redundant arg to _PyFrame_PushTrampolineUnchecked (GH-110759)
Irit Katriel [Thu, 12 Oct 2023 10:02:42 +0000 (12:02 +0200)] 
gh-109094: remove redundant arg to _PyFrame_PushTrampolineUnchecked (GH-110759)

2 years agoGH-109214: Convert _SAVE_CURRENT_IP to _SET_IP in tier 2 trace creation. (GH-110755)
Mark Shannon [Thu, 12 Oct 2023 09:34:32 +0000 (10:34 +0100)] 
GH-109214: Convert _SAVE_CURRENT_IP to _SET_IP in tier 2 trace creation. (GH-110755)

2 years agogh-107450: Raise OverflowError when parser column offset overflows (#110754)
Lysandros Nikolaou [Thu, 12 Oct 2023 09:34:12 +0000 (11:34 +0200)] 
gh-107450: Raise OverflowError when parser column offset overflows (#110754)

2 years agogh-110696: Fix incorrect syntax error message for incorrect argument unpacking (...
Pablo Galindo Salgado [Thu, 12 Oct 2023 09:02:02 +0000 (10:02 +0100)] 
gh-110696: Fix incorrect syntax error message for incorrect argument unpacking (#110706)

2 years agogh-71587: Establish global state in `_datetime` (#110475)
Erlend E. Aasland [Thu, 12 Oct 2023 08:28:10 +0000 (10:28 +0200)] 
gh-71587: Establish global state in `_datetime` (#110475)

* Use explicit initialiser for m_base
* Add module state stub; establish global state on stack
* Put conversion factors in state struct
* Move PyDateTime_TimeZone_UTC to state
* Move PyDateTime_Epoch to state struct
* Fix ref leaks in and clean up initialisation

2 years agogh-106193: Rename and fix duplicated tests in `test_monitoring` (GH-109139)
Hugo van Kemenade [Thu, 12 Oct 2023 07:43:58 +0000 (09:43 +0200)] 
gh-106193: Rename and fix duplicated tests in `test_monitoring` (GH-109139)

2 years agogh-104169: Fix test_peg_generator after tokenizer refactoring (#110727)
Lysandros Nikolaou [Thu, 12 Oct 2023 07:34:35 +0000 (09:34 +0200)] 
gh-104169: Fix test_peg_generator after tokenizer refactoring (#110727)

* Fix test_peg_generator after tokenizer refactoring
* Remove references to tokenizer.c in comments etc.

2 years agoGH-110749: fix unistd.h import in file_tokenizer.c (#110750)
Filipe Laíns [Thu, 12 Oct 2023 05:52:13 +0000 (06:52 +0100)] 
GH-110749: fix unistd.h import in file_tokenizer.c (#110750)

2 years agogh-110682: Ignore `__match_args__` from `__instancecheck__` in protocols (#110683)
Nikita Sobolev [Thu, 12 Oct 2023 02:20:20 +0000 (05:20 +0300)] 
gh-110682: Ignore `__match_args__` from `__instancecheck__` in protocols (#110683)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agogh-85283: _stat extension now uses the limited C API (#110711)
Victor Stinner [Wed, 11 Oct 2023 22:06:20 +0000 (00:06 +0200)] 
gh-85283: _stat extension now uses the limited C API (#110711)

gh-85283: _stat extension uses the limited C API

The _stat C extension is now built with the limited C API.

2 years agogh-110673: test_pty raises on short write (#110677)
Victor Stinner [Wed, 11 Oct 2023 21:30:15 +0000 (23:30 +0200)] 
gh-110673: test_pty raises on short write (#110677)

Add write_all() helper function to test_pty to raise an exception on
short write: if os.writes() does not write all bytes. It should not
happen for a PTY.

2 years agogh-110733: Micro-optimization in BaseEventLoop._run_once (#110735)
J. Nick Koston [Wed, 11 Oct 2023 20:59:27 +0000 (10:59 -1000)] 
gh-110733: Micro-optimization in BaseEventLoop._run_once (#110735)

2 years agogh-110631: Fix reST indentation in `Doc/reference` (#110708)
Ezio Melotti [Wed, 11 Oct 2023 20:50:55 +0000 (22:50 +0200)] 
gh-110631: Fix reST indentation in `Doc/reference` (#110708)

Fix wrong indentation in the Doc/reference dir.

2 years agogh-85283: If Py_LIMITED_API is defined, undefine Py_BUILD_CORE (#110725)
Victor Stinner [Wed, 11 Oct 2023 20:47:54 +0000 (22:47 +0200)] 
gh-85283: If Py_LIMITED_API is defined, undefine Py_BUILD_CORE (#110725)

If the Py_LIMITED_API macro is defined, Py_BUILD_CORE,
Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE macros are now
undefined by Python.h.

Only undefine these 3 macros after including "exports.h" which uses
them to define PyAPI_FUNC(), PyAPI_DATA() and PyMODINIT_FUNC macros.

Remove hacks (undefine manually the 3 Py_BUILD_CORE macros) in
Modules/_testcapi/parts.h and Modules/_testclinic_limited.c.

2 years agogh-110631: Fix reST indentation (#110724)
Ezio Melotti [Wed, 11 Oct 2023 20:43:03 +0000 (22:43 +0200)] 
gh-110631: Fix reST indentation (#110724)

* Fix wrong indentation in the other dirs.

* Fix more wrong indentation.

2 years agogh-110631: Fix reST indentation in `Doc/library` (#110685)
Ezio Melotti [Wed, 11 Oct 2023 20:24:12 +0000 (22:24 +0200)] 
gh-110631: Fix reST indentation in `Doc/library` (#110685)

Fix wrong indentation in the Doc/library dir.