Commit Graph

49372 Commits

Author SHA1 Message Date
Miss Islington (bot) 3f244b2f6e
[3.11] gh-105497: [Enum] Fix Flag inversion when alias/mask members exist. (GH-105542) (#105571)
When inverting a Flag member (or boundary STRICT), only consider other canonical flags; when inverting an IntFlag member (or boundary KEEP), also consider aliases.
(cherry picked from commit 59f009e589)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-07-05 13:59:18 +02:00
Miss Islington (bot) 23b731a10d
[3.11] GH-104554: Add RTSPS support to `urllib/parse.py` (GH-104605) (#105760)
RTSPS is the permanent scheme defined in
https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
alongside RTSP and RTSPU schemes.

---------

(cherry picked from commit f3266c05b6)

Co-authored-by: zentarim <33746047+zentarim@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-07-05 13:02:36 +02:00
Miss Islington (bot) 33fb89552b
[3.11] gh-89392: Make test_decimal discoverable (GH-106209) (#106229)
(cherry picked from commit 0e24499129)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-05 13:00:56 +02:00
Miss Islington (bot) edb29f0fbe
[3.11] gh-104683: Rename Lib/test/clinic.test as Lib/test/clinic.test.c (GH-106443) (#106445)
gh-104683: Rename Lib/test/clinic.test as Lib/test/clinic.test.c (GH-106443)
(cherry picked from commit a941bd6c53)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-05 09:03:25 +00:00
Miss Islington (bot) 9f8aa7a6d7
[3.11] gh-106368: Add tests for permutation helpers in Argument Clinic (GH-106407) (#106410)
Added new test class PermutationTests()
(cherry picked from commit 8f6df5e9cb)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-04 14:17:26 +02:00
Miss Islington (bot) 3cc5c4a073
[3.11] gh-106368: Increase Argument Clinic test coverage (GH-106389) (#106391)
Add:

- test_disallowed_gropuing__no_matching_bracket
- test_double_slash
(cherry picked from commit 3406f8cce5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-04 00:22:32 +00:00
Miss Islington (bot) 76889641e6
[3.11] gh-106368: Harden Argument Clinic parser tests (GH-106384) (#106388)
(cherry picked from commit 648688c137)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-03 23:35:42 +00:00
Erlend E. Aasland 3fdda976db
[3.11] gh-106368: Clean up Argument Clinic tests (#106373) (#106381)
(cherry picked from commit 3ee8dac7a1)
2023-07-03 22:33:45 +00:00
Erlend E. Aasland 52d5049cfd
[3.11] gh-106368: Increase Argument Clinic test coverage (#106369) (#106374)
Add tests for 'self' and 'defining_class' converter requirements.
(cherry picked from commit 7f4c8121db)
2023-07-03 22:07:05 +00:00
Miss Islington (bot) 9e33586018
[3.11] gh-102541: Fix Helper.help("mod") for non-existent mod (GH-105934) (#106323)
gh-102541: Fix Helper.help("mod") for non-existent mod (GH-105934)

If the output arg to Helper() is a stream rather than the default None, which means 'page to stdout', the ImportError from pydoc.resolve is currently not caught in pydoc.doc. The same error is caught when output is None.
---------

(cherry picked from commit 0530f4f646)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-07-01 23:15:44 +00:00
Victor Stinner d5418e97fc
[3.11] gh-101634: regrtest reports decoding error as failed test (#106169) (#106175)
gh-101634: regrtest reports decoding error as failed test (#106169)

When running the Python test suite with -jN option, if a worker stdout
cannot be decoded from the locale encoding report a failed testn so the
exitcode is non-zero.

(cherry picked from commit 2ac3eec103)
2023-06-28 02:58:34 +00:00
Miss Islington (bot) fbb0151e5e
[3.11] IDLE: Condense run.main threading.Thread start. (GH-106125) (#106153)
IDLE: Condense run.main threading.Thread start. (GH-106125)

Use daemon argument added in 3.3 and directly call .start.
Remove now unused 'sockthread' name.
(cherry picked from commit eaa1eae55e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-06-27 17:37:20 +00:00
Kumar Aditya 307c59a0c1
[3.11] gh-105979: Fix exception handling in unmarshal_frozen_code (`Python/import.c`) (GH-105980). (#106100)
* [3.11] gh-105979: Fix exception handling in `unmarshal_frozen_code` (`Python/import.c`) (GH-105980).
(cherry picked from commit cd5280367a)

Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
2023-06-26 09:00:51 +00:00
Miss Islington (bot) 2944a6cc0a
[3.11] GH-105840: Fix assertion failures when specializing calls with too many __defaults__ (GH-105864)
GH-105840: Fix assertion failures when specializing calls with too many __defaults__ (GH-105847)
(cherry picked from commit 2beab5bdef)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2023-06-16 18:30:22 +00:00
Alex Waygood e590338893
[3.11] gh-105834: Backport new tests for `typing.Protocol` (#105835) (#105860) 2023-06-16 16:39:12 +00:00
Miss Islington (bot) c0c4186858
[3.11] GH-105588: Add missing error checks to some obj2ast_* converters (GH-105839)
GH-105588: Add missing error checks to some obj2ast_* converters (GH-105589)
(cherry picked from commit a4056c8f9c)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2023-06-15 23:13:51 +00:00
Dong-hee Na abeb589290
[3.11] gh-102541: Hide traceback in help prompt (gh-102614). (gh-105830)
(cherry picked from commit ba516e70c6)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2023-06-15 15:29:00 +00:00
Miss Islington (bot) c2e51a9985
[3.11] gh-105436: Ignore unrelated errors when checking empty env (GH-105742) (#105757)
gh-105436: Ignore unrelated errors when checking empty env (GH-105742)
(cherry picked from commit 4cefe3cf10)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-06-13 23:39:56 +00:00
Miss Islington (bot) 261d0b4f0e
[3.11] gh-105436: The environment block should end with two null wchar_t values (GH-105495) (#105701)
gh-105436: The environment block should end with two null wchar_t values (GH-105495)
(cherry picked from commit 4f7d3b602d)

Co-authored-by: Dora203 <66343334+sku2000@users.noreply.github.com>
2023-06-12 16:49:57 +00:00
Miss Islington (bot) 2ba8e6ac50
[3.11] Fix typo in configparser module docstring (GH-105652) (#105654)
Fix typo in configparser module docstring (GH-105652)

"zc.buildbot" -> "zc.buildout"
(cherry picked from commit 845e593c4e)

Co-authored-by: litlighilit <97860435+litlighilit@users.noreply.github.com>
2023-06-11 14:33:50 +00:00
Alex Waygood 6cb1308005
[3.11] Miscellaneous improvements to the typing docs (#105529) (#105568)
Miscellaneous improvements to the typing docs (#105529)

Mostly, these are changes so that we use shorter sentences and shorter paragraphs. In particular, I've tried to make the first sentence introducing each object in the typing API short and declarative.
2023-06-09 22:41:22 +01:00
Miss Islington (bot) 6dcbd50eb8
[3.11] gh-105557: Remove duplicate sqlite3 test method (GH-105558) (#105562)
test_func_return_too_large_int() was defined twice.
Keep only the redefined method, as that also checks the tracebacks.
(cherry picked from commit b8fa7bda4f)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-09 14:02:15 +00:00
Miss Islington (bot) fed1b5a198
[3.11] gh-105332: [Enum] Fix unpickling flags in edge-cases (GH-105348) (GH-105519)
* revert enum pickling from by-name to by-value

(cherry picked from commit 4ff5690e59)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-06-08 18:02:12 -07:00
Miss Islington (bot) c2df09fb4d
[3.11] gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer (GH-103339) (#105527)
gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer (GH-103339)
(cherry picked from commit 3ee921d84f)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-06-08 20:48:10 +00:00
Miss Islington (bot) b073b30cae
[3.11] test_types: Replace raw assert statements (GH-105500) (#105508)
(cherry picked from commit a8eb7372ee)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-06-08 15:33:40 +00:00
Miss Islington (bot) af80db063f
[3.11] Further improve docs for `typing.Annotated` (GH-105498) (#105504)
* Further improve docs for `typing.Annotated` (GH-105498)
(cherry picked from commit d213c2990f)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-08 15:06:39 +00:00
Jelle Zijlstra 3a195f3468
[3.11] gh-105286: Further improvements to `typing.py` docstrings (GH-105363) (#105417)
[3.11] gh-105286: Further improvements to `typing.py` docstrings (GH-105363).
(cherry picked from commit 9a89f1bf1e)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-07 21:41:46 +00:00
Alex Waygood ccc971714e
[3.11] typing: Improve documentation of generic classes and aliases (#105369) (#105454) 2023-06-07 21:27:15 +00:00
Alex Waygood 18e9fd80d9
[3.11] gh-103171: Revert undocumented behaviour change for runtime-checkable protocols decorated with `@final` (#105445) 2023-06-07 21:18:21 +00:00
Pablo Galindo d2340ef257 Python 3.11.4 2023-06-06 23:00:27 +01:00
Miss Islington (bot) daf22ca7f9
[3.11] gh-104411: Update test_getint for Tcl 9.0 (GH-104412) (#105357)
gh-104411: Update test_getint for Tcl 9.0 (GH-104412)
(cherry picked from commit 2c49c759e8)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2023-06-06 10:04:21 -04:00
Miss Islington (bot) faae548e0e
[3.11] gh-89412: Add missing attributes (added in 3.10) to traceback module docs (GH-105046) (#105328)
(cherry picked from commit a4f72fa39a)

Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-06-05 19:02:23 +02:00
Alex Waygood 93d9e990fb
[3.11] gh-105286: Improve typing.py docstrings (#105287) (#105322)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-06-05 18:11:35 +02:00
Jelle Zijlstra 48957888d2
[3.11] gh-105164: Detect annotations inside match blocks (GH-105177). (#105314)
(cherry picked from commit 69d1245685)
2023-06-05 13:46:12 +00:00
Tian Gao aca77b5530
[3.11] gh-105080: Fixed inconsistent signature on derived classes (GH… (#105274) 2023-06-04 15:26:01 -06:00
Victor Stinner 5de6ca59fb
[3.11] gh-105096: Reformat wave documentation (#105136) (#105138) (#105155)
[3.12] gh-105096: Reformat wave documentation (#105136) (#105138)

gh-105096: Reformat wave documentation (#105136)

Add ".. class::" markups in the wave documentation.

* Reformat also wave.py (minor PEP 8 changes).
* Remove redundant "import struct": it's already imported at top
  level.
* Remove wave.rst from .nitignore

(cherry picked from commit 85e5d03163)
(cherry picked from commit 01b42f9559)
2023-05-31 16:40:25 +00:00
Miss Islington (bot) c39500db52
[3.11] GH-89455: Add missing attributes (added in 3.11) to traceback module docs (GH-105044) (#105067)
GH-89455: Add missing attributes (added in 3.11) to traceback module docs (GH-105044)
(cherry picked from commit 39f6a0489f)

Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-05-29 20:37:49 +01:00
Jelle Zijlstra d34e58a1d5
[3.11] gh-103921: Improve typing documentation (GH-104642) (#105007)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-27 16:30:41 -07:00
Miss Islington (bot) dcfa8165ad
[3.11] gh-104497: Make tkinter test pass with tk 8.7 (GH-104789) (#105029)
For test_widgets.MenuTest.test_configure_type, the options
in the error message change to alphabetical order.
---------

(cherry picked from commit 897e716d03)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-05-27 17:52:14 -04:00
Miss Islington (bot) ca5524745d
[3.11] Remove raw asserts in test_typing.py (GH-104951) (#104979)
Remove raw asserts in test_typing.py (GH-104951)
(cherry picked from commit 2cb445635e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-26 14:34:37 +00:00
Miss Islington (bot) f585ed19ad
[3.11] gh-104924: Fix `read()able` in `http.client` log messages (gh-104926) (gh-104971)
gh-104924: Fix `read()able` in `http.client` log messages (gh-104926)
(cherry picked from commit 6c81d7572e)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-05-26 12:02:13 +00:00
Miss Islington (bot) 13424746ce
[3.11] gh-104943: Remove mentions of old Python versions (GH-104945) (#104962)
(cherry picked from commit 46857d0b2a)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2023-05-26 07:13:45 +00:00
Miss Islington (bot) 76873ca6b1
[3.11] Fix test_importlib.test_side_effect_import() (GH-104840) (#104843)
Fix test_importlib.test_side_effect_import() (GH-104840)

Wait until the thread spawn by the import completes to avoid dangling
threads. With this fix, the following command no longer fails:

./python -m test --fail-env-changed test_importlib -m test_side_effect_import -F -j20
(cherry picked from commit 426950993f)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-05-25 02:35:34 +02:00
Miss Islington (bot) 5e911673e4
[3.11] Improve test coverage for is_typeddict (GH-104884) (#104888)
In particular, it's important to test that is_typeddict(TypedDict)
returns False.
(cherry picked from commit 1497607a8e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-24 19:23:35 +00:00
Miss Islington (bot) 22618a86f4
[3.11] gh-104719: IDLE - test existence of all tokenize references. (GH-104767) (#104845)
gh-104719: IDLE - test existence of all tokenize references. (GH-104767)

Class editor.IndentSearcher contains all editor references to tokenize module.
Module io tokenize reference cover those other modules.

(cherry picked from commit e561c09975)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-05-24 08:46:33 -04:00
Miss Islington (bot) 582aadc80e
[3.11] gh-104271: Fix auto() fallback in case of mixed type Enum (GH-104809)
[3.12] gh-104271: Fix auto() fallback in case of mixed type Enum (GH-104279)
(cherry picked from commit f4e2049f14)

Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
2023-05-23 12:48:20 -07:00
Miss Islington (bot) 6f94bbf77e
[3.11] gh-104536: Improve `multiprocessing.process._cleanup` logic (GH-104537) (#104737)
Fix a race condition in the internal `multiprocessing.process` cleanup
logic that could manifest as an unintended `AttributeError` when calling
`BaseProcess.close()`.

(cherry picked from commit ef5d00a592)

Co-authored-by: Luccccifer <lukezhang764@gmail.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-05-22 12:49:33 +02:00
Miss Islington (bot) e95ca78fab
[3.11] gh-102978: Fix mock.patch function signatures for class and staticmethod decorators (GH-103228) (#103499)
Fixes unittest.mock.patch not enforcing function signatures for methods
decorated with @classmethod or @staticmethod when patch is called with
autospec=True.

(cherry picked from commit 59e0de4903)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2023-05-22 12:47:12 +02:00
Alex Waygood d691de1d2d
[3.11] gh-104683: `clinic.py`: Improve coverage for the `parse_converter` method (#104729) (#104730) 2023-05-21 23:48:25 +00:00
Prince Roshan 2ade563abc
[3.11] gh-103606: Improve error message from logging.config.FileConfig (GH-103628) (#104687)
* gh-103606: Improve error message from logging.config.FileConfig (GH-103628)

(cherry picked from commit 152227b569)

plus backport the followup exception change fix to that in #104701
2023-05-21 12:17:18 -07:00