summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-105564: Don't include artificial newlines in the line attribute of tokens ↵Pablo Galindo Salgado2023-06-094-25/+30
| | | | (#105565)
* Clarify the supported cases in the tokenize module (#105569)Pablo Galindo Salgado2023-06-091-0/+9
|
* gh-105497: [Enum] Fix Flag inversion when alias/mask members exist. (GH-105542)Ethan Furman2023-06-093-8/+47
| | | When inverting a Flag member (or boundary STRICT), only consider other canonical flags; when inverting an IntFlag member (or boundary KEEP), also consider aliases.
* Miscellaneous improvements to the typing docs (#105529)Alex Waygood2023-06-093-145/+229
| | | Mostly, these are changes so that we use shorter sentences and shorter paragraphs. In particular, I've tried to make the first sentence introducing each object in the typing API short and declarative.
* gh-105557: Remove duplicate sqlite3 test method (#105558)Erlend E. Aasland2023-06-091-7/+2
| | | | test_func_return_too_large_int() was defined twice. Keep only the redefined method, as that also checks the tracebacks.
* gh-94924: support `inspect.iscoroutinefunction` in ↵Thomas Grainger2023-06-093-2/+54
| | | | | | | | | | `create_autospec(async_def)` (#94962) * support inspect.iscoroutinefunction in create_autospec(async_def) * test create_autospec with inspect.iscoroutine and inspect.iscoroutinefunction * test when create_autospec functions check their signature
* gh-105407: Remove unused imports (#105554)Victor Stinner2023-06-095-5/+3
|
* gh-102304: Remove Py_INCREF() doc change (#105552)Victor Stinner2023-06-091-9/+0
| | | | Py_INCREF() was made compatible again with Python 3.9 and older in the limited API of Python debug mode.
* gh-102304: Fix Py_INCREF() for limited C API 3.9 (#105550)Victor Stinner2023-06-091-2/+14
| | | | | | When Python is built in debug mode (Py_REF_DEBUG macro), Py_INCREF() and Py_DECREF() of the limited C API 3.9 (and older) now call Py_IncRef() and Py_DecRef(), since _Py_IncRef() and _Py_DecRef() were added to Python 3.10.
* gh-105545: Remove deprecated `MacOSXOSAScript._name` (gh-105546)Nikita Sobolev2023-06-094-15/+7
|
* gh-105396: Deprecate PyImport_ImportModuleNoBlock() function (#105397)Victor Stinner2023-06-095-1/+18
| | | | Deprecate the PyImport_ImportModuleNoBlock() function which is just an alias to PyImport_ImportModule() since Python 3.3.
* CI: Configure macOS build as per updated devguide recommendations (#105533)Erlend E. Aasland2023-06-081-3/+2
|
* gh-102832: IDLE - update stackviewer open (#105528)Terry Jan Reedy2023-06-081-2/+2
| | | Use 'last_exc' instead of 'last_value' in 3.12/3.
* gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer ↵Irit Katriel2023-06-084-52/+22
| | | | (#103339)
* gh-100227: Lock Around Modification of the Global Allocators State (gh-105516)Eric Snow2023-06-084-56/+183
| | | The risk of a race with this state is relatively low, but we play it safe anyway. We do avoid using the lock in performance-sensitive cases where the risk of a race is very, very low.
* gh-105332: [Enum] Fix unpickling flags in edge-cases (GH-105348)Nikita Sobolev2023-06-084-23/+47
| | | | | * revert enum pickling from by-name to by-value Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* gh-100227: Lock Around Adding Global Audit Hooks (gh-105515)Eric Snow2023-06-083-21/+47
| | | The risk of a race with this state is relatively low, but we play it safe anyway.
* gh-104310: Rename the New Function in importlib.util (gh-105255)Eric Snow2023-06-083-18/+41
| | | | | | | | | | | The original name wasn't as clear as it could have been. This change includes the following: * rename the function * change the default value for "disable_check" to False * add clues to the docstring that folks should probably not use the function --------- Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-100227: Lock Around Use of the Global "atexit" State (gh-105514)Eric Snow2023-06-083-25/+28
| | | The risk of a race with this state is relatively low, but we play it safe anyway.
* Revert "Move observability-relevant structure fields to the top" (#105512)Pablo Galindo Salgado2023-06-083-63/+51
|
* test_types: Replace raw assert statements (#105500)Jelle Zijlstra2023-06-081-25/+27
|
* Further improve docs for `typing.Annotated` (#105498)Alex Waygood2023-06-082-61/+85
|
* GH-105229: Remove remaining two-codeunit superinstructions (GH-105326)Mark Shannon2023-06-0812-624/+521
| | | | * Remove LOAD_CONST__LOAD_FAST and LOAD_FAST__LOAD_CONST superinstructions.
* Move observability-relevant structure fields to the top (#105271)Gabriele N. Tornetta2023-06-083-51/+63
|
* gh-105431: Remove unused stuff from `test_typing.NewTypeTests` (#105432)Nikita Sobolev2023-06-081-7/+0
|
* gh-104635: Eliminate redundant STORE_FAST instructions in the compiler ↵Dong-hee Na2023-06-074-9/+57
| | | | (gh-105320)
* GH-104996: Defer joining of `pathlib.PurePath()` arguments. (GH-104999)Barney Gale2023-06-072-17/+29
| | | | Joining of arguments is moved to `_load_parts`, which is called when a normalized path is needed.
* gh-103171: Forward-port new tests for runtime-checkable protocols dec orated ↵Alex Waygood2023-06-071-0/+65
| | | | | with `@final` (#105473) Forward-port of the tests that were added to the 3.11 branch in #105445
* gh-105390: Add explicit type cast (#105466)Kirill Podoprigora2023-06-071-1/+2
|
* gh-94673: Ensure subtypes are readied only once in math.trunc() (gh-105465)neonene2023-06-071-1/+1
| | | Fixes a typo in d2e2e53.
* gh-90015: Document that PEP-604 unions do not support forward references ↵Alex Waygood2023-06-071-0/+8
| | | | (#105366)
* gh-104610: Stop looking for PREDICT() in the cases generator (#105459)Guido van Rossum2023-06-071-16/+5
| | | We no longer use `PREDICT()`, it doesn't have any benefits.
* Fix grammar and improve clarity for an deprecation message. (GH-105457)Raymond Hettinger2023-06-071-2/+2
|
* GH-104610: Remove the use of `PREDICT` macros. (GH-104651)Mark Shannon2023-06-073-551/+507
|
* typing: Improve documentation of generic classes and aliases (#105369)Alex Waygood2023-06-072-65/+91
|
* gh-105437: Improve tests of type params names for PEP 695 (#105438)Nikita Sobolev2023-06-072-4/+12
|
* gh-105430: Remove `typing._Immutable` unused internal helper (#105434)Nikita Sobolev2023-06-071-11/+0
|
* gh-97797: Improve documentation for typing.Annotated (#105365)Alex Waygood2023-06-071-19/+54
|
* Improve docs for `typing.TypeAlias` (#105372)Alex Waygood2023-06-071-4/+26
|
* gh-105435: Fix spurious NEWLINE token if file ends with comment without a ↵Pablo Galindo Salgado2023-06-073-5/+39
| | | | newline (#105442)
* gh-105375: Improve error handling in sqlite3 collation callback (#105412)Erlend E. Aasland2023-06-072-3/+7
| | | Check for error after each call to PyUnicode_FromStringAndSize().
* gh-105390: Correctly raise TokenError instead of SyntaxError for tokenize ↵Pablo Galindo Salgado2023-06-076-24/+35
| | | | errors (#105399)
* gh-89886: Use Autoconf quadrigraphs where appropriate (#105226)Erlend E. Aasland2023-06-071-44/+44
|
* gh-104692: Include commoninstall as a prerequisite for bininstall (#104693)Jeffery To2023-06-072-1/+11
| | | | | | | | | This ensures that `commoninstall` is completed before `bininstall` is started when parallel builds are used (`make -j install`), and so the `python3` symlink is only installed after all standard library modules are installed. Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
* Improve code examples in `typing.rst` (#105346)Alex Waygood2023-06-071-30/+75
|
* typing docs: Make the PEPs list an expandable section, hidden by default ↵Alex Waygood2023-06-071-1/+11
| | | | | (#105353) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* GH-95088: Clarify rules for parsing an item key for format strings (#103779)achhina2023-06-071-1/+3
| | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-105286: Further improvements to `typing.py` docstrings (#105363)Alex Waygood2023-06-071-25/+43
|
* `typing.NewType` docs: the future performance improvements are now in the ↵Alex Waygood2023-06-071-3/+7
| | | | past (#105354)
* GH-102613: Fast recursive globbing in `pathlib.Path.glob()` (GH-104512)Barney Gale2023-06-064-140/+163
| | | | | | | | | | | | | | This commit introduces a 'walk-and-match' strategy for handling glob patterns that include a non-terminal `**` wildcard, such as `**/*.py`. For this example, the previous implementation recursively walked directories using `os.scandir()` when it expanded the `**` component, and then **scanned those same directories again** when expanded the `*.py` component. This is wasteful. In the new implementation, any components following a `**` wildcard are used to build a `re.Pattern` object, which is used to filter the results of the recursive walk. A pattern like `**/*.py` uses half the number of `os.scandir()` calls; a pattern like `**/*/*.py` a third, etc. This new algorithm does not apply if either: 1. The *follow_symlinks* argument is set to `None` (its default), or 2. The pattern contains `..` components. In these cases we fall back to the old implementation. This commit also replaces selector classes with selector functions. These generators directly yield results rather calling through to their successors. A new internal `Path._glob()` method takes care to chain these generators together, which simplifies the lazy algorithm and slightly improves performance. It should also be easier to understand and maintain.