Commit graph

108940 commits

Author SHA1 Message Date
Miss Islington (bot)
aa8c3446c0
bpo-44959: Add fallback to extension modules with '.sl' suffix on HP-UX (GH-27857)
(cherry picked from commit 2396fa6537)

Co-authored-by: Florin Spătar <florin.spatar@gmail.com>
2021-10-22 04:08:50 -07:00
Miss Islington (bot)
216c040bb1
bpo-43592: Raise RLIMIT_NOFILE in test.libregrtest (GH-29127)
Raise RLIMIT_NOFILE in test.libregrtest.

On macOS the default is often too low for our testsuite to succeed.

Co-authored by reviewer: Victor Stinner
(cherry picked from commit 843b890334)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2021-10-21 21:48:44 -07:00
Miss Islington (bot)
c53428fe89
bpo-44344: Document that pow can return a complex number for non-complex inputs. (GH-27853) (GH-29134)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 887a55705b)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2021-10-22 00:08:36 +02:00
Miss Islington (bot)
b26eae54e9
bpo-41983: add availability info to socket docs (GH-27519) (GH-29137)
* add availability info to AF_PACKET section
* add availability for AF_QIPCRTR as well

(cherry picked from commit 51375388be)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-10-22 00:07:38 +02:00
Miss Islington (bot)
04485ac988
bpo-45160: Ttk optionmenu only set variable once (GH-28291) (GH-29132)
(cherry picked from commit add46f8476)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
2021-10-21 22:59:20 +02:00
Ethan Furman
e628700dbf
[3.9] bpo-44174: [Enum] add name-mangling reference (GH-29128) 2021-10-21 11:32:18 -07:00
Miss Islington (bot)
bfa4237ecf
bpo-34451: Document prompt and output toggle feature in html tutorial (GH-27105) (GH-29120)
(cherry picked from commit 5a14f71fe8)

Co-authored-by: Thomas <thmsdnnr@gmail.com>
2021-10-21 14:42:10 +02:00
Ethan Furman
9733c9651a
[3.9] bpo-42517: [ENUM] update docs for changes coming in 3.11 (GH-29113) 2021-10-20 16:11:47 -07:00
Miss Islington (bot)
d33fae7105
bpo-45192: Fix a bug that infers the type of an os.PathLike[bytes] object as str (GH-28323) (GH-29112)
An object implementing the os.PathLike protocol can represent a file
system path as a str or bytes object.
Therefore, _infer_return_type function should infer os.PathLike[str]
object as str type and os.PathLike[bytes] object as bytes type.
(cherry picked from commit 6270d3eeaf)

Co-authored-by: Kyungmin Lee <rekyungmin@gmail.com>
2021-10-20 23:25:10 +02:00
Miss Islington (bot)
427ab124b3
bpo-45464: [doc] Explain that subclassing multiple exceptions is fragile (GH-29094) (GH-29105)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
(cherry picked from commit dff0b71343)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-20 20:50:28 +02:00
Miss Islington (bot)
1249ce7c6c
bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100)
(cherry picked from commit d2cd5eef0c)

Co-authored-by: Jeong YunWon <69878+youknowone@users.noreply.github.com>
2021-10-20 10:45:06 -07:00
Miss Islington (bot)
9192683165
bpo-45229: Make doctest tests discoverable (GH-28986) (GH-29096)
(cherry picked from commit 8d6740f489)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-10-20 18:52:41 +02:00
Łukasz Langa
88f4ec88e2
[3.9] bpo-45494: Fix parser crash when reporting errors involving invalid continuation characters (GH-28993) (#29071)
There are two errors that this commit fixes:

* The parser was not correctly computing the offset and the string
  source for E_LINECONT errors due to the incorrect usage of strtok().
* The parser was not correctly unwinding the call stack when a tokenizer
  exception happened in rules involving optionals ('?', [...]) as we
  always make them return valid results by using the comma operator. We
  need to check first if we don't have an error before continuing..
(cherry picked from commit a106343f63)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

NOTE: unlike the cherry-picked original, this commit points at a crazy location
due to a bug in the tokenizer that required a big refactor in 3.10 to fix.
We are leaving as-is for 3.9.
2021-10-20 18:51:13 +02:00
Miss Islington (bot)
50e8b2ff02
Cleanup a couple of comments left on PR 28775 post-merge. (GH-29079)
(cherry picked from commit 1dfac27dff)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2021-10-20 09:50:27 -07:00
Miss Islington (bot)
15cd7a7f9e
bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077) (GH-29081)
Since v8.6.11, a few configuration options seem to accept an empty value
where they did not previously; particularly the `type` of a `Menu`
widget, and the `compound` of any ttk widget with a label.  Providing an
explicit expected error message to `checkEnumParam` bypasses the check
of an empty value, which no longer raises `TclError`.
(cherry picked from commit 4fe454c6f5)

Co-authored-by: Zachary Ware <zach@python.org>
2021-10-20 15:50:31 +02:00
Łukasz Langa
d46b2217d1
[3.9] bpo-45500: Rewrite test_dbm (GH-29002) (GH-29074)
* Generate test classes at import time. It allows to filter them when
  run with unittest. E.g: "./python -m unittest test.test_dbm.TestCase_gnu -v".
* Create a database class in a new directory which will be removed after
  test. It guarantees that all created files and directories be removed
  and will not conflict with other dbm tests.
* Restore dbm._defaultmod after tests. Previously it was set to the last
  dbm module (dbm.dumb) which affected other tests.
* Enable the whichdb test for dbm.dumb.
* Move test_keys to the correct test class. It does not test whichdb().
* Remove some outdated code and comments..
(cherry picked from commit 975b94b9de)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-10-20 17:06:38 +09:00
Łukasz Langa
a18e4e9c15
[3.9] bpo-45449: add note about PEP 585 in collections.abc's documentation (GH-29047) (GH-29068)
Signed-off-by: Filipe Laíns <lains@riseup.net>

Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
(cherry picked from commit 7bafa0cf58)

Co-authored-by: Filipe Laíns <lains@riseup.net>
2021-10-19 20:50:09 +02:00
Miss Islington (bot)
76578884c5
bpo-45515: Add zoneinfo to the datetime documentation (GH-29038) (GH-29066)
We should have done this way back when 3.9 was released, but it fell off
the radar.

Co-authored-by: Paul Ganssle <git@m.ganssle.io>
(cherry picked from commit 8e40ca127f)
2021-10-19 20:35:56 +02:00
Miss Islington (bot)
cb34c1ee1b
Improve multiserver queue recipe (GH-29012) (GH-29014) 2021-10-18 00:24:51 -05:00
Miss Islington (bot)
1dbf9c86b2
bpo-45229: Make test_http_cookiejar discoverable (GH-29004)
(cherry picked from commit b3f0ceae91)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-10-17 09:46:55 -07:00
Miss Islington (bot)
ac1b7a3319
[3.9]bpo-45463: Clarify that global statements allows multiple names (GH-28851) (GH-28990)
The global statement allows specifying a list of identifiers
(https://docs.python.org/3/reference/simple_stmts.htmlGH-the-global-statement).

The "Execution model" chapter described the global statement as if it
only allowed one single name. Pluralize "name" in the appropriate places.
(cherry picked from commit 4ecd119b00)

Co-authored-by: Luca Chiodini <luca@chiodini.org>

Co-authored-by: Luca Chiodini <luca@chiodini.org>
2021-10-16 10:01:14 -04:00
Serhiy Storchaka
6848602806
bpo-45467: Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec (GH-28944) (GH-28953)
They support now splitting escape sequences between input chunks.

Add the third parameter "final" in codecs.raw_unicode_escape_decode().
It is True by default to match the former behavior.

(cherry picked from commit 39aa98346d)
2021-10-14 21:23:52 +03:00
Serhiy Storchaka
7c722e32bf
[3.9] bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939) (GH-28945)
They support now splitting escape sequences between input chunks.

Add the third parameter "final" in codecs.unicode_escape_decode().
It is True by default to match the former behavior.
(cherry picked from commit c96d1546b1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-10-14 20:03:29 +03:00
Miss Islington (bot)
38fadbc5b9
no-issue: Make silence about warning '_POSIX_C_SOURCE redefined' (GH-28948)
(cherry picked from commit d413c50363)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-10-14 09:36:19 -07:00
Miss Islington (bot)
fb72034538
[3.9] bpo-24444: fix an error in argparse help when help for an option is blank (GH-28050) (GH-28932)
(cherry picked from commit 6fafc25aea)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-10-13 22:36:05 +02:00
Miss Islington (bot)
9210eff61b
bpo-45386: Handle strftime's ValueError graciously in xmlrpc.client (GH-28765) (GH-28935)
At import time, the xmlrpc.client module uses different date formats to
test strftime so it can format years with 4 digits consistently.
Depending on the underlying C library and its strftime implementation
some of these calls can result in ValueErrors, blocking the
xmlrpc.client module from being imported.

This commit changes the behavior of this bit of code to react to
ValueError exceptions, treating the format that caused them as an
non-viable option.
(cherry picked from commit 1c83135381)

Co-authored-by: rtobar <rtobarc@gmail.com>
2021-10-13 20:00:05 +02:00
Łukasz Langa
5d74713093
[3.9] bpo-45229: Make tkinter tests discoverable (GH-28637) (GH-28929)
(cherry picked from commit f59ed3c310)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-10-13 19:08:44 +02:00
Miss Islington (bot)
5638618845
bpo-45239: Fix parsedate_tz when time has more than 2 dots in it (GH-28452) (GH-28928)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit b9e687618d)

Co-authored-by: Ben Hoyt <benhoyt@gmail.com>
2021-10-13 18:58:37 +02:00
Miss Islington (bot)
cc90732d15
bpo-20692: Add Programming FAQ entry for 1.__class__ error. (GH-28918)
To avoid error, add either space or parentheses.
(cherry picked from commit 380c440875)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-10-12 22:40:18 -07:00
Miss Islington (bot)
9901d153c2
[3.9] bpo-45405: Prevent `internal configure error when running configure` with recent versions of non-Apple clang. (GH-28845) (GH-28910)
Change the configure logic to function properly on macOS when the compiler
outputs a platform triplet for option --print-multiarch.

Co-authored-by: Ned Deily <nad@python.org>
(cherry picked from commit 9c4766772c)


Co-authored-by: David Bohman <debohman@gmail.com>

Automerge-Triggered-By: GH:ned-deily
2021-10-12 17:35:59 -07:00
Miss Islington (bot)
6d4d4ec59f
Fix format string in _PyImport_LoadDynamicModuleWithSpec() (GH-28863)
(cherry picked from commit f79f3b41c8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-10-12 10:10:41 -07:00
Miss Islington (bot)
0cd5bf9194
Slight correct grammar (GH-28860)
(cherry picked from commit 1b11582f0e)

Co-authored-by: nobodyatandnothing <91722596+nobodyatandnothing@users.noreply.github.com>
2021-10-12 10:01:26 -07:00
Miss Islington (bot)
38e3ada75a
bpo-45441: Update some moved URLs in documentation (GH-28861)
(cherry picked from commit b37dc9b3bc)

Co-authored-by: 180909 <wjh180909@gmail.com>
2021-10-12 07:20:50 -07:00
Miss Islington (bot)
faa87f7f3b
bpo-45401: Fix a resource warning in test_logging (GH-28864) (GH-28873)
(cherry picked from commit 15188b115a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-10-12 10:18:43 +03:00
Miss Islington (bot)
23528905d4
bpo-42253: Update xml.dom.minidom.rst (GH-23126) (GH-28875)
Document that the "standalone" parameter was added in Python 3.9.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit c7e81fcf95)

Co-authored-by: Jens Diemer <github.com@jensdiemer.de>
2021-10-12 10:18:15 +03:00
Miss Islington (bot)
320084fe7d
bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828)
(cherry picked from commit 659812b451)

Co-authored-by: Olaf van der Spek <olafvdspek@gmail.com>
2021-10-11 12:34:51 -07:00
Miss Islington (bot)
7d1ae89b84
Handle error when PyUnicode_GetLength returns a negative value. (GH-28859)
(cherry picked from commit 560a79f94e)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-10-11 04:40:57 -07:00
Miss Islington (bot)
ac421c348b
bpo-45401: Change shouldRollover() methods to only rollover regular f… (GH-28822) (#28866)
…iles.

Also changed some historical return values from 1 -> True and 0 -> False.
(cherry picked from commit 62a667784b)

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2021-10-11 12:01:09 +02:00
Miss Islington (bot)
d57d33c234
Fix a leak in _PyImport_LoadDynamicModuleWithSpec() after failing PySys_Audit() (GH-28862)
(cherry picked from commit 9883ca498d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-10-11 02:43:09 -07:00
Miss Islington (bot)
5f44bb28fd
Fix the "Finding all Adverbs" example (GH-21420) (#28840)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit dbd62e74da)

Co-authored-by: Rim Chatti <chattiriim@gmail.com>
2021-10-10 14:43:58 -07:00
Dong-hee Na
e4fcb6fd3d
[3.9] bpo-20028: Keep original exception when PyUnicode_GetLength return -1 (GH-28832) (GH-28835) 2021-10-10 01:13:44 +09:00
Miss Islington (bot)
6f3bc5eee6
bpo-20028: Improve error message of csv.Dialect when initializing (GH-28705)
(cherry picked from commit 34bbc87b2d)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-10-09 08:30:54 -07:00
Miss Islington (bot)
87f0156a22
bpo-45262, asyncio: Fix cache of the running loop holder (GH-28796)
Prevent use-after-free of running loop holder via cache.
(cherry picked from commit 392a898353)

Co-authored-by: Matthias Reichl <github@hias.horus.com>
2021-10-07 16:14:04 -07:00
Miss Islington (bot)
06935bd68e
bpo-45337: Use the realpath of the new executable when creating a venv on Windows (GH-28663)
(cherry picked from commit 6811fdaec8)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-10-07 15:55:15 -07:00
Christian Clauss
4346b81cc6
[3.9] Fix typos in the Lib directory (GH-28775) (GH-28803)
Fix typos in the Lib directory as identified by codespell.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 745c9d9dfc)

Automerge-Triggered-By: GH:JulienPalard
2021-10-07 08:42:38 -07:00
Christian Clauss
da56601783
[3.9] Fix typos in the Tools directory (GH-28769) (GH-28800)
Like #28744 but for the Tools directory.

Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 682aecfdeb)
2021-10-07 17:31:24 +02:00
Christian Clauss
78efc9aff2
[3.9] Fix typos in the Python directory (GH-28767) (GH-28798)
(cherry picked from commit db693df3e1)

Automerge-Triggered-By: GH:JulienPalard
2021-10-07 07:36:39 -07:00
Christian Clauss
960e7b3ba1
[3.9] Fix typos in the Objects directory (GH-28766) (GH-28795)
(cherry picked from commit 5f401f1040)

Automerge-Triggered-By: GH:JulienPalard
2021-10-07 07:09:41 -07:00
Christian Clauss
71d56a7231
[3.9] [Misc] [Mac] Fix typos found using codespell (GH-28756) (GH-28793)
(cherry picked from commit 470145f572)

Automerge-Triggered-By: GH:JulienPalard
2021-10-07 06:42:07 -07:00
Christian Clauss
8f762349a2
[3.9] Fix typos in the Modules directory (GH-28761). (GH-28791)
(cherry picked from commit dd02a696e5)

Co-authored-by: Christian Clauss <cclauss@me.com>

Automerge-Triggered-By: GH:JulienPalard
2021-10-07 06:17:05 -07:00