Skip to content
Permalink
main
Switch branches/tags

Commits on Aug 17, 2022

  1. gh-90110: Get the C Analyzer Tool Working Again (gh-96057)

    We broke it with a recent `_PyArg_Parser` change.
    
    Also:
    * moved the `_PyArg_Parser` whitelist entries over to ignored.tsv now that they are thread-safe
    * added some known globals from a currently-excluded file
    * dropped some outdated globals from the whitelist
    ericsnowcurrently committed Aug 17, 2022
  2. GH-95589: Dont crash when subclassing extension classes with multiple…

    … inheritance (GH-96028)
    
    * Treat tp_weakref and tp_dictoffset like other opaque slots for multiple inheritance.
    
    * Document Py_TPFLAGS_MANAGED_DICT and Py_TPFLAGS_MANAGED_WEAKREF in what's new.
    markshannon committed Aug 17, 2022
  3. gh-95991: Add some infrastructure for testing Limited API in _testcapi (

    GH-95992)
    
    - Limited API needs to be enabled per source file
    - Some builds don't support Limited API, so Limited API tests must be skipped on those builds
      (currently this is `Py_TRACE_REFS`, but that may change.)
    - `Py_LIMITED_API` must be defined before `<Python.h>` is included.
    
    This puts the hoop-jumping in `testcapi/parts.h`, so individual
    test files can be relatively simple. (Currently that's only
    `vectorcall_limited.c`, imagine more.)
    encukou committed Aug 17, 2022
  4. gh-95736: Fix event loop creation in IsolatedAsyncioTestCase (GH-96033)

    It should be created before calling the setUp() method, but after
    checking for skipping a test.
    
    Automerge-Triggered-By: GH:tiran
    serhiy-storchaka committed Aug 17, 2022
  5. GH-95704: Don't suppress errors from tasks when TG is cancelled (#95761)

    When a task catches CancelledError and raises some other error,
    the other error should not silently be suppressed.
    
    Any scenario where a task crashes in cleanup upon cancellation
    will now result in an ExceptionGroup wrapping the crash(es)
    instead of propagating CancelledError and ignoring the side errors.
    
    NOTE: This represents a change in behavior (hence the need to
    change several tests).  But it is only an edge case.
    
    Co-authored-by: Thomas Grainger <tagrain@gmail.com>
    gvanrossum and graingert committed Aug 17, 2022

Commits on Aug 16, 2022

  1. gh-96005: Handle WASI ENOTCAPABLE in getpath (GH-96006)

    - On WASI `ENOTCAPABLE` is now mapped to `PermissionError`.
    - The `errno` modules exposes the new error number.
    - `getpath.py` now ignores `PermissionError` when it cannot open landmark
      files `pybuilddir.txt` and `pyenv.cfg`.
    tiran committed Aug 16, 2022
  2. gh-94823: Improve coverage in tokenizer.c:valid_utf8 (GH-94856)

    When loading a source file from disk, there is a separate UTF-8 validator
    distinct from the one in `unicode_decode_utf8`. This exercises that code path
    with the same set of invalid inputs as we use for testing the "other" UTF-8
    decoder.
    mdboom committed Aug 16, 2022
  3. gh-95957: Add instructions for Tcl/Tk and OpenSSL on RHEL/CentOS 7 (#…

    …95964)
    
    Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
    tiran and erlend-aasland committed Aug 16, 2022

Commits on Aug 15, 2022

  1. gh-78143: IDLE - fix settings dialog page label. (#96009)

    '/Tab' should have been removed from the font page label
    when the tab-spaces setting was moved to the Windows page.
    terryjreedy committed Aug 15, 2022
  2. gh-95231: Disable md5 & crypt modules if FIPS is enabled (GH-94742)

    If kernel fips is enabled, we get permission error upon doing
    `import crypt`. So, if kernel fips is enabled, disable the
    unallowed hashing methods.
    
    Python 3.9.1 (default, May 10 2022, 11:36:26)
    [GCC 10.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import crypt
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python3.9/crypt.py", line 117, in <module>
        _add_method('MD5', '1', 8, 34)
      File "/usr/lib/python3.9/crypt.py", line 94, in _add_method
        result = crypt('', salt)
      File "/usr/lib/python3.9/crypt.py", line 82, in crypt
        return _crypt.crypt(word, salt)
    PermissionError: [Errno 1] Operation not permitted
    
    Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
    sshedi committed Aug 15, 2022
  3. GH-95707: Fix uses of Py_TPFLAGS_MANAGED_DICT (GH-95854)

    * Make sure that tp_dictoffset is correct with Py_TPFLAGS_MANAGED_DICT is set.
    
    * Avoid traversing managed dict twice when subclassing class with Py_TPFLAGS_MANAGED_DICT set.
    markshannon committed Aug 15, 2022

Commits on Aug 13, 2022

  1. gh-95853: Add script to automate WASM build (GH-95828)

    Automate WASM build with a new Python script. The script provides
    several build profiles with configure flags for Emscripten flavors
    and WASI. The script can detect and use Emscripten SDK and WASI SDK from
    default locations or env vars.
    
    ``configure`` now detects Node arguments and creates HOSTRUNNER
    arguments for Node 16. It also sets correct arguments for
    ``wasm64-emscripten``.
    
    Co-authored-by: Brett Cannon <brett@python.org>
    tiran and brettcannon committed Aug 13, 2022
  2. gh-89313: Add hashlib.file_digest to whatsnew 3.11 (GH-95965)

    Automerge-Triggered-By: GH:pablogsal
    tiran committed Aug 13, 2022
  3. gh-94439: typing docs: Add minimum version to __required_keys__ and…

    … `__optional_keys__` (#95373)
    howiezhao committed Aug 13, 2022

Commits on Aug 12, 2022

  1. gh-94909: fix joining of absolute and relative Windows paths in pathl…

    …ib (GH-95450)
    
    Have pathlib use `os.path.join()` to join arguments to the `PurePath` initialiser, which fixes a minor bug when handling relative paths with drives.
    
    Previously:
    
    ```python
    >>> from pathlib import PureWindowsPath
    >>> a = 'C:/a/b'
    >>> b = 'C:x/y'
    >>> PureWindowsPath(a, b)
    PureWindowsPath('C:x/y')
    ```
    
    Now:
    
    ```python
    >>> PureWindowsPath(a, b)
    PureWindowsPath('C:/a/b/x/y')
    ```
    barneygale committed Aug 12, 2022
Older