forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Update fork #3
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
Merged
Merged
Update fork #3
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
Removed unnecessary escaping of asterisks, as visible both on GitHub and in https://docs.python.org/3/library/decimal.html#decimal.localcontext Co-authored-by: Łukasz Langa <[email protected]>
Clarifies that it remains None until a method checking the child process status has been called and noticed it has terminated.
modernize dataclass example typing `list` rather than `List` and comment as to that line being the alluded too error.
gh-103324) We replace _PyRuntime.tstate_current with a thread-local variable. As part of this change, we add a _Py_thread_local macro in pyport.h (only for the core runtime) to smooth out the compiler differences. The main motivation here is in support of a per-interpreter GIL, but this change also provides some performance improvement opportunities. Note that we do not provide a fallback to the thread-local, either falling back to the old tstate_current or to thread-specific storage (PyThread_tss_*()). If that proves problematic then we can circle back. I consider it unlikely, but will run the buildbots to double-check. Also note that this does not change any of the code related to the GILState API, where it uses a thread state stored in thread-specific storage. I suspect we can combine that with _Py_tss_tstate (from here). However, that can be addressed separately and is not urgent (nor critical). (While this change was mostly done independently, I did take some inspiration from earlier (~2020) work by @markshannon (main...markshannon:threadstate_in_tls) and @vstinner (#23976).)
Fix description of copyreg.pickle function
…linic (#94519) Convert fork_exec to pre-inlined-argparser Argument Clinic Co-authored-by: Gregory P. Smith <[email protected]>
The new wording better reflects the cases where `datetime.strptime` differs from` time.strptime`. --------- Co-authored-by: Paul Ganssle <[email protected]>
This removes a section of the `strftime` and `strptime` documentation that refers to a bygone era when `strftime` would return an encoded byte string. --------- Co-authored-by: Paul Ganssle <[email protected]>
…102482) * Clean up unused variables and imports in the email module * Remove extra newline char * Remove superflous dict+unpacking syntax * Remove unused 'msg' var * Clean up unused variables and imports in the email module * Remove extra newline char * Remove superflous dict+unpacking syntax * Remove unused 'msg' var --------- Co-authored-by: Barry Warsaw <[email protected]>
Co-authored-by: C.A.M. Gerlach <[email protected]> Co-authored-by: Ezio Melotti <[email protected]>
Deep-frozen code objects are cannot be shared (currently) by interpreters, due to how adaptive specialization can modify the bytecodes. We work around this by only using the deep-frozen objects in the main interpreter. This does incur a performance penalty for subinterpreters, which we may be able to resolve later.
…ExceptionGroup (#103792) Co-authored-by: Irit Katriel <[email protected]>
This speeds up `super()` (by around 85%, for a simple one-level `super().meth()` microbenchmark) by avoiding allocation of a new single-use `super()` object on each use.
Core static types will continue to use the global value. All other types will use the per-interpreter value. They all share the same range, where the global types use values < 2^16 and each interpreter uses values higher than that.
…mServer socketservers (#103674) sockserver gains ForkingUnixStreamServer and ForkingUnixDatagramServer classes for consistency with all of the others. Ironically these existed but were buried in our test suite. Addresses #103673 <!-- gh-issue-number: gh-103673 --> * Issue: gh-103673 <!-- /gh-issue-number --> --------- Co-authored-by: Gregory P. Smith <[email protected]> Co-authored-by: Nikita Sobolev <[email protected]>
This PR makes three minor linting adjustments to the `wasm` module caught by [ruff](https://github.com/charliermarsh/ruff). <!-- gh-issue-number: gh-103801 --> * Issue: gh-103801 <!-- /gh-issue-number --> --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This is strictly about moving the "obmalloc" runtime state from `_PyRuntimeState` to `PyInterpreterState`. Doing so improves isolation between interpreters, specifically most of the memory (incl. objects) allocated for each interpreter's use. This is important for a per-interpreter GIL, but such isolation is valuable even without it. FWIW, a per-interpreter obmalloc is the proverbial canary-in-the-coalmine when it comes to the isolation of objects between interpreters. Any object that leaks (unintentionally) to another interpreter is highly likely to cause a crash (on debug builds at least). That's a useful thing to know, relative to interpreter isolation.
This PR makes some minor linting adjustments to the Lib/test module caught by [ruff](https://github.com/charliermarsh/ruff). The adjustments are all related to the `F541 f-string without any placeholders` issue. Issue: #103805 <!-- gh-issue-number: gh-103805 --> * Issue: gh-103805 <!-- /gh-issue-number --> --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Gregory P. Smith <[email protected]>
…d Request (#103855) Co-authored-by: Łukasz Langa <[email protected]>
Co-authored-by: Łukasz Langa <[email protected]> Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Michael Blahay <[email protected]>
As discussed in https://discuss.python.org/t/unittest-fail-if-zero-tests-were-discovered/21498/7 It is common for test runner misconfiguration to fail to find any tests, This should be an error. Fixes: #62432
GH-103896) Co-authored-by: Pablo Galindo <[email protected]>
…103684) Add socket options for source-specific multicast when present as C #defines. Co-authored-by: Oleg Iarygin <[email protected]>
This API is one of Unicode creator APIs.
…ade` in `asyncio`. (#17425) Co-authored-by: Kumar Aditya <[email protected]>
Establish global state and port the following types to heap types: - DictRemover_Type - PyCArg_Type - PyCThunk_Type - PyCField_Type - StructParam_Type
…ormationByName when available (GH-103485)
Use datetime.fromisocalendar in _strptime This unifies the ISO → Gregorian conversion logic and improves handling of invalid ISO weeks.
Using `datetime.datetime.utcnow()` and `datetime.datetime.utcfromtimestamp()` will now raise a `DeprecationWarning`. We also have removed our internal uses of these functions and documented the change.
The prompt will still be incorrect in IDLE on Windows, as IDLE uses CTRL-D for EOF on all platforms.
There were cases where we do unnecessary work for builtin static types. This also simplifies some work necessary for a per-interpreter GIL.
…18650) subprocess's communicate(None) closes stdin of the child process, after sending no (extra) data. Make asyncio variant do the same. This fixes issues with processes that waits for EOF on stdin before continuing.
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.
No description provided.