| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Make sure statements that have run to completion or errored are
reset and cleared off the cursor for all paths in execute() and
executemany().
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
| |
Fixes #94101
Automerge-Triggered-By: GH:tiran
|
| |
|
|
|
|
|
|
|
| |
removed from Windows (GH-94069)
Fixes #94068
Automerge-Triggered-By: GH:zware
|
|
|
|
| |
(GH-94042)
|
|
|
| |
Add unit test on Py_MEMBER_SIZE() and some other macros.
|
| |
|
|
|
| |
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
calculation (GH-93641)
|
|
|
|
| |
- In Modules/_sqlite/connection.c, use PyLong_FromLong
- In Modules/_sqlite/microprotocols.c, use PyTuple_Pack
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
this was problematic (GH-93471)
|
|
|
|
| |
Use C APIs such as PyModule_AddType instead of PyModule_AddObject.
Also remove incorrect module decrefs if module fails to initialise.
|
|
|
|
| |
systems (#93090)
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
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>
|
|
|
|
| |
case-folding (GH-32010)
|
| |
|
|
|
| |
WASI does not have the ``chmod(2)`` syscall yet.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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-93284)
|
|
|
|
|
|
| |
_posixsubprocess: add a static assertion to ensure that the pid_t
type is signed.
Replace _Py_IntegralTypeSigned() with _Py_IS_TYPE_SIGNED().
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Modules/binascii.c (GH-93181)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Revert "bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)"
This reverts commit b09184bf05b07b77c5ecfedd4daa846be3cbf0a9.
|
|
|
|
|
| |
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.
|
|
|
|
| |
version (gh-93091)
|
| |
|
|
|
|
|
| |
bytes (GH-93046)
Just pass it to the factory as is.
|
| |
|
|
|
|
| |
(GH-92980)
|
| |
|
| |
|
| |
|