summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-94673: More Per-Interpreter Fields for Builtin Static Types (gh-103912)Eric Snow2023-05-035-86/+185
| | | | | his involves moving tp_dict, tp_bases, and tp_mro to PyInterpreterState, in the same way we did for tp_subclasses. Those three fields are effectively const for builtin static types (unlike tp_subclasses). In theory we only need to make their values immortal, along with their contents. However, that isn't such a simple proposition. (See gh-103823.) In the meantime the simplest solution is to move the fields into the interpreter. One alternative is to statically allocate the values, but that's its own can of worms.
* GH-103963: Make dis display names of args for intrinsics opcodes (#104029)Juhi Chandalia2023-05-036-17/+110
|
* GH-104102: Optimize `pathlib.Path.glob()` handling of `../` pattern segments ↵Barney Gale2023-05-023-0/+19
| | | | | | | | (GH-104103) These segments do not require a `stat()` call, as the selector's `_select_from()` method is called after we've established that the parent is a directory.
* GH-104104: Optimize `pathlib.Path.glob()` by avoiding repeated calls to ↵Barney Gale2023-05-022-11/+16
| | | | | | `os.path.normcase()` (GH-104105) Use `re.IGNORECASE` to implement case-insensitive matching. This restores behaviour from before GH-31691.
* gh-103822: [Calendar] change return value to enum for day and month APIs ↵Prince Roshan2023-05-022-2/+2
| | | | (GH-103827)
* gh-65022: Fix description of tuple return value in copyreg (#103892)Shantanu2023-05-021-1/+1
|
* GH-103525: Improve exception message from `pathlib.PurePath()` (GH-103526)Barney Gale2023-05-023-16/+27
| | | | | | | | Check that arguments are strings before calling `os.path.join()`. Also improve performance of `PurePath(PurePath(...))` while we're in the area: we now use the *unnormalized* string path of such arguments. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-84436: Add integration C API tests for immortal objects (gh-103962)Dong-hee Na2023-05-026-1/+69
|
* gh-103743: Add PyUnstable_Object_GC_NewWithExtraData (GH-103744)Jurica Bradarić2023-05-026-2/+156
| | | | Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-102997: Update Windows installer to SQLite 3.41.2. (#102999)Mariusz Felisiak2023-05-024-3/+4
|
* GH-103484: Fix redirected permanently URLs (#104001)Rafael Fontenelle2023-05-0240-60/+78
| | | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
* Improve assert_type phrasing (#104081)Shantanu2023-05-022-6/+8
| | | | | | | | | I'd like to make the fact that this does nothing at runtime really obvious, since I suspect this is unintuitive for users who are unfamiliar with static type checking. I thought of this because of https://discuss.python.org/t/add-arg-check-type-to-types/26384 wherein I'm skeptical that the user really did want `assert_type`.
* gh-102997: Update macOS installer to SQLite 3.41.2. (GH-102998)Mariusz Felisiak2023-05-022-3/+4
|
* GH-103472: close response in HTTPConnection._tunnel (#103473)Thomas Grainger2023-05-023-15/+43
| | | | | | | | Avoid a potential `ResourceWarning` in `http.client.HTTPConnection` by closing the proxy / tunnel's CONNECT response explicitly. --------- Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-88496: IDLE - fix another test on macOS (#104075)Terry Jan Reedy2023-05-021-2/+3
| | | Needed for Catalina: test_sidebar add 'idletasks' and skip assert.
* gh-94673: Hide Objects in PyTypeObject Behind Accessors (gh-104074)Eric Snow2023-05-026-244/+352
| | | This makes it much cleaner to move more PyTypeObject fields to PyInterpreterState.
* gh-94673: Properly Initialize and Finalize Static Builtin Types for Each ↵Eric Snow2023-05-0217-134/+145
| | | | | Interpreter (gh-104072) Until now, we haven't been initializing nor finalizing the per-interpreter state properly.
* gh-104016: Skip test for deeply neste f-strings on wasi (#104071)Pablo Galindo Salgado2023-05-011-3/+4
|
* gh-104057: Fix direct invocation of test_super (#104064)Kirill Podoprigora2023-05-011-2/+2
|
* gh-87092: Expose assembler to unit tests (#103988)Irit Katriel2023-05-0111-48/+329
|
* gh-97696: asyncio eager tasks factory (#102853)Itamar Ostricher2023-05-0112-47/+945
| | | | Co-authored-by: Jacob Bower <jbower@meta.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* gh-84436: Immortalize in _PyStructSequence_InitBuiltinWithFlags() (gh-104054)Eric Snow2023-05-018-59/+74
| | | This also does some cleanup.
* gh-104057: Fix direct invocation of test_module (GH-104059)Kirill Podoprigora2023-05-011-1/+1
|
* gh-100458: Clarify Enum.__format__() change of mixed-in types in the ↵Anže Pečar2023-05-011-13/+5
| | | | | | whatsnew/3.11.rst (GH-100387) Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com> Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* gh-104018: disallow "z" format specifier in %-format of byte strings (GH-104033)John Belmonte2023-05-013-1/+3
| | | | | | | | | | | PEP-0682 specified that %-formatting would not support the "z" specifier, but it was unintentionally allowed for bytes. This PR makes use of the "z" flag an error for %-formatting in a bytestring. Issue: #104018 --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-104016: Fixed off by 1 error in f string tokenizer (#104047)jx1242023-05-013-5/+25
| | | | | | Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com> Co-authored-by: Ken Jin <kenjin@python.org> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* GH-103629: Update Unpack's repr in compliance with PEP 692 (#104048)Franek Magiera2023-05-013-28/+45
|
* gh-102799: replace sys.exc_info by sys.exception in inspect and traceback ↵Irit Katriel2023-05-012-4/+6
| | | | modules (#104032)
* Fix typo in "expected" word in few source files (#104034)chgnrdv2023-05-012-2/+2
|
* gh-103824: fix use-after-free error in Parser/tokenizer.c (#103993)chgnrdv2023-05-012-1/+18
|
* gh-104035: Do not ignore user-defined `__{get,set}state__` in slotted frozen ↵Nikita Sobolev2023-05-013-2/+74
| | | | dataclasses (#104041)
* gh-104028: Reduce object creation while calling callback function from gc ↵Dong-hee Na2023-05-012-1/+13
| | | | (gh-104030)
* gh-104036: Fix direct invocation of test_typing (#104037)Kirill Podoprigora2023-05-011-1/+1
| | | Previously, `python -m test test_typing` worked, but `python Lib/test/test_typing.py` did not.
* gh-102213: Optimize the performance of `__getattr__` (GH-103761)sunmy20192023-05-013-8/+28
| | | | | Co-authored-by: Kirill <80244920+Eclips4@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Xiang Wang <34048878+wangxiang-hz@users.noreply.github.com>
* gh-103895: Improve how invalid `Exception.__notes__` are displayed (#103897)Carey Metcalfe2023-05-014-5/+23
|
* Adjust expression from `==` to `!=` in alignment with the meaning of the ↵Ben Faulhaber2023-05-011-1/+1
| | | | paragraph. (GH-104021)
* gh-88496: Fix IDLE test hang on macOS (#104025)Terry Jan Reedy2023-05-013-2/+3
| | | | Replace widget.update() with widget.update_idletasks in two places.
* Improve int test coverage (#104024)Shantanu2023-05-011-0/+20
| | | | | | | Following discussion in https://discuss.python.org/t/bug-in-int-42/26360/5 This tests some of the things documented in https://github.com/python/cpython/pull/100436 Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-88773: Added teleport method to Turtle library (#103974)Liam Gersten2023-04-304-12/+128
| | | | | | | | | | | Add a `teleport` method to `turtle` module turtle instances that acts a lot like `goto`, _but_ ensures the pen is up while warping to the new position to and can control shape filling behavior as part of the jump. Based on an educator user feature request. --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-104015: Fix direct invocation of `test_dataclasses` (#104017)Nikita Sobolev2023-04-301-1/+1
| | | Previously, `python -m test test_dataclasses` passed, but `./python.exe Lib/test/test_dataclasses.py` failed
* gh-104012: Ensure test_calendar.CalendarTestCase.test_deprecation_warning ↵Alex Waygood2023-04-301-4/+4
| | | | consistently passes (#104014)
* gh-103977: compile re expressions in platform.py only if required (#103981)Pieter Eendebak2023-04-302-36/+40
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-98003: Inline call frames for CALL_FUNCTION_EX (GH-98004)Ken Jin2023-04-306-55/+148
|
* Replace Netlify with Read the Docs build previews (#103843)Hugo van Kemenade2023-04-305-21/+51
| | | | | Co-authored-by: Oleg Iarygin <dralife@yandex.ru> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Update name in acknowledgements and add mailmap (#103696)Amethyst Reese2023-04-302-1/+4
| | | | | | | | I changed my name last year, and would like to update my name in the acknowledgements and git history accordingly. git-mailmap reference: https://git-scm.com/docs/gitmailmap Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-82054: allow test runner to split test_asyncio to execute in parallel by ↵Joshua Herman2023-04-301-3/+16
| | | | | | | | | | | | | | | | | | | | | | | sharding. (#103927) This runs test_asyncio sub-tests in parallel using sharding from Cinder. This suite is typically the longest-pole in runs because it is a test package with a lot of further sub-tests otherwise run serially. By breaking out the sub-tests as independent modules we can run a lot more in parallel. After porting we can see the direct impact on a multicore system. Without this change: Running make test is 5 min 26 seconds With this change: Running make test takes 3 min 39 seconds That'll vary based on system and parallelism. On a `-j 4` run similar to what CI and buildbot systems often do, it reduced the overall test suite completion latency by 10%. The drawbacks are that this implementation is hacky and due to the sorting of the tests it obscures when the asyncio tests occur and involves changing CPython test infrastructure but, the wall time saved it is worth it, especially in low-core count CI runs as it pulls a long tail. The win for productivity and reserved CI resource usage is significant. Future tests that deserve to be refactored into split up suites to benefit from are test_concurrent_futures and the way the _test_multiprocessing suite gets run for all start methods. As exposed by passing the -o flag to python -m test to get a list of the 10 longest running tests. --------- Co-authored-by: Carl Meyer <carl@oddbird.net> Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google, LLC]
* Remove non-existing tools from Sundry skiplist (#103991)Oleg Iarygin2023-04-291-9/+2
|
* gh-103793: Defer formatting task name (#103767)Itamar Ostricher2023-04-294-2/+29
| | | | | | | | | | | | | The default task name is "Task-<counter>" (if no name is passed in during Task creation). This is initialized in `Task.__init__` (C impl) using string formatting, which can be quite slow. Actually using the task name in real world code is not very common, so this is wasted init. Let's defer this string formatting to the first time the name is read (in `get_name` impl), so we don't need to pay the string formatting cost if the task name is never read. We don't change the order in which tasks are assigned numbers (if they are) -- the number is set on task creation, as a PyLong instead of a formatted string. Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-87092: change assembler to use instruction sequence instead of CFG (#103933)Irit Katriel2023-04-295-80/+92
|
* gh-103636: issue warning for deprecated calendar constants (#103833)Prince Roshan2023-04-295-0/+84
| | | | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>