Commit graph

113798 commits

Author SHA1 Message Date
Miss Islington (bot)
c473627c73
gh-90359: Update documentation to follow PEP 495. (gh-94800)
(cherry picked from commit 07374cce52)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-07-13 17:16:09 -07:00
Miss Islington (bot)
11cdde85c3
gh-90815: Fix test_embed for Windows PGO build with mimalloc (GH-94790)
Fixes the failure of PGO building with `mimalloc` on Windows, ensuring that `test_bpo20891` does not break profiling data (`python31*.pgc`).
(cherry picked from commit 4a6bb30eb6)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
2022-07-13 09:40:46 -07:00
Miss Islington (bot)
f44a9dc430
gh-94759: Create LCOV report with branch coverage (GH-94793)
(cherry picked from commit f5c02afaff)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-13 08:01:15 -07:00
Miss Islington (bot)
ffbd6ae37c
gh-94751: Install, import and run the test C++ extension (MVP) (GH-94754) (#94780)
This is a quick-and-dirty way to run the C++ tests.
It can definitely be improved in the future, but it should fail when things go wrong.

- Run test functions on import (yes, this can definitely be improved)
- Fudge setuptools metadata (name & version) to make the extension installable
- Install and import the extension in test_cppext
(cherry picked from commit ec5db539b9)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2022-07-13 11:09:06 +02:00
Miss Islington (bot)
3c91f42918
Fix typo in _exact_ratio comment. (GH-94789)
(cherry picked from commit e39ce7d487)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2022-07-12 14:57:39 -07:00
Miss Islington (bot)
7c185017a9
docs: typing.Self, fix typo (GH-94771)
* fix typo - double spelled word 'use'

* change methods names to the infinitive form
(cherry picked from commit 90a6e56e56)

Co-authored-by: Max Zhenzhera <59729293+maxzhenzhera@users.noreply.github.com>
2022-07-12 11:17:06 -07:00
Miss Islington (bot)
cdd0cabf92
gh-94773: deepfreeze: support frozensets with unsortable types (GH-94775)
(cherry picked from commit 0c66074e9f)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-12 09:35:43 -07:00
Pablo Galindo
a4b98a792f
Post 3.11.0b4 2022-07-11 18:31:05 +01:00
Pablo Galindo
5a7e1e0a92
Python 3.11.0b4 2022-07-11 16:25:22 +01:00
Miss Islington (bot)
a276833a7d
[3.11] GH-94736: mark SemLock test as linux only (GH-94750) (#94752)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-07-11 16:24:12 +01:00
Miss Islington (bot)
91176d3883
[3.11] bpo-45924: Fix asyncio incorrect traceback when future's exception is raised multiple times (GH-30274) (#94747)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-07-11 14:17:32 +01:00
Miss Islington (bot)
8464e4ae83
GH-94736: Fix _multiprocessing.SemLock subclassing (GH-94738)
* fix allocator and deallocator

* 📜🤖 Added by blurb_it.

* code review

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit f5b76330cf)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-07-11 05:40:02 -07:00
John Belmonte
45896f2a02
[3.11] gh-93883: elide traceback indicators when possible (GH-93994) (GH-94740)
Elide traceback column indicators when the entire line of the
frame is implicated.  This reduces traceback length and draws
more attention to the remaining (very relevant) indicators.

Example:
```
Traceback (most recent call last):
  File "query.py", line 99, in <module>
    bar()
  File "query.py", line 66, in bar
    foo()
  File "query.py", line 37, in foo
    magic_arithmetic('foo')
  File "query.py", line 18, in magic_arithmetic
    return add_counts(x) / 25
           ^^^^^^^^^^^^^
  File "query.py", line 24, in add_counts
    return 25 + query_user(user1) + query_user(user2)
                ^^^^^^^^^^^^^^^^^
  File "query.py", line 32, in query_user
    return 1 + query_count(db, response['a']['b']['c']['user'], retry=True)
                               ~~~~~~~~~~~~~~~~~~^^^^^
TypeError: 'NoneType' object is not subscriptable
```

Automerge-Triggered-By: GH:pablogsal
2022-07-11 04:27:29 -07:00
Miss Islington (bot)
f3212b1ec7
GH-77265: Document NaN handling in statistics functions that sort or count (GH-94676) (#94726) 2022-07-10 12:35:33 -05:00
Brandt Bucher
e5c8ad3e15
[3.11] GH-94694: Fix column offsets for multi-line method lookups (GH-94721)
(cherry picked from commit 264b3ddfd5)
2022-07-09 22:12:45 -07:00
Miss Islington (bot)
7b5737a51a
Improve dataclass docstring (gh-94686)
(cherry picked from commit a10cf2f6b3)

Co-authored-by: Tom Fryers <61272761+TomFryers@users.noreply.github.com>
2022-07-09 11:51:35 -07:00
Miss Islington (bot)
a61870e196
gh-94637: Release GIL in SSLContext.set_default_verify_paths (GH-94658)
(cherry picked from commit 78307c7dc2)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-09 09:33:15 -07:00
Kumar Aditya
7a341724e4
[3.11] GH-93252: Fix error handling for failed Python calls (GH-94693) (GH-94708)
Automerge-Triggered-By: GH:tiran
2022-07-09 05:09:15 -07:00
Miss Islington (bot)
b4e232c4b5
gh-94607: Fix subclassing generics (GH-94610)
Co-authored-by: Serhiy Storchaka <3659035+serhiy-storchaka@users.noreply.github.com>
(cherry picked from commit 6442a9dd21)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2022-07-08 22:20:43 -07:00
Miss Islington (bot)
cb4359ccfc
Use mdash-es consistently in the library docs index (GH-92762)
(cherry picked from commit efb20a97c4)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2022-07-08 07:52:02 -07:00
Christian Heimes
36a3372d51
[3.11] gh-94215: Fix error handling for line-tracing events (GH-94681) (GH-94688)
* Re-enable crasher
* Fix error handling for line-tracing events
* blurb add
(cherry picked from commit 23ee4a8067)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2022-07-08 15:25:53 +02:00
Erlend Egeberg Aasland
73a1800b55
[3.11] gh-94622: Add more references to the sqlite3 types anchor (GH-94623) (#94678)
(cherry picked from commit e5b841a403)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-08 02:50:01 +02:00
Miss Islington (bot)
c72001e5bd
gh-94321: Document sqlite3.PrepareProtocol (GH-94620)
(cherry picked from commit fb6dccae34)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-07 16:09:05 -07:00
Miss Islington (bot)
77a015387b
GH-94644: fix test_curses ref leak (GH-94647)
(cherry picked from commit 277f55cb04)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-07-07 05:03:00 -07:00
Miss Islington (bot)
65c431685b
gh-93910: Fix enum performance regression (GH-94614)
This removes the performance regression in 3.11, **at the expense of not fixing
the "bug" that allows accessing values from values** (e.g. `Color.RED.BLUE`).

Using the benchmark @markshannon [presented](https://github.com/python/cpython/issues/93910GH-issuecomment-1165503032), the results are:

| Version | Enum | Fast enum | Normal class |
| --- | --- | --- | --- |
| 3.10 | 2.04 | 0.59 | 0.56 |
| 3.11 | 2.78 | 0.31 | 0.15 |
| This PR | 1.30 | 0.32 | 0.16 |

I share this mostly as information about the source of the regression, as this may be useful. It may be that the lower-risk approach for the beta is just to revert to a previously-known working state.
(cherry picked from commit ed136b9673)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
2022-07-07 05:01:09 -07:00
Miss Islington (bot)
421c4b0255
gh-94215: Add reproducer for segfault in frame_setlineno() (GH-94563)
(cherry picked from commit de5884295e)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-07 04:17:47 -07:00
Erlend Egeberg Aasland
c0b7868db2
[3.11] gh-94430: Allow params named module or self with custom C names in AC (GH-94431) (#94649)
(cherry picked from commit 8bbd70b4d1)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-07 12:12:47 +02:00
Christian Heimes
74c953d396
[3.11] gh-92228: disable the compiler's 'small exit block inlining' optimization for blocks that have a line number (GH-94592) (GH-94643)
Inlining of code that corresponds to source code lines, can make it hard to distinguish later between code which is only reachable from except handlers, and that which is reachable in normal control flow. This caused problems with the debugger's jump feature.

This PR turns off the inlining optimisation for code which has line numbers. We still inline things like the implicit "return None"..
(cherry picked from commit bde06e1b83)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-07-07 03:10:32 -07:00
Erlend Egeberg Aasland
3517c138a8
[3.11] gh-94628: Add explicit parameter list to sqlite3.connect docs (GH-94629) (#94645)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 3eb2b9634f)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-07 10:46:14 +02:00
Miss Islington (bot)
fa44a760d5
gh-94630: Update sqlite3 docs with positional-only and keyword-only symbols (GH-94631)
(cherry picked from commit 94988603f3)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-06 16:22:10 -07:00
Miss Islington (bot)
37a47b139c
gh-94017: Improve clarity of sqlite3 transaction handling docs (GH-94320)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 760b8cf0c8)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-07-06 14:08:13 -07:00
Miss Islington (bot)
0187b60106
GH-93896: AAlways set event loop in asyncio.run and IsolatedAsyncioTestCase (GH-94593)
(cherry picked from commit 14fea6b4d2)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-07-06 08:48:37 -07:00
Irit Katriel
b22f9d6e8c
[3.11] gh-94438: in frameobject's mark_stacks switch, the PUSH_EXC_INFO and POP_EXCEPT cases are no longer reachable (GH-94582) (GH-94595)
(cherry picked from commit 50b9a7762f)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-07-06 08:21:59 +01:00
Łukasz Langa
5f4a16b291
[3.11] gh-94510: Raise on re-entrant calls to sys.setprofile and sys.settrace (GH-94511) (GH-94578)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 40d81fd63b)
2022-07-05 21:02:43 +02:00
Miss Islington (bot)
552fc9a9ac
gh-91330: Tests and docs for dataclass descriptor-typed fields (GH-94424) (GH-94576)
Co-authored-by: Erik De Bonte <erikd@microsoft.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 5f319308a8)
2022-07-05 20:44:31 +02:00
Miss Islington (bot)
d49c99f10d
gh-94360: Fix a tokenizer crash when reading encoded files with syntax errors from stdin (GH-94386)
* gh-94360: Fix a tokenizer crash when reading encoded files with syntax errors from stdin

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>

* nitty nit

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

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-07-05 10:09:51 -07:00
Miss Islington (bot)
9bd97a2a7e
gh-90355: Add isolated flag if currently isolated (GH-92857) (GH-94568)
Co-authored-by: Carter Dodd <carter.dodd@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit c8556bcf6c)
2022-07-05 17:54:03 +02:00
Vinay Sajip
49aeda989d
[3.11] gh-92897: Ensure venv --copies respects source build property of the creating interpreter (GH-92899) (GH-94567)
(cherry picked from commit 067597522a)

Co-authored-by: Jeremy Kloth <jeremy.kloth@gmail.com>
2022-07-05 16:40:17 +01:00
Miss Islington (bot)
7a3dae06eb
Docs: Convert PEP 630 (Isolating Extension Modules) to a HOWTO (GH-94489) (GH-94566)
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>

(cherry picked from commit e6ec6f5b50)
2022-07-05 17:20:03 +02:00
Miss Islington (bot)
d49159bd9f
[3.11] bpo-46755: Don't log stack info twice in QueueHandler (GH-31355) (GH-94564)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-07-05 15:49:05 +01:00
Łukasz Langa
1bfe83a114
[3.11] gh-94485: Set line number of module's RESUME instruction to 0 as specified by PEP 626 (GH-94552) (GH-94562)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Mark Shannon <mark@hotpy.org>

(cherry picked from commit 324d01944d)
2022-07-05 16:01:24 +02:00
Miss Islington (bot)
0615e7f9bb
gh-84753: Clarify change made to inspect functions (GH-94554) (GH-94560)
(cherry picked from commit a2a3f2c541)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-07-05 14:35:09 +02:00
Miss Islington (bot)
e28446858f
gh-94538: Fix Argument Clinic output to custom file (GH-94539) (GH-94555)
(cherry picked from commit 2b8ed4d3d4)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-05 14:33:59 +02:00
Miss Islington (bot)
77bf973930
Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551) (GH-94557)
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
(cherry picked from commit 3440d197a5)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2022-07-05 14:30:19 +02:00
Miss Islington (bot)
99a06685d4
gh-93626: Set the release for __future__.annotations to None (GH-93628) (GH-94553)
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
(cherry picked from commit 4791a8a835)

Co-authored-by: KotlinIsland <65446343+KotlinIsland@users.noreply.github.com>
2022-07-05 11:16:32 +02:00
Miss Islington (bot)
68f5fa6683
[3.11] GH-94262: Don't create frame objects for frames that aren't yet complete. (GH-94371) (#94482)
Co-authored-by: Mark Shannon <mark@hotpy.org>
2022-07-04 19:43:12 +01:00
Vinay Sajip
8fe0b1d8fa
[3.11] Update logging documentation: change cross-reference and add webapp r… (GH-94541) 2022-07-04 09:09:40 +01:00
Miss Islington (bot)
1e7efbc449
IDLE doc: Tweek RESTART and Windows console start (GH-94530)
(cherry picked from commit 39c29f753e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-07-03 10:20:48 -07:00
Miss Islington (bot)
abf5f5c5d7
gh-81054: Document that SimpleHTTPRequestHandler follows symbolic links (GH-94416) (GH-94492)
(cherry picked from commit 80aaeabb8b)

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
2022-07-01 18:41:24 +02:00
Miss Islington (bot)
227e0d69ed
gh-75372: Specify major version in README for installation (GH-92759) (GH-94487)
(cherry picked from commit 3abda7a38a)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-07-01 18:22:02 +02:00