Commit graph

114877 commits

Author SHA1 Message Date
Miss Islington (bot)
29ff9daf82
gh-101015: Fix typing.get_type_hints with unpacked *tuple (PEP 646) (GH-101031)
(cherry picked from commit 807d6b576f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-01-23 00:20:15 -08:00
Miss Islington (bot)
69d12d868e
[3.11] GH-101097: Switch from standard interval notation to greater or less than signs for random.random()'s documentation (GH-101119) (GH-101246)
(cherry picked from commit 8bcd4a6ec7)

Co-authored-by: Andrew Hong <andrewhong@myyahoo.com>

Automerge-Triggered-By: GH:rhettinger
2023-01-22 13:45:55 -08:00
Miss Islington (bot)
8cf8a6820e
Bump Azure Pipelines to ubuntu-22.04 (GH-101089)
(cherry picked from commit c22a55c8b4)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-01-21 06:39:37 -08:00
Miss Islington (bot)
d2aaf818ae
[3.11] gh-101037: Fix potential memory underallocation for zeros of int subtypes (GH-101038) (#101219)
gh-101037: Fix potential memory underallocation for zeros of int subtypes (GH-101038)

This PR fixes object allocation in long_subtype_new to ensure that there's at least one digit in all cases, and makes sure that the value of that digit is copied over from the source long.

Needs backport to 3.11, but not any further: the change to require at least one digit was only introduced for Python 3.11.

Fixes GH-101037.
(cherry picked from commit 401fdf9c85)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2023-01-21 10:54:09 +00:00
Miss Islington (bot)
99da75e770
gh-101143: Remove references to TimerHandle from asyncio.base_events.BaseEventLoop._add_callback (GH-101197)
(cherry picked from commit 9e947675ae)

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2023-01-21 02:28:09 -08:00
Miss Islington (bot)
c6cfde6fb1
gh-100750: pass encoding kwarg in lib/platform.py (GH-100751)
(cherry picked from commit 6b3993c556)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-01-20 21:07:56 -08:00
Miss Islington (bot)
db0eeb381e
[3.11] gh-86610: Use attribute directive in docs for pathlib.PurePath (GH-101114) (#101205)
(cherry picked from commit 01093b8203)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2023-01-20 23:28:21 +01:00
Miss Islington (bot)
efc89f3454
[3.11] GH-101111: Disambigaute origin of const for store_const and append_const (GH-101121) (#101203)
(cherry picked from commit 9a155138c5)

While the documentation for `optparse` mentioned that both `store_const` and
`append_const` store a constant value, it was not clear where this value was
coming from.

A link to `Option.const` makes this explicit.

Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
2023-01-20 23:22:04 +01:00
Miss Islington (bot)
1798df2b40
[3.11] Fix minor typos in SSL documentation (GH-101158) (#101201)
(cherry picked from commit 73497690b5)

Co-authored-by: Simon Robinson <simon@robinson.ac>
2023-01-20 23:18:25 +01:00
Miss Islington (bot)
0dc35e4bbb
gh-91485: Avoid unnecessary use of non-Python syntax in io docs (GH-101177)
(cherry picked from commit 783d1bc51b)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-01-20 14:12:26 -08:00
Miss Islington (bot)
e039d53dae
[3.11] gh-101100: [Enum] Fix sphinx warnings in docs (GH-101122) (#101173)
(cherry picked from commit 9e025d305f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-01-20 23:07:23 +01:00
Miss Islington (bot)
5e1c4ac85e
[3.11] Provided better example for logging cookbook (GH-101164) (GH-101184)
Co-authored-by: Vladimir Malinovskii <galqiwi@galqiwi.ru>
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2023-01-20 17:43:08 +00:00
Gregory P. Smith
efe3a389ca
[3.11] gh-101144: Allow zipfile.Path .open & .read_text encoding to be positional (#101179)
The zipfile.Path open() and read_text() encoding parameter can be supplied as a positional argument without causing a TypeError again. 3.10.0b1 included a regression that made it keyword only.

Documentation update included as users writing code to be compatible with a wide range of versions will need to consider this for some time..

(cherry picked from commit 5927013e47)

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
2023-01-20 00:06:18 -08:00
Miss Islington (bot)
1998ea69c7
gh-101041: Fix a misspelled name of utctimetuple in a doc warning (GH-101042)
(cherry picked from commit 8e9d08b062)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-01-19 21:06:47 -08:00
Miss Islington (bot)
db65a326a4
Docs: improve sqlite3 placeholders example (GH-101092)
(cherry picked from commit b84be8d9c0)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-01-18 01:43:44 -08:00
Miss Islington (bot)
3ef9f6b508
gh-82052: Don't send partial UTF-8 sequences to the Windows API (GH-101103)
Don't send partial UTF-8 sequences to the Windows API
(cherry picked from commit f34176b77f)

Co-authored-by: Paul Moore <p.f.moore@gmail.com>
2023-01-17 11:52:50 -08:00
Miss Islington (bot)
5e52778b1a
Fix typo in ReprEnum documentation (GH-101079)
(cherry picked from commit c5660ae96f)

Co-authored-by: Viicos <65306057+Viicos@users.noreply.github.com>
2023-01-17 02:59:35 -08:00
Pablo Galindo Salgado
31b82abb5c
[3.11] gh-101046: Fix a potential memory leak in the parser when raising MemoryError (GH-101051) (#101085)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-01-16 23:48:51 +00:00
Miss Islington (bot)
a3510c3a4e
gh-100247: Improve documentation for custom shebang commands in py.exe launcher (GH-101083)
(cherry picked from commit 30753c37c6)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-01-16 09:13:47 -08:00
Steve Dower
87ade7ebda
gh-100320: Fix path calculations on Windows when python.exe is moved outside of the normal location (GH-100947) 2023-01-16 17:00:34 +00:00
Miss Islington (bot)
63690e9af8
gh-101056: Fix memory leak in formatfloat() in bytesobject.c (GH-101057)
(cherry picked from commit b1a74a182d)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-01-16 03:12:23 -08:00
Nikita Sobolev
855b1a935e
[3.11] GH-100942: Fix incorrect cast in property_copy(). (GH-100965). (#101008)
(cherry picked from commit 94fc7706b7)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-01-15 12:38:25 +05:30
Miss Islington (bot)
6d98282ed4
[3.11] Sync-up parameter name in equivalent code snippet of enumerate (GH-101029) (#101030)
Sync-up parameter name in equivalent code snippet of `enumerate` (GH-101029)
(cherry picked from commit ef633e5000)

Co-authored-by: JustAnotherArchivist <JustAnotherArchivist@users.noreply.github.com>
2023-01-15 12:16:06 +05:30
Miss Islington (bot)
c7aa39286b
gh-100668: Clarify how sqlite3 maps parameters onto placeholders (GH-100960)
(cherry picked from commit 206f05a46b)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-01-14 15:04:53 -08:00
Miss Islington (bot)
39c1f68fff
gh-101021: Document binary parameters as bytes (GH-101024)
(cherry picked from commit 49cae39ef0)

Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
2023-01-14 12:22:08 -08:00
Raymond Hettinger
ba88628808
[3.11] Add recipes to showcase tee(), zip*, batched, starmap, and product. (GH-101028) 2023-01-13 22:32:32 -06:00
Miss Islington (bot)
d06315a6fa
[3.11] GH-100573: Fix server hang caused by os.stat() on named pipe (Windows) (GH-100959) (#101019)
(cherry picked from commit 1bc7a73683)
2023-01-13 13:58:20 -08:00
Miss Islington (bot)
6492492ce7
gh-100247: Fix py.exe launcher not using entire shebang command for finding custom commands (GH-100944)
(cherry picked from commit 468c3bf798)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-01-13 04:52:28 -08:00
Serhiy Storchaka
2834fdc689
[3.11] gh-100160: Tweak the documentation for the default asyncio policy (GH-100969) 2023-01-13 10:15:23 +02:00
Steve Dower
55a26de6ba
gh-96290: Support partial/invalid UNC drives in ntpath.normpath() and splitdrive() (GH-100351)
This brings the Python implementation of `ntpath.normpath()` in line with the C implementation added in 99fcf15

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Eryk Sun <eryksun@gmail.com>
2023-01-12 21:32:26 +00:00
Miss Islington (bot)
75717645bc
Fix typo in enum module documentation (GH-100992)
(cherry picked from commit 2161bbf243)

Co-authored-by: Noam Cohen <noam@noam.me>
2023-01-12 07:51:11 -08:00
Nikita Sobolev
cb6ff54b01
[3.11] gh-100931: Test all pickle protocols in test_slice (GH-100932). (GH-100979)
(cherry picked from commit 8795ad1bd0)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

Automerge-Triggered-By: GH:AlexWaygood
2023-01-12 03:24:09 -08:00
Nikita Sobolev
db2643737d
[3.11] gh-100871: Improve copy module tests (GH-100872) (#100976)
(cherry picked from commit 729ab9b622)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-01-12 11:15:00 +00:00
Miss Islington (bot)
e8097d49f6
GH-100894: Updated the doc for sys.winver to clarify its usual contents (GH-100913)
(cherry picked from commit d9dff4c8b5)

Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
2023-01-11 16:21:07 -08:00
Miss Islington (bot)
b594f25327
Skip py.exe launcher tests in full layout CI test (GH-100948)
These tests become flaky when py.exe exists on the test machine but isn't the one that was just built. They also don't provide any useful information for this scenario, so easiest to just skip them.
(cherry picked from commit 5ff029f7a3)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-01-11 09:52:10 -08:00
Kumar Aditya
e707671684
[3.11] GH-100892: Fix race in clearing threading.local (GH-100922). (#100937)
(cherry picked from commit 762745a124)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2023-01-11 21:01:48 +05:30
Serhiy Storchaka
1b2459dc64
[3.11] gh-100160: Remove any deprecation warnings in asyncio.get_event_loop() (#100412)
Some deprecation warnings will reappear (in a slightly different form) in 3.12.

Co-authored-by: Guido van Rossum <guido@python.org>
2023-01-10 12:20:09 -08:00
Miss Islington (bot)
a7f9afdd46
[3.11] gh-100916: Convert argument to appropriate type (GH-100917) (GH-100918)
Co-authored-by: Yao-Ching Huang <tom4996131207@gmail.com>
2023-01-10 10:38:57 +00:00
Hugo van Kemenade
1e74a12bde
[3.11] Fix typos in Doc folder (GH-100880). (#100914)
Co-authored-by: Semen Zhydenko <semen.zhydenko@gmail.com>
2023-01-10 11:42:03 +02:00
Miss Islington (bot)
ecb3be91b4
gh-100180: Update macOS installer to OpenSSL 1.1.1s (GH-100908)
(cherry picked from commit 57a5259a43)

Co-authored-by: Ned Deily <nad@python.org>
2023-01-09 21:39:38 -08:00
Miss Islington (bot)
03732b1bd9
gh-100893: update bpo reference in Mac README (GH-100905)
(cherry picked from commit be23a20242)

Co-authored-by: Ned Deily <nad@python.org>
2023-01-09 19:40:34 -08:00
Miss Islington (bot)
13453a205b
gh-100180: Update Windows installer to OpenSSL 1.1.1s (GH-100901)
(cherry picked from commit d7ab7149f8)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-01-09 16:51:49 -08:00
Miss Islington (bot)
4e096ec647
bpo-28356: Document os.rename() behavior on Windows for differing volumes (GH-27376)
(cherry picked from commit e098137cd3)

Co-authored-by: Ryan Ozawa <ryan.ozawa21@gmail.com>
2023-01-09 13:52:43 -08:00
Miss Islington (bot)
2d1128e9eb
GH-81061: Fix refcount issue when returning None from a ctypes.py_object callback (GH-13364)
(cherry picked from commit 837ba05267)

Co-authored-by: dgelessus <dgelessus@users.noreply.github.com>
2023-01-09 08:06:17 -08:00
Miss Islington (bot)
074b881e11
[3.11] Update copyright year in README (GH-100863) (GH-100864)
(cherry picked from commit e47b13934b)
Co-authored-by: Ned Deily <nad@python.org>
Co-authored-by: HARSHA VARDHAN <75431678+Thunder-007@users.noreply.github.com>
2023-01-08 21:55:52 -05:00
Miss Islington (bot)
07d1f99e8f
[3.11] Update copyright years to 2023. (gh-100848) (GH-100849)
(cherry picked from commit 11f99323c2)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2023-01-08 17:57:17 -08:00
Miss Islington (bot)
6184b800ee
GH-100805: Support numpy.array() in random.choice(). (GH-100830)
(cherry picked from commit 9a68ff12c3)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-01-08 12:04:49 -08:00
Miss Islington (bot)
6c7e32f6a8
gh-100689: Revert "bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061)" (GH-100745)
* gh-100689: Revert "bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061)"

This reverts commit 7c83eaa536.
(cherry picked from commit b034fd3e59)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-01-08 05:19:37 -08:00
Shantanu
be7c19723f
[3.11] gh-100776: Fix misleading default value in help(input) (GH-100788) (#100841)
(cherry picked from commit a2141882f2)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-01-08 01:23:12 -08:00
Miss Islington (bot)
87076d880c
gh-100783: fix os.path.join documentation (GH-100811)
- Use "drive", not "drive letter", because of UNC paths
- Previous components are not thrown away from relative drive letters
- Use "segment" instead of "component" for consistency with pathlib
- Other miscellaneous improvements
(cherry picked from commit 53455a319f)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-01-08 01:22:44 -08:00