Russell Keith-Magee
26c65980dc
gh-103329: Add regression test for PropertyMock with side effect ( #103358 )
2023-04-07 20:09:00 -06:00
sunmy2019
5d7d86f2fd
gh-103272: regression test for getattr exception in property ( #103336 )
2023-04-07 12:11:11 -07:00
Tian Gao
2667452945
gh-103225: Fixed zero lineno issue for pdb ( #103265 )
...
Co-authored-by: Artem Mukhin <ortem00@gmail.com>
2023-04-07 18:57:46 +01:00
Alex Waygood
800382a2b0
gh-74690: Add more tests for runtime-checkable protocols ( #103347 )
2023-04-07 18:21:19 +01:00
AN Long
4dc339b4d6
GH-88013: Fix TypeError raised by ntpath.realpath in some cases (GH-102813)
2023-04-07 12:56:00 +01:00
Nikita Sobolev
995386071f
bpo-46523: fix tests rerun when `setUp[Class|Module]` fails ( #30895 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-04-07 12:43:41 +02:00
Dong-hee Na
efb0a2cf3a
gh-103256: Fix hmac algorithm to support fallback implementation (gh-103286)
...
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-04-07 10:51:29 +09:00
AGZain
a653c32d08
gh-93121: fix test_mailbox where some test cases were accidentally dropped ( #93242 )
2023-04-06 23:19:11 +01:00
Brett Cannon
5d08c3ff7d
GH-102700: allow built-in modules to be submodules (GH-103162)
2023-04-06 14:19:54 -07:00
Alex Waygood
dca7d174f1
gh-103193: Speedup and inline `inspect._is_type` ( #103321 )
...
Improve performance of `inspect.getattr_static`
2023-04-06 21:49:24 +01:00
Alex Waygood
affedee8bf
gh-103193: Use LBYL idioms rather than EAFP in `inspect.getattr_static` ( #103318 )
2023-04-06 20:17:53 +01:00
Ijtaba Hussain
1724553e6e
gh-103186: assert in tests that UnsafeMailcapInput warnings are provided ( #103217 )
2023-04-06 19:13:33 +01:00
Irit Katriel
52bc2e7b9d
gh-48330: assert warning is emitted on unittest.TestResult with no addDuration ( #103309 )
2023-04-06 14:05:23 +01:00
Irit Katriel
482b6eeadc
gh-102799: use sys.exception() instead of sys.exc_info() in tests ( #103293 )
2023-04-06 11:08:25 +01:00
Ethan Furman
a44568b80d
[Enum] unchain exception property.__get__ (GH-103305)
2023-04-05 21:30:11 -07:00
Eric Snow
03089fdccc
gh-101659: Add _Py_AtExit() (gh-103298)
...
The function is like Py_AtExit() but for a single interpreter. This is a companion to the atexit module's register() function, taking a C callback instead of a Python one.
We also update the _xxinterpchannels module to use _Py_AtExit(), which is the motivating case. (This is inspired by pain points felt while working on gh-101660.)
2023-04-05 18:42:02 -06:00
Ethan Furman
4ec8dd10bd
gh-93910: [Enum] remove member.member deprecation (GH-103236)
...
i.e. Color.RED.BLUE is now officially supported.
2023-04-05 17:33:52 -07:00
Brandt Bucher
b4978ff872
GH-88691: Shrink the CALL caches (GH-103230)
2023-04-05 14:15:49 -07:00
Alex Waygood
de18267685
gh-74690: Further optimise `typing._ProtocolMeta.__instancecheck__` ( #103280 )
2023-04-05 17:37:36 +01:00
Irit Katriel
5e7c468fc4
gh-89058: remove skip from test_no_hang_on_context_chain_cycle2 ( #102903 )
2023-04-05 15:52:38 +01:00
Yeojin Kim
8f70b16e33
gh-86094: Add support for Unicode Path Extra Field in ZipFile (gh-102566)
2023-04-05 20:54:48 +09:00
Alex Waygood
3246688918
gh-74690: typing: Call `_get_protocol_attrs` and `_callable_members_only` at protocol class creation time, not during `isinstance()` checks ( #103160 )
2023-04-05 12:19:03 +01:00
Alex Waygood
47753ecde2
gh-74690: typing: Simplify and optimise `_ProtocolMeta.__instancecheck__` ( #103159 )
2023-04-05 10:07:30 +01:00
Alex Waygood
264c00a1c5
gh-103193: Micro-optimise helper functions for `inspect.getattr_static` ( #103195 )
2023-04-05 08:27:01 +01:00
Michael Handler
1a8f862e32
gh-66897: Upgrade HTTP CONNECT to protocol HTTP/1.1 ( #8305 )
...
* bpo-22708: Upgrade HTTP CONNECT to protocol HTTP/1.1 (GH-NNNN)
Use protocol HTTP/1.1 when sending HTTP CONNECT tunnelling requests;
generate Host: headers if one is not already provided (required by
HTTP/1.1), convert IDN domains to punycode in HTTP CONNECT requests.
* Refactor tests to pass under -bb (fix ByteWarnings); missed some lines >80.
* Use consistent 'tunnelling' spelling in Lib/http/client.py
* Lib/test/test_httplib: Remove remnant of obsoleted test.
* Use dict.copy() not copy.copy()
* fix version changed
* Update Lib/http/client.py
Co-authored-by: bgehman <bgehman@users.noreply.github.com>
* Switch to for/else: syntax, as suggested
* Don't use for: else:
* Sure, fine, w/e
* Oops
* 1nm to the left
---------
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: bgehman <bgehman@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-04-04 21:55:24 -07:00
Charles Machalow
935aa45235
GH-75586: Make shutil.which() on Windows more consistent with the OS (GH-103179)
2023-04-04 23:24:13 +01:00
Thomas Wouters
30f82cf6c9
Merge branch 'main' of https://github.com/python/cpython into main
2023-04-04 22:01:07 +02:00
Steve Dower
fd1947ecfb
bpo-44844: Enable detection of Microsoft Edge browser in webbrowser module (GH-29908)
2023-04-04 17:00:03 +01:00
Thomas Wouters
b861ba4a82
Python 3.12.0a7
2023-04-04 17:52:42 +02:00
Erlend E. Aasland
c00dcf0e38
gh-103092: Isolate `_pickle` module ( #102982 )
...
Co-authored-by: Mohamed Koubaa <koubaa.m@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2023-04-04 15:38:54 +05:30
Ethan Furman
810d365b5e
gh-103056: [Enum] use staticmethod decorator for _gnv_ (GH-103231)
...
_gnv_ --> _generate_next_value_
2023-04-03 17:47:40 -07:00
Ethan Furman
5ffc1e5a21
gh-98298, gh-74730: [Enum] update docs (GH-103163)
...
fix FlagBoundary statements
add warning about reloading modules and enum identity
2023-04-03 14:57:42 -07:00
Sadra Barikbin
d3a7732dd5
gh-103215: Remove redundant if stmt from `enum.EnumType._find_data_type_` (GH-103222)
2023-04-03 14:51:43 -07:00
Barney Gale
11c302055a
GH-76846, GH-85281: Call `__new__()` and `__init__()` on pathlib subclasses (GH-102789)
...
Fix an issue where `__new__()` and `__init__()` were not called on subclasses of `pathlib.PurePath` and `Path` in some circumstances.
Paths are now normalized on-demand. This speeds up path construction, `p.joinpath(q)`, and `p / q`.
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2023-04-03 19:57:11 +01:00
Nikita Sobolev
2a721258a1
gh-101865: Deprecate `co_lnotab` from code objects as per PEP 626 ( #101866 )
...
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-04-03 17:35:04 +02:00
Shantanu
385b5d6e09
gh-102038: Skip a sometimes unnecessary stat in site.py ( #102039 )
2023-04-02 15:47:31 -07:00
Charlie Zhao
32937d6aa4
gh-103109: Document ignore_warnings() test support helper ( #103110 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-04-03 00:18:25 +02:00
Giampaolo Rodola
6883007a86
bpo-4080: unittest durations ( #12271 )
2023-04-03 00:12:51 +02:00
Alex Waygood
6d59c9e32e
gh-102433: Use `inspect.getattr_static` in `typing._ProtocolMeta.__instancecheck__` ( #103034 )
2023-04-02 14:22:19 +01:00
Partha P. Mukherjee
d828b35785
GH-102456: Fix docstring and getopt options for base64 (gh-102457)
2023-04-02 14:05:50 +09:00
Alex Waygood
361a3eaf1b
gh-74690: Micro-optimise `typing._get_protocol_attrs` ( #103152 )
...
Improve performance of `isinstance()` checks against runtime-checkable protocols
2023-03-31 21:54:50 +01:00
Ethan Furman
2a4d8c0a9e
gh-102549: [Enum] fail enum creation when data type raises in __init__ (GH-103149)
2023-03-31 13:52:31 -07:00
Eric Snow
dfc4c95762
gh-101659: Clean Up the General Import Tests for Subinterpreters (gh-103151)
...
This involves 3 changes: some general cleanup, checks to match the kind of module, and switch from testing against sys to _imp.
This is a precursor to gh-103150, though the changes are meant to stand on their own.
2023-03-31 12:18:33 -06:00
Alex Waygood
9048d73f7a
gh-74690: typing: Don't unnecessarily call `_get_protocol_attrs` twice in `_ProtocolMeta.__instancecheck__` ( #103141 )
...
Speed up `isinstance()` calls against runtime-checkable protocols
2023-03-31 18:37:24 +01:00
James De Bias
b0422e140d
gh-102871: Remove obsolete browsers from webbrowser ( #102872 )
2023-03-31 11:02:47 -04:00
Irit Katriel
44bd3fe570
gh-102799: use exception instance instead of sys.exc_info() ( #102885 )
2023-03-31 11:23:02 +01:00
Jeong, YunWon
21e9de3bf0
gh-103085: Fix python locale.getencoding not to emit deprecation warning (gh-103086)
2023-03-31 01:23:43 +09:00
Brandt Bucher
121057aa36
GH-89987: Shrink the BINARY_SUBSCR caches (GH-103022)
2023-03-29 15:53:30 -07:00
Bernhard Wagner
d052a383f1
gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc output ( #103113 )
...
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Éric <merwok@netwok.org>
2023-03-29 15:21:56 -04:00
gaogaotiantian
e375bff037
gh-103068: Check condition expression of breakpoints for pdb ( #103069 )
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Artem Mukhin <ortem00@gmail.com>
2023-03-29 12:09:12 +02:00