added a commit to iritkatriel/cpython that referenced this pull request
* Correct
documentation (
) *
: Added marker for non-standard coroutine function detection (
) This introduces a new decorator `@inspect.markcoroutinefunction`, which, applied to a sync function, makes it appear async to `inspect.iscoroutinefunction()`. * Docs: Don't upload CI artifacts (
) *
: Fix os.walk RecursionError on deep trees (
) Use a stack to implement os.walk iteratively instead of recursively to avoid hitting recursion limits on deeply nested trees. *
: re docs: Add more specific definition of \w (
) Co-authored-by: Jelle Zijlstra <[email protected]> *
: Add ssl.OP_LEGACY_SERVER_CONNECT (
) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Christian Heimes <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]> Fixes
*
: Change lower-case and upper-case to match recommendations in imaplib docs (
) *
: Fix ref cycle in `asyncio._SelectorSocketTransport` with `_read_ready_cb` (
) *
: Fix inconsistency in `json.dumps()` error messages (
) * Clarify that every thread has its own default context in contextvars (
) *
: Fix cookiejar file that was not truncated for some classes (
) Co-authored-by: Łukasz Langa <[email protected]> *
: Reduce misses in BINARY_SUBSCR_(LIST/TUPLE)_INT (
) Don't specialize if the index is negative. *
: improve docs on str.encode and bytes.decode (
) Co-authored-by: C.A.M. Gerlach <[email protected]> *
: Add note on WeakKeyDictionary behavior when deleting a replaced entry (
) Co-authored-by: Pieter Eendebak <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]> *
: Improvements to inspect.signature __text_signature__ handling (
) This makes a couple related changes to inspect.signature's behaviour when parsing a signature from `__text_signature__`. First, `inspect.signature` is documented as only raising ValueError or TypeError. However, in some cases, we could raise RuntimeError. This PR changes that, thereby fixing
. (Note that the new ValueErrors in RewriteSymbolics are caught and then reraised with a message) Second, `inspect.signature` could randomly drop parameters that it didn't understand (corresponding to `return None` in the `p` function). This is the core issue in
. I think this is very surprising behaviour and it seems better to fail outright. Third, adding this new failure broke a couple tests. To fix them (and to e.g. allow `inspect.signature(select.epoll.register)` as in
), I add constant folding of a couple binary operations to RewriteSymbolics. (There's some discussion of making signature expression evaluation arbitrary powerful in
. I think that's out of scope. The additional constant folding here is pretty straightforward, useful, and not much of a slippery slope) Fourth, while
is incorrect about the cause of the issue, it turns out if you had consecutive newlines in __text_signature__, you'd get `tokenize.TokenError`. Finally, the `if name is invalid:` code path was dead, since `parse_name` never returned `invalid`. *
: Speed up `asyncio.get_running_loop` (
) *
: fix `asyncio` subprocess losing `stderr` and `stdout` output (
) *
: Fixed a bug in socket.getfqdn() (
) *
: Add tests for pickling all builtin types and functions (
) * Remove unused variable from `dis._find_imports` (
) *
: Fix crash when creating an instance of `_ctypes.CField` (
) *
: Clarify use of octal format of mode argument in help(os.chmod) (
) Co-authored-by: Kumar Aditya <[email protected]> *
: Pack location tables more effectively (
) * Correct typo in typing.py (
) In the docstring of `ParamSpec`, the name of `P = ParamSpec('P')` was mistakenly written as `'T'`. *
: Add `_PyLong_IsPositiveSingleDigit` function to check for single digit integers (
) *
: Make the correct call specialization fail kind show up in the stats (
) *
: fix bad rebase of moved test file (
) *
: Add C implementation for `asyncio.current_task` (
) Co-authored-by: pranavtbhat *
: Trim trailing whitespace (
) Automerge-Triggered-By: GH:brandtbucher *
: Harmonise parameter names between C and pure-Python implementations of `datetime.time.strftime`, `datetime.datetime.fromtimestamp` (
) *
: fix misleading tkinter.Tk docstring (
) Mentioned as a desired change by terryjreedy on the corresponding issue, since Tk is not a subclass of Toplevel. *
: Added example and link to faq for UnboundLocalError in reference (
) * Fix typo in 3.12 What's New (
) *
: PEP3118 itemsize of an empty ctypes array should not be 0 (
) The itemsize returned in a memoryview of a ctypes array is now computed from the item type, instead of dividing the total size by the length and assuming that the length is not zero. *
: fix copy-paste errors in specialization stats (
) *
: Initialize `frame->previous` in init_frame to fix segmentation fault when accessing `frame.f_back` (
) *
: Clarify "readonly bytes-like object" semantics in C arg-parsing docs (
) *
: improve performance of `hasattr` for type objects (
) *
: Specialise LOAD_ATTR_METHOD for managed dictionaries (
) * Revert "
: Specialise LOAD_ATTR_METHOD for managed dictionaries (
)" (
) This reverts commit
. *
: Reduce hash collisions for code objects (
) * Uses a better hashing algorithm to get better dispersion and remove commutativity. * Incorporates `co_firstlineno`, `Py_SIZE(co)`, and bytecode instructions. * This is now the entire set of criteria used in `code_richcompare`, except for `_PyCode_ConstantKey` (which would incorporate the types of `co_consts` rather than just their values). *
: 3.8x speed improvement in (Async)Mock instantiation (
) *
: remove `jython` compatibility parts from stdlib and tests (
) * bpo-40447: accept all path-like objects in compileall.compile_file (
) Signed-off-by: Filipe Laíns <[email protected]> Signed-off-by: Filipe Laíns <[email protected]> Co-authored-by: Irit Katriel <[email protected]> Co-authored-by: Shantanu <[email protected]> *
: Improve accuracy of builtin sum() for float inputs (
) *
,
- Allow for private `pathlib.Path` subclassing (
) Users may wish to define subclasses of `pathlib.Path` to add or modify existing methods. Before this change, attempting to instantiate a subclass raised an exception like: AttributeError: type object 'PPath' has no attribute '_flavour' Previously the `_flavour` attribute was assigned as follows: PurePath._flavour = xxx not set!! xxx PurePosixPath._flavour = _PosixFlavour() PureWindowsPath._flavour = _WindowsFlavour() This change replaces it with a `_pathmod` attribute, set as follows: PurePath._pathmod = os.path PurePosixPath._pathmod = posixpath PureWindowsPath._pathmod = ntpath Functionality from `_PosixFlavour` and `_WindowsFlavour` is moved into `PurePath` as underscored-prefixed classmethods. Flavours are removed. Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Brett Cannon <[email protected]> Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Eryk Sun <[email protected]> *
: Ensure unreported errors are chained for SystemError during import (
) * Add "strict" to dotproduct(). Add docstring. Factor-out common code. (
) *
: improve test coverage of number formatting (
) *
: Start running SSL tests with OpenSSL 3.1.0-beta1 (
) *
: Add is_integer method to int (
) This improves the lives of type annotation users of `float` - which type checkers implicitly treat as `int|float` because that is what most code actually wants. Before this change a `.is_integer()` method could not be assumed to exist on things annotated as `: float` due to the method not existing on both types. *
: Add enterabs example in sched (
) Co-authored-by: Shantanu <[email protected]> *
: Implement zero copy writes for `SelectorSocketTransport` in asyncio (
) Co-authored-by: Guido van Rossum <[email protected]> *
: Implement zero copy writes for `SelectorSocketTransport` in asyncio (
) Co-authored-by: Guido van Rossum <[email protected]> * Misc Itertools recipe tweaks (
) *
: Convert several functions in `bltinsmodule` to AC (
) * Remove wrong comment about `repr` in `test_unicode` (
) *
: Tutorial: Modernize the 'data-record class' example (
) Co-authored-by: Alex Waygood <[email protected]> *
: Fix handling of dirs named index.html in http.server (
) If you had a directory called index.html or index.htm within a directory, it would cause http.server to return a 404 Not Found error instead of the directory listing. This came about due to not checking that the index was a regular file. I have also added a test case for this situation. Automerge-Triggered-By: GH:merwok *
: Fix unittest.mock.seal with AsyncMock (
) *
: Add test for inheritance of annotations and update documentation (
) *
: Make float documentation more accurate (
) Previously, the grammar did not accept `float("10")`. Also implement mdickinson's suggestion of removing the indirection. * [Minor PR] Quotes in documentation changed into code blocks (
) Minor formatting fix in documentation Co-authored-by: Shantanu <[email protected]> *
: Fix docs claim that compileall parameters could be bytes (
) *
: simplification to `eff_request_host` in cookiejar.py (
) `IPV4_RE` includes a `.`, and the `.find(".") == -1` included here is already testing to make sure there's no dot, so this part of the expression is tautological. Instead use more modern `in` syntax to make it clear what the check is doing here. The simplified implementation more clearly matches the wording in RFC 2965. Co-authored-by: hauntsaninja <[email protected]> *
: Clarify re docs for byte pattern group names (
) *
: Improve argparse choices docs; revert bad change to lzma docs (
) Based on the definition of the collections.abc classes, it is more accurate to use "sequence" instead of "container" when describing argparse choices. A previous attempt at fixing this in
was mistaken; this PR reverts that change. Co-authored-by: Shantanu <[email protected]> * Fix name of removed `inspect.Signature.from_builtin` method in 3.11.0a2 changelog (
) *
: Fix `rst` markup in `configparser` docstrings (
) *
: Add `__class_getitem__` to `multiprocessing.queues.Queue` (
) *
: micro optimize list.pop (
) * Remove `NoneType` redefinition from `clinic.py` (
) *
: Improve accuracy of sqlite3.Row iter test (
) *
: Modernize a ton of simpler instructions (
) * load_const and load_fast aren't families for now * Don't decref unmoved names * Modernize GET_ANEXT * Modernize GET_AWAITABLE * Modernize ASYNC_GEN_WRAP * Modernize YIELD_VALUE * Modernize POP_EXCEPT (in more than one way) * Modernize PREP_RERAISE_STAR * Modernize LOAD_ASSERTION_ERROR * Modernize LOAD_BUILD_CLASS * Modernize STORE_NAME * Modernize LOAD_NAME * Modernize LOAD_CLASSDEREF * Modernize LOAD_DEREF * Modernize STORE_DEREF * Modernize COPY_FREE_VARS (mark it as done) * Modernize LIST_TO_TUPLE * Modernize LIST_EXTEND * Modernize SET_UPDATE * Modernize SETUP_ANNOTATIONS * Modernize DICT_UPDATE * Modernize DICT_MERGE * Modernize MAP_ADD * Modernize IS_OP * Modernize CONTAINS_OP * Modernize CHECK_EXC_MATCH * Modernize IMPORT_NAME * Modernize IMPORT_STAR * Modernize IMPORT_FROM * Modernize JUMP_FORWARD (mark it as done) * Modernize JUMP_BACKWARD (mark it as done) Signed-off-by: Filipe Laíns <[email protected]> Signed-off-by: Filipe Laíns <[email protected]> Co-authored-by: Jeremy Paige <[email protected]> Co-authored-by: Carlton Gibson <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]> Co-authored-by: Jon Burdo <[email protected]> Co-authored-by: Stanley <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]> Co-authored-by: Thomas Grainger <[email protected]> Co-authored-by: Brad Wolfe <[email protected]> Co-authored-by: Richard Kojedzinszky <[email protected]> Co-authored-by: František Nesveda <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]> Co-authored-by: Nikita Sobolev <[email protected]> Co-authored-by: Łukasz Langa <[email protected]> Co-authored-by: Dennis Sweeney <[email protected]> Co-authored-by: Bisola Olasehinde <[email protected]> Co-authored-by: C.A.M. Gerlach <[email protected]> Co-authored-by: Pieter Eendebak <[email protected]> Co-authored-by: Shantanu <[email protected]> Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Dominic Socular <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]> Co-authored-by: Hai Shi <[email protected]> Co-authored-by: amaajemyfren <[email protected]> Co-authored-by: Brandt Bucher <[email protected]> Co-authored-by: david-why <[email protected]> Co-authored-by: Pieter Eendebak <[email protected]> Co-authored-by: penguin_wwy <[email protected]> Co-authored-by: Eli Schwartz <[email protected]> Co-authored-by: Itamar Ostricher <[email protected]> Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Eric Wieser <[email protected]> Co-authored-by: Irit Katriel <[email protected]> Co-authored-by: Bill Fisher <[email protected]> Co-authored-by: Petr Viktorin <[email protected]> Co-authored-by: Ken Jin <[email protected]> Co-authored-by: Carl Meyer <[email protected]> Co-authored-by: Filipe Laíns <[email protected]> Co-authored-by: Raymond Hettinger <[email protected]> Co-authored-by: Barney Gale <[email protected]> Co-authored-by: Brett Cannon <[email protected]> Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Eryk Sun <[email protected]> Co-authored-by: Sebastian Berg <[email protected]> Co-authored-by: Illia Volochii <[email protected]> Co-authored-by: JosephSBoyle <[email protected]> Co-authored-by: James Frost <[email protected]> Co-authored-by: MonadChains <[email protected]> Co-authored-by: Bart Broere <[email protected]> Co-authored-by: Glyph <[email protected]> Co-authored-by: hauntsaninja <[email protected]> Co-authored-by: Ilya Kulakov <[email protected]> Co-authored-by: Guy Yagev <[email protected]> Co-authored-by: Jakub Kuczys <[email protected]>