summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-103826: fix unused variable warning introduced in gh-102343 (#103825)sunmy20192023-04-251-2/+2
|
* gh-100227: Add a Granular Lock for _PyRuntime.imports.extensions.dict ↵Eric Snow2023-04-253-4/+16
| | | | | | (gh-103460) The lock is unnecessary as long as there's a GIL, but completely necessary with a per-interpreter GIL.
* gh-103636: add enums for days and months in calendar module (GH-103642)Prince Roshan2023-04-252-21/+40
| | | Convert day contants to a Day enum, and add a Month enum.
* gh-103718: Correctly set f-string buffers in all cases (GH-103815)Lysandros Nikolaou2023-04-251-8/+6
| | | | | | Turns out we always need to remember/restore fstring buffers in all of the stack of tokenizer modes, cause they might change to `TOK_REGULAR_MODE` and have newlines inside the braces (which is when we need to reallocate the buffer and restore the fstring ones).
* gh-82814: fix shutil access error on WSL (#103790)Allan Lago2023-04-252-1/+4
| | | | | | | gh-82814: Adds `errno.EACCES` to the list of ignored errors on `_copyxattr`. EPERM and EACCES are different constants but in general should be treated the same. News entry authored by: Gregory P. Smith <greg@krypto.org>
* Also fail DO-NOT-MERGE when "awaiting changes" or "awaiting change review" ↵Łukasz Langa2023-04-241-2/+2
| | | | | | | | present on PR (#103807) "awaiting changes" means somebody put a review that requested changes. "awaiting change review" means that the PR author published changes after a red review and then requested a re-review.
* gh-103765: Remove pkgutil.rst from .nitignore (GH-103797)Jaime Alonso Lorenzo2023-04-241-1/+0
|
* gh-103810: Fix broken references in dataclasses (#103811)Olga Matoula2023-04-242-73/+74
| | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* GH-103805: Lib test f541 linting issue fix (#103812)Rodolfo M. Pereira2023-04-2414-90/+90
| | | | | | | | | | | | | | | | 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: https://github.com/python/cpython/issues/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 <greg@krypto.org>
* gh-101659: Isolate "obmalloc" State to Each Interpreter (gh-101660)Eric Snow2023-04-2420-73/+322
| | | | | | | | | | | | | | 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.
* gh-103801: Tools/wasm linting and formatting (#103796)Daniel Versoza2023-04-243-3/+5
| | | | | | | | | | | | 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>
* gh-103673: Add missing ForkingUnixStreamServer and ForkingUnixDatagramServer ↵jb21702023-04-245-10/+19
| | | | | | | | | | | | | | | | 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 <greg@krypto.org> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-95795: Move types.next_version_tag to PyInterpreterState (gh-102343)Eric Snow2023-04-244-43/+94
| | | | | | 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.
* gh-87729: add LOAD_SUPER_ATTR instruction for faster super() (#103497)Carl Meyer2023-04-2418-408/+783
| | | | | 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.
* gh-103791: Make contextlib.suppress also act on exceptions within an ↵Łukasz Langa2023-04-246-22/+73
| | | | | ExceptionGroup (#103792) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* gh-100227: Only Use deepfreeze for the Main Interpreter (gh-103794)Eric Snow2023-04-243-34/+58
| | | | | | | 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.
* gh-103492: Clarify SyntaxWarning with literal comparison (#103493)Shantanu2023-04-244-16/+34
|
* gh-101100: Fix Sphinx warnings in `argparse` module (#103289)Hugo van Kemenade2023-04-245-16/+78
| | | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* gh-101517: fix line number propagation in code generated for except* (#103550)Irit Katriel2023-04-245-15/+27
|
* gh-103780: Use patch instead of mock in asyncio unix events test (#103782)Itamar Ostricher2023-04-241-5/+4
|
* gh-102498 Clean up unused variables and imports in the email module (#102482)JosephSBoyle2023-04-245-10/+6
| | | | | | | | | | | | | | | | | | | | | * 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 <barry@python.org>
* gh-99184: Bypass instance attribute access in `repr` of `weakref.ref` (#99244)Nikita Sobolev2023-04-243-4/+14
|
* gh-99032: datetime docs: Encoding is no longer relevant (#93365)William Andrea2023-04-241-4/+1
| | | | | | | 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 <1377457+pganssle@users.noreply.github.com>
* gh-94300: Update datetime.strptime documentation (#95318)Howie Zhao2023-04-241-1/+1
| | | | | | | The new wording better reflects the cases where `datetime.strptime` differs from` time.strptime`. --------- Co-authored-by: Paul Ganssle <git@m.ganssle.io>
* gh-103776: Remove explicit uses of $(SHELL) from Makefile (GH-103778)Zachary Ware2023-04-241-5/+5
| | | | | | | | This avoids conflicting with the shebang of the called scripts as well as avoiding hard errors on platforms where the called script runs a failing unchecked command in the usual course of checking since `SHELL=/bin/sh -e` as of a90863c. Fixes gh-103776.
* gh-87092: fix a few cases of incorrect error handling in compiler (#103456)Irit Katriel2023-04-241-9/+23
| | | gh-87092: fix a few cases of incorrect error handling
* GH-103727: Avoid advancing tokenizer too far in f-string mode (GH-103775)Lysandros Nikolaou2023-04-242-14/+14
|
* Revert "Add tests for empty range equality (#103751)" (#103770)Terry Jan Reedy2023-04-241-5/+0
| | | | This reverts commit dca27a69a8261353f7f986eb8f808f0d487ac4b7. Added tests are redundant with existing tests.
* gh-94518: Port 23-argument `_posixsubprocess.fork_exec` to Argument Clinic ↵Oleg Iarygin2023-04-243-66/+256
| | | | | | | (#94519) Convert fork_exec to pre-inlined-argparser Argument Clinic Co-authored-by: Gregory P. Smith <greg@krypto.org>
* GH-65022: Fix description of copyreg.pickle function (#102656)Furkan Onder2023-04-241-2/+2
| | | Fix description of copyreg.pickle function
* gh-103323: Get the "Current" Thread State from a Thread-Local Variable ↵Eric Snow2023-04-245-18/+73
| | | | | | | | | | | (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).)
* gh-91687: modernize dataclass example typing (#103773)Allan Lago2023-04-241-1/+1
| | | modernize dataclass example typing `list` rather than `List` and comment as to that line being the alluded too error.
* gh-103746: Test `types.UnionType` and `Literal` types together (#103747)Nikita Sobolev2023-04-242-0/+34
|
* gh-103765: Fix 'Warning: py:class reference target not found: ModuleSpec' ↵Jaime Alonso Lorenzo2023-04-241-1/+1
| | | | (GH-103769)
* gh-87452: Improve the Popen.returncode docsJoshua Herman2023-04-241-3/+6
| | | Clarifies that it remains None until a method checking the child process status has been called and noticed it has terminated.
* Removed unnecessary escaping of asterisks (#103714)Richard Hajek2023-04-241-1/+1
| | | | | 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 <lukasz@langa.pl>
* GH-102973: Slim down Fedora packages in the dev container (#103283)Miro Hrončok2023-04-241-2/+2
|
* gh-103091: Add PyUnstable_Type_AssignVersionTag (#103095)Brett Simmers2023-04-246-0/+49
|
* Add tests for empty range equality (#103751)Kirill2023-04-241-0/+5
|
* gh-103712: Increase the length of the type name in AttributeError messages ↵Alex Gaynor2023-04-244-7/+7
| | | | (#103713)
* gh-44123: Add note on relative path for os.exec* (GH-93826)Stanley2023-04-241-1/+2
| | | Co-authored-by: Steve Dower <steve.dower@python.org>
* Change 'dependant' to 'dependent' (#103745)Christopher Chavez2023-04-242-3/+3
| | | | The word 'dependent' is both an adjective and a noun. A 'dependant' is a British alternative spelling for the noun form. In idlelib.sidebar, 'OS-dependant' is an adjective and clearly wrong. In 'Using', 'dependant' as a noun would be acceptable in Britain, but we use American spellings in Python docs. https://www.merriam-webster.com/words-at-play/spelling-variants-dependent-vs-dependant
* gh-102950: Implement PEP 706 – Filter for tarfile.extractall (#102953)Petr Viktorin2023-04-248-99/+1786
|
* gh-103285: Rewrite _splitlines_no_ff to improve performance (#103307)Tian Gao2023-04-243-18/+20
|
* gh-103685: Fix tkinter.Menu.index() for Tk 8.7 (#103686)Christopher Chavez2023-04-243-2/+7
| | | | | | --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-103668: Run pyugrade on idlelib (#103671)Nikita Sobolev2023-04-2317-50/+50
| | | | --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-103724: Add test case if no arg as provided in os.register_at_fork ↵Ankit Kumar Pandey2023-04-231-0/+3
| | | | (gh-103725)
* gh-81403: Add NEWS entry for PR #13951 (#103729)Senthil Kumaran2023-04-231-0/+3
| | | Add NEWS entry for PR #13951
* gh-101688: Implement types.get_original_bases (#101827)James Hilton-Balfe2023-04-236-0/+146
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-103718: Correctly cache and restore f-string buffers when needed (GH-103719)Lysandros Nikolaou2023-04-233-11/+35
|