Commit Graph

2179 Commits

Author SHA1 Message Date
Janek Nouvertné 7d9c68513d
gh-120868: Fix breaking change in `logging.config` when using `QueueHandler` (GH-120872) 2024-06-27 08:09:01 +01:00
Wulian233 c501261c91
gh-120495: Fix incorrect exception handling in Tab Nanny (#120498)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-06-15 05:04:14 -06:00
Tian Gao 417bec733c
Add Tian Gao to CODEOWNERS and ACKS (GH-120166) 2024-06-06 10:20:37 -07:00
benchatt 14e3c7071b
gh-115225: Raise error on unsupported ISO 8601 time strings (#119339)
Some time strings that contain fractional hours or minutes are permitted
by ISO 8601, but such strings are very unlikely to be intentional. The
current parser does not parse such strings correctly or raise an error.
This change raises a ValueError when hours or minutes contain a decimal mark.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-06-05 13:35:40 -04:00
Joshua Herman b9965ef282
gh-119189: Fix the power operator for Fraction (GH-119242)
When using the ** operator or pow() with Fraction as the base
and an exponent that is not rational, a float, or a complex, the
fraction is no longer converted to a float.
2024-05-31 10:05:09 +00:00
Xie Yanbo 5ef5622543
Fix typos in HISTORY documentation (#119453) 2024-05-27 10:57:23 +03:00
Russell Keith-Magee df987331d8
gh-114099: Formalize Tier 3 status of iOS (GH-118020) 2024-04-20 23:04:08 -04:00
Jeff Glass acf69e09c6
gh-115178: Add Counts of UOp Pairs to pystats (GH-115181) 2024-04-16 14:27:18 +01:00
Vlad4896 d5f1139c79
gh-117534: Add checking for input parameter in iso_to_ymd (#117543)
Moves the validation for invalid years in the C implementation of the `datetime` module into a common location between `fromisoformat` and `fromisocalendar`, which improves the error message and fixes a failed assertion when parsing invalid ISO 8601 years using one of the "ISO weeks" formats.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2024-04-09 13:53:00 -04:00
Nice Zombies cae4cdd07d
gh-117349: Micro-optimize a few `os.path` functions (#117350)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2024-04-02 21:32:35 +01:00
Mehdi Drissi d308d33e09
gh-89547: Support for nesting special forms like Final (#116096) 2024-03-11 23:11:56 -07:00
Derek Higgins 465db27cb9
gh-100985: Consistently wrap IPv6 IP address during CONNECT (GH-100986)
Update _get_hostport to always remove square brackets
from IPv6 addresses. Then add them if needed
in "CONNECT .." and "Host: ".
2024-02-17 10:10:12 +00:00
Peter Lazorchak 5a173efa69
Add Peter L to ACKS (GH-115222) 2024-02-10 01:06:14 +08:00
Alois Klink dce30c9cbc
gh-95649: Document that asyncio contains uvloop code (#107536)
Some of the asyncio SSL changes in GH-31275 [1] were taken from
v0.16.0 of the uvloop project [2]. In order to comply with the MIT
license, we need to just need to document the copyright information.

[1]: https://github.com/python/cpython/pull/31275
[2]: https://github.com/MagicStack/uvloop/tree/v0.16.0
2024-01-12 22:21:13 +00:00
Grigoriev Semyon bb4c167060
gh-111488: Changed error message in case of no 'in' keyword after 'for' in cmp (#113656) 2024-01-06 10:27:49 +00:00
Ege Akman ea978c645e
gh-113637: Let c_annotations.py to handle the spacing of Limited/Unstable API & Stable ABI translation strings (#113638) 2024-01-03 13:22:38 +02:00
Ethan Furman 4afa7be32d
add Ujan to ACKS for work on enum docs (GH-113301) 2023-12-19 17:55:24 -08:00
Constantin Hong aa5bee30ab
gh-102130: Support tab completion in cmd for Libedit. (GH-107748)
---

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2023-12-05 08:24:56 +01:00
Matt Prodani 1ff212debd
gh-111699: Move smtpd note to dedicated section in What's New Python 3.12 doc (GH-112544)
Relocate smtpd deprecation notice to it's own section rather than under
'locale' in docs for What's New in Python 3.12 doc
2023-11-30 14:53:19 +02:00
Grant Ramsay e954ac7205
gh-63284: Add support for TLS-PSK (pre-shared key) to the ssl module (#103181)
Add support for TLS-PSK (pre-shared key) to the ssl module.

---------

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-11-27 04:01:44 +00:00
Stephen Gildea 38035fed9b
gh-90890: New methods to access mailbox.Maildir message info and flags (#103905)
New methods to access mailbox.Maildir message info and flags:
get_info, set_info, get_flags, set_flags, add_flag, remove_flag.

These methods speed up accessing a message's info and/or flags and are
useful when it is not necessary to access the message's contents,
as when iterating over a Maildir to find messages with specific flags.

---------

* Add more str type checking
* modernize to f-strings instead of %

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-11-11 17:41:33 +00:00
Savannah Ostrowski 6640f1d8d2
GH-94438: Restore ability to jump over None tests (GH-111237) 2023-10-23 23:13:16 -07:00
박문식 d33aa18f15
gh-82367: Use `FindFirstFile` Win32 API in `ntpath.realpath()` (GH-110298)
* Use `FindFirstFile` Win32 API to fix a bug where `ntpath.realpath()`
breaks out of traversing a series of paths where a (handled)
`ERROR_ACCESS_DENIED` or `ERROR_SHARING_VIOLATION` occurs.
* Update docs to reflect that `ntpath.realpath()` eliminates MS-DOS
style names.
2023-10-05 09:49:07 -05:00
Jacob Coffee 99fba5f156
gh-109812: Fix phrasing for `collections.Counter` (gh-109813) 2023-09-27 21:29:39 -05:00
Hugo van Kemenade 8a82bff12c
Docs: Update Donghee Na's name (#109743) 2023-09-22 12:52:57 -06:00
Adam Turner 3e8fcb7df7
ACKS: Fix ordering; Correct Itamar Oren's surname; Add Adam Turner (#109737) 2023-09-22 16:56:07 +02:00
buermarc 68a6f21f47
gh-109375: Fix bug where pdb registers an alias without an associated command (#109376) 2023-09-14 22:31:30 +01:00
Corvin 24aa249a66
gh-107932: Fix dis module for bytecode that does not have an associated source line (GH-107988) 2023-08-25 09:31:26 +01:00
Chris Markiewicz 2eb60c1934
gh-108111: Flush gzip write buffer before seeking, fixing bad writes (#108341)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-08-24 10:23:01 +02:00
Tyler Smart 9bb576cb07
gh-107995: Fix doctest collection of functools.cached_property objects (#107996)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-18 15:44:38 +00:00
James Cave 810d5d87d9
gh-107089: Improve Shelf.clear method performance (gh-107090) 2023-07-29 09:08:11 +09:00
Bart Skowron 2aba047f0a
gh-69714: Make `calendar` module fully tested (#93655)
There are 3 paths to use `locale` argument in
`calendar.Locale{Text|HTML}Calendar.__init__(..., locale=None)`:
(1) `locale=None` -- denotes the "default locale"[1]
(2) `locale=""` -- denotes the native environment
(3) `locale=other_valid_locale` -- denotes a custom locale

So far case (2) is covered and case (1) is in 78935daf5a (same branch).
This commit adds a remaining case (3).

[1] In the current implementation, this translates into the following
approach:

GET current locale
IF current locale == "C" THEN
  SET current locale TO ""
  GET current locale
ENDIF

* Remove unreachable code (and increase test coverage)

This condition cannot be true. `_locale.setlocale()` from the C module
raises `locale.Error` instead of returning `None` for
`different_locale.__enter__` (where `self.oldlocale` is set).

* Expand the try clause to calls to `LocaleTextCalendar.formatmonthname()`.

This method temporarily changes the current locale to the given locale,
so `_locale.setlocale()` may raise `local.Error`.


Co-authored-by: Rohit Mediratta <rohitm@gmail.com>
Co-authored-by: Jessica McKellar <jesstess@mit.edu>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-07-22 15:20:40 +02:00
Chris Brett 4b4a5b70aa
gh-106634: Corrected minor asyncio doc issues (#106671) 2023-07-13 13:21:13 +05:30
Andrew Geng 3e5ce7968f
gh-106503: asyncio._SelectorSocketTransport: fix cyclic reference on close(). (#106504) 2023-07-07 17:11:54 +05:30
James Webber a12e8ffb49
gh-106075: add `asyncio.taskgroups.__all__` to `asyncio.__all__` (#106090)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2023-06-26 07:54:03 +00:00
Youfu Zhang 9c5aa8967b
gh-96522: Fix deadlock in pty.spawn (#96639) 2023-05-19 13:22:43 +00:00
Amethyst Reese 4b10ecc29f
Update name in acknowledgements and add mailmap (#103696)
I changed my name last year, and would like to update my name in the
acknowledgements and git history accordingly.

git-mailmap reference: https://git-scm.com/docs/gitmailmap

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-04-30 03:21:20 +00:00
Stefano Rivera 76632b836c
gh-62432: unittest runner: Exit code 5 if no tests were run (#102051)
As discussed in https://discuss.python.org/t/unittest-fail-if-zero-tests-were-discovered/21498/7

It is common for test runner misconfiguration to fail to find any tests,
This should be an error.

Fixes: #62432
2023-04-27 01:28:46 +00:00
Juhi Chandalia 86aa8a5e98
GH-103804: Add test for dis.findlinestarts (#103806) 2023-04-25 22:23:35 +01:00
jb2170 d94b3a6f45
gh-103673: Add missing ForkingUnixStreamServer and ForkingUnixDatagramServer socketservers (#103674)
sockserver gains ForkingUnixStreamServer and ForkingUnixDatagramServer classes for consistency with all of the others. Ironically these existed but were buried in our test suite.

Addresses #103673 

<!-- gh-issue-number: gh-103673 -->
* Issue: gh-103673
<!-- /gh-issue-number -->

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-04-24 22:35:52 +00:00
Tomas R 59e0de4903
gh-102978: Fix mock.patch function signatures for class and staticmethod decorators (#103228)
Fixes unittest.mock.patch not enforcing function signatures for methods
decorated with @classmethod or @staticmethod when patch is called with
autospec=True.
2023-04-13 08:37:57 +01:00
raylu 8b1b17134e
gh-103059: Clarify gc.freeze documentation (#103058) 2023-04-10 10:30:32 -06: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
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
yonatanp 2dc94634b5
gh-94440: Fix issue of ProcessPoolExecutor shutdown hanging (#94468)
Fix an issue of concurrent.futures ProcessPoolExecutor shutdown hanging.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-15 21:44:52 -07:00
Marta Gómez Macías 66aa78cbe6
gh-102356: Add thrashcan macros to filter object dealloc (#102426)
Add thrashcan macros to the deallocator of the filter objects to protect against deeply nested destruction of chains of nested filters.
2023-03-05 12:00:41 +01:00
Byeongmin Choi 77a3196b7c
gh-101863: Fix wrong comments in EUC-KR codec (gh-102417) 2023-03-05 01:01:54 +09:00
Steven Troxler 0f89acf6cc
gh-101561: Add typing.override decorator (#101564)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-02-27 13:16:11 -08:00
SKO 56e93c8020
gh-95675: fix uid and gid at test_add_dir_getmember (gh-102207)
Co-authored-by: Seonkyo Ok <seonkyo.ok@linecorp.com>
2023-02-25 11:26:40 +09:00
Yeojin Kim 347f7406df
gh-81652: Add MAP_ALIGNED_SUPER FreeBSD and MAP_CONCEAL OpenBSD constants (gh-102191) 2023-02-24 19:26:51 +09:00