Commit graph

115994 commits

Author SHA1 Message Date
Pablo Galindo Salgado
19a266ca89
[3.11] gh-111366: Correctly show custom syntax error messages in the codeop module functions (GH-111384). (#111516)
(cherry picked from commit cd6e0a04a1)
2023-10-31 14:41:20 +00:00
Nikita Sobolev
bc9f47097e
[3.11] gh-108303: Move all inspect test files to test_inspect/ (GH-109607) (#111543) 2023-10-31 14:00:39 +00:00
Miss Islington (bot)
08e4e11b75
[3.11] gh-111380: Show SyntaxWarnings only once when parsing if invalid syntax is encouintered (GH-111381) (#111383)
gh-111380: Show SyntaxWarnings only once when parsing if invalid syntax is encouintered (GH-111381)
(cherry picked from commit 3d2f1f0b83)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-10-31 13:29:42 +00:00
Miss Islington (bot)
c66f0bedeb
[3.11] gh-111531: Tkinter: fix reference leaks in bind_class() and bind_all() (GH-111533) (GH-111536)
(cherry picked from commit e3353c498d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-31 07:13:29 +00:00
Miss Islington (bot)
c5f6c6396d
[3.11] Remove myself from typing CODEOWNERS (GH-111523) (#111526)
Remove myself from typing CODEOWNERS (GH-111523)
(cherry picked from commit 804a207c16)

Co-authored-by: Ken Jin <kenjin@python.org>
2023-10-31 07:47:57 +02:00
Miss Islington (bot)
a9d5966bce
[3.11] gh-111347: Remove wrong assertion in test_sendfile (GH-111377) (#111462)
gh-111347: Remove wrong assertion in test_sendfile (GH-111377)

Windows is different.
(cherry picked from commit fa35b9e89b)

Co-authored-by: zcxsythenew <30565051+zcxsythenew@users.noreply.github.com>
2023-10-30 18:14:30 -07:00
Miss Islington (bot)
78150c6f7b
[3.11] gh-111284: Make multiprocessing tests with threads faster and more reliable (GH-111285) (GH-111511)
(cherry picked from commit 624ace5a2f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-30 17:44:27 +00:00
Serhiy Storchaka
9a12c23fe4
[3.11] gh-111165: Remove documentation for moved functions (GH-111467) (GH-111472)
(cherry picked from commit 4d6bdf8aab)
2023-10-29 19:45:51 +00:00
Miss Islington (bot)
a10fc6670b
[3.11] gh-101100: Fix sphinx warnings in library/asyncio-eventloop.rst (GH-111222) (#111470)
gh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst` (GH-111222)

* gh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst`

* Update Doc/library/socket.rst



* Update asyncio-eventloop.rst

* Update socket.rst

---------

(cherry picked from commit 46389c3275)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-29 19:39:25 +00:00
Miss Islington (bot)
68c03cef24
[3.11] gh-111426: Remove test_cmd.test_coverage (GH-111427) (#111433)
gh-111426: Remove `test_cmd.test_coverage` (GH-111427)
(cherry picked from commit 66bea2555d)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-28 23:23:38 +00:00
Miss Islington (bot)
da1736b06a
[3.11] CI: Include Python version in cache.config key (GH-111410) (#111422)
CI: Include Python version in cache.config key (GH-111410)

* Include Python version in cache.config key, after Python setup

* Remove EOL 3.7 from branch triggers
(cherry picked from commit 9d4a1a480b)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-28 07:51:57 +00:00
Miss Islington (bot)
1a01ca44d6
[3.11] gh-110205: Fix asyncio ThreadedChildWatcher._join_threads() (GH-110884) (#111413)
- `ThreadedChildWatcher.close()` is now *officially* a no-op; `_join_threads()` never did anything.
- Threads created by that class are now named `asyncio-waitpid-NNN`.
- `test.test_asyncio.utils.TestCase.close_loop()` now waits for the child watcher's threads, but not forever; if a thread hangs, it raises `RuntimeError`.
(cherry picked from commit c3bb10c930)

Co-authored-by: Guido van Rossum <guido@python.org>
2023-10-27 16:36:24 -07:00
Miss Islington (bot)
e84b06c05a
[3.11] gh-111406: Fix broken link to bpython's site (GH-111407) (#111409)
gh-111406: Fix broken link to bpython's site (GH-111407)
(cherry picked from commit 8a158a753c)

Co-authored-by: Zack Cerza <zack@cerza.org>
2023-10-27 18:45:52 +00:00
Miss Islington (bot)
a9e0455bd3
[3.11] gh-111276: Clarify docs and comments about the role of LC_CTYPE (GH-111319) (#111392)
Fix locale.LC_CTYPE documentation to no longer mention string.lower() et al. Those functions were removed in Python 3.0:
https://docs.python.org/2/library/string.htmlGH-deprecated-string-functions

Also, fix a comment in logging about locale-specific behavior of `str.lower()`.

(cherry picked from commit 6d42759c5e)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-27 17:15:15 +02:00
Hugo van Kemenade
e7cdcccd26
[3.11] gh-111187: Postpone removal version for locale.getdefaultlocale() to 3.15 (GH-111188) (#111326) 2023-10-27 16:08:53 +03:00
Pablo Galindo Salgado
22cde39fbf
[3.11] bpo-43950: handle wide unicode characters in tracebacks (GH-28150) (#111373) 2023-10-27 09:46:20 +09:00
Miss Islington (bot)
762aba72eb
[3.11] gh-111348: Fix direct invocation of test_doctest; remove test_doctest.test_coverage (GH-111349) (#111360)
gh-111348: Fix direct invocation of `test_doctest`; remove `test_doctest.test_coverage` (GH-111349)
(cherry picked from commit 31c05b72c1)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2023-10-26 13:12:27 +00:00
Savannah Ostrowski
12c7e5071c
[3.11] GH-94438: Restore ability to jump over None tests (GH-111338)
(cherry picked from commit 6640f1d)
2023-10-25 20:47:16 +00:00
Miss Islington (bot)
6fea61a9e0
[3.11] gh-111165: Add missed "support." prefix for "verbose" (GH-111327) (GH-111329)
(cherry picked from commit a4981921aa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-25 15:15:50 +00:00
Miss Islington (bot)
07664c9ddb
[3.11] gh-108590: Improve sqlite3 docs on encoding issues and how to handle those (GH-108699) (#111325)
Add a guide for how to handle non-UTF-8 text encodings.
Link to that guide from the 'text_factory' docs.

(cherry picked from commit 1262e41842)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Corvin <corvin@corvin.dev>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-25 14:07:44 +00:00
Serhiy Storchaka
fc9a5ef1a8
[3.11] [3.12] gh-111165: Move test running code from test.support to libregrtest (GH-111166) (GH-111316) (GH-111318)
Remove no longer used functions run_unittest() and run_doctest() from
the test.support module.
(cherry picked from commit f6a45a03d0)
(cherry picked from commit 5c4f9a1c7e)
2023-10-25 12:37:19 +00:00
Serhiy Storchaka
14167031eb
[3.11] gh-111309: Use unittest to collect and run distutils tests (GH-111311)
* use unittest.main() instead of run_unittest(test_suite()) to run tests from
  modules via the CLI
* add explicit load_tests() to load doctests
* use test.support.load_package_tests() to load tests in submodules of
  distutils.tests
* removes no longer needed test_suite() functions
2023-10-25 14:57:17 +03:00
Miss Islington (bot)
bb92fdabc7
[3.11] gh-111174: Fix crash in getbuffer() called repeatedly for empty BytesIO (GH-111210) (GH-111315)
(cherry picked from commit 9da98c0d9a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-25 11:18:30 +00:00
Artyom Romanov
d38843a7b6
[3.11] Bump ruff to the latest version (GH-111288) (#111310) 2023-10-25 11:33:09 +01:00
Miss Islington (bot)
652d3f33fb
[3.11] gh-109017: Use non alternate name for Kyiv (GH-109251) (GH-111279)
tzdata provides Kiev as an alternative to Kyiv:
https://sources.debian.org/src/tzdata/2023c-10/backward/?hl=314GH-L314

But Debian moved it to the tzdata-legacy package breaking the test:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050530

This patch switches to the name provided by tzdata.

Also check that the new name is actually available.
(cherry picked from commit 46407fe79c)

Co-authored-by: Jochen Sprickerhof <github@jochen.sprickerhof.de>
2023-10-24 23:56:02 +03:00
Miss Islington (bot)
ff7dc61643
[3.11] Revert "Fix a code snippet typo in asyncio docs (GH-108427)" (GH-111271) (GH-111273)
Revert "Fix a code snippet typo in asyncio docs (GH-108427)" (GH-111271)

This reverts commit 7f31676340.

The change resulted in a tautology and should not have been made.  There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)

(cherry picked from commit c7d68f907a)


Ref: https://github.com/python/cpython/pull/108427#-issuecomment-1777525740

Co-authored-by: Zachary Ware <zach@python.org>
2023-10-24 11:26:57 -05:00
Jelle Zijlstra
575bff3732
[3.11] gh-111151: Convert monospaced directives to :ref: (GH-111152) (#111270)
(cherry picked from commit 1198076447)

Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
2023-10-24 15:34:46 +00:00
Miss Islington (bot)
c905fab338
[3.11] gh-75666: Tkinter: add tests for binding (GH-111202) (GH-111256)
(cherry picked from commit 9bb202a1a9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-24 14:53:38 +03:00
Miss Islington (bot)
10376a164f
[3.11] Fix typo in sys docs (GH-111196) (#111249)
Co-authored-by: James Tocknell <aragilar+github@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-24 08:15:03 +00:00
Miss Islington (bot)
e35393fde9
[3.11] Fix a code snippet typo in asyncio docs (GH-108427) (#111244)
Co-authored-by: A <5249513+Dumeng@users.noreply.github.com>
2023-10-24 06:35:49 +00:00
Miss Islington (bot)
bf41dcda70
[3.11] gh-101100: Fix Sphinx warnings for fileno (GH-111118) (#111227)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-23 19:18:00 +00:00
Miss Islington (bot)
09bd752d94
[3.11] Add a version added note for PY_VECTORCALL_ARGUMENTS_OFFSET (GH-110963) (#111220)
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
2023-10-23 16:09:56 +00:00
Miss Islington (bot)
a449a70bcb
[3.11] typo: missing line of output in pull parser example (GH-111068) (#111218)
Co-authored-by: Don Patterson <37046246+don-patterson@users.noreply.github.com>
2023-10-23 16:04:52 +00:00
Miss Islington (bot)
135d5c5840
[3.11] gh-106310 - document the __signature__ attribute (GH-106311) (#111146)
Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-23 18:49:17 +03:00
Furkan Onder
f446df741f
[3.11] gh-67565: Add tests for C-contiguity checks (GH-110951) (GH-111199)
(cherry picked from commit 9376728ce4)
2023-10-23 12:49:44 +03:00
Miss Islington (bot)
0a23960266
[3.11] gh-110383: Italicize variable name (GH-111206) (#111208)
Co-authored-by: Nick <Nikki1993@users.noreply.github.com>
2023-10-23 11:11:54 +03:00
Miss Islington (bot)
6020a3e736
[3.11] gh-110383: Added explanation about simplest regex use case for quantifiers. (GH-111110) (#111205)
Co-authored-by: Nick <Nikki1993@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-23 07:31:32 +00:00
Miss Islington (bot)
3c3c489d41
[3.11] gh-110196: Fix ipaddress.IPv6Address.__reduce__ (GH-110198) (GH-111190)
(cherry picked from commit 767f416feb)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2023-10-22 19:12:58 +00:00
Miss Islington (bot)
aaa755dd48
[3.11] gh-101100: Fix sphinx warnings in library/asyncio-dev.rst (GH-111179) (#111186)
gh-101100: Fix sphinx warnings in `library/asyncio-dev.rst` (GH-111179)

* gh-101100: Fix sphinx warnings in `library/asyncio-dev.rst`

* Update Doc/library/asyncio-eventloop.rst

* Update Doc/library/asyncio-eventloop.rst

---------

(cherry picked from commit 8c689c9b88)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2023-10-22 10:29:06 -07:00
Miss Islington (bot)
d0502a9c67
[3.11] gh-101100: Fix Sphinx warning in tutorial/introduction.rst (GH-111173) (#111176)
gh-101100: Fix Sphinx warning in `tutorial/introduction.rst` (GH-111173)
(cherry picked from commit 663cf513b0)

Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2023-10-22 12:03:39 +00:00
Miss Islington (bot)
cf777399a9
[3.11] gh-111085: Fix invalid state handling in TaskGroup and Timeout (GH-111111) (GH-111172)
asyncio.TaskGroup and asyncio.Timeout classes now raise proper RuntimeError
if they are improperly used.

* When they are used without entering the context manager.
* When they are used after finishing.
* When the context manager is entered more than once (simultaneously or
  sequentially).
* If there is no current task when entering the context manager.

They now remain in a consistent state after an exception is thrown,
so subsequent operations can be performed correctly (if they are allowed).

(cherry picked from commit 6c23635f2b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
2023-10-21 19:40:07 +00:00
Miss Islington (bot)
cf28c61c73
[3.11] gh-111159: Fix doctest output comparison for exceptions with notes (GH-111160) (#111170)
gh-111159: Fix `doctest` output comparison for exceptions with notes (GH-111160)
(cherry picked from commit fd60549c0a)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-21 18:23:38 +00:00
Serhiy Storchaka
4222dd93af
[3.11] gh-110918: regrtest: allow to intermix --match and --ignore options (GH-110919) (GH-111168)
Test case matching patterns specified by options --match, --ignore,
--matchfile and --ignorefile are now tested in the order of
specification, and the last match determines whether the test case be run
or ignored.
(cherry picked from commit 9a1fe09622)
2023-10-21 17:30:19 +00:00
Miss Islington (bot)
17b8e35b65
[3.11] gh-111157: Mention __notes__ in traceback.format_exception_only docstring (GH-111158) (#111164)
gh-111157: Mention `__notes__` in `traceback.format_exception_only` docstring (GH-111158)
(cherry picked from commit 5e7727b052)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-21 18:06:51 +01:00
Miss Islington (bot)
47670fbdd0
[3.11] gh-110932: Fix regrtest for SOURCE_DATE_EPOCH (GH-111143) (#111153)
gh-110932: Fix regrtest for SOURCE_DATE_EPOCH (GH-111143)

If the SOURCE_DATE_EPOCH environment variable is defined, use its
value as the random seed.
(cherry picked from commit 7237fb578d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-21 09:01:10 +00:00
Miss Islington (bot)
9addf2cf11
[3.11] gh-111126: Use isinstance instead of assert[Not]IsInstance in test_typing (GH-111127) (#111131)
gh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing` (GH-111127)
(cherry picked from commit ea7c26e4b8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-10-20 18:28:41 +00:00
Miss Islington (bot)
7213fc248d
[3.11] Synchronize test_contextlib with test_contextlib_async (GH-111000) (GH-111115)
(cherry picked from commit ff4e53cb74)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-20 14:33:22 +00:00
Miss Islington (bot)
69bcaf7e0e
gh-110913: Fix WindowsConsoleIO chunking of UTF-8 text (GH-111007)
(cherry picked from commit 11312eae6e)

Co-authored-by: Tamás Hegedűs <sorgloomer@users.noreply.github.com>
2023-10-20 12:19:04 +00:00
Miss Islington (bot)
6df935c212
[3.11] gh-101100: Fix sphinx warnings in library/codecs.rst (GH-110979) (#111071)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-20 11:09:23 +03:00
Miss Islington (bot)
f1dbde0d3a
[3.11] gh-101100: Fix Sphinx warnings in library/tty.rst (GH-111079) (#111098)
gh-101100: Fix Sphinx warnings in `library/tty.rst` (GH-111079)

Fix Sphinx warnings in library/tty.rst
(cherry picked from commit c42c68aa7b)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-20 07:50:17 +03:00