Commit graph

114617 commits

Author SHA1 Message Date
Miss Islington (bot)
0dfbb769df
[3.11] gh-99277: remove older version of get_write_buffer_limits (GH-99280) (#99338)
(cherry picked from commit f1680c3fbf)

Co-authored-by: Carlo <34414634+csuriano23@users.noreply.github.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-11-10 09:01:14 -08:00
Miss Islington (bot)
c9f2177d13
gh-99204: Calculate base_executable by alternate names in POSIX venvs (GH-99206)
Check to see if `base_executable` exists. If it does not, attempt
to use known alternative names of the python binary to find an
executable in the path specified by `home`.

If no alternative is found, previous behavior is preserved.

Signed-off-by: Vincent Fazio <vfazio@gmail.com>

(cherry picked from commit c41b13d39c)

Co-authored-by: Vincent Fazio <vfazio@gmail.com>
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
2022-11-10 08:53:51 -08:00
Miss Islington (bot)
f9a68be673
[3.11] GH-99257: Check the owner's type when specializing slots (GH-99324)
(cherry picked from commit 9d69284169)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2022-11-10 08:44:49 -08:00
Miss Islington (bot)
1de088ca95
gh-74044: inspect.signature for wrappers around decorated bound methods (GH-736)
(cherry picked from commit dbf2faf579)

Co-authored-by: Anton Ryzhov <anton@ryzhov.me>
2022-11-10 04:58:06 -08:00
Miss Islington (bot)
921f235367
gh-99320: remove tests for old-style class from test_complex (GH-99321)
(cherry picked from commit 26726c7649)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-11-10 03:22:00 -08:00
Miss Islington (bot)
7c9c993945
GH-99205: Mark new interpreters and threads as non-static (GH-99268)
(cherry picked from commit 283ab0e1c0)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2022-11-09 14:19:15 -08:00
Miss Islington (bot)
014940ac70
Update reference to the size of PyPI (GH-99076)
Update reference to the size of PyPI

Last changed in 2008 (528576031d).
(cherry picked from commit 58ee5d8677)

Co-authored-by: jmcb <joelsgp@protonmail.com>
2022-11-09 11:36:10 -08:00
Victor Stinner
1082890857
gh-98724: Fix Py_CLEAR() macro side effects (#99100) (#99288)
The Py_CLEAR(), Py_SETREF() and Py_XSETREF() macros now only evaluate
their argument once. If an argument has side effects, these side
effects are no longer duplicated.

Add test_py_clear() and test_py_setref() unit tests to _testcapi.

(cherry picked from commit c03e05c2e7)
2022-11-09 16:29:23 +01:00
Miss Islington (bot)
cf5dbb47a2
[Enum] Typo: fix DuplicateFreeEnum example docs (GH-99265)
(cherry picked from commit b3bd69c1bf)

Co-authored-by: Bruno Neyra <112962296+blv-brunoneyra@users.noreply.github.com>
2022-11-08 16:51:04 -08:00
Miss Islington (bot)
1565db7020
gh-94445: add compiler test for another case of excessive stack use (GH-99237)
(cherry picked from commit 027bc7e6bb)

Co-authored-by: Carl Meyer <carl@oddbird.net>
2022-11-08 13:16:28 -08:00
Miss Islington (bot)
00147a84fc
gh-99238: clarify the type of the env dict. (GH-99253)
(cherry picked from commit 2eee9d9cd7)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-11-08 13:09:04 -08:00
Miss Islington (bot)
4f31171e3f
gh-99248: [Enum] fix negative number infinite loop (GH-99256)
[Enum] fix negative number infinite loop

- _iter_bits_lsb() now raises a ValueError if a negative number
  is passed in

- verify() now skips checking negative numbers for named flags
(cherry picked from commit 0b4ffb08cc)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2022-11-08 12:33:21 -08:00
Miss Islington (bot)
ca944628ac
Fix broken link in asyncio-subprocesses doc (GH-99214)
GH- Fix broken link in Doc/library/asyncio-subprocess.rst

This is a trivial fix in documentation to fix a broken link.

There is a broken link in [Doc/library/asyncio-subprocess.rst](https://docs.python.org/3/library/asyncio-subprocess.htmlGH-asyncio.subprocess.Process) for the function ``wait_for``:

![image](https://user-images.githubusercontent.com/37690409/200388894-fb6b7c42-b2cc-49ec-a239-e3472890db1f.png)

I suppose this refers to the function ``asyncio.wait_for`` which is not clear in the docs.

This PR fixes the link and the result looks like the following:

![image](https://user-images.githubusercontent.com/37690409/200389483-b4a92105-7d2c-4285-b0fc-78a6dc0be39c.png)
(cherry picked from commit acf4d5d5bd)

Co-authored-by: Mikael Koli <koli.mikael@gmail.com>
Automerge-Triggered-By: GH:AlexWaygood
2022-11-08 08:33:51 -08:00
Miss Islington (bot)
47f4a18be0
gh-99181: fix except* on unhashable exceptions (GH-99192)
(cherry picked from commit c43714fbcd)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-11-08 01:58:45 -08:00
Miss Islington (bot)
2d00190591
gh-92119: ctypes: Print exception class name instead of its representation (GH-98302)
(cherry picked from commit b9dedfe61d)

Co-authored-by: Kamil Turek <kamil.turek@hotmail.com>
2022-11-07 21:20:06 -08:00
Miss Islington (bot)
a6f6c3a3d6
[3.11] gh-98433: Fix quadratic time idna decoding. (GH-99092) (#99222)
There was an unnecessary quadratic loop in idna decoding. This restores
the behavior to linear.

(cherry picked from commit d315722564)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-11-07 18:57:10 -08:00
Miss Islington (bot)
1add2393a8
[3.11] gh-98513: Test abstract methods of some collections types (GH-98516) (#99226)
(cherry picked from commit a309ad9f76)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-11-07 18:45:08 -08:00
Miss Islington (bot)
42fb233c52
gh-99124: use concrete exception types in test_builtin (GH-99125)
(cherry picked from commit c32bc1bffd)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-11-07 18:12:48 -08:00
Miss Islington (bot)
1e5e38b0ee
gh-94280: Require Python 3.9 or higher to compile CPython on Windows (GH-94281)
(cherry picked from commit acc6468f7e)

Co-authored-by: Shixian Li <34830785+znsoooo@users.noreply.github.com>
2022-11-07 13:12:56 -08:00
Miss Islington (bot)
857f6a44a5
[3.11] gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance (GH-99002) (GH-99212)
gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance (GH-99002)

The flag is not inherited, but its effect -- a NULL tp_new -- is.

Drop hints for people who come here wanting to “disallow instantiation”.
(cherry picked from commit 1438b77997)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2022-11-07 19:55:58 +01:00
Miss Islington (bot)
3dbf2708f5
doc: Formatting and typo fixes (GH-98974)
(cherry picked from commit 728e42fcf5)

Co-authored-by: jmcb <joelsgp@protonmail.com>
2022-11-07 09:14:52 -08:00
Miss Islington (bot)
5f83209d89
bpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)
(cherry picked from commit 5ff81da6d3)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2022-11-07 04:11:11 -08:00
Irit Katriel
d8a42bcaf0
[3.11] gh-99153: set location on SyntaxError for try with both except and except* (GH-99160) (#99168) 2022-11-07 09:41:20 +00:00
Nikita Sobolev
263e9830aa
[3.11] GH-99155: Fix NormalDist pickle with 0 and 1 protocols (GH-99156). (GH-99188)
(cherry picked from commit d7a00f1e8e)

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

Automerge-Triggered-By: GH:rhettinger
2022-11-07 01:41:08 -08:00
Miss Islington (bot)
58c8c1dee7
gh-96055: Update faulthandler to emit proper unexpect signal number (gh-99162)
(cherry picked from commit f626b7b504)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-11-06 18:45:54 -08:00
Miss Islington (bot)
c4408d35f6
gh-94286 Fix documentation of print default param (GH-94297)
(cherry picked from commit 2db55e0c00)

Co-authored-by: Nouran Ali <nouranalimohammed@gmail.com>
2022-11-06 12:24:02 -08:00
Miss Islington (bot)
6fadca308c
gh-99051: remove duplicated test from test_weakref (GH-99052)
(cherry picked from commit 8463cb55da)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-11-06 12:03:15 -08:00
Miss Islington (bot)
57077928ec
gh-83004: Clean up refleak in _pickle initialisation (GH-98841)
(cherry picked from commit d3b82b4463)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-11-06 06:41:24 -08:00
Miss Islington (bot)
4b1e45e78b
gh-83004: Clean up refleak in _zoneinfo initialisation (GH-98842)
(cherry picked from commit 31f2f6568d)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-11-06 06:30:41 -08:00
Miss Islington (bot)
be4bab8c2b
gh-93464: [Enum] fix auto() failure during multiple assignment (GH-99148)
* fix auto() failure during multiple assignment

i.e. `ONE = auto(), 'text'` will now have `ONE' with the value of `(1,
'text')`.  Before it would have been `(<an auto instance>, 'text')`
(cherry picked from commit 8feb7ab77c)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2022-11-06 06:30:32 -08:00
Miss Islington (bot)
29c3dc050a
gh-83004: Clean up refleak in _io initialisation (GH-98840)
(cherry picked from commit 1208037246)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-11-06 06:03:52 -08:00
Miss Islington (bot)
d025046ef5
test_typing: use all pickle protocols (GH-99154)
(cherry picked from commit a0bc75e2fd)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-11-06 04:15:45 -08:00
Miss Islington (bot)
e0fc2b3fd1
[doc] fix typo (GH-99143)
(cherry picked from commit 586b07e1f9)

Co-authored-by: Doj <34577424+visualdoj@users.noreply.github.com>
2022-11-05 14:12:22 -07:00
Miss Islington (bot)
0a99a79afe
gh-99134: Update bundled pip to 22.3.1 (gh-99135)
Update bundled pip to 22.3.1
(cherry picked from commit 47ab8480e7)

Co-authored-by: Paul Moore <p.f.moore@gmail.com>
2022-11-05 12:27:23 -07:00
Miss Islington (bot)
d8c11b75e2
gh-94808: add tests covering PySequence_{Set,Del}Slice (GH-99123)
(cherry picked from commit c5c40773cb)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-11-05 10:32:46 -07:00
Jason R. Coombs
07734a42db
[3.11] gh-98706: Sync with importlib_metadata 4.13.0. (GH-98875)
These changes are already applied to main but have been selected from importlib_metadata 4.x for their bug fixes.
2022-11-05 06:55:04 -07:00
Miss Islington (bot)
46a493e2db
gh-94808: add tests covering PyEval_GetFuncDesc function (GH-98300)
(cherry picked from commit b5f711185b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-11-05 06:32:46 -07:00
Erlend E. Aasland
573b451886
[3.11] gh-99086: Fix implicit int compiler warning in configure check for PTHREAD_SCOPE_SYSTEM (GH-99085) (#99118)
(cherry picked from commit 12078e78f6)

Co-authored-by: Sam James <sam@cmpct.info>
2022-11-05 10:27:47 +01:00
Victor Stinner
a9a8c87126
[3.11] gh-90867: test.support.wait_process() uses LONG_TIMEOUT (#99071) (#99098)
The test.support.wait_process() function now uses a timeout of
LONG_TIMEOUT seconds by default, instead of SHORT_TIMEOUT.  It
doesn't matter if a Python buildbot is slower, it only matters that
the process completes. The timeout should just be shorter than
"forever".

(cherry picked from commit f09da28768)
2022-11-04 15:50:51 +01:00
Miss Islington (bot)
f7d2c948f5
minor edits to locale doc (GH-98537)
(cherry picked from commit c0bf7607a1)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
2022-11-04 06:12:01 -07:00
Miss Islington (bot)
2b79f4e469
[3.11] gh-94808: Cover LOAD_GLOBAL for custom dict subtypes (GH-96767) (GH-99091) 2022-11-04 11:12:42 +00:00
Miss Islington (bot)
2ef2eaac15
Docs: add named to the list of styles in the sqlite3.paramstyle attr docs (GH-99078)
(cherry picked from commit 016c7d37b6)

Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-11-03 16:27:53 -07:00
Miss Islington (bot)
41a9f49bc5
gh-98978: Fix Py_SetPythonHome(NULL) (GH-99066)
Fix use-after-free in Py_SetPythonHome(NULL), Py_SetProgramName(NULL)
and _Py_SetProgramFullPath(NULL) function calls.

Issue reported by Benedikt Reinartz.
(cherry picked from commit b07f546ea3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-11-03 11:09:15 -07:00
Miss Islington (bot)
eb023a84d9
gh-98740: Fix validation of conditional expressions in RE (GH-98764)
In very rare circumstances the JUMP opcode could be confused with the
argument of the opcode in the "then" part which doesn't end with the
JUMP opcode. This led to incorrect detection of the final JUMP opcode
and incorrect calculation of the size of the subexpression.

NOTE: Changed return value of functions _validate_inner() and
_validate_charset() in Modules/_sre/sre.c.  Now they return 0 on success,
-1 on failure, and 1 if the last op is JUMP (which usually is a failure).
Previously they returned 1 on success and 0 on failure.
(cherry picked from commit e9ac890c02)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-11-03 00:47:39 -07:00
Miss Islington (bot)
a02979fa48
gh-98512: Add more tests for ValuesView (GH-98515)
(cherry picked from commit 29e027c3e6)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-11-02 19:35:39 -07:00
Miss Islington (bot)
2199a7dace
gh-65002: Make note that null bytes are used to pad bytes (GH-98635)
(cherry picked from commit 8cd21c2c5d)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-11-02 19:24:24 -07:00
Miss Islington (bot)
e0df94dc7c
Docs: Add 'as, match statement' to the index (GH-99001)
(cherry picked from commit 26720fffd0)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-11-02 19:22:41 -07:00
Miss Islington (bot)
8b4d5b1047
argparse howto: Use f-string in preference to "...".format() (GH-98883)
(cherry picked from commit 1fd20d0b57)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
2022-11-02 19:17:33 -07:00
Miss Islington (bot)
88736db5d6
gh-96997: Clarify the contract of PyMem_SetAllocator() (GH-98977)
(cherry picked from commit c053284e39)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-11-02 14:57:26 -07:00
Steve Dower
3ff659aea2
gh-98790: When DLLs directory is missing on Windows, assume executable_dir contains PYD files instead (GH-98936) 2022-11-02 20:04:06 +00:00