| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
None. (GH-13933) (GH-16141)
In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values
(like in the optional third parameter of getattr). "None" should be used if None is accepted
as argument and passing None has the same effect as not passing the argument at all.
(cherry picked from commit 279f44678c8b84a183f9eeb85e0b086228154497)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
(GH-15630) (GH-15635)
Only AttributeError should be silenced.
(cherry picked from commit 41c57b335330ff48af098d47e379e0f9ba09d233)
|
|
|
|
|
|
|
|
|
| |
(GH-13464)
Automatically replace
tp_print -> tp_vectorcall_offset
tp_compare -> tp_as_async
tp_reserved -> tp_as_async
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Explicit cast a pointer difference (intptr_t) to int to fix
two warnings on 64-bit Windows:
Modules\pyexpat.c(1181): warning C4244: 'initializing':
conversion from '__int64' to 'int', possible loss of data
Modules\pyexpat.c(1192): warning C4244: 'initializing':
conversion from '__int64' to 'int', possible loss of data
|
|
|
|
|
|
| |
(GH-9422)
Use tp_members and tp_getset instead.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The C accelerated _elementtree module now initializes hash randomization
salt from _Py_HashSecret instead of libexpat's default CPRNG.
Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue34623
|
|
|
|
|
| |
The concrete PyDict_* API is used to interact with PyInterpreterState.modules in a number of places. This isn't compatible with all dict subclasses, nor with other Mapping implementations. This patch switches the concrete API usage to the corresponding abstract API calls.
We also add a PyImport_GetModule() function (and some other helpers) to reduce a bunch of code duplication.
|
|
|
| |
PR #1638, for bpo-28411, causes problems in some (very) edge cases. Until that gets sorted out, we're reverting the merge. PR #3506, a fix on top of #1638, is also getting reverted.
|
|
|
| |
sys.modules is the one true source.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-29591: Upgrade Modules/expat to libexpat 2.2
* bpo-29591: Restore Python changes on expat
* bpo-29591: Remove expat config of unsupported platforms
Remove the configuration (Modules/expat/*config.h) of unsupported
platforms:
* Amiga
* MacOS Classic on PPC32
* Open Watcom
* bpo-29591: Remove useless XML_HAS_SET_HASH_SALT
The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became
useless since our local expat copy was upgrade to expat 2.1 (it's now
expat 2.2.0).
|
| |
|
| |
|
| |
|
|
|
|
| |
possible. Patch is writen with Coccinelle.
|
|
|
|
|
|
|
|
|
|
|
| |
Replace
_PyObject_CallArg1(func, arg)
with
PyObject_CallFunctionObjArgs(func, arg, NULL)
Using the _PyObject_CallArg1() macro increases the usage of the C stack, which
was unexpected and unwanted. PyObject_CallFunctionObjArgs() doesn't have this
issue.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace
PyObject_CallFunction(func, "O", arg)
and
PyObject_CallFunction(func, "O", arg, NULL)
with
_PyObject_CallArg1(func, arg)
Replace
PyObject_CallFunction(func, NULL)
with
_PyObject_CallNoArg(func)
_PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate
memory on the C stack.
|
|\
| |
| |
| |
| |
| | |
_PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
|
| |
| |
| |
| |
| |
| | |
_PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
|
| |
| |
| |
| |
| |
| |
| | |
The module initializer of the pyexpat module failed to check
the return value of PySys_GetObject() for NULL.
CID 982779
|
|\ \
| |/
| |
| | |
generated by Argument Clinic. Patch by Petr Viktorin.
|
| |
| |
| |
| | |
generated by Argument Clinic. Patch by Petr Viktorin.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
Old code is correct, but with Py_SETREF and Py_CLEAR it can be cleaner.
This patch doesn't fix bugs and hence there is no need to backport it.
|
| |
| |
| |
| | |
private functions.
|
|/ |
|
|\
| |
| |
| | |
expat parser.
|
| |
| |
| |
| | |
expat parser.
|
|\ \
| |/
| |
| |
| | |
Added additional tests for expat parser attributes.
Based on patch by John Leitch.
|
| |
| |
| |
| |
| | |
Added additional tests for expat parser attributes.
Based on patch by John Leitch.
|
| |
| |
| |
| | |
signatures as booleans.
|
| |
| |
| |
| | |
instead of types={'type'} to specify the types the converter accepts.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
_codecs_cn, _codecs_hk, _codecs_iso2022, _codecs_jp, _codecs_kr and _codecs_tw
modules.
pyexpat.c doesn't need to redeclare PyMODINIT_FUNC, it's already declared in
Include/pyport.h.
|
|\ \
| |/
| |
| | |
overflows. Added few missed PyErr_NoMemory().
|
| |
| |
| |
| | |
overflows. Added few missed PyErr_NoMemory().
|
|\ \
| |/
| |
| |
| |
| | |
exception tracebacks.
Initial patch by Mark Shannon.
|
| |
| |
| |
| |
| |
| | |
exception tracebacks.
Initial patch by Mark Shannon.
|
| |
| |
| |
| | |
Corresponding functions now accept `const char *` (issue #1772673).
|
|/
|
|
|
| |
Could not emit an external file as pyexpat has a conditionally built
method which Clinic won't hide otherwise.
|
|
|
|
|
|
| |
to parse more than one XML document per pyexpat xmlparser instance.
(Original patches by Hirokazu Yamamoto and Amaury Forgeot d'Arc, with
suggested wording by David Gutteridge)
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Python now uses SipHash24 on all major platforms.
|
|\ \
| |/
| |
| | |
CID 486814
|
| |
| |
| |
| | |
CID 486814
|
|\ \
| |/
| |
| | |
CID 486663
|