| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
The switch cases (really TARGET(opcode) macros) have been moved from ceval.c to generated_cases.c.h. That file is generated from instruction definitions in bytecodes.c (which impersonates a C file so the C code it contains can be edited without custom support in e.g. VS Code).
The code generator lives in Tools/cases_generator (it has a README.md explaining how it works). The DSL used to describe the instructions is a work in progress, described in https://github.com/faster-cpython/ideas/blob/main/3.12/interpreter_definition.md.
This is surely a work-in-progress. An easy next step could be auto-generating super-instructions.
**IMPORTANT: Merge Conflicts**
If you get a merge conflict for instruction implementations in ceval.c, your best bet is to port your changes to bytecodes.c. That file looks almost the same as the original cases, except instead of `TARGET(NAME)` it uses `inst(NAME)`, and the trailing `DISPATCH()` call is omitted (the code generator adds it automatically).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Address Serhiy Storchaka's review.
|
|
|
|
| |
Specify the full path to the docs for `make docclean`
This is to have `make clean` not error out on cross-builds.
|
|
|
|
|
|
|
|
|
| |
The uuid.getnode() function has multiple implementations, tested sequentially.
The ifconfig implementation was incorrect and always failed: fix it.
In practice, functions of libuuid library are preferred, if available:
uuid_generate_time_safe(), uuid_create() or uuid_generate_time().
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
|
|
|
| |
contains PYD files instead (GH-98936)
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Closes #98989
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The Python test suite now fails wit exit code 4 if no tests ran. It
should help detecting typos in test names and test methods.
* Add "EXITCODE_" constants to Lib/test/libregrtest/main.py.
* Fix a typo: "NO TEST RUN" becomes "NO TESTS RAN"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Formatting changes for faq/programming
* Add missing method formatting, use non-literal formatting
* Fix sphinx warnings
* Some extra formatting missed earlier
* More formatting suggestions from review
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Add missing colon, avoid referening external module
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
|
| |
|
| |
|
|
|
|
|
| |
sett… (GH-98922)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
|
|
|
|
|
| |
For wasmtime 2.0, the stack depth cost is 6% higher. This causes the default max `marshal` recursion depth to blow the stack.
As the default marshal depth is 2000 and Windows is set to 1000, split the difference and choose 1500 for WASI to be safe.
|
| |
|
|
|
|
|
| |
Use unnumbered footnote in this file to avoid reseting the footnotes numbering.
Example: when building the tutorial into a PDF and using `latex_show_urls = "footnotes"`; this footnote become the number 8. However, without this change, the footnote shows the number 1.
|
|
|
|
| |
instead of 'from y import x' (#98932)
|
|
|
|
|
| |
Fix subscription of type aliases containing bare generic types or types
like TypeVar: for example tuple[A, T][int] and tuple[TypeVar, T][int],
where A is a generic type, and T is a type variable.
|
| |
|
|
|
| |
Closes #98658
|
|
|
|
|
|
| |
This reduces confusion between jumps at the bytecode level
(e.g. JUMPTO(), JUMPBY(), and various JUMP_*() opcodes)
and jumps in the C code (which are 'goto' statements).
|
| |
|
| |
|
| |
|
|
|
|
| |
(GH-98732)
|
|
|
|
|
|
|
| |
Previously, the optional restrictions on subinterpreters were: disallow fork, subprocess, and threads. By default, we were disallowing all three for "isolated" interpreters. We always allowed all three for the main interpreter and those created through the legacy `Py_NewInterpreter()` API.
Those settings were a bit conservative, so here we've adjusted the optional restrictions to: fork, exec, threads, and daemon threads. The default for "isolated" interpreters disables fork, exec, and daemon threads. Regular threads are allowed by default. We continue always allowing everything For the main interpreter and the legacy API.
In the code, we add `_PyInterpreterConfig.allow_exec` and `_PyInterpreterConfig.allow_daemon_threads`. We also add `Py_RTFLAGS_DAEMON_THREADS` and `Py_RTFLAGS_EXEC`.
|
| |
|
|
|
| |
They were introduced right between GH-98441 and GH-98408.
|
| |
|
|
|
| |
This adds them to the Limited API.
|
| |
|
|
|
|
| |
checking. This also fixes an incorrect error offset. (GH-98812)
|
|
|
|
| |
allows for a field named BUILTIN (gh-98143)
|
|
|
| |
Thanks to PEP 623 changes, the comparison cannot fail.
|
|
|
|
| |
attribute and to indicate when it became late-bound. (#97972)
|
|
|
|
|
|
|
|
|
|
|
| |
* As most of `test_embed` now uses `Py_InitializeFromConfig`, add
a specific test case to cover `Py_Initialize` (and `Py_InitializeEx`)
* Rename `_testembed` init helper to clarify the API used
* Add a `PyConfig_Clear` call in `Py_InitializeEx` to make
the code more obviously correct (it already didn't leak as
none of the dynamically allocated config fields were being
populated, but it's clearer if the wrappers follow the
documented API usage guidelines)
|
|
|
|
| |
(#98806)
|
|
|
|
| |
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
|
| |
This is a tiny typo fix of package definition in glossary.
According to https://devguide.python.org/documentation/help-documenting/ simple typos don’t require issues of their own, but, instead, a pull request can by submitted directly.
Automerge-Triggered-By: GH:AlexWaygood
|