master
Commits on Apr 22, 2021
-
bpo-35306: Avoid raising OSError from pathlib.Path.exists when passed…
… an invalid filename (GH-25529)
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-38822: Fixed os.stat failing on inaccessible directories. (GH-25527)
It would just fail if the path was inaccessible and had a trailing slash. It should fall back to the parent directory's metadata.
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-43284: Update platform.win32_ver to use _syscmd_ver instead of sy…
…s.getwindowsversion() (GH-25500) The sys module uses the kernel32.dll version number, which can vary from the "actual" Windows version. Since the best option for getting the version is WMI (which is expensive), we switch back to launching cmd.exe (which is also expensive, but a lot less code on our part). sys.getwindowsversion() is not updated to avoid launching executables from that module.
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Fix typo in the documentation (GH-24703)
Missing multiply symbol added Automerge-Triggered-By: GH:merwok
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-38659: Properly re-intialize module variables in test_enum (GH-25516
) Previously TestIntEnumConvert and TestStrEnumConvert would end up converting the module level variables from their regular int form to a `test.test_enum.X` instance after _convert would run. This meant that after a single test ran, the next set of _convert functions would be operating on the enum instances rather than ints. This would cause some tests such as the one involving format to fail when running under a mode that repeatedly runs test such as the refleak finder.
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits
Commits on Apr 21, 2021
-
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-40137: Add pycore_moduleobject.h internal header (GH-25507)
Add pycore_moduleobject.h internal header file with static inline functions to access module members: * _PyModule_GetDict() * _PyModule_GetDef() * _PyModule_GetState() These functions don't check at runtime if their argument has a valid type and can be inlined even if Python is not built with LTO. _PyType_GetModuleByDef() uses _PyModule_GetDef(). Replace PyModule_GetState() with _PyModule_GetState() in the extension modules, considered as performance sensitive: * _abc * _functools * _operator * _pickle * _queue * _random * _sre * _struct * _thread * _winapi * array * posix The following extensions are now built with the Py_BUILD_CORE_MODULE macro defined, to be able to use the internal pycore_moduleobject.h header: _abc, array, _operator, _queue, _sre, _struct.
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-43472: Ensure PyInterpreterState_New audit events are raised when…
… called through _xxsubinterpreters module (GH-25506)
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-40137: Optimize _PyType_GetModuleByDef() loop (GH-25505)
PyType_Ready() now ensures that a type MRO cannot be empty. _PyType_GetModuleByDef() no longer checks "i < PyTuple_GET_SIZE(mro)" at the first loop iteration to optimize the most common case, when the argument is the defining class.
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-40137: _PyType_GetModuleByDef() doesn't check tp_flags (GH-25504)
_PyType_GetModuleByDef() no longer checks if types are heap types. _PyType_GetModuleByDef() must only be called on a heap type created by PyType_FromModuleAndSpec() or on its subclasses. type_ready_mro() ensures that a static type cannot inherit from a heap type.
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
doc: Sync some missing 3.10 changes with the What's New (GH-25503)
Automerge-Triggered-By: GH:isidentical
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-38659: [Enum] add _simple_enum decorator (GH-25497)
add: * `_simple_enum` decorator to transform a normal class into an enum * `_test_simple_enum` function to compare * `_old_convert_` to enable checking `_convert_` generated enums `_simple_enum` takes a normal class and converts it into an enum: @simple_enum(Enum) class Color: RED = 1 GREEN = 2 BLUE = 3 `_old_convert_` works much like` _convert_` does, using the original logic: # in a test file import socket, enum CheckedAddressFamily = enum._old_convert_( enum.IntEnum, 'AddressFamily', 'socket', lambda C: C.isupper() and C.startswith('AF_'), source=_socket, ) `_test_simple_enum` takes a traditional enum and a simple enum and compares the two: # in the REPL or the same module as Color class CheckedColor(Enum): RED = 1 GREEN = 2 BLUE = 3 _test_simple_enum(CheckedColor, Color) _test_simple_enum(CheckedAddressFamily, socket.AddressFamily) Any important differences will raise a TypeErrorVerified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-38605: Revert making 'from __future__ import annotations' the def…
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits
Commits on Apr 20, 2021
-
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-43888: Reduce coverage collection timeout to 1h40m in GHA (GH-25471)
Ref: Signed-off-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
docs: clarify what patterns Path.glob accepts (GH-25486)
Automerge-Triggered-By: GH:Yhg1s
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-43799: Also define SSLv3_method() (GH-25481)
Signed-off-by: Christian Heimes <christian@python.org>
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-38659: [Enum] add _simple_enum decorator (GH-25285)
add: _simple_enum decorator to transform a normal class into an enum _test_simple_enum function to compare _old_convert_ to enable checking _convert_ generated enums _simple_enum takes a normal class and converts it into an enum: @simple_enum(Enum) class Color: RED = 1 GREEN = 2 BLUE = 3 _old_convert_ works much like _convert_ does, using the original logic: # in a test file import socket, enum CheckedAddressFamily = enum._old_convert_( enum.IntEnum, 'AddressFamily', 'socket', lambda C: C.isupper() and C.startswith('AF_'), source=_socket, ) test_simple_enum takes a traditional enum and a simple enum and compares the two: # in the REPL or the same module as Color class CheckedColor(Enum): RED = 1 GREEN = 2 BLUE = 3 _test_simple_enum(CheckedColor, Color) _test_simple_enum(CheckedAddressFamily, socket.AddressFamily) Any important differences will raise a TypeErrorVerified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits
Commits on Apr 19, 2021
-
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-43837: Reverse order of precedence table to show tightly binding …
…operators first (GH-25469)
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-40849: Expose X509_V_FLAG_PARTIAL_CHAIN ssl flag (GH-20463)
This short PR exposes an openssl flag that wasn't exposed. I've also updated to doc to reflect the change. It's heavily inspired by 990fcaa.
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-43669: More test_ssl cleanups (GH-25470)
Signed-off-by: Christian Heimes <christian@python.org>
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-43880: Show DeprecationWarnings for deprecated ssl module features (
GH-25455) * ssl.OP_NO_SSLv2 * ssl.OP_NO_SSLv3 * ssl.OP_NO_TLSv1 * ssl.OP_NO_TLSv1_1 * ssl.OP_NO_TLSv1_2 * ssl.OP_NO_TLSv1_3 * ssl.PROTOCOL_SSLv2 * ssl.PROTOCOL_SSLv3 * ssl.PROTOCOL_SSLv23 (alias for PROTOCOL_TLS) * ssl.PROTOCOL_TLS * ssl.PROTOCOL_TLSv1 * ssl.PROTOCOL_TLSv1_1 * ssl.PROTOCOL_TLSv1_2 * ssl.TLSVersion.SSLv3 * ssl.TLSVersion.TLSv1 * ssl.TLSVersion.TLSv1_1 * ssl.wrap_socket() * ssl.RAND_pseudo_bytes() * ssl.RAND_egd() (already removed since it's not supported by OpenSSL 1.1.1) * ssl.SSLContext() without a protocol argument * ssl.match_hostname() * hashlib.pbkdf2_hmac() (pure Python implementation, fast OpenSSL function will stay) Signed-off-by: Christian Heimes <christian@python.org>
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits -
bpo-42854: Use SSL_read/write_ex() (GH-25468)
The ssl module now uses ``SSL_read_ex`` and ``SSL_write_ex`` internally. The functions support reading and writing of data larger than 2 GB. Writing zero-length data no longer fails with a protocol violation error. Signed-off-by: Christian Heimes <christian@python.org>
Verified
This commit was created on GitHub.com and signed with GitHub’s verified signature.GPG key ID: 4AEE18F83AFDEB23 Learn about signing commits