Gregory P. Smith
a31dea1feb
gh-106669: Revert "gh-102988: Detect email address parsing errors ... ( #105127 )" ( #106733 )
...
This reverts commit 18dfbd0357
.
Adds a regression test from the issue.
See https://github.com/python/cpython/issues/106669 .
2023-07-20 20:30:52 -07:00
Brandt Bucher
214a25dd81
GH-104584: Miscellaneous fixes for -Xuops (GH-106908)
2023-07-20 16:35:39 +00:00
Zach Brantmeier
009e8f084c
Fix typo in 3.11.4 changelog: urllib.request.Requst -> Request ( #106830 )
2023-07-20 09:28:21 +00:00
Pieter Eendebak
832c37d42a
gh-106751: Optimize _PolllikeSelector for many iteration case (gh-106884)
2023-07-20 09:53:11 +09:00
Barney Gale
c6c5665ee0
GH-100502: Add `pathlib.PurePath.pathmod` attribute (GH-106533)
...
This instance attribute stores the implementation of `os.path` used for
low-level path operations: either `posixpath` or `ntpath`.
2023-07-19 18:59:55 +01:00
Yonatan Bitton
70b961ed93
gh-104090: Fix unittest collectedDurations resources leak ( #106795 )
2023-07-19 12:03:47 +01:00
Dong-hee Na
e6f96cf9c6
gh-106751: Optimize SelectSelector.select() for many iteration case (gh-106879)
2023-07-19 15:12:38 +09:00
Dong-hee Na
7513e2e7e4
gh-106751: Optimize KqueueSelector.select() for many iteration case (gh-106864)
2023-07-19 10:18:23 +09:00
Tian Gao
663854d73b
gh-106727: Make `inspect.getsource` smarter for class for same name definitions ( #106815 )
2023-07-18 23:20:31 +00:00
Irit Katriel
40f3f11a77
gh-105481: Generate the opcode lists in dis from data extracted from bytecodes.c ( #106758 )
2023-07-18 19:42:44 +01:00
J. Nick Koston
aecf6aca51
gh-106751: selectors: optimize EpollSelector.select() ( #106754 )
...
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2023-07-18 10:16:32 +00:00
Serhiy Storchaka
83ac128490
bpo-42327: C API: Add PyModule_Add() function (GH-23443)
...
It is a fixed implementation of PyModule_AddObject() which consistently
steals reference both on success and on failure.
2023-07-18 09:42:05 +03:00
Serhiy Storchaka
e1c295e3da
gh-106719: Fix __annotations__ getter and setter in the type and module types (GH-106720)
...
No longer suppress arbitrary errors. Simplify the code.
2023-07-18 08:56:58 +03:00
Nikita Sobolev
ebf2c56b33
gh-106831: Fix NULL check of d2i_SSL_SESSION() result in _ssl.c ( #106832 )
2023-07-17 19:55:40 +00:00
Irit Katriel
5ecedbd266
gh-106789: avoid importing pprint from sysconfig ( #106790 )
2023-07-17 10:28:33 +01:00
Grigoriev Semyon
55408f86d7
gh-105726: Add `__slots__` to `AbstractContextManager` and `AbstractAsyncContextManager` ( #106771 )
...
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-07-16 15:30:39 +00:00
Kevin Diem
cc25ca16ee
gh-106706: Streamline family syntax in cases generator DSL ( #106716 )
...
From `family(opname, STRUCTSIZE) = OPNAME + SPEC1 + ... + SPECn;`
to `family(OPNAME, STRUCTSIZE) = SPEC1 + ... + SPECn;`
2023-07-16 08:16:34 -07:00
Jason R. Coombs
22980dc7c9
gh-106752: Sync with zipp 3.16.2 ( #106757 )
...
* gh-106752: Sync with zipp 3.16.2
* Add blurb
2023-07-15 09:21:17 -04:00
Inada Naoki
2566b74b26
gh-81283: compiler: remove indent from docstring ( #106411 )
...
Co-authored-by: Éric <merwok@netwok.org>
2023-07-15 19:33:32 +09:00
Jason R. Coombs
03185f0c15
gh-106752: Move zipfile._path into its own package ( #106753 )
...
* gh-106752: Move zipfile._path into its own package so it may have supplementary behavior.
* Add blurb
2023-07-14 20:40:46 +00:00
J. Nick Koston
aeef8591e4
gh-106554: replace `_BaseSelectorImpl._key_from_fd` with `dict.get` ( #106555 )
2023-07-15 03:46:30 +09:00
Irit Katriel
6a70edf24c
gh-105481: expose opcode metadata via the _opcode module ( #106688 )
2023-07-14 18:41:52 +01:00
Jason R. Coombs
243fdcb40e
gh-106531: Remove importlib.resources._legacy ( #106532 )
...
* gh-106531: Remove importlib.resources._legacy
Syncs with importlib_resources 6.0.
* Remove documentation for removed functionality.
2023-07-14 13:38:28 -04:00
Grant Ramsay
21d98be422
gh-105293: Do not call SSL_CTX_set_session_id_context on client side SSL context ( #105295 )
...
* gh-105293: Do not call SSL_CTX_set_session_id_context on client side SSL context
Openssl states this is a "server side only" operation.
Calling this on a client side socket can result in unexpected behavior
* Add news entry on SSL "set session id context" changes
2023-07-14 00:10:54 -07:00
Nikita Sobolev
490295d651
gh-105626: Change the default return value of `HTTPConnection.get_proxy_response_headers` ( #105628 )
2023-07-13 23:55:49 -07:00
J. Nick Koston
8d2f3c36ca
gh-106664: selectors: add get() method to _SelectorMapping ( #106665 )
...
It can be used to avoid raising and catching KeyError twice via __getitem__.
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2023-07-13 19:18:53 +00:00
Ammar Askar
2f3ee02c22
gh-106690: Add a .coveragerc file to the CPython repository ( #8150 )
...
The added file is the coverage default at some point in time + checking branches both ways + IDLE additions, labelled as such and somewhat designed to be unlikely to affect other files. Located in the CPython repository directory, it can be used where it is or copied elsewhere, depending on how one runs coverage.
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-07-13 11:45:21 -04:00
Mark Shannon
487861c6ae
GH-104909: Split `LOAD_ATTR_INSTANCE_VALUE` into micro-ops (GH-106678)
2023-07-13 16:36:19 +01:00
Alex Waygood
32718f908c
gh-106309: Deprecate typing.no_type_check_decorator ( #106312 )
2023-07-13 14:30:35 +01:00
CF Bolz-Tereick
7e6ce48872
gh-106628: email parsing speedup (gh-106629)
2023-07-13 15:12:56 +09:00
Jim Porter
af51bd7cda
gh-89427: Set VIRTUAL_ENV_PROMPT even when VIRTUAL_ENV_DISABLE_PROMPT… (GH-106643)
2023-07-13 07:08:33 +01:00
Dennis Sweeney
ab86426a34
gh-105235: Prevent reading outside buffer during mmap.find() ( #105252 )
...
* Add a special case for s[-m:] == p in _PyBytes_Find
* Add tests for _PyBytes_Find
* Make sure that start <= end in mmap.find
2023-07-12 22:50:45 -04:00
Prince Roshan
357e9e9da3
gh-106602: [Enum] Add __copy__ and __deepcopy__ (GH-106666)
2023-07-12 14:01:17 -07:00
Nikita Sobolev
e4b88c1e4a
gh-106236: Replace `assert` with `raise RuntimeError` in `threading.py` ( #106237 )
...
Replace `assert` with `raise ` in `threading.py` so that -OO does not alter _DummyThread behavior.
2023-07-12 11:07:59 -07:00
Mark Shannon
b03755a234
GH-104909: Break LOAD_GLOBAL specializations in micro-ops. (GH-106677)
2023-07-12 14:34:14 +01:00
Steve Dower
e2d7366fb3
gh-99079: Update Windows build to use OpenSSL 3.0.9 (GH-106649)
2023-07-12 13:46:30 +01:00
Ijtaba Hussain
de827322ca
gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source directory ( #103213 )
...
Fetch CONFIG_ARGS from the original source directory, instead of from
the copied source tree. When "make clean" is executed in the copied
source tree, the build directory is cleared and the configure argument
lookup fails. However, the original source directory still contains this
information.
2023-07-11 22:22:18 +00:00
Serhiy Storchaka
4bf43710d1
gh-106307: C API: Add PyMapping_GetOptionalItem() function (GH-106308)
...
Also add PyMapping_GetOptionalItemString() function.
2023-07-11 23:04:12 +03:00
Pablo Galindo Salgado
b444bfb0a3
gh-106597: Add debugging struct with offsets for out-of-process tools ( #106598 )
2023-07-11 20:35:41 +01:00
Serhiy Storchaka
579aa89e68
gh-106521: Add PyObject_GetOptionalAttr() function (GH-106522)
...
It is a new name of former _PyObject_LookupAttr().
Add also PyObject_GetOptionalAttrString().
2023-07-11 22:13:27 +03:00
Jelle Zijlstra
945d3cbf2e
gh-106403: Restore weakref support for TypeVar and friends ( #106418 )
2023-07-11 08:43:24 -07:00
Terry Jan Reedy
a2d54d4e8a
gh-106498: Revert incorrect colorsys.rgb_to_hls change ( #106627 )
...
gh-86618 assumed a-b-c = a-(b+c) = a-d where d = b+d.
For floats 2.0, 1.0, and 0.9999999999999999, this assumption
is false. The net change of 1.1102230246251565e-16 to 0.0
results in division by 0. Revert the replacement. Add test.
2023-07-11 11:07:20 -04:00
Ethan Furman
95b7426f45
gh-105497: [Enum] Fix flag mask inversion when unnamed flags exist ( #106468 )
...
For example:
class Flag(enum.Flag):
A = 0x01
B = 0x02
MASK = 0xff
~Flag.MASK is Flag(0)
2023-07-11 13:35:54 +02:00
Victor Stinner
1f2921b72c
gh-106572: Convert PyObject_DelAttr() to a function ( #106611 )
...
* Convert PyObject_DelAttr() and PyObject_DelAttrString() macros to
functions.
* Add PyObject_DelAttr() and PyObject_DelAttrString() functions to
the stable ABI.
* Replace PyObject_SetAttr(obj, name, NULL) with
PyObject_DelAttr(obj, name).
2023-07-11 11:38:22 +02:00
Thomas Dwyer
18dfbd0357
gh-102988: Detect email address parsing errors and return empty tuple to indicate the parsing error (old API) ( #105127 )
...
Detect email address parsing errors and return empty tuple to indicate the parsing error (old API). This fixes or at least ameliorates CVE-2023-27043.
---------
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-07-10 23:00:55 +00:00
Louis Paulot
6782fc0502
gh-94777: Fix deadlock in ProcessPoolExecutor ( #94784 )
...
Fixes a hang in multiprocessing process pool executor when a child process crashes and code could otherwise block on writing to the pipe. See GH-94777 for more details.
2023-07-10 21:45:27 +00:00
Eric Snow
a840806d33
gh-105227: Add PyType_GetDict() (GH-105747)
...
This compensates for static builtin types having `tp_dict` set to `NULL`.
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-07-10 18:41:02 +02:00
Mark Shannon
0c90e75610
GH-100288: Specialize LOAD_ATTR for simple class attributes. ( #105990 )
...
* Add two more specializations of LOAD_ATTR.
2023-07-10 11:40:35 +01:00
Hugo van Kemenade
34c14147a2
gh-106487: Allow the 'count' argument of `str.replace` to be a keyword ( #106488 )
2023-07-10 12:52:36 +03:00
Victor Stinner
dcc028d924
gh-105376: Remove logging.warn() and LoggerAdapter.warn() ( #106553 )
2023-07-09 10:32:50 +02:00