Commit Graph

113428 Commits

Author SHA1 Message Date
Miss Islington (bot) 0f1748d66e
gh-78630: Drop invalid HP aCC compiler switch -fPIC on HP-UX (GH-8847)
At compile time, '+z' is already properly used with HP aCC, and shared
libraries are correctly linked with '+b'. The '-fPIC' switch can safely be
dropped.
(cherry picked from commit 09be18a73d)

Co-authored-by: Michael Osipov <michael.osipov@siemens.com>
2022-05-19 09:51:08 -07:00
Miss Islington (bot) 37d60c0255
gh-92417: `importlib` docs: remove references to unsupported Python versions (GH-92424) (GH-92979)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 70aa1b9b91)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-05-19 18:11:25 +02:00
Miss Islington (bot) 27302ae2df
bpo-46879: Fix incorrect sphinx object names in doc (GH-31615) (GH-92974)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 2cdd57f119)

Co-authored-by: Martin Fischer <martin@push-f.com>
2022-05-19 17:56:59 +02:00
Miss Islington (bot) de97d8229c
gh-92417: `subprocess` docs: remove note on compatibility with Python <3.5 (GH-92538) (GH-92972)
(cherry picked from commit 84b86000e2)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-05-19 17:56:04 +02:00
Miss Islington (bot) 02fe22576e
gh-92417: `fractions`, `decimal`: Improve docs for alternative constructor methods (GH-92421) (GH-92970)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 090df844ea)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-05-19 17:45:12 +02:00
Miss Islington (bot) a2d6e6c206
gh-92417: `socket` docs: remove references to Python <3.3 (GH-92544) (GH-92968)
(cherry picked from commit 639b62c9c4)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-05-19 17:42:07 +02:00
Miss Islington (bot) 4d1e243fca
bpo-45393: help() on operator precedence has misleading entries (GH-31246) (GH-92965)
(cherry picked from commit fb082c2fc5)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2022-05-19 17:40:49 +02:00
Miss Islington (bot) 54653b5005
gh-92417: Update docs and examples of doctest.IGNORE_EXCEPTION_DETAIL for Py>=3 (GH-92502) (GH-92962)
(cherry picked from commit 97b9c1096f)
2022-05-19 17:19:34 +02:00
Miss Islington (bot) 71cdf6a38a
gh-92675: venv: Fix ensure_directories() to again accept a Path for env_dir (GH-92676)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 30deeac649)

Co-authored-by: David Foster <david@dafoster.net>
2022-05-19 08:17:28 -07:00
Miss Islington (bot) 7afccd34a6
gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803)
(cherry picked from commit 137fd3d88a)

Co-authored-by: Christian Heimes <christian@python.org>
2022-05-19 08:05:52 -07:00
Miss Islington (bot) 611d43c2a4
gh-91491: Complete Whats New in 3.11 for typing (GH-92708)
Fixes GH-91491

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 6b51773afd)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-05-19 07:25:50 -07:00
Miss Islington (bot) ad2363d54c
gh-92670: Skip test_shutil.TestCopy.test_copyfile_nonexistent_dir on AIX (GH-92718)
(cherry picked from commit 654032ac5f)

Co-authored-by: Ayappan Perumal <ayappap2@in.ibm.com>
2022-05-19 02:50:39 -07:00
Miss Islington (bot) 17a62d1e59
Doc: amend ssl.PROTOCOL_SSLv2 and ssl.PROTOCOL_SSLv3 wording (GH-92634)
(cherry picked from commit 41638967a0)

Co-authored-by: Jan Brasna <1784648+janbrasna@users.noreply.github.com>
2022-05-19 02:37:57 -07:00
Miss Islington (bot) 482e334daf
Include ``asyncio.Barrier`` in 3.11 Whats New (GH-92927)
(cherry picked from commit 60ee61571a)

Co-authored-by: Duprat <yduprat@gmail.com>
2022-05-19 01:59:49 -07:00
Miss Islington (bot) aa55985aa8
gh-87901: Remove the encoding argument from os.popen (GH-92836)
(cherry picked from commit 96f65835f8)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2022-05-18 20:12:47 -07:00
Miss Islington (bot) 849963598f
gh-92812: Align ArgumentParser.add_subparsers() docs with argument spec (GH-92814)
(cherry picked from commit f2d994da10)

Co-authored-by: 180909 <734461790@qq.com>
2022-05-18 14:25:25 -07:00
Miss Islington (bot) 65ebd923b3
gh-92780: Improve sqlite3.Connection.create_collation docs (GH-92790)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 7ee19e2715)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-05-18 04:58:57 -07:00
Miss Islington (bot) fad72d0e36
gh-91755: Document Py_IncRef and Py_DecRef as C functions (GH-91805)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 58a3d28039)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
2022-05-18 02:00:22 -07:00
Miss Islington (bot) 9a61afec20
bpo-40838: document `getdoc`, `getmodule`, `getsourcefile` in `inspect` returns `None` (GH-30575)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit b86d783a4e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-05-17 18:41:55 -07:00
Miss Islington (bot) 36da1a77c6
gh-92841: Fix asyncio's RuntimeError: Event loop is closed (GH-92842)
(cherry picked from commit 33880b4b1c)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2022-05-17 15:59:29 -07:00
Miss Islington (bot) 58088a544c
gh-89898: Fix test_threading.test_args_argument() (GH-92885)
Join the thread to not leak threads running in the background to the
next test.

Fix the following warning on the "AMD64 FreeBSD Shared 3.11"
buildbot:

test_args_argument (test.test_threading.ThreadTests.test_args_argument) ...
Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2)
Warning -- Dangling thread: <_MainThread(MainThread, started 35026161664)>
Warning -- Dangling thread: <Thread(Thread-134 (<lambda>), started 35314998016)>
ok
(cherry picked from commit 970efae274)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-05-17 15:45:56 -07:00
Miss Islington (bot) 1df455042d
gh-89653: PEP 670: Fix PyUnicode_READ() cast (GH-92872)
_Py_CAST() cannot be used with a constant type: use _Py_STATIC_CAST()
instead.
(cherry picked from commit e6fd7992a9)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-05-17 10:45:55 -07:00
Miss Islington (bot) 38d95b5500
[3.11] gh-92530: Fix an issue that occurred after interrupting threading.Condition.notify (GH-92534) (GH-92829)
If Condition.notify() was interrupted just after it released the waiter lock,
but before removing it from the queue, the following calls of notify() failed
with RuntimeError: cannot release un-acquired lock.
(cherry picked from commit 70af994fee)


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

Automerge-Triggered-By: GH:serhiy-storchaka
2022-05-17 09:45:40 -07:00
Miss Islington (bot) 76b81be413
gh-81548: Clarify the deprecation of octal sequences affect byte strings (GH-92643)
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 0d8500c739)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-05-17 09:44:23 -07:00
Miss Islington (bot) 5c826ef0a5
Fix NULL check in test_type_from_ephemeral_spec in_testcapimodule.c (GH-92863)
(cherry picked from commit 524f03c08c)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2022-05-17 08:47:50 -07:00
Miss Islington (bot) 386583040d
Fix NULL test in _testinternalcapi (GH-92861)
(cherry picked from commit 702e0da000)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2022-05-16 18:57:42 -07:00
Miss Islington (bot) da2f0c755d
re docs: fix source code link (GH-92819)
(cherry picked from commit bd30461298)

Co-authored-by: 谭九鼎 <109224573@qq.com>
2022-05-16 17:21:50 -07:00
Christian Heimes 8f937976bc
[3.11] gh-90473: Skip tests that don't apply to Emscripten and WASI (GH-92846) (GH-92851)
Co-authored-by: Christian Heimes <christian@python.org>
2022-05-16 20:15:56 +02:00
Miss Islington (bot) 52e6596fb5
gh-92671: Don't omit parentheses when unparsing empty tuples (GH-92673)
(cherry picked from commit f6fd8aac13)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2022-05-16 06:01:34 -07:00
Miss Islington (bot) 2ef6a986ee
Speedup: build docs in parallel (GH-92733)
(cherry picked from commit a487623c6b)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-05-16 05:17:20 -07:00
Victor Stinner a3d2ce95d1
gh-92781: Avoid mixing declarations and code in C API (#92783) (#92813)
Avoid mixing declarations and code in the C API to fix the compiler
warning: "ISO C90 forbids mixed declarations and code"
[-Werror=declaration-after-statement].

(cherry picked from commit 90e7230073)
2022-05-16 13:19:52 +02:00
Miss Islington (bot) 5f24acdca0
gh-90473: WASI: Mark tests that require os.pipe() (GH-92837)
(cherry picked from commit 730902c0ad)

Co-authored-by: Christian Heimes <christian@python.org>
2022-05-16 01:04:01 -07:00
Miss Islington (bot) fdfc7eb410
gh-87670: Add web.archive redirects from effbot (GH-92816)
(cherry picked from commit 3ed1cae9ed)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-05-15 23:26:31 -07:00
Ezio Melotti 5b2c5ae756
[3.11] Restore default role check in `make check`. (GH-92290) (#92821)
* Restore default role check in `make check`.

* Options first, then files.

* Update `make.bat` too.

* Add a comment explaining the extra options.

* No reason to ignore the README.rst.

* Enable default-role check in sphinx-lint.

Co-authored-by: Julien Palard <julien@palard.fr>

* Update sphinx-lint default-role check.

* Fix use of the default role in the docs.

* Update make.bat to check for the default role too.

* Fix comment in make.bat.

Co-authored-by: Julien Palard <julien@palard.fr>
(cherry picked from commit 953ab07952)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2022-05-15 17:55:12 +02:00
Miss Islington (bot) 2bcae11302
gh-90473: Fail subprocess early on Emscripten/WASI (GH-92802)
(cherry picked from commit db0b455ff4)

Co-authored-by: Christian Heimes <christian@python.org>
2022-05-14 11:47:17 -07:00
Miss Islington (bot) dae3e2fea3
Check result of utc_to_seconds and skip fold probe in pure Python (GH-91582)
The `utc_to_seconds` call can fail, here's a minimal reproducer on
Linux:

TZ=UTC python -c "from datetime import *; datetime.fromtimestamp(253402300799 + 1)"

The old behavior still raised an error in a similar way, but only
because subsequent calculations happened to fail as well. Better to fail
fast.

This also refactors the tests to split out the `fromtimestamp` and
`utcfromtimestamp` tests, and to get us closer to the actual desired
limits of the functions. As part of this, we also changed the way we
detect platforms where the same limits don't necessarily apply (e.g.
Windows).

As part of refactoring the tests to hit this condition explicitly (even
though the user-facing behvior doesn't change in any way we plan to
guarantee), I noticed that there was a difference in the places that
`datetime.utcfromtimestamp` fails in the C and pure Python versions, which
was fixed by skipping the "probe for fold" logic for UTC specifically —
since UTC doesn't have any folds or gaps, we were never going to find a
fold value anyway. This should prevent some failures in the pure python
`utcfromtimestamp` method on timestamps close to 0001-01-01.

There are two separate news entries for this because one is a
potentially user-facing change, the other is an internal code
correctness change that, if anything, changes some error messages. The
two happen to be coupled because of the test refactoring, but they are
probably best thought of as independent changes.

Fixes GH-91581
(cherry picked from commit 83c0247d47)

Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
2022-05-14 07:59:52 -07:00
Miss Islington (bot) d9089c0e8b
GH-92804: Fix memory leak in memoryview iterator (gh-92805)
(cherry picked from commit d923fdf54b)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-05-14 07:55:03 -07:00
Miss Islington (bot) 9640676356
gh-92311: Add tests for frame_setlineno jumping over listcomps (GH-92741)
(cherry picked from commit 8cf2906828)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2022-05-13 23:19:00 -07:00
Miss Islington (bot) 9a97a89b3d
gh-92611: Link to PEP 594 sections & add key detail in doc deprecation notices (GH-92612)
(cherry picked from commit 9f68dab3d3)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-05-13 13:09:53 -07:00
Miss Islington (bot) 60c4bca013
Fix typo in argparse docs. (GH-92691) (#92709) 2022-05-13 09:03:03 -05:00
Miss Islington (bot) 0c1795bd33
Document Py_ssize_t. (GH-92512)
It fixes 252 errors from a Sphinx nitpicky run (sphinx-build -n). But
there's 8182 errors left.

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 664aa94b57)

Co-authored-by: Julien Palard <julien@palard.fr>
2022-05-13 06:32:05 -07:00
Miss Islington (bot) 2e8b2d0ee2
GH-92236: Remove spurious "line" event when starting coroutine or generator. (GH-92722) (GH-92772)
(cherry picked from commit 22a1db378c)
2022-05-13 11:52:54 +01:00
Miss Islington (bot) c41667e71b
gh-90473: Increase stack size, disable obmalloc on WASI (GH-92732)
(cherry picked from commit d81d57e959)

Co-authored-by: Christian Heimes <christian@python.org>
2022-05-13 00:00:33 -07:00
Miss Islington (bot) 715b070dcc
gh-92436: __future__ docs: add note on expectations for "from __future__ import annotations" (GH-92568)
(cherry picked from commit 6582c96454)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-05-12 07:37:59 -07:00
Miss Islington (bot) 3d1ad42591
Update outdated `LOAD_METHOD` comments in `Python/ceval.c` (GH-92641)
(cherry picked from commit bdf9969197)

Co-authored-by: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
2022-05-12 05:59:36 -07:00
Miss Islington (bot) 6e1a214426
gh-89653: PEP 670: unicodeobject.h uses _Py_CAST() (GH-92696) (GH-92703)
Use _Py_CAST() and _Py_STATIC_CAST() in macros wrapping static inline
functions of unicodeobject.h.

Change also the kind type from unsigned int to int: same parameter
type than PyUnicode_FromKindAndData().

The limited API version 3.11 no longer casts arguments to expected
types.
(cherry picked from commit d0c9353a79)

Co-authored-by: Victor Stinner <vstinner@python.org>

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-05-12 02:01:35 +02:00
Miss Islington (bot) a1bef8c2e3
gh-89653: PEP 670: Use PyObject* type for parameters (GH-92694)
Use the PyObject* type for parameters of static inline functions:

* Py_SIZE(): same parameter type than PyObject_Size()
* PyList_GET_SIZE(), PyList_SET_ITEM(): same parameter type than
  PyList_Size() and PyList_SetItem()
* PyTuple_GET_SIZE(), PyTuple_SET_ITEM(): same parameter type than
  PyTuple_Size() and PyTuple_SetItem().
(cherry picked from commit 6de78ef96a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-05-11 16:23:29 -07:00
Miss Islington (bot) c7b9da5204
gh-92031, test_embed: Improve test for unquickening static code (GH-92440)
(cherry picked from commit 27185f98ff)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2022-05-11 16:22:45 -07:00
Miss Islington (bot) bf86901dc1
Fix minor documentation error in bisect docs (GH-92697)
(cherry picked from commit b3f99b69d0)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-05-11 16:13:13 -07:00
Miss Islington (bot) 6f9287205f
gh-89653: PEP 670: Limited API doesn't cast arguments (GH-92654)
The limited API version 3.11 no longer casts arguments to expected
types of functions of functions:

* PyList_GET_SIZE(), PyList_SET_ITEM()
* PyTuple_GET_SIZE(), PyTuple_SET_ITEM()
* PyWeakref_GET_OBJECT()
(cherry picked from commit 7d3b469e47)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-05-11 15:32:04 -07:00