forked from python/cpython
-
-
Notifications
You must be signed in to change notification settings - Fork 0
gh-130522: Fix threading errors during garbage collection #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
TkTech
wants to merge
301
commits into
main
Choose a base branch
from
fix-issue-130522
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ng to the HTML5 standard (pythonGH-135930) * Whitespaces no longer accepted between `</` and the tag name. E.g. `</ script>` does not end the script section. * Vertical tabulation (`\v`) and non-ASCII whitespaces no longer recognized as whitespaces. The only whitespaces are `\t\n\r\f `. * Null character (U+0000) no longer ends the tag name. * Attributes and slashes after the tag name in end tags are now ignored, instead of terminating after the first `>` in quoted attribute value. E.g. `</script/foo=">"/>`. * Multiple slashes and whitespaces between the last attribute and closing `>` are now ignored in both start and end tags. E.g. `<a foo=bar/ //>`. * Multiple `=` between attribute name and value are no longer collapsed. E.g. `<a foo==bar>` produces attribute "foo" with value "=bar". * Whitespaces between the `=` separator and attribute name or value are no longer ignored. E.g. `<a foo =bar>` produces two attributes "foo" and "=bar", both with value None; `<a foo= bar>` produces two attributes: "foo" with value "" and "bar" with value None. * Fix Sphinx errors. * Apply suggestions from code review Co-authored-by: Ezio Melotti <[email protected]> * Address review comments. * Move to Security. --------- Co-authored-by: Ezio Melotti <[email protected]>
…E_ATTR_WITH_HINT` (python#136249)
…#135794) This fixes the data races in typeobject.c in subinterpreters under free-threading. The type flags and slots are only modified in the main interpreter as all static types are first initialised in main interpreter.
…TML5 standard (pythonGH-135664) * "--!>" now ends the comment. * "-- >" no longer ends the comment. * Support abnormally ended empty comments "<-->" and "<--->". --------- Co-author: Kerim Kabirov <[email protected]> Co-authored-by: Ezio Melotti <[email protected]>
…educe home (python#135831) This is still formally undefined behaviour, but we may as well keep the *same* undefined behaviour as previous versions. PEP 796 proposes a cleaner and more consistent replacement for 3.15+
…nGH-136258) Use the %N format specifier instead of %s and `PyType_GetName`.
…#136320) Fix skipped test in test_zstd
…de effect (python#136341) Document that get_context in multiprocessing have side effect
…g nested forwardrefs (python#136319)
…l part of Decimal (python#132202) Co-authored-by: Serhiy Storchaka <[email protected]>
…l part of Fraction (python#132204)
…handling newlines in output. (pythonGH-136217)
* Remove the table * Replace warnings with notes Latest releases of Python 3.9-3.15 include expat 2.7.1 which is not vulnerable. expat 2.6.0 was released in February 2024.
…cts (pythonGH-135980) * Turn the __future__ table to list-table. This'll make it easier to add entries that need longer markup * Semantic markup for __future__ feature descriptions. * Document CO_* C macros.
…136325) add versionadded for sys._getframemodulename
…r generic checks (pythonGH-136815) Co-authored-by: Brett Cannon <[email protected]>
…ythonGH-137031) pythongh-136461 added perf support for macOS, with ifdefs around all changes except increasing thread_id to 64 bits. Make that change Apple-specific too.
…pythonGH-136419) Files like NUL on windows are, from `importlib.resources` point of view, an artifact caused by installing to a filesystem directory. Mention these.
…free-threading docs (python#137042)
…lass, make the original class collectible (python#136893)" (python#137014) This reverts commit 46cbdf9.
… sections (pythonGH-135942) Co-authored-by: Blaise Pabon <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…ings (pythonGH-136617) Zstd references in shutil docstrings
The comment in the generated file is now more self-explanatory. The checks for unexpected file contents are also strengthened.
Adds tooling to build mpdec (and thus _decimal) as part of an Emscripten build.
python#137004) Adds a mechanism to test browser-based initialisation of the Python interpreter, via a Playwright headless browser instance.
Rename `lock.h` to `pylock.h` to avoid conflicts with headers of other projects.
…ion under `Py_STATS` builds (python#137055)
…n#136994) De-instrumenting code objects modifies the thread local bytecode for all threads as such, holding the critical section on the code object is not sufficient and leads to data races. Now, the de-instrumentation is now performed under a stop the world pause as such no thread races with executing the thread local bytecode while it is being de-instrumented.
_testclinic.c mocks out PY_VERSION_HEX to 3.8 before including _testclinic_depr.c.h to avoid the errors the preprocessor would otherwise throw due to the deprecation feature it is testing. Also partially revert 74e2acd: this restores Modules/_testclinic.c to match the same file in the 3.14 branch.
…cTest's lineno computation (pythonGH-136930) Previously, DocTest's lineno of functions and methods decorated with functools.cache(), functools.lru_cache() and functools.cached_property() was not properly returned (None was returned) because the computation relied on inspect.isfunction() which does not consider the decorated result as a function. We now use the more generic inspect.isroutine(), as elsewhere in doctest's logic. Also, added a special case for functools.cached_property().
…thonGH-137094) Use a `PyEvent` instead of a lock to fix a race on the free-threaded build.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This issue was introduced in 3.13 (5a1ecc8) and causes spurious errors when threads shutdown. This issue occurs on all platforms, and can be triggered by utilities like
coverage.py's pytracer module or the PyCharm debugger (pydevd), which may keep references to internal threading objects around.Issue was reproduced on Linux/OSX/Windows: