summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-111789: Use PyDict_GetItemRef() in Modules/pyexpat.c (gh-112079)Serhiy Storchaka2023-11-271-12/+5
|
* gh-111789: Use PyDict_GetItemRef() in Modules/_threadmodule.c (gh-112077)Serhiy Storchaka2023-11-271-6/+4
|
* gh-111789: Use PyDict_GetItemRef() in Modules/_struct.c (gh-112076)Serhiy Storchaka2023-11-271-5/+4
|
* gh-111789: Use PyDict_GetItemRef() in Modules/_csv.c (gh-112073)Serhiy Storchaka2023-11-271-8/+2
|
* gh-112438: Fix support of format units with the "e" prefix in nested tuples ↵Serhiy Storchaka2023-11-271-5/+9
| | | | in PyArg_Parse (gh-112439)
* gh-63284: Add support for TLS-PSK (pre-shared key) to the ssl module (#103181)Grant Ramsay2023-11-272-1/+360
| | | | | | | | Add support for TLS-PSK (pre-shared key) to the ssl module. --------- Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-112358: Fix Python 3.12 regression with subclassing struct.Struct. (#112424)Mark Dickinson2023-11-262-34/+41
| | | | | | Revert commit c8c0afc7137ab9f22bf59d591084948ca967c97c (PR #94532), which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`. This caused issues with code in the wild that subclasses `struct.Struct`.
* gh-76785: Return an "excinfo" Object From Interpreter.run() (gh-111573)Eric Snow2023-11-231-69/+25
|
* gh-76785: Add _PyType_GetModuleName() to the Internal C-API (gh-112323)Eric Snow2023-11-222-0/+17
| | | The new function corresponds to the existing (public) PyType_GetName() and PyType_GetQualName().
* gh-111965: Use critical sections to make io.BufferedIOBase and its related ↵Mayuresh Kedari2023-11-222-40/+180
| | | | classes thread safe (gh-112298)
* gh-59703: restore include of mach-o/dyld.h (gh-112309)Ned Deily2023-11-221-0/+1
| | | | On older versions of macOS, _NSGetExecutablePath appears to only be available via macho-o/dyld so macho-o/dyld.h is still needed.
* gh-111863: Rename term Py_NOGIL to Py_GIL_DISABLED in sysconfig (gh-112307)Donghee Na2023-11-221-3/+3
|
* gh-59703: use the system dladdr function in getpath.c for macOS framework ↵AN Long2023-11-211-11/+6
| | | | | builds (GH-111546) Co-authored-by: Ned Deily <nad@python.org>
* gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864)Hugo van Kemenade2023-11-2016-31/+31
| | | Rename Py_NOGIL to Py_GIL_DISABLED
* gh-111965: Using critical sections to make ``io.StringIO`` thread safe. ↵AN Long2023-11-192-30/+194
| | | | (gh-112116)
* gh-112213: Update _weakref module to use new AC feature (gh-112250)Donghee Na2023-11-192-25/+31
|
* gh-111903: Update AC to support "pycore_critical_section.h" header (gh-112251)Donghee Na2023-11-196-6/+6
|
* gh-111965: Use critical sections to make io.TextIOWrapper thread safe ↵AN Long2023-11-182-39/+181
| | | | (gh-112193)
* gh-111926: Update _weakref to be threadsafe in --disable-gil build (gh-112189)Donghee Na2023-11-181-9/+20
|
* gh-112070: make `functools.lru_cache` threadsafe in --disable-gil build ↵Wanderxjtu2023-11-172-6/+25
| | | | | | | | | | | | | | | | | (gh-112111) * gh-112070: make `functools.lrucacle` threadsafe in --disable-gil build * gh-112070: update generate `functoolsmodule` files * gh-112070: add NEWS file * Delete Misc/NEWS.d/next/Library/2023-11-15-20-19-45.gh-issue-112070.q6OhcU.rst * gh-112070: reformat functoolsmodule.c --------- Co-authored-by: Sam Gross <colesbury@gmail.com>
* gh-111482: Fix time_clockid_converter() on AIX (#112170)Victor Stinner2023-11-161-2/+2
| | | clockid_t is defined as long long on AIX.
* gh-111956: Add thread-safe one-time initialization. (gh-111960)Sam Gross2023-11-161-0/+32
|
* gh-111798: Use lower Py_C_RECURSION_LIMIT in debug mode (#112124)Victor Stinner2023-11-161-0/+9
| | | | | | | * Run again test_ast_recursion_limit() on WASI platform. * Add _testinternalcapi.get_c_recursion_remaining(). * Fix test_ast and test_sys_settrace: test_ast_recursion_limit() and test_trace_unpack_long_sequence() now adjust the maximum recursion depth depending on the the remaining C recursion.
* gh-111916: Make hashlib related modules thread-safe without the GIL (#111981)Tomas R2023-11-159-137/+187
| | | | | Always use an individual lock on hash objects when in free-threaded builds. Fixes #111916
* gh-96954: Fix `make regen-unicodedata` in out-of-tree builds (#112118)Miro Hrončok2023-11-152-2/+2
| | | | | | | | | This avoids: python3.13 Tools/unicode/makeunicodedata.py python3.13: can't open file '.../build/debug/Tools/unicode/makeunicodedata.py': [Errno 2] No such file or directory make: *** [Makefile:1498: regen-unicodedata] Error 2 Re-run `make regen-unicodedata` to update the script path in generated files.
* gh-111789: Use PyDict_GetItemRef() in Modules/_asynciomodule.c (GH-112072)Serhiy Storchaka2023-11-151-6/+2
|
* gh-112062: Make `_struct` module thread-safe in `--disable-gil` builds (#112094)Radislav Chugunov2023-11-151-7/+6
| | | | | * gh-112062: Make `_struct` module thread-safe in --disable-gil builds
* gh-111545: Test PyHash_GetFuncDef() function (#112098)Victor Stinner2023-11-154-1/+61
| | | Add Modules/_testcapi/hash.c and Lib/test/test_capi/test_hash.py.
* gh-111995: Add getnameinfo extension flag (#111994)adder322023-11-151-0/+3
| | | Add getnameinfo extension NI_IDN flag.
* gh-111942: Fix SystemError in the TextIOWrapper constructor (#112061)Serhiy Storchaka2023-11-141-2/+6
| | | | | | In non-debug more the check for the "errors" argument is skipped, and then PyUnicode_AsUTF8() can fail, but its result was not checked. Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-111942: Fix crashes in TextIOWrapper.reconfigure() (GH-111976)Serhiy Storchaka2023-11-141-3/+36
| | | | | | | | * Fix crash when encoding is not string or None. * Fix crash when both line_buffering and write_through raise exception when converted ti int. * Add a number of tests for constructor and reconfigure() method with invalid arguments.
* gh-111262: Add PyDict_Pop() function (#112028)Victor Stinner2023-11-144-27/+105
| | | | | | | _PyDict_Pop_KnownHash(): remove the default value and the return type becomes an int. Co-authored-by: Stefan Behnel <stefan_ml@behnel.de> Co-authored-by: Antoine Pitrou <pitrou@free.fr>
* gh-111903: Add `@critical_section` directive to Argument Clinic. (#111904)Sam Gross2023-11-142-3/+11
| | | | | | | | | The `@critical_section` directive instructs Argument Clinic to generate calls to `Py_BEGIN_CRITICAL_SECTION()` and `Py_END_CRITICAL_SECTION()` around the bound function. In `--disable-gil` builds, these calls will lock and unlock the `self` object. They are no-ops in the default build. This is used in one place (`_io._Buffered.close`) as a demonstration. Subsequent PRs will use it more widely in the `_io.Buffered` bindings.
* gh-111789: Use PyDict_GetItemRef() in _ctypes (GH-111828)Serhiy Storchaka2023-11-142-78/+61
|
* gh-107149: make new opcode util functions private rather than public and ↵Irit Katriel2023-11-141-17/+18
| | | | unstable (#112042)
* gh-111138: Add PyList_Extend() and PyList_Clear() functions (#111862)Victor Stinner2023-11-131-0/+21
| | | | | | * Split list_extend() into two sub-functions: list_extend_fast() and list_extend_iter(). * list_inplace_concat() no longer has to call Py_DECREF() on the list_extend() result, since list_extend() now returns an int.
* gh-111928: make "memo" dict local to scan_once call (gh-112005)AN Long2023-11-131-23/+19
| | | Co-authored-by: Sam Gross <colesbury@gmail.com>
* gh-111777: Fix assertion errors on incorrectly still-tracked GC object ↵T. Wouters2023-11-121-1/+3
| | | | | | | | | | destruction (#111778) In PyObject_GC_Del, in Py_DEBUG mode, when warning about GC objects that were not properly untracked before starting destruction, take care to untrack the object _before_ warning, to avoid triggering a GC run and causing the problem the code tries to warn about. Also make sure to save and restore any pending exceptions, which the warning would otherwise clobber or trigger an assertion error on.
* Fix undefined behaviour in datetime.time.fromisoformat() (#111982)T. Wouters2023-11-111-1/+1
| | | Fix undefined behaviour in datetime.time.fromisoformat() when parsing a string without a timezone. 'tzoffset' is not assigned to by parse_isoformat_time if it returns 0, but time_fromisoformat then passes tzoffset to another function, which is undefined behaviour (even if the function in question does not use the value).
* gh-111789: Simplify the sqlite code (GH-111829)Serhiy Storchaka2023-11-102-17/+6
| | | | Use new C API functions PyDict_GetItemRef() and PyMapping_GetOptionalItemString().
* Add private _PyUnicode_AsUTF8NoNUL() function (GH-111957)Serhiy Storchaka2023-11-102-13/+2
| | | | Like PyUnicode_AsUTF8(), but check for embedded null characters.
* gh-111841: Fix os.putenv() and os.unsetenv() with embedded NUL on Windows ↵Serhiy Storchaka2023-11-101-1/+6
| | | | (GH-111842)
* gh-111569: Fix critical sections test on WebAssembly (GH-111897)Sam Gross2023-11-091-0/+4
| | | | | | | | This adds a macro `Py_CAN_START_THREADS` that corresponds to the Python function `test.support.threading_helper.can_start_thread()`. WASI and some Emscripten builds do not have a working pthread implementation. This macro is used to guard the critical sections C API tests that require a working threads implementation.
* gh-111835: Add seekable method to mmap.mmap (gh-111852)Donghee Na2023-11-091-7/+14
|
* GH-111804: Drop posix.fallocate() under WASI (GH-111869)Brett Cannon2023-11-092-5/+8
| | | | | | | Drop posix.fallocate() under WASI. The underlying POSIX function, posix_fallocate(), was found to vary too much between implementations to remain in WASI. As such, while it was available in WASI preview1, it's been dropped in preview2.
* gh-111569: Implement Python critical section API (gh-111571)Sam Gross2023-11-084-1/+218
| | | | | | | | Critical sections are helpers to replace the global interpreter lock with finer grained locking. They provide similar guarantees to the GIL and avoid the deadlock risk that plain locking involves. Critical sections are implicitly ended whenever the GIL would be released. They are resumed when the GIL would be acquired. Nested critical sections behave as if the sections were interleaved.
* Remove redundant check in dbm.open() (GH-111844)Serhiy Storchaka2023-11-081-5/+0
| | | PyUnicode_FSConverter() already checks for embedded null characters.
* gh-111495: Add tests for PyList C API (#111562)Kalyan2023-11-081-1/+179
| | | | | Signed-off-by: kalyanr <kalyan.ben10@live.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* socket: Update generated AC code (#111853)Jelle Zijlstra2023-11-081-2/+7
|
* gh-111662: Update socket module to use AC for optimizing performance (gh-111661)Bogdan Romanyuk2023-11-082-69/+223
|