Commit graph

24254 commits

Author SHA1 Message Date
Miss Islington (bot)
016af14d93
[3.10] bpo-44589: raise a SyntaxError when mapping patterns have duplicate literal keys (GH-27131) (GH-27157)
(cherry picked from commit 2693132292)


Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>

Automerge-Triggered-By: GH:brandtbucher
2021-07-14 18:00:35 -07:00
Miss Islington (bot)
ff7af2203c
bpo-34932: Add socket.TCP_KEEPALIVE for macOS (GH-25079)
(cherry picked from commit d59d7374a3)

Co-authored-by: Shane Harvey <shnhrv@gmail.com>
2021-07-14 16:15:31 -07:00
Miss Islington (bot)
3048b8bd2a
bpo-44639: fix typo in sqlite.rst (transation => transaction) (GH-27145) (GH-27148)
To my understanding, this is supposed to say "transaction".

See the relevant source:

a158b20019/Modules/_sqlite/connection.cGH-L1434-L1467
(cherry picked from commit 1ca27f2647)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
2021-07-14 23:22:50 +01:00
Pablo Galindo Salgado
03c85d49ed
[3.10] Add release highlights for the 3.10 what's new document (GH-27150) (GH-27152)
(cherry picked from commit 2b47af6398)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-07-14 23:22:12 +01:00
Miss Islington (bot)
9b369c952c
bpo-43126: Expand docs on io.IOBase.readlines() method (GH-27061) (GH-27113)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 3b5b99da4b)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-07-13 16:41:12 +02:00
Miss Islington (bot)
f514addfbc
bpo-44514: Add doctest testcleanup for configparser and bz2 (GH-26909) (GH-27112)
Add testcleanup section to configparser and bz2 documentation which
removes temporary files created in the filesystem when 'make doctest'
is run.
(cherry picked from commit 48a5aa7f12)

Co-authored-by: Kevin Follstad <kfollstad@gmail.com>
2021-07-13 16:34:10 +02:00
Miss Islington (bot)
7223ce3b3f
bpo-44613: Make importlib.metadata non-provisional (GH-27101) (#27106)
* importlib.metadata is no longer provisional as of 3.10
* Add NEWS entry
(cherry picked from commit f6954cdfc5)

Co-authored-by: Barry Warsaw <barry@python.org>

Co-authored-by: Barry Warsaw <barry@python.org>
2021-07-12 17:40:51 -07:00
Miss Islington (bot)
721d4796be
bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026) (#27097)
(cherry picked from commit da2e673c53)

Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
2021-07-12 17:43:16 +02:00
Miss Islington (bot)
443db64f49
bpo-26329: update os.path.normpath documentation (GH-20138) (GH-27094)
(cherry picked from commit 66c5853406)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2021-07-12 17:07:46 +02:00
Miss Islington (bot)
662ace1093
Doc: Fix wrong exception used in example. (GH-26572)
(cherry picked from commit 15f0fc571c)

Co-authored-by: Julien Palard <julien@palard.fr>
2021-07-08 21:51:26 -07:00
Miss Islington (bot)
a219d6bc8f
docs: add the word 'official' (GH-26849)
(cherry picked from commit af4a2dcc40)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2021-07-08 10:27:57 -05:00
Miss Islington (bot)
846cc4d280
bpo-43453: Update and re-add example to typing runtime_checkable (GH-27013)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 17f94e2888)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-07-05 13:46:02 -07:00
Ethan Furman
9bf7c2d638
[3.10] bpo-44559: [Enum] revert enum module to 3.9 (GH-27010)
* [Enum] revert enum module to 3.9
2021-07-03 21:08:42 -07:00
Miss Islington (bot)
bea618d780
Fix a small typo in the docs (GH-26991) (GH-27003)
(cherry picked from commit a79e2b6497)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
2021-07-03 15:15:49 -03:00
Miss Islington (bot)
42c26282a1
bpo-34798: [doc] clearer presentation of pprint.PrettyPrinter constru… (GH-26967) (GH-26990)
(cherry picked from commit 943e77d42d)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-07-02 11:07:50 +01:00
Steve Dower
a5764d3d96
bpo-41180: Replace marshal code.__new__ audit event with marshal.load[s] and marshal.dumps (GH-26970) 2021-06-30 18:52:25 +01:00
Miss Islington (bot)
08aa26e435
bpo-38062: [doc] clarify that atexit uses equality comparisons internally. (GH-26935) (GH-26956)
(cherry picked from commit 12803c59d5)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
2021-06-29 18:52:27 +01:00
Miss Islington (bot)
d9fc4c3deb
bpo-42588: Update the docs for the TopologicalSorter.static_order() method (GH-26834)
(cherry picked from commit 0d7f7975d5)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-06-29 04:14:52 -07:00
Miss Islington (bot)
a6acd1ab08
[doc] Fix typo in what's new in 3.10 (GH-26911) (GH-26940)
The `try` statement was missing a colon and therefore was not exemplifying the correct `SyntaxError`.
(cherry picked from commit dcb1caef5b)

Co-authored-by: Rodrigo Girão Serrão <rodrigogiraoserrao@gmail.com>
2021-06-29 12:12:23 +01:00
Miss Islington (bot)
dc10264eb8
bpo-40939: Remove documentation for PyParser_* & add porting notes (GH-26855) (GH-26898)
I tried to be relatively thorough and give lots of links.
One reason is that this wasn't deprecated very long; also it seems people running into this tend to not be familiar with similar APIs.

(cherry picked from commit 29987f7265)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2021-06-28 11:35:52 +02:00
Miss Islington (bot)
f4b31cdbc0
bpo-44464: Remove special exclusion for flake8 in the deprecation warnings. (GH-26807) (GH-26929)
Sync with importlib_metadata 4.6.
(cherry picked from commit efe7d08d17)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-06-27 18:19:24 -04:00
Miss Islington (bot)
aeb63392e7
bpo-40620: Clarify tutorial controlflow.rst `range` examples (GH-26919) (GH-26927)
(cherry picked from commit 2f49c9debc)

Co-authored-by: jdevries3133 <58614260+jdevries3133@users.noreply.github.com>
2021-06-27 20:51:16 +01:00
Miss Islington (bot)
88970125e7
bpo-43977: Properly update the tp_flags of existing subclasses when their parents are registered (GH-26864)
(cherry picked from commit ca2009d72a)

Co-authored-by: Brandt Bucher <brandt@python.org>
2021-06-25 08:46:23 -07:00
Miss Islington (bot)
a80a38ee9a
[3.10] bpo-44498: Issue a deprecation warning on asynchat, asyncore and smtpd import (GH-26882) (GH-26904)
* Issue a deprecation warning on smtpd import

* Also issue DeprecationWarnings for asynchat and asyncore

* Fix some tests

* test___all__ requires the word 'module' or 'package' in the deprecation
  warning text, so add those to smtpd, asynchat, and asyncore.
* In test_support, use pprint now instead of asyncore as the landmark.

* Add What's New

* Use ..deprecated::

* Use ..deprecated::

* Update Lib/smtpd.py

Co-authored-by: Miro Hrončok <miro@hroncok.cz>

* Update Doc/library/smtpd.rst

Co-authored-by: Miro Hrončok <miro@hroncok.cz>

* Import async{hat,ore} after the DeprecationWarning for this module

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
(cherry picked from commit 8488b85c63)


Co-authored-by: Barry Warsaw <barry@python.org>

Automerge-Triggered-By: GH:warsaw
2021-06-24 12:57:55 -07:00
Erlend Egeberg Aasland
0a3452e7cf
[3.10] bpo-43988: Add test.support.check_disallow_instantiation() (GH-25757) (GH-26885)
(cherry picked from commit 4f725261c6, fbff5387c3, and 8cec740820)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

Automerge-Triggered-By: GH:vstinner
2021-06-23 16:46:25 -07:00
Victor Stinner
ece3841d3d
bpo-44441: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26877)
Py_RunMain() now resets PyImport_Inittab to its initial value at
exit. It must be possible to call PyImport_AppendInittab() or
PyImport_ExtendInittab() at each Python initialization.

(cherry picked from commit 489699ca05)
2021-06-23 17:47:38 +02:00
Miss Islington (bot)
88a3342314
bpo-41621: Document defaultdict's default_factory parameter (GH-21945)
It defaults to None and is positional only.
(cherry picked from commit d1ae57027f)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2021-06-23 10:58:20 -04:00
Miss Islington (bot)
e6ea428b83
[doc] Improve punctuation atexit doc (GH-25629) (GH-26856)
(cherry picked from commit a6b47de07a)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2021-06-22 18:10:22 +01:00
Miss Islington (bot)
1e16217204
bpo-13814: Explain why generators are not context managers (GH-26835)
Put entry in Design FAQ after a question about a context manager for assignment.
Original patch by Aidan Lowe.
(cherry picked from commit 51f45d085d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-21 18:02:43 -04:00
Victor Stinner
9b0bbb9143
bpo-44466: Faulthandler now detects the GC (GH-26823) (GH-26826)
The faulthandler module now detects if a fatal error occurs during a
garbage collector collection (only if all_threads is true).

(cherry picked from commit d19163912b)
2021-06-21 14:23:13 +02:00
Miss Islington (bot)
28fe0159f5
bpo-44077: Expose IP_RECVTOS in the socket module (GH-25992)
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit a317778fd5)

Co-authored-by: Georg Sauthoff <mail@georg.so>
2021-06-20 13:36:21 -07:00
Miss Islington (bot)
26c89e7c7a
Fix typos and grammatical changes in the 3.10 what's new document (GH-26319) (GH-26814) 2021-06-20 20:53:14 +01:00
Miss Islington (bot)
344487b956
Add a note about NameError/AttributeError suggestions with custom error functions (GH-26794) (GH-26796)
(cherry picked from commit 83c9dad8da)

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

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-20 20:22:40 +01:00
Miss Islington (bot)
139c5778c2
bpo-44426: Fix use of the C keyword 'default' as a variable name (GH-26798) (GH-26804)
(cherry picked from commit 291848195f)
2021-06-19 16:16:13 +01:00
Miss Islington (bot)
3cb70ab2fb
Remove dubious suggestion (GH-26789) (#26797) 2021-06-18 23:27:47 -05:00
Ethan Furman
1b4addf3cb
[3.10] bpo-43945: [Enum] reduce scope of new format() behavior (GH-26752)
* [Enum] reduce scope of new format behavior

Instead of treating all Enums the same for format(), only user mixed-in
enums will be affected.  In other words, IntEnum and IntFlag will not be
changing the format() behavior, due to the requirement that they be
drop-in replacements of existing integer constants.

If a user creates their own integer-based enum, then the new behavior
will apply:

    class Grades(int, Enum):
        A = 5
        B = 4
        C = 3
        D = 2
        F = 0

Now:  format(Grades.B)  -> DeprecationWarning and '4'
3.12:                   -> no warning, and 'B'.

(cherry picked from commit f60b07ab6c)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2021-06-18 14:25:42 -07:00
Miss Islington (bot)
77eaf14d27
bpo-44310: Add a FAQ entry for caching method calls (GH-26731) (GH-26777) 2021-06-17 16:14:36 -05:00
Miss Islington (bot)
c689e0a7e2
bpo-44426: Use of 'complex' as a C variable name confuses Sphinx; change it to 'num'. (GH-26744) (GH-26760)
(cherry picked from commit 7247f6f433)
2021-06-16 20:13:37 +01:00
Miss Islington (bot)
84ce737f73
bpo-44392: Add Py_GenericAlias to C API docs (GH-26724)
Also fix stable ABI type definitions
(cherry picked from commit 6773c3eaa7)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-06-16 07:34:45 -07:00
Miss Islington (bot)
7fd40101b7
bpo-43795: Don't list private names in the limited API (GH-26740)
* Remove struct _node from the stable ABI list

This struct was removed along with the old parser in Python 3.9 (PEP 617)

* Stable ABI list: Use the public name "PyFrameObject" rather than "_frame"

* Ensure limited API doesn't contain private names

Names prefixed by an underscore are private by definition.

* Add a blurb
(cherry picked from commit 7cad9cb51b)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2021-06-16 02:53:12 -07:00
Ethan Furman
41c2a4a727
[3.10] bpo-44342: [Enum] improve test, add andrei kulakov to ACKS (GH-26726)
* [3.10] [Enum] improve test, add andrei kulakov to ACKS (GH-26726).
(cherry picked from commit cb2014f207)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2021-06-15 18:50:59 -07:00
Mark Dickinson
8d0b2ca493
[3.10] bpo-43475: Add what's new entry for NaN hash changes (GH-26725) (GH-26743)
(cherry picked from commit 1d10bf0bb9)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2021-06-15 20:13:10 +01:00
Miss Islington (bot)
fc310cb862
bpo-38291: Remove mention of typing.io and typing.re again (GH-26113)
They were originally removed in GH-10173 per bpo-35089, but then
readded in GH-21574. Cf. bpo-38291 for decision to remove.
(cherry picked from commit 8a76683cfb)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-06-14 08:06:33 -07:00
Miss Islington (bot)
809c3faa03
bpo-44310: Note that lru_cache keep references to both arguments and results (GH-26715) (GH-26716) 2021-06-14 08:43:48 -05:00
Miss Islington (bot)
128899d8b8
bpo-43475: Fix the Python implementation of hash of Decimal NaN (GH-26679)
(cherry picked from commit 9f1c5f6e8a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-06-13 07:05:28 -07:00
Miss Islington (bot)
d7930fb720
bpo-44362: ssl: improve deprecation warnings and docs (GH-26646)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit e26014f1c4)

Co-authored-by: Christian Heimes <christian@python.org>
2021-06-11 00:36:17 -07:00
Ethan Furman
749648609d
[3.10] bpo-44242: [Enum] remove missing bits test from Flag creation (GH-26586) (GH-26635)
Move the check for missing named flags in flag aliases from Flag creation
to a new *verify* decorator..

(cherry picked from commit eea8148b7d)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2021-06-10 07:24:20 -07:00
Miss Islington (bot)
eeefa7f6c0
bpo-43833: Emit warnings for numeric literals followed by keyword (GH-25466)
Emit a deprecation warning if the numeric literal is immediately followed by
one of keywords: and, else, for, if, in, is, or. Raise a syntax error with
more informative message if it is immediately followed by other keyword or
identifier.

Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 2ea6d89028)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-06-08 16:52:23 -07:00
Miss Islington (bot)
75185561a9
bpo-43795: Note Stable ABI PEP in What's New (GH-26479) (GH-26603)
(cherry picked from commit 257e400a19)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-06-08 18:00:10 +02:00
Miss Islington (bot)
2af690fdb2
bpo-44322: Document more SyntaxError details. (GH-26562)
1. SyntaxError args have a tuple of other attributes.
2. Attributes are adjusted for errors in f-string field expressions.
3. Compile() can raise SyntaxErrors.
(cherry picked from commit 67dfa6f2a5)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-06 22:09:34 -04:00