| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
| |
require `_generate_next_value_` to be defined before members
|
|
|
|
|
|
|
|
|
| |
PyFrame_GetCode(frame): return a borrowed reference to the frame
code.
Replace frame->f_code with PyFrame_GetCode(frame) in most code,
except in frameobject.c, genobject.c and ceval.c.
Also add PyFrame_GetLineNumber() to the limited C API.
|
|
|
|
|
|
|
|
|
|
|
| |
bpo-35134, bpo-40421: Add Include/cpython/code.h header file.
code.h now defines PyCodeObject type in the limited C API. It is now
included by Python.h.
Give a name to the PyCodeObject structure: it is now called
"struct PyCodeObject". So it becomes possible to define PyCodeObject
as "struct PyCodeObject" in the limited C API without defining the
structure.
|
|
|
|
|
|
|
|
|
|
| |
Add a new separated pyframe.h header file of the PyFrame public C
API: it is included by Python.h.
Add PyFrame_GetLineNumber() to the limited C API.
Replace "struct _frame" with "PyFrameObject" in header files.
PyFrameObject is now defined as struct _frame by pyframe.h which is
included early enough in Python.h.
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
code (GH-19745)
|
| |
| |
| | |
This test has been changed to always use the old parser, so no need for it to be skipped.
|
| |
| |
| | |
An E_EOF error was only being caught after the parser exited before this commit. There are some cases though, where the tokenizer returns ERRORTOKEN *and* has set an E_EOF error (like when EOF directly follows a line continuation character) which weren't correctly handled before.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now only test_error_during_result_unpickle_in_result_handler()
captures and ignores sys.stderr in the test process.
Tools like test.bisect_cmd don't support subTest() but only
work with the granularity of one method.
Remove unused ExecutorDeadlockTest._sleep_id() method.
|
| |
| |
| |
| | |
Process.shutdown(wait=True) of concurrent.futures now closes
explicitly the result queue.
|
| | |
|
| |
| |
| | |
This commit also allows to pass flags to the new parser in all interfaces and fixes a bug in the parser generator that was causing to inline rules with actions, making them disappear.
|
| |
| |
| |
| |
| |
| | |
Add a new close() method to multiprocessing.SimpleQueue to explicitly
close the queue.
Automerge-Triggered-By: @pitrou
|
| | |
|
|/ |
|
|
|
|
| |
PyType_FromSpec types (GH-19414)
|
|
|
| |
Update the "Makefile.pre.in" template and the "PCbuild/lib.pyproj" with the files in "Lib/test/test/test_peg_generator" so they get correctly installed along the rest of the standard library.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Adds a short description of `PyDoc_STRVAR` and `PyDoc_STR` to "Useful macros" section of C-API docs.
Currently, there is [one lone mention](https://docs.python.org/3/c-api/module.html?highlight=pydoc_strvar#c.PyModuleDef) in the C-API reference, despite the fact that `PyDoc_STRVAR` is ubiquitous to `Modules/`.
Additionally, this properly uses `c:macro` within `Doc/c-api/module.rst` to link.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Import logging lazily in assertLogs() in unittest.
Move TestHandler from test.support to logging_helper.
|
|
|
|
|
|
| |
* Move socket related functions from test.support to socket_helper.
* Import socket, nntplib and urllib.error lazily in transient_internet().
* Remove importing multiprocess.
|
|
|
|
|
| |
* Import asyncio lazily in unittest (only when IsolatedAsyncioTestCase is used).
* Import asyncio.events lazily in test.support.
|
|
|
|
| |
(GH-19705)
|
|
|
|
|
| |
This is one of the few files that has intimate knowledge of the pyc file
format. Since it lacks tests it tends to become outdated fairly quickly.
At present it has been broken since the introduction of PEP 552.
|
| |
|
| |
|
|
|
|
|
| |
Deprecate lib2to3 module in light of PEP 617.
We anticipate removal in the 3.12 timeframe.
|
|
|
|
|
|
|
|
|
|
| |
Previously every test was building an extension module and
loading it into sys.modules. The tearDown function was thus
not able to clean up correctly, resulting in memory leaks.
With this commit, every test function now builds the extension
module and runs the actual test code in a new process
(using assert_python_ok), so that sys.modules stays intact
and no memory gets leaked.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Optimize the subprocess module on FreeBSD using closefrom().
A single close(fd) syscall is cheap, but when sysconf(_SC_OPEN_MAX)
is high, the loop calling close(fd) on each file descriptor can take
several milliseconds.
The workaround on FreeBSD to improve performance was to load and
mount the fdescfs kernel module, but this is not enabled by default.
Initial patch by Ed Maste (emaste), Conrad Meyer (cem), Kyle Evans
(kevans) and Kubilay Kocak (koobs):
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242274
|
|
|
|
|
|
|
|
|
| |
On FreeBSD, os.closerange(fd_low, fd_high) now calls
closefrom(fd_low) if fd_high is greater than or equal to
sysconf(_SC_OPEN_MAX).
Initial patch by Ed Maste (emaste), Conrad Meyer (cem), Kyle Evans
(kevans) and Kubilay Kocak (koobs):
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242274
|
| |
|
|
|
|
|
|
| |
If _PyCode_InitOpcache() fails in _PyEval_EvalFrameDefault(), use
"goto exit_eval_frame;" rather than "return NULL;" to exit the
function in a consistent state. For example, tstate->frame is now
reset properly.
|
| |
|
| |
|
|
|
| |
We should use `$(MKDIR_P) <directory>`, not `$(MKDIR_P) -p <directory>`.
|
|
|
|
|
| |
This is invoked by mypy, using ast.parse(source, "<func_type>", "func_type"). Since the new grammar doesn't yet support the func_type_input start symbol we must use the old compiler in this case to prevent a crash.
https://bugs.python.org/issue40334
|
| |
|
|
|
|
|
|
|
| |
Log "Warning -- ..." test warnings into sys.__stderr__ rather than
sys.stderr, to ensure to display them even if sys.stderr is captured.
test.libregrtest.utils.print_warning() now calls
test.support.print_warning().
|
| |
|
|
|
| |
The changes in this commit are all related to @vstinner's original review comments of the initial PEP 617 implementation PR.
|
|
|
|
| |
test_peg_generator (GH-19674)
|
|
|
|
|
|
|
| |
Using `def` rather than `define` results in:
Ambiguous command "def pu": define, define-prefix.
Automerge-Triggered-By: @csabella
|