Instead of long and uninteresting output for all checked libraries, only print found issues by default.
Add a new -v/--verbose option to list all symbols (useful for checking that the script finds the symbols).
Along the way, leave a deprecated Tools/wasm/wasi/__main__.py behind for backwards-compatibility.
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
If we are specializing to `LOAD_GLOBAL_MODULE` or `LOAD_ATTR_MODULE`, try
to enable deferred reference counting for the value, if the object is owned by
a different thread. This applies to the free-threaded build only and should
improve scaling of multi-threaded programs.
Add the unicodedata.iter_graphemes() function to iterate over grapheme
clusters according to rules defined in Unicode Standard Annex #29.
Add unicodedata.grapheme_cluster_break(), unicodedata.indic_conjunct_break()
and unicodedata.extended_pictographic() functions to get the properties
of the character which are related to the above algorithm.
Co-authored-by: Guillaume "Vermeille" Sanchez <guillaume.v.sanchez@gmail.com>
The behaviour of Cut in nested parentheses, Repeat, Opt, and similar
is somewhat chaotic. Apparently even the academic papers on PEG aren't
as clear as they could be.
And it doesn't really matter. Python only uses top-level cuts.
When that changes, we can clarify as much as necessary (and even
change the implementation to make sense for what we'll need).
Document that this is deliberately unspecified, and add a test to
make sure any decision is deliberate, tested and documented.
- Gather all documented names into a set in a single pass.
This makes the check much faster.
- Do not match substrings (e.g. documenting `PyErr_WarnEx`
doesn't mean that `PyErr_Warn` is documented)
- Consider `PY`-prefixed names (a lot of old macros use this)
In optimized and `-Og` builds, arguments and local variables are frequently
unavailable in gdb. This makes `py-bt` fail to print anything useful. Use the
`PyThreadState*` pointers `_Py_tss_gilstate` and `Py_tss_tstate` to find the
interpreter frame if we can't get the frame from the
`_PyEval_EvalFrameDefault` call.
Co-authored-by: Victor Stinner <vstinner@python.org>
The PyObject header reference count fields must be initialized using
atomic operations because they may be concurrently read by another
thread (e.g., from `_Py_TryIncref`).
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandt@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
The use of memmove and _Py_memory_repeat were not thread-safe in the
free threading build in some cases. In theory, memmove and
_Py_memory_repeat can copy byte-by-byte instead of pointer-by-pointer,
so concurrent readers could see uninitialized data or tearing.
Additionally, we should be using "release" (or stronger) ordering to be
compliant with the C11 memory model when copying objects within a list.
This makes generator frame state transitions atomic in the free
threading build, which avoids segfaults when trying to execute
a generator from multiple threads concurrently.
There are still a few operations that aren't thread-safe and may crash
if performed concurrently on the same generator/coroutine:
* Accessing gi_yieldfrom/cr_await/ag_await
* Accessing gi_frame/cr_frame/ag_frame
* Async generator operations
Now that we specialize range iteration in the interpreter for the common
case where the iterator has only one reference, there's not a
significant performance cost to making the iteration thread-safe.
JIT: Fix crash due to incorrect caching on side exits when exiting jitted code.
* Make sure that stack is in correct state at side exits with TOS cached values
* Simplify choice of cached items for side exits
* WIP: ENH: Pixi package definitions for downstream development
[skip ci]
* linux-64 support
* tidy gitignore
* respond to review
- switch cases on `PYTHON_VARIANT`
- remove `minor_version` by using `python3`
- remove runtime-only asan options
* README updates
* use `.md` to preview rendering
* Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* Apply suggestion from @FFY00
Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
* Apply suggestion from @FFY00
Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
* Apply suggestion from @FFY00
Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
* Apply suggestion from @lucascolley
---------
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
* Include LDVERSION and EXE in base_interpreter value
In Fedora, build-details.json created and installed for python3.14t
contains "/usr/bin/python3.14" as the base_interpreter value.
Create a correct string, taking into account both LDVERSION and EXE
config variables, similarly to how it's defined in altbininstall in Makefile.
* Add news
Signed-off-by: Filipe Laíns <lains@riseup.net>
---------
Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Filipe Laíns <lains@riseup.net>