| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Co-authored-by: Guido van Rossum <guido@python.org>
Co-authored-by: Talin <viridia@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
|
|
|
|
| |
(#16459)
|
| |
|
|
|
| |
This improves the performance slightly.
|
|
|
|
|
| |
# a typo fix
Automerge-Triggered-By: GH:vsajip
|
|
|
|
|
| |
with GCC/Clang (GH-24606)
Automerge-Triggered-By: GH:benjaminp
|
|
|
| |
Co-authored-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
|
| |
|
|
|
|
|
| |
SQLite 3.7.15 is required as by GH-24106. SQLITE_OPEN_URI was added in
SQLite 3.7.7.
|
|
|
|
|
|
|
|
|
| |
From the SQLite 3.5.3 changelog:
sqlite3_step() returns SQLITE_MISUSE instead of crashing when called
with a NULL parameter.
The workaround no longer needed because we no longer support
SQLite releases older than 3.7.15.
|
|
|
|
| |
Exit code is now 1 instead of 0. A message is printed to stderr instead of stdout. This is
the proper behaviour for a tool that can be used in scripts.
|
|
|
| |
It's been public since 2012: ea9766897bf1d2ccf610ff9ce805acca7c4cce6f
|
|
|
|
|
|
|
|
| |
The note about the GIL was buried pretty deep in the threading documentation,
and this made it hard for first time users to discover why their attempts
at using threading to parallelizing their application did not work.
In this commit, the note is moved to the top of the module documention for
visibility.
|
|
|
|
| |
(GH-22987)
|
| |
|
|
|
|
|
|
| |
Printing to IDLE's Shell is often slower than printing to a system
terminal, but it can be made faster by pre-formatting a single
string before printing.
|
|
|
|
|
| |
(GH-24629)
(The previous commit fixed print_exception(None, None, None).)
|
| |
|
| |
|
|
|
| |
We will remove wstr cache in Python 3.12. See PEP 623.
|
|
|
|
|
| |
Emit DeprecationWarning when PyArg_Parse*() is called with 'u', 'Z' format.
See PEP 623.
|
|
|
|
|
|
|
|
| |
Unittest discovery support namespace package as start
directory. But it doesn't find namespace package in
the start directory automatically.
Otherwise, unittest discovery search into unexpected
directories like `vendor/` or `node_modules/`.
|
| |
|
|
|
|
|
|
|
|
| |
When very large data remains in TextIOWrapper, flush() may fail forever.
So prevent that data larger than chunk_size is remained in TextIOWrapper internal
buffer.
Co-Authored-By: Eryk Sun
|
| |
|
| |
|
|
|
|
|
|
| |
* No longer save/restore the current exception. It is no longer used
with an exception raised.
* No longer clear the current exception on error: it's now up to the
caller.
|
| |
|
|
|
|
|
| |
In the Running User Code section, gather together paragraphs about two
processes and the sys.stdstream replacements, preparing to add another.
|
|
|
| |
Previously, the doc at least strongly implied that it had to be an iterator.
|
| |
|
|
|
| |
For some mysterious reason we have PySet_Check, PyFrozenSet_Check, PyAnySet_Check, PyAnySet_CheckExact and PyFrozenSet_CheckExact but no PySet_CheckExact.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The types.FunctionType constructor now inherits the current builtins
if the globals dictionary has no "__builtins__" key, rather than
using {"None": None} as builtins: same behavior as eval() and exec()
functions.
Defining a function with "def function(...): ..." in Python is not
affected, globals cannot be overriden with this syntax: it also
inherits the current builtins.
PyFrame_New(), PyEval_EvalCode(), PyEval_EvalCodeEx(),
PyFunction_New() and PyFunction_NewWithQualName() now inherits the
current builtins namespace if the globals dictionary has no
"__builtins__" key.
* Add _PyEval_GetBuiltins() function.
* _PyEval_BuiltinsFromGlobals() now uses _PyEval_GetBuiltins() if
builtins cannot be found in globals.
* Add tstate parameter to _PyEval_BuiltinsFromGlobals().
|
| |
|
| |
|
|
|
| |
Calling same function also gets new local namespace.
|
|
|
| |
We explicitly disable /OPT:ICF as some manual optimisations depend on some functions still having distinct pointers (such as wrap_binary_func and wrap_binary_func_l).
|
| |
|
|
|
|
|
|
| |
Include/{odictobject.h,parser_interface.h,picklebufobject.h,pydebug.h,pyfpe.h}
into Include/cpython/.
Parser: peg_api: include Python.h instead of parser_interface.h.
|
|
|
| |
Cleanup also the code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pass the current interpreter (interp) rather than the current Python
thread state (tstate) to internal functions which only use the
interpreter.
Modified functions:
* _PyXXX_Fini() and _PyXXX_ClearFreeList() functions
* _PyEval_SignalAsyncExc(), make_pending_calls()
* _PySys_GetObject(), sys_set_object(), sys_set_object_id(), sys_set_object_str()
* should_audit(), set_flags_from_config(), make_flags()
* _PyAtExit_Call()
* init_stdio_encoding()
* etc.
|
|
|
|
|
|
|
|
| |
Remove the private _PyErr_OCCURRED() macro: use the public
PyErr_Occurred() function instead.
CPython internals must use the internal _PyErr_Occurred(tstate)
function instead: it is the most efficient way to check if an
exception was raised.
|
|
|
|
| |
Remove explicit tstate usage in sysmodule.c when it's only used raise
exceptions: get it implicitly using PyErr_XXX() functions.
|
|
|
|
| |
The _Py_IsMainInterpreter() function now expects interp rather than
tstate.
|
|
|
|
|
| |
Use directly the PyThreadState_Get() function in public header files,
since PyThreadState_GET() macro is just an alias to it in pratice in
these files.
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-24576)
Replace _PyThreadState_GET() with _PyInterpreterState_GET() in
functions which only need the current interpreter, but don't need the
current Python thread state.
Replace also _PyThreadState_UncheckedGet() with _PyThreadState_GET()
in faulthandler.c, since _PyThreadState_UncheckedGet() is just an
alias to _PyThreadState_GET() in practice.
|