Commit Graph

10799 Commits

Author SHA1 Message Date
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
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
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) 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
Miss Islington (bot) 1065ba66b5
bpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492) (GH-26538)
(cherry picked from commit dda9ecbfec)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-06-04 23:10:07 +01:00
Irit Katriel 6563ea5c60
[3.10] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26480)
(cherry picked from commit 87272b70f1)

Co-authored-by: MapleCCC <littlelittlemaple@gmail.com>
2021-06-01 22:58:06 +01:00
Miss Islington (bot) 150a8e8a3e
[3.10] bpo-42392: [docs] Add deprecated-removed loop labels for asyncio (GH-26357) (GH-26390)
* Add deprecated-removed loop labels for all reelvant functions/classes in asyncio
(cherry picked from commit d8fd8c8568)


Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>

Automerge-Triggered-By: GH:gpshead
2021-05-26 15:19:42 -07:00
Miss Islington (bot) 1261941e02
bpo-41147: [doc] contextlib.redirect_stdout() provides the new stream as context var (GH-21199) (GH-26379)
(cherry picked from commit 46db39d7bd)

Co-authored-by: Peter Law <PeterJCLaw@gmail.com>
2021-05-26 15:34:22 +01:00
Miss Islington (bot) 05f8ad0c74
bpo-20408: Fix memoryview() signature in docs (GH-24431)
(cherry picked from commit d18e5dae91)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-05-25 17:30:00 +03:00
Miss Islington (bot) a6825197e9
bpo-44151: Various grammar, word order, and markup fixes (GH-26344) (GH-26345) 2021-05-24 23:23:10 -07:00
Miss Islington (bot) 86779878df
bpo-44151: linear_regression() minor API improvements (GH-26199) (GH-26338) 2021-05-24 18:11:12 -07:00
Miss Islington (bot) d309bcc9e3
bpo-44195: Use 'TraversableResources' in the docs to match the implementation. (GH-26317)
(cherry picked from commit 7148293d96)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-05-24 10:30:05 -07:00
Miss Islington (bot) 069bc4f5b4
bpo-43207: InspectLoader.is_package is not an abstract method (GH-24517)
Making the description of `InspectLoader.is_package` aligned with the current implementation.

Automerge-Triggered-By: GH:jaraco
(cherry picked from commit 8b9310d902)

Co-authored-by: Junnosuke Kuroda <Isa-rentacs@users.noreply.github.com>
2021-05-23 12:37:16 -07:00
Miss Islington (bot) 37da1f09a2
Remove duplicate words in docs. (GH-26167) (GH-26296)
(cherry picked from commit b06ed1d883)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-05-22 21:55:17 +01:00
Miss Islington (bot) 856958d0e7
Specify Python Cookbook edition for reference (GH-26301) (#26302)
(cherry picked from commit 604cd71e50)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-05-21 23:48:56 +01:00
Miss Islington (bot) 1886b8496b
[doc] Fix indentation in inspect documentation (GH-24846) (GH-26287)
(cherry picked from commit 642fdfdc04)

Co-authored-by: Numerlor <25886452+Numerlor@users.noreply.github.com>
2021-05-21 18:06:41 +01:00
Miss Islington (bot) 9d16b1ae58
[doc] Fix typo in asyncio-eventloop documentation (GH-22311) (GH-26256)
(cherry picked from commit b66a03a491)

Co-authored-by: Bruno <brunogeninatti@gmail.com>
2021-05-19 22:19:53 +01:00
Miss Islington (bot) 65dede60fa
bpo-40975: [doc] Identify AsyncExitStack.enter_async_context()/aclose() as coroutine methods (GH-20870) (GH-26254)
(cherry picked from commit c054e8f78f)

Co-authored-by: naglis <naglis@users.noreply.github.com>
2021-05-19 21:37:32 +01:00
Miss Islington (bot) 3357604db9
bpo-44010: IDLE: colorize pattern-matching soft keywords (GH-25851)
(cherry picked from commit 60d343a816)

Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
2021-05-19 02:44:14 -07:00
Miss Islington (bot) 1f483c0c1b
bpo-30593: Doc'ed that executescript() disregards isolation level (GH-26220)
(cherry picked from commit 9014437573)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-19 10:37:33 +03:00
Łukasz Langa 4d17c93dfe
[3.10] bpo-41963: document that ConfigParser strips off comments (GH-26197) (GH-26214)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Laura Gutierrez Funderburk <58710704+lgfunderburk@users.noreply.github.com>
Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>

(cherry picked from commit 02ee819126)
2021-05-18 19:03:09 +02:00
Miss Islington (bot) e6755ba94b
Apply edits from Allen Downey's review of the linear_regression docs. (GH-26176) (GH-26185) 2021-05-16 19:47:57 -07:00
Miss Islington (bot) d49877e6e7
[doc] Fix typo in os module (GH-24464)
Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit fdc7e52f5f)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2021-05-16 16:59:12 -07:00
Miss Islington (bot) a38db84122
bpo-32133: Improve numbers docs (GH-26124) (GH-26149) 2021-05-15 10:28:55 -07:00
Miss Islington (bot) 2e99869f64
bpo-44072: fix Complex, Integral docs for `**` (GH-25986)
In numbers module docstrings and docs.
(cherry picked from commit 4aa63d65a9)

Co-authored-by: Rory Yorke <rory.yorke@gmail.com>
2021-05-14 15:22:45 -07:00
Miss Islington (bot) 623481c77b
Subprocess Protocols Documentation (GH-20950) (GH-26133) 2021-05-14 10:22:55 -07:00
Irit Katriel 23643799ac
[3.10] [doc] Fix typos in cgi.rst (GH-24766) (GH-26132)
(cherry picked from commit 19d839ae20)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2021-05-14 18:12:33 +01:00
Miss Islington (bot) 464269778b
Updated code example for asyncio.gather (GH-20604) (GH-26119)
The previous example did not fully showcase the interest of using gather.

Here the example showcases "the result is an aggregate list of returned values".
(cherry picked from commit 56b8ea65d2)

Co-authored-by: josephernest <nouvellecollection@gmail.com>

Co-authored-by: josephernest <nouvellecollection@gmail.com>
2021-05-13 23:07:20 -07:00
Miss Islington (bot) 6275ea0282
bpo-44030: Fix formatting error in exceptions docs (GH-25929) (GH-26086)
(cherry picked from commit 8ea350ee90)

Co-authored-by: Miguel Brito <5544985+miguendes@users.noreply.github.com>
2021-05-13 01:27:08 +01:00
Miss Islington (bot) 1e4ca09d82
bpo-10548: expectedFailure does not apply to fixtures (GH-23201) (#26044)
(cherry picked from commit 23ae2c3bac)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2021-05-11 23:23:40 +01:00
Miss Islington (bot) 6fc6f4366d
bpo-23750: Document os-system, subprocess. Patch by Martin Panter. (GH-26016) (GH-26040)
* Document os-system, subprocess Patch

* Update Doc/library/os.rst

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 5f2eb87f28)

Co-authored-by: uniocto <serit142sa33go@gmail.com>

Co-authored-by: uniocto <serit142sa33go@gmail.com>
2021-05-11 13:55:15 -07:00
Miss Islington (bot) 7bef7a180d
bpo-25821: Fix inaccuracy in threading.enumerate/is_alive documentation (GH-23192) (#26035)
(cherry picked from commit 12e7d10dfd)

Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2021-05-11 19:19:27 +01:00
Miss Islington (bot) 90904011bd
Doc: http.server: directory is not a class attribute, but an argument. (GH-26017)
* Doc: http.server: directory is not a class attribute, but an argument.
(cherry picked from commit d1b81574ed)

Co-authored-by: Julien Palard <julien@palard.fr>
2021-05-10 19:20:22 -07:00
Miss Islington (bot) f47305aa1f
bpo-43558: Add note about base class initialization to dataclasses doc (GH-25967) (GH-26018)
(cherry picked from commit 2a031723ee)

Co-authored-by: dhoekstra2000 <douwe.hoekstra2512@gmail.com>

Co-authored-by: dhoekstra2000 <douwe.hoekstra2512@gmail.com>
2021-05-10 09:38:46 -04:00
Miss Islington (bot) 70ff820046
Fix a word in dataclasses docs. (GH-26003) (GH-26004)
(cherry picked from commit 801497a115)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2021-05-08 22:22:48 -04:00
Miss Islington (bot) a8fa6b248f
Simple Enhancement. Add missing return statements in ftplib documentation. (GH-25968) (#25969)
(cherry picked from commit b32c8e9795)

Co-authored-by: Senthil Kumaran <senthil@uthcode.com>

Co-authored-by: Senthil Kumaran <senthil@uthcode.com>
2021-05-07 07:13:15 -07:00
Miss Islington (bot) ba5076f34b
Fix minor grammar problems in dataclasses documentation (GH-25948) (GH-25958)
Some missing words; some odd word choices.
(cherry picked from commit ee8e7c2fa9)

Co-authored-by: Scott Noyes <snoyes@gmail.com>

Co-authored-by: Scott Noyes <snoyes@gmail.com>
2021-05-06 17:54:32 -04:00
Miss Islington (bot) 34fc6dd8fd
docs: clearly document that ":GH-X" string formatting results in "0X..." (GH-25941)
* clearly document that ":GH-X" string formatting results in "0X..."

* put back the "serial comma"
(cherry picked from commit 92ceb1c840)

Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
2021-05-06 12:46:08 -07:00
Miss Islington (bot) 5dffd79ee9
Clarify rx parameter of compileall functions (GH-25857)
(cherry picked from commit 09490298d4)

Co-authored-by: Jean-Abou-Samra <37271310+Jean-Abou-Samra@users.noreply.github.com>
2021-05-04 12:57:35 -07:00
Miss Islington (bot) 377f3d43aa
fix enum.property reference in docs (GH-25875) (#25876)
(cherry picked from commit 6fee0835cb)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-05-04 06:24:46 -07:00
Miss Islington (bot) 2046fb35e4
bpo-44001: improve Literal documentation (GH-25877) (#25882)
(cherry picked from commit 87109f4d85)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-05-04 11:17:35 +02:00
Julien Palard 440c025726
Doc: Fix random.uniform example comment. (GH-25784) 2021-05-03 02:20:54 -07:00
Eric V. Smith 72720a2639
dataclasses docs: add a missing word. (GH-25839) 2021-05-03 02:33:34 -04:00
Eric V. Smith a21b3d2fa2
More clarification of kw_only args. (GH-25838)
Also, clarify that the dataclass decorator is what raises an error for some mutable defaults.
2021-05-03 01:55:13 -04:00
Raymond Hettinger 4ae828f3c0
Fix invalid markup (#25833) 2021-05-02 21:07:29 -07:00
Raymond Hettinger 8c598dbb94
bpo-25478: Add total() method to collections.Counter (GH-25829) 2021-05-02 20:19:51 -07:00