| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(GH-20033)
|
|
|
| |
These were added by mistake (see https://bugs.python.org/issue39481#msg366288).
|
|
|
|
|
|
|
| |
In translate(), generate unique group names across calls.
The restores the undocumented ability to get a valid regexp
by joining multiple translate() results via `|`.
|
|
|
|
|
|
|
| |
_Py_hashtable_new() now uses PyMem_Malloc/PyMem_Free allocator by
default, rather than PyMem_RawMalloc/PyMem_RawFree.
PyMem_Malloc is faster than PyMem_RawMalloc for memory blocks smaller
than or equal to 512 bytes.
|
|
|
|
|
|
|
| |
* Move Modules/hashtable.h to Include/internal/pycore_hashtable.h
* Move Modules/hashtable.c to Python/hashtable.c
* Python is now linked to hashtable.c. _tracemalloc is no longer
linked to hashtable.c. Previously, marshal.c got hashtable.c via
_tracemalloc.c which is built as a builtin module.
|
| |
|
|
|
|
|
| |
* Replace id->object with _PyUnicode_FromId(&id)
* Use _Py_static_string_init(str) macro to initialize statically
name_op in typeobject.c.
|
| |
|
|
|
|
| |
(GH-20026)
|
|
|
|
| |
Co-authored-by: Brad Solomon <brsolomon@deloitte.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
|
|
| |
* Py_UNICODE -> wchar_t
* Py_UNICODE -> unicode in Argument Clinic
* PyUnicode_AsUnicode -> PyUnicode_AsWideCharString
* Don't use "u#" format.
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
Avoid unnecessary overhead in _PyDict_GetItemIdWithError() by calling
_PyDict_GetItem_KnownHash() instead of the more generic PyDict_GetItemWithError(),
since we already know the hash of interned strings.
|
|
|
|
|
|
| |
With the new parser, the error message contains always the trailing
newlines, causing the comparison of the repr of the error messages
in codeop to fail. This commit makes the new parser mirror the old parser's
behaviour regarding trailing newlines.
|
| |
|
|
|
|
| |
* Add the terminating period.
* Omit module name for builtin types.
|
|
|
|
| |
(GH-20021)
|
|
|
|
|
|
|
|
|
| |
* bpo-37986: Improve perfomance of PyLong_FromDouble()
* Use strict bound check for safety and symmetry
* Remove possibly outdated performance claims
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert posixmodule.c ("posix" or "nt" module) to the multiphase
initialization (PEP 489).
* Create the module using PyModuleDef_Init().
* Create ScandirIteratorType and DirEntryType with the new
PyType_FromModuleAndSpec() (PEP 573)
* Get the module state from ScandirIteratorType and DirEntryType with
the new PyType_GetModule() (PEP 573)
* Pass module to functions which access the module state.
* convert_sched_param() gets a new module parameter. It is now called
directly since Argument Clinic doesn't support passing the module
to an argument converter callback.
* Remove _posixstate_global macro.
|
|
|
|
| |
(GH-19984)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-19987)
This is for the C generator:
- Disallow rule and variable names starting with `_`
- Rename most local variable names generated by the parser to start with `_`
Exceptions:
- Renaming `p` to `_p` will be a separate PR
- There are still some names that might clash, e.g.
- anything starting with `Py`
- C reserved words (`if` etc.)
- Macros like `EXTRA` and `CHECK`
|
|
|
|
|
|
|
| |
(#20015)
* bpo-40570: Improve compatibility of uname_result with late-bound .platform.
* Add test capturing ability to cast uname to a tuple.
|
| |
|
|
|
|
|
|
|
|
|
| |
* bpo-39791: Update importlib.resources to support files() API (importlib_resources 1.5).
* 📜🤖 Added by blurb_it.
* Add some documentation about the new objects added.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
* initialize n->n_col_offset
* 📜🤖 Added by blurb_it.
* Move initialization
Co-authored-by: nanjekyejoannah <joannah.nanjekye@ibm.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
| |
This fixes a possible memory leak in the C implementation of
asyncio.Task.
|
| |
|
|
|
|
| |
done (GH-19986)
|
| |
|
|
|
|
|
| |
Always run GitHub action jobs, even on documentation-only pull
requests. So it will be possible to make a GitHub action job, like
the Windows (64-bit) job, mandatory.
|
| |
|
|
|
|
|
|
|
|
|
| |
(Note: PEP 554 is not accepted and the implementation in the code base is a private one for use in the test suite.)
If code running in a subinterpreter raises an uncaught exception then the "run" call in the calling interpreter fails. A RunFailedError is raised there that summarizes the original exception as a string. The actual exception type, __cause__, __context__, state, etc. are all discarded. This turned out to be functionally insufficient in practice. There is a more helpful solution (and PEP 554 has been updated appropriately).
This change adds the exception propagation behavior described in PEP 554 to the _xxsubinterpreters module. With this change a copy of the original exception is set to __cause__ on the RunFailedError. For now we are using "pickle", which preserves the exception's state. We also preserve the original __cause__, __context__, and __traceback__ (since "pickle" does not preserve those).
https://bugs.python.org/issue32604
|
|
|
|
|
|
|
| |
Declare _PyErr_GetTopmostException() with PyAPI_FUNC() to properly
export the function in the C API. The function remains private
("_Py") prefix.
Co-Authored-By: Julien Danjou <julien@danjou.info>
|
|
|
|
|
|
|
|
|
| |
(GH-19936)
Module C state is now accessible from C-defined heap type methods (PEP 573).
Patch by Marcel Plch and Petr Viktorin.
Co-authored-by: Marcel Plch <mplch@redhat.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
When parsing something like `f(g()=2)`, where the name of a default arg
is not a NAME, but an arbitrary expression, a specialised error message
is emitted.
|
|
|
|
|
|
|
| |
When parsing a string with an invalid escape, the old parser used to
point to the beginning of the invalid string. This commit changes the new
parser to match that behaviour, since it's currently pointing to the
end of the string (or to be more precise, to the beginning of the next
token).
|
| |
|
|
|
|
|
|
| |
Make the design more object-oriented.
Split _GenericAlias on two almost independent classes: for special
generic aliases like List and for parametrized generic aliases like List[int].
Add specialized subclasses for Callable, Callable[...], Tuple and Union[...].
|
| |
|
| |
|
|
|
| |
*first* is repeated twice.
|
| |
|
|
|
|
|
|
| |
When Python is built with experimental isolated interpreters, disable
the list free list.
Temporary workaround until this cache is made per-interpreter.
|
|
|
|
|
|
|
| |
When Python is built with experimental isolated interpreters, a
garbage collection now does nothing in an isolated interpreter.
Temporary workaround until subinterpreters stop sharing Python
objects.
|
|
|
|
|
|
| |
When Python is built with experimental isolated interpreters, disable
the type method cache.
Temporary workaround until the cache is made per-interpreter.
|
|
|
|
| |
the AST (GH-19952)
|
| |
|
|
|
|
|
| |
(#19950)
This reverts commit d60040ba226bd2e3b6f58d074015aa2499dc1cb8.
|