summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-42663: Fix parsing TZ strings in zoneinfo module (GH-23825)Serhiy Storchaka2023-10-141-218/+151
| | | | | | | 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.
* gh-109747: Improve errors for unsupported look-behind patterns (GH-109859)Serhiy Storchaka2023-10-142-9/+7
| | | | | | 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).
* gh-110628: Add tests for PyLong C API (GH-110629)Serhiy Storchaka2023-10-142-0/+224
|
* gh-110815: Improve tests for PyArg_ParseTupleAndKeywords() (GH-110817)Serhiy Storchaka2023-10-131-13/+39
|
* gh-71587: Establish global state in `_datetime` (#110475)Erlend E. Aasland2023-10-121-136/+172
| | | | | | | | * 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
* gh-104169: Fix test_peg_generator after tokenizer refactoring (#110727)Lysandros Nikolaou2023-10-121-1/+1
| | | | * Fix test_peg_generator after tokenizer refactoring * Remove references to tokenizer.c in comments etc.
* gh-85283: _stat extension now uses the limited C API (#110711)Victor Stinner2023-10-111-0/+3
| | | | | gh-85283: _stat extension uses the limited C API The _stat C extension is now built with the limited C API.
* gh-110289: C API: Add PyUnicode_EqualToUTF8() and ↵Serhiy Storchaka2023-10-111-0/+44
| | | | PyUnicode_EqualToUTF8AndSize() functions (GH-110297)
* gh-84489: C API: Add tests for Py_BuildValue() (GH-110596)Serhiy Storchaka2023-10-111-0/+37
|
* gh-110525: Add tests for internal `set` CAPI (GH-110630)Nikita Sobolev2023-10-104-1/+64
|
* gh-110590: Fix a bug where _sre.compile would overwrite exceptions (#110591)Nikita Sobolev2023-10-101-0/+3
| | | | TypeError would be overwritten by OverflowError if 'code' param contained non-ints.
* gh-109595: Add -Xcpu_count=<n> cmdline for container users (#109667)Donghee Na2023-10-101-2/+6
| | | | | | --------- Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
* gh-84570: Implement Waiting in SendChannel.send() (gh-110565)Eric Snow2023-10-101-26/+101
| | | | | We had been faking it (poorly). We will add timeouts separately.
* gh-109693: Use pyatomic.h for signal module (gh-110480)Donghee Na2023-10-091-17/+18
|
* gh-78469: Declare missing sethostname for Solaris 10 (#109447)Jakub Kulík2023-10-091-2/+3
| | | Add OS version specific macro for Solaris: Py_SUNOS_VERSION.
* gh-107652: Set up CIFuzz to run fuzz targets continuously (#107653)Illia Volochii2023-10-091-0/+3
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-76785: Add SendChannel.send_buffer() (#110246)Eric Snow2023-10-092-36/+287
| | | (This is still a test module.)
* gh-109191: Fix build with newer editline (gh-110239)Bo Anderson2023-10-091-1/+1
|
* gh-110525: Cover PySet_Add corner case with frozenset objects (GH-110544)Nikita Sobolev2023-10-091-0/+37
|
* gh-110549: Remove unused includes of <stddef.h> in _testcapi (GH-110552)Nikita Sobolev2023-10-093-6/+0
|
* gh-110525: Add CAPI tests for set and frozenset objects (GH-110526)Nikita Sobolev2023-10-094-1/+167
|
* gh-89902: Deprecate non-standard format specifier "N" for Decimal (GH-110508)Serhiy Storchaka2023-10-081-0/+6
| | | It was not documented and only supported in the C implementation.
* gh-108277: Add os.timerfd_create() function (#108382)Masaru Tsuchiyama2023-10-072-1/+639
| | | | | | | | Add wrapper for timerfd_create, timerfd_settime, and timerfd_gettime to os module. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-76785: Support Running Some Functions in Subinterpreters (gh-110251)Eric Snow2023-10-061-24/+318
| | | This specifically refers to `test.support.interpreters.Interpreter.run()`.
* gh-106078: Suppress the warning caused by multi-phase initialization of ↵Charlie Zhao2023-10-061-1/+7
| | | | `decimal` (#107524)
* gh-110489: Optimise math.ceil for known exact float (#108801)Shantanu2023-10-061-7/+9
| | | | This matches a similar optimisation done for math.floor in https://github.com/python/cpython/pull/21072
* gh-82367: Use `FindFirstFile` Win32 API in `ntpath.realpath()` (GH-110298)박문식2023-10-052-1/+71
| | | | | | | * Use `FindFirstFile` Win32 API to fix a bug where `ntpath.realpath()` breaks out of traversing a series of paths where a (handled) `ERROR_ACCESS_DENIED` or `ERROR_SHARING_VIOLATION` occurs. * Update docs to reflect that `ntpath.realpath()` eliminates MS-DOS style names.
* gh-110365: Fix error overwrite in `termios.tcsetattr` (#110366)Nikita Sobolev2023-10-051-13/+26
| | | Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-88402: Add new sysconfig variables on Windows (GH-110049)Sam Gross2023-10-044-0/+122
| | | | Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
* gh-76785: Print the Traceback from Interpreter.run() (gh-110322)Eric Snow2023-10-041-1/+7
| | | | | This is a temporary solution. The full fix may involve serializing the traceback in some form. (FYI, I merged this yesterday and the reverted it due to buildbot failures. See gh-110248.)
* GH-109369: Merge all eval-breaker flags and monitoring version into one ↵Mark Shannon2023-10-042-8/+4
| | | | word. (GH-109846)
* gh-110260: Check for PyList_SetItem() errors in termios module (GH-110261)Nikita Sobolev2023-10-041-17/+32
|
* gh-110300: Fix Refleaks in test_interpreters and test__xxinterpchannels ↵Eric Snow2023-10-041-2/+9
| | | | (gh-110318)
* Revert "gh-76785: Print the Traceback from Interpreter.run() (gh-110248)" ↵Eric Snow2023-10-031-4/+0
| | | | | | | (gh-110314) This reverts commit 6bc889aedc11cc8e0b9f57948a3d528ad2685497. That commit is causing some buildbot failures.
* gh-76785: Print the Traceback from Interpreter.run() (gh-110248)Eric Snow2023-10-031-0/+4
| | | This is a temporary fix. The full fix may involve serializing the traceback in some form.
* gh-108867: Add PyThreadState_GetUnchecked() function (#108870)Victor Stinner2023-10-032-3/+4
| | | | | | Add PyThreadState_GetUnchecked() function: similar to PyThreadState_Get(), but don't issue a fatal error if it is NULL. The caller is responsible to check if the result is NULL. Previously, this function was private and known as _PyThreadState_UncheckedGet().
* gh-109860: Use a New Thread State When Switching Interpreters, When ↵Eric Snow2023-10-032-45/+68
| | | | | | | | | Necessary (gh-110245) In a few places we switch to another interpreter without knowing if it has a thread state associated with the current thread. For the main interpreter there wasn't much of a problem, but for subinterpreters we were *mostly* okay re-using the tstate created with the interpreter (located via PyInterpreterState_ThreadHead()). There was a good chance that tstate wasn't actually in use by another thread. However, there are no guarantees of that. Furthermore, re-using an already used tstate is currently fragile. To address this, now we create a new thread state in each of those places and use it. One consequence of this change is that PyInterpreterState_ThreadHead() may not return NULL (though that won't happen for the main interpreter).
* gh-110241: Add missing error check to `record_eval` in `_testinternalcapi` ↵Nikita Sobolev2023-10-021-1/+5
| | | | (#110242)
* gh-76785: Module-level Fixes for test.support.interpreters (gh-110236)Eric Snow2023-10-021-20/+165
| | | | | * add RecvChannel.close() and SendChannel.close() * make RecvChannel and SendChannel shareable * expose ChannelEmptyError and ChannelNotEmptyError
* gh-105716: Support Background Threads in Subinterpreters Consistently ↵Eric Snow2023-10-023-44/+60
| | | | | | | (gh-109921) The existence of background threads running on a subinterpreter was preventing interpreters from getting properly destroyed, as well as impacting the ability to run the interpreter again. It also affected how we wait for non-daemon threads to finish. We add PyInterpreterState.threads.main, with some internal C-API functions.
* gh-109853: Fix sys.path[0] For Subinterpreters (gh-109994)Eric Snow2023-10-021-10/+28
| | | This change makes sure sys.path[0] is set properly for subinterpreters. Before, it wasn't getting set at all. This PR does not address the broader concerns from gh-109853.
* gh-107073: Make PyObject_VisitManagedDict() public (#108763)Victor Stinner2023-10-023-7/+7
| | | | | | | | Make PyObject_VisitManagedDict() and PyObject_ClearManagedDict() functions public in Python 3.13 C API. * Rename _PyObject_VisitManagedDict() to PyObject_VisitManagedDict(). * Rename _PyObject_ClearManagedDict() to PyObject_ClearManagedDict(). * Document these functions.
* gh-109649: Use os.process_cpu_count() (#110165)Victor Stinner2023-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | Replace os.cpu_count() with os.process_cpu_count() in modules: * compileall * concurrent.futures * multiprocessing Replace os.cpu_count() with os.process_cpu_count() in programs: * _decimal deccheck.py test * freeze.py * multissltests.py * python -m test (regrtest) * wasm_build.py Other changes: * test.pythoninfo logs os.process_cpu_count(). * regrtest gets os.process_cpu_count() / os.cpu_count() in headers.
* gh-109649: Add os.process_cpu_count() function (#109907)Victor Stinner2023-09-302-36/+45
| | | | | | | | | * Refactor os_sched_getaffinity_impl(): move variable definitions to their first assignment. * Fix test_posix.test_sched_getaffinity(): restore the old CPU mask when the test completes! * Doc: Specify that os.cpu_count() counts *logicial* CPUs. * Doc: Specify that os.sched_getaffinity(0) is related to the calling thread.
* gh-110014: Include explicitly <unistd.h> header (#110155)Victor Stinner2023-09-304-25/+34
| | | | | | | | | | | * Remove unused <locale.h> includes. * Remove unused <fcntl.h> include in traceback.h. * Remove redundant <assert.h> and <stddef.h> includes. They are already included by "Python.h". * Remove <object.h> include in faulthandler.c. Python.h already includes it. * Add missing <stdbool.h> in pycore_pythread.h if HAVE_PTHREAD_STUBS is defined. * Fix also warnings in pthread_stubs.h: don't redefine macros if they are already defined, like the __NEED_pthread_t macro.
* gh-105323: Update readline module to detect apple editline variant (gh-108665)Donghee Na2023-09-291-0/+4
|
* gh-110079: Remove extern "C" { ...} in C code (#110080)Victor Stinner2023-09-294-32/+0
|
* gh-110045: Update symtable module for PEP 695 (#110066)Jelle Zijlstra2023-09-291-0/+8
|
* gh-110052: Fix faulthandler for freed tstate (#110069)Victor Stinner2023-09-291-2/+1
| | | | faulthandler now detected freed interp and freed tstate, and no longer dereference them.
* gh-109782: Ensure `os.path.isdir` has the same signature on all platforms ↵Amin Alaee2023-09-282-13/+13
| | | | (GH-109790)