summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* gh-99426: Use PyUnicode_FromFormat() and PyErr_Format() instead of sprintf ↵Serhiy Storchaka2022-11-143-25/+9
| | | | (GH-99427)
* gh-99300: Use Py_NewRef() in Modules/ directory (#99468)Victor Stinner2022-11-1410-173/+92
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Modules/ directory.
* gh-99300: Use Py_NewRef() in Modules/_datetimemodule.c (#99465)Victor Stinner2022-11-142-98/+49
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in Modules/_datetimemodule.c and Modules/_zoneinfo.c
* gh-99300: Use Py_NewRef() in Modules/ directory (#99467)Victor Stinner2022-11-1410-144/+75
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Modules/ directory.
* gh-99300: Use Py_NewRef() in Modules/ directory (#99466)Victor Stinner2022-11-1410-214/+106
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Modules/ directory.
* gh-99300: Use Py_NewRef() in Modules/_asynciomodule.c (#99441)Victor Stinner2022-11-131-54/+26
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in Modules/_asynciomodule.c.
* gh-98930: improve the docstring of signal.strsignal (#99290)ram vikram singh2022-11-132-6/+8
| | | | | | | Improves the docstring on signal.strsignal to make it explain when it returns a message, None, or when it raises ValueError. Closes #98930 Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-99275: Fix `SystemError` in `ctypes` during `__initsubclass__` (#99283)Nikita Sobolev2022-11-131-1/+4
|
* gh-99300: Use Py_NewRef() in Modules/_ctypes/ (#99436)Victor Stinner2022-11-135-124/+62
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in C files of the Modules/_ctypes/ directory.
* gh-99300: Use Py_NewRef() in Modules/ directory (#99440)Victor Stinner2022-11-136-82/+41
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Modules/ directory.
* gh-99300: Use Py_NewRef() in Modules/itertoolsmodule.c (#99439)Victor Stinner2022-11-131-62/+31
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in Modules/itertoolsmodule.c.
* gh-99300: Use Py_NewRef() in Modules/_elementtree.c (#99438)Victor Stinner2022-11-131-82/+37
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in Modules/_elementtree.c.
* gh-83638: Add sqlite3.Connection.autocommit for PEP 249 compliant behaviour ↵Erlend E. Aasland2022-11-126-45/+192
| | | | | | | | | | (#93823) Introduce the autocommit attribute to Connection and the autocommit parameter to connect() for PEP 249-compliant transaction handling. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
* GH-81057: Remove static state from arraymodule (#99409)Kumar Aditya2022-11-121-5/+12
|
* gh-99204: Calculate base_executable by alternate names in POSIX venvs (GH-99206)Vincent Fazio2022-11-101-0/+19
| | | | | | | | | | | Check to see if `base_executable` exists. If it does not, attempt to use known alternative names of the python binary to find an executable in the path specified by `home`. If no alternative is found, previous behavior is preserved. Signed-off-by: Vincent Fazio <vfazio@gmail.com> Signed-off-by: Vincent Fazio <vfazio@gmail.com>
* gh-90110: Update the C-analyzer Tool (gh-99307)Eric Snow2022-11-101-1/+1
|
* gh-98724: Fix Py_CLEAR() macro side effects (#99100)Victor Stinner2022-11-091-0/+87
| | | | | | | The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate their argument once. If an argument has side effects, these side effects are no longer duplicated. Add test_py_clear() and test_py_setref() unit tests to _testcapi.
* gh-90868: Adjust the Generated Objects (gh-99223)Eric Snow2022-11-084-11/+15
| | | | | | | | | | | We do the following: * move the generated _PyUnicode_InitStaticStrings() to its own file * move the generated _PyStaticObjects_CheckRefcnt() to its own file * include pycore_global_objects.h in extension modules instead of pycore_runtime_init.h These changes help us avoid including things that aren't needed. https://github.com/python/cpython/issues/90868
* gh-98627: Add the _testsinglephase Module (gh-99039)Eric Snow2022-11-083-0/+80
| | | | | This makes it more clear that a given test is definitely testing against a single-phase init (legacy) extension module. The new module is a companion to _testmultiphase. https://github.com/python/cpython/issues/98627
* gh-91248: Add PyFrame_GetVar() function (#95712)Victor Stinner2022-11-081-0/+34
| | | | | | Add PyFrame_GetVar() and PyFrame_GetVarString() functions to get a frame variable by its name. Move PyFrameObject C API tests from test_capi to test_frame.
* GH-90699: fix refleak in `_testcapimodule.c` (gh-99236)Kumar Aditya2022-11-081-0/+1
|
* gh-92119: ctypes: Print exception class name instead of its representation ↵Kamil Turek2022-11-081-1/+4
| | | | (#98302)
* GH-90699: Remove remaining `_Py_IDENTIFIER` stdlib usage (GH-99067)Kumar Aditya2022-11-073-40/+37
|
* gh-95389: expose popular ETHERTYPE_* constants in the socket module (#95390)Noam Cohen2022-11-071-0/+23
| | | | Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
* remove new line in pickle exception message (GH-31782)Harshil2022-11-071-2/+2
|
* gh-96055: Update faulthandler to emit proper unexpect signal number (gh-99162)Dong-hee Na2022-11-071-4/+16
|
* Correct some typos in comments (GH-98194)jonasdlindner2022-11-061-1/+1
| | | Automerge-Triggered-By: GH:AlexWaygood
* gh-83004: Clean up refleak in _pickle initialisation (#98841)Shantanu2022-11-061-7/+6
|
* gh-83004: Clean up refleak in _zoneinfo initialisation (#98842)Shantanu2022-11-061-2/+3
|
* gh-94808: add tests covering `PyFunction_GetKwDefaults` and ↵Nikita Sobolev2022-11-051-0/+29
| | | | `PyFunction_SetKwDefaults` (GH-98809)
* gh-94808: add tests covering `PySequence_{Set,Del}Slice` (GH-99123)Nikita Sobolev2022-11-051-0/+33
|
* gh-94808: add tests covering `PyEval_GetFuncDesc` function (GH-98300)Nikita Sobolev2022-11-051-0/+7
|
* gh-73691: Increase size limits in _xxtestfuzz (#99070)Gregory P. Smith2022-11-031-3/+6
| | | | | | | | Now that our int<->str conversions are size limited and we have the _pylong module handling larger integers, we don't need to limit everything just to avoid wasting time in the quadratic time DoS-like case while fuzzing. We can tweak these further after seeing how this goes.
* GH-90699: Remove `_Py_IDENTIFIER` usage from `_ctypes` (GH-99054)Kumar Aditya2022-11-034-64/+35
|
* gh-83004: Clean up refleak in _io initialisation (#98840)Shantanu2022-11-031-3/+3
|
* gh-98740: Fix validation of conditional expressions in RE (GH-98764)Serhiy Storchaka2022-11-031-27/+29
| | | | | | | | | | | In very rare circumstances the JUMP opcode could be confused with the argument of the opcode in the "then" part which doesn't end with the JUMP opcode. This led to incorrect detection of the final JUMP opcode and incorrect calculation of the size of the subexpression. NOTE: Changed return value of functions _validate_inner() and _validate_charset() in Modules/_sre/sre.c. Now they return 0 on success, -1 on failure, and 1 if the last op is JUMP (which usually is a failure). Previously they returned 1 on success and 0 on failure.
* GH-90699: Remove `_Py_IDENTIFIER` usage from `_elementtree` module (GH-99012)Kumar Aditya2022-11-021-25/+59
|
* gh-98790: When DLLs directory is missing on Windows, assume executable_dir ↵Steve Dower2022-11-021-7/+21
| | | | contains PYD files instead (GH-98936)
* GH-90699: Remove `_Py_IDENTIFIER` usage from `_asyncio` module (#99010)Kumar Aditya2022-11-021-69/+38
|
* GH-90699: Remove `_Py_IDENTIFIER` usage from `_json` module (GH-98956)Kumar Aditya2022-11-021-29/+8
|
* GH-90699: Remove `_Py_IDENTIFIER` usage from `_curses` module (GH-98957)Kumar Aditya2022-11-021-12/+6
|
* gh-98658: Add __class_getitem__ to array.array (#98661)Jelle Zijlstra2022-11-011-0/+1
| | | Closes #98658
* GH-98897: fix memory leak if `math.dist` raises exception (GH-98898)Kumar Aditya2022-11-011-3/+3
|
* gh-98610: Adjust the Optional Restrictions on Subinterpreters (GH-98618)Eric Snow2022-10-316-28/+56
| | | | | | | Previously, the optional restrictions on subinterpreters were: disallow fork, subprocess, and threads. By default, we were disallowing all three for "isolated" interpreters. We always allowed all three for the main interpreter and those created through the legacy `Py_NewInterpreter()` API. Those settings were a bit conservative, so here we've adjusted the optional restrictions to: fork, exec, threads, and daemon threads. The default for "isolated" interpreters disables fork, exec, and daemon threads. Regular threads are allowed by default. We continue always allowing everything For the main interpreter and the legacy API. In the code, we add `_PyInterpreterConfig.allow_exec` and `_PyInterpreterConfig.allow_daemon_threads`. We also add `Py_RTFLAGS_DAEMON_THREADS` and `Py_RTFLAGS_EXEC`.
* gh-98793: Fix typecheck in `overlapped.c` (#98835)Charlie Zhao2022-10-302-5/+13
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* Fix comment typos in `_operator.c` (#98853)David Buchanan2022-10-291-2/+2
|
* gh-98739: Update libexpat from 2.4.9 to 2.5.0 (#98742)Shaun Walbridge2022-10-273-18/+35
| | | | | * Update libexpat from 2.4.9 to 2.5.0 to address CVE-2022-43680. Co-authored-by: Shaun Walbridge <shaun.walbridge@gmail.com>
* gh-98586: Add vector call APIs to the Limited API (GH-98587)Wenzel Jakob2022-10-271-4/+101
| | | Expose the facilities for making vector calls through Python's limited API.
* gh-94808: cover `PyFunction_GetDefaults` and `PyFunction_SetDefaults` (#98449)Nikita Sobolev2022-10-271-0/+29
|
* Fix readline.c compiler warning. (GH-98738)Benjamin Peterson2022-10-261-1/+1
| | | | | | | ``` Modules/readline.c:1260:37: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] completer_word_break_characters = ^ ```