summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* gh-89121: Keep the number of pending SQLite statements to a minimum (#30379)Erlend Egeberg Aasland2022-06-231-22/+12
| | | | | Make sure statements that have run to completion or errored are reset and cleared off the cursor for all paths in execute() and executemany().
* Fix typo in _io.TextIOWrapper Clinic input (#94037)fikotta2022-06-221-2/+2
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-94101 Disallow instantiation of SSLSession objects (GH-94102)chgnrdv2022-06-221-1/+2
| | | | | Fixes #94101 Automerge-Triggered-By: GH:tiran
* DOC: correct bytesarray -> bytearray in comments (GH-92410)Thomas A Caswell2022-06-212-2/+2
|
* gh-94068: Remove HVSOCKET_CONTAINER_PASSTHRU constant because it has been ↵Steve Dower2022-06-211-1/+0
| | | | | | | removed from Windows (GH-94069) Fixes #94068 Automerge-Triggered-By: GH:zware
* gh-94028: Clear and reset sqlite3 statements properly in cursor iternext ↵Erlend Egeberg Aasland2022-06-211-0/+3
| | | | (GH-94042)
* gh-87347: Add parenthesis around macro arguments (#93915)Victor Stinner2022-06-201-1/+25
| | | Add unit test on Py_MEMBER_SIZE() and some other macros.
* gh-84461: Silence some compiler warnings on WASM (GH-93978)Christian Heimes2022-06-204-5/+9
|
* gh-93925: Improve clarity of sqlite3 commit/rollback, and close docs (#93926)Erlend Egeberg Aasland2022-06-192-10/+22
| | | Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-93937, C API: Move PyFrame_GetBack() to Python.h (#93938)Victor Stinner2022-06-195-6/+0
| | | | | | | | | | | | | | | | Move the follow functions and type from frameobject.h to pyframe.h, so the standard <Python.h> provide frame getter functions: * PyFrame_Check() * PyFrame_GetBack() * PyFrame_GetBuiltins() * PyFrame_GetGenerator() * PyFrame_GetGlobals() * PyFrame_GetLasti() * PyFrame_GetLocals() * PyFrame_Type Remove #include "frameobject.h" from many C files. It's no longer needed.
* gh-77782: Deprecate global configuration variable (#93943)Victor Stinner2022-06-171-6/+15
| | | | | | | Deprecate global configuration variable like Py_IgnoreEnvironmentFlag: the Py_InitializeFromConfig() API should be instead. Fix declaration of Py_GETENV(): use PyAPI_FUNC(), not PyAPI_DATA().
* gh-91404: Revert "bpo-23689: re module, fix memory leak when a match is ↵Gregory P. Smith2022-06-175-81/+47
| | | | | | | | | | | | terminated by a signal or allocation failure (GH-32283) (#93882) Revert "bpo-23689: re module, fix memory leak when a match is terminated by a signal or memory allocation failure (GH-32283)" This reverts commit 6e3eee5c11b539e9aab39cff783acf57838c355a. Manual fixups to increase the MAGIC number and to handle conflicts with a couple of changes that landed after that. Thanks for reviews by Ma Lin and Serhiy Storchaka.
* gh-91985: Ensure in-tree builds override platstdlib_dir in every path ↵neonene2022-06-161-1/+2
| | | | calculation (GH-93641)
* gh-93829: In sqlite3, replace Py_BuildValue with faster APIs (#93830)Erlend Egeberg Aasland2022-06-152-4/+3
| | | | - In Modules/_sqlite/connection.c, use PyLong_FromLong - In Modules/_sqlite/microprotocols.c, use PyTuple_Pack
* gh-79579: Improve DML query detection in sqlite3 (#93623)Erlend Egeberg Aasland2022-06-141-74/+45
| | | | | | | | | The fix involves using pysqlite_check_remaining_sql(), not only to check for multiple statements, but now also to strip leading comments and whitespace from SQL statements, so we can improve DML query detection. pysqlite_check_remaining_sql() is renamed lstrip_sql(), to more accurately reflect its function, and hardened to handle more SQL comment corner cases.
* gh-89546: Clean up PyType_FromMetaclass (GH-93686)Petr Viktorin2022-06-141-1/+2
| | | | | | | | When changing PyType_FromMetaclass recently (GH-93012, GH-93466, GH-28748) I found a bunch of opportunities to improve the code. Here they are. Fixes: #89546 Automerge-Triggered-By: GH:encukou
* gh-93741: Add private C API _PyImport_GetModuleAttrString() (GH-93742)Serhiy Storchaka2022-06-1414-173/+47
| | | | | | It combines PyImport_ImportModule() and PyObject_GetAttrString() and saves 4-6 lines of code on every use. Add also _PyImport_GetModuleAttr() which takes Python strings as arguments.
* Remove usage of _Py_IDENTIFIER from math module (#93739)Dong-hee Na2022-06-121-9/+55
|
* gh-84508: tool to generate cjk traditional chinese mappings (gh-93272)Davide Rizzo2022-06-112-0/+3
|
* gh-92930: _pickle.c: Acquire strong references before calling save() (GH-92931)Dennis Sweeney2022-06-111-11/+36
|
* gh-93466: Document PyType_Spec doesn't accept repeated slot IDs; raise where ↵Petr Viktorin2022-06-101-0/+59
| | | | this was problematic (GH-93471)
* gh-90763: Modernise xx template module initialisation (#93078)Erlend Egeberg Aasland2022-06-102-43/+54
| | | | Use C APIs such as PyModule_AddType instead of PyModule_AddObject. Also remove incorrect module decrefs if module fails to initialise.
* gh-92434: Silence compiler warning in Modules/_sqlite/connection.c on 32-bit ↵neonene2022-06-101-1/+1
| | | | systems (#93090)
* bpo-45383: Get metaclass from bases in PyType_From* (GH-28748)Sebastian Berg2022-06-091-0/+160
| | | | | | | | | This checks the bases of of a type created using the FromSpec API to inherit the bases metaclasses. The metaclass's alloc function will be called as is done in `tp_new` for classes created in Python. Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
* gh-93421: Update sqlite3 cursor.rowcount only after SQLITE_DONE (#93526)Erlend Egeberg Aasland2022-06-081-8/+11
|
* gh-93370: Deprecate sqlite3.version and sqlite3.version_info (#93482)Kalyan2022-06-071-1/+1
| | | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* bpo-42658: Use LCMapStringEx in ntpath.normcase to match OS behaviour for ↵AN Long2022-06-062-1/+99
| | | | case-folding (GH-32010)
* gh-93475: Expose FICLONE and FICLONERANGE constants in fcntl (#93478)Illia Volochii2022-06-061-0/+9
|
* gh-90473: Make chmod a dummy on WASI, skip chmod tests (GH-93534)Christian Heimes2022-06-061-0/+4
| | | WASI does not have the ``chmod(2)`` syscall yet.
* remove redundant argument to log_helper (GH-93440)Pieter Eendebak2022-06-031-5/+5
|
* gh-69093: Fix Setup.local.in rule for _sqlite3 (GH-93380)Christian Heimes2022-05-311-1/+1
|
* GH-93312: Add os.PIDFD_NONBLOCK flag (#93313)Kumar Aditya2022-05-311-0/+3
|
* gh-92839: fixed typo in _bisectmodule.c (line 131) (#92849)oda-gitso2022-05-281-2/+2
|
* bpo-40514: Drop EXPERIMENTAL_ISOLATED_SUBINTERPRETERS (gh-93185)Eric Snow2022-05-272-23/+0
| | | | | | | This was added for bpo-40514 (gh-84694) to test out a per-interpreter GIL. However, it has since proven unnecessary to keep the experiment in the repo. (It can be done as a branch in a fork like normal.) So here we are removing: * the configure option * the macro * the code enabled by the macro
* GH-90230: Add stats to breakdown the origin of calls to `PyEval_EvalFrame` ↵Mark Shannon2022-05-271-1/+2
| | | | (GH-93284)
* gh-82616: Add Py_IS_TYPE_SIGNED() macro (#93178)Victor Stinner2022-05-272-1/+18
| | | | | | _posixsubprocess: add a static assertion to ensure that the pid_t type is signed. Replace _Py_IntegralTypeSigned() with _Py_IS_TYPE_SIGNED().
* GH-93207: Remove HAVE_STDARG_PROTOTYPES configure check for stdarg.h (#93215)Kumar Aditya2022-05-272-8/+0
|
* gh-60074: add new stable API function PyType_FromMetaclass (GH-93012)Wenzel Jakob2022-05-271-0/+73
| | | | | | | | Added a new stable API function ``PyType_FromMetaclass``, which mirrors the behavior of ``PyType_FromModuleAndSpec`` except that it takes an additional metaclass argument. This is, e.g., useful for language binding tools that need to store additional information in the type object.
* gh-93172: Remove unnecessary "if"s in binascii_a2b_qp_impl() from ↵oda-gitso2022-05-251-8/+2
| | | | Modules/binascii.c (GH-93181)
* gh-93202: Always use %zd printf formatter (#93201)Victor Stinner2022-05-251-2/+2
| | | | | | | | | | | | | | | | Python now always use the ``%zu`` and ``%zd`` printf formats to format a size_t or Py_ssize_t number. Building Python 3.12 requires a C11 compiler, so these printf formats are now always supported. * PyObject_Print() and _PyObject_Dump() now use the printf %zd format to display an object reference count. * Update PY_FORMAT_SIZE_T comment. * Remove outdated notes about the %zd format in PyBytes_FromFormat() and PyUnicode_FromFormat() documentations. * configure no longer checks for the %zd format and no longer defines PY_FORMAT_SIZE_T macro in pyconfig.h. * pymacconfig.h no longer undefines PY_FORMAT_SIZE_T: macOS 10.4 is no longer supported. Python 3.12 now requires macOS 10.6 (Snow Leopard) or newer.
* gh-92728: Restore re.template, but deprecate it (GH-93161)Miro Hrončok2022-05-252-0/+2
| | | | | | Revert "bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)" This reverts commit b09184bf05b07b77c5ecfedd4daa846be3cbf0a9.
* gh-92658: AF_HYPERV is only supported on Windows (#93192)Victor Stinner2022-05-252-8/+13
| | | | | Only build the AF_HYPERV support on Windows for the _socket extension. FreeBSD defines the AF_HYPERV macro but doesn't have the SOCKADDR_HV type.
* gh-92434: Silence a compiler warning in _xxsubinterpretersmodule.c for 32bit ↵neonene2022-05-251-1/+1
| | | | version (gh-93091)
* gh-92658: Add Hyper-V socket support (GH-92755)Jordan Borean2022-05-242-0/+143
|
* gh-93044: No longer convert the database argument of sqlite3.connect() to ↵Serhiy Storchaka2022-05-212-7/+4
| | | | | bytes (GH-93046) Just pass it to the factory as is.
* gh-91922: Fix sqlite connection on nonstardard locales and paths (GH-92926)Serhiy Storchaka2022-05-202-53/+20
|
* gh-92913: Clarify changes to PyInitConfig.module_search_paths[_set] fields ↵Steve Dower2022-05-191-2/+3
| | | | (GH-92980)
* gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803)Christian Heimes2022-05-191-1/+1
|
* Fix NULL check in test_type_from_ephemeral_spec in_testcapimodule.c (GH-92863)Dennis Sweeney2022-05-171-1/+1
|
* Fix NULL test in _testinternalcapi (GH-92861)Dennis Sweeney2022-05-171-1/+1
|