Commit Graph

440 Commits

Author SHA1 Message Date
Miss Islington (bot) 223fde359a
gh-86986: Drop compatibility support for Sphinx 2 (GH-93737)
* Revert "bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282)"

This reverts commit 5c1f15b4b1

* Revert "bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)"

This reverts commit b63a620014.
(cherry picked from commit 0efe3a1636)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-06-21 10:51:23 -07:00
Miss Islington (bot) 158579654d
bpo-39229: fix formatting in library/functions.rst (GH-17857)
Missing reference of auditing event presents error when building translated documentation
(cherry picked from commit f298ba1f27)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2022-05-08 16:39:09 -07:00
Miss Islington (bot) a48d31f204
gh-81488: Add recursive wording for issubclass docs (GH-92087)
(cherry picked from commit 1066ecb970)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-04-30 21:21:51 -07:00
Miss Islington (bot) 88bbc5dd7a
bpo-30718: Add information about text buffering (GH-32351)
(cherry picked from commit 5101d97d0b)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
2022-04-20 02:00:43 -07:00
Miss Islington (bot) a57ec7a4fe
bpo-43698: do not use `...` as argument name in docs (GH-30502)
(cherry picked from commit b9d8980d89)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-26 04:42:26 -08:00
Miss Islington (bot) c8044777cf
Add Positional only arguments forward slash (/) to sorted() function in Built-in Functions document (GH-30113)
sorted() function is missing forward slash (/) in Built-in Functions documentation page.

Automerge-Triggered-By: GH:asvetlov
(cherry picked from commit f025ae63dc)

Co-authored-by: Vivek Vashist <vivekvashist@gmail.com>
2021-12-15 04:59:01 -08:00
Miss Islington (bot) 1f7000808e
bpo-19737: Improved the documentation for globals (GH-29823) (GH-30041)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 4fe5585240)

Co-authored-by: 180909 <734461790@qq.com>
2021-12-11 01:32:13 +01:00
Brett Cannon 99aad31b7a
[3.10] bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently required by CPython (GH-29170) (GH-29650)
It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`.
(cherry picked from commit be36e06340)

Co-authored-by: Brett Cannon <brett@python.org>
2021-11-22 15:09:15 -08:00
Miss Islington (bot) 8af3090cb7
[doc] Link to section File input (GH-28941) (GH-29375)
(cherry picked from commit 48824fa1e2)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2021-11-02 22:54:53 +01:00
Miss Islington (bot) 9b3cda5687
bpo-44344: Document that pow can return a complex number for non-complex inputs. (GH-27853) (GH-29135)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 887a55705b)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2021-10-22 00:08:20 +02:00
Łukasz Langa 8f9d398b46
[3.10] [docs] Improve the markup of powers (GH-28598) (GH-28607)
(cherry picked from commit 4f05f15d7b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-09-28 23:09:58 +02:00
Łukasz Langa 0d41bf1570
[3.10] bpo-45246: Document that sorted() only uses "<" comparisons (GH-28494) (GH-28502)
(cherry picked from commit 9a0dcc5b2e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2021-09-21 22:32:09 +02:00
Miss Islington (bot) 8711b3d0ac
bpo-44135: [docs] Fix inline markup (GH-28095)
(cherry picked from commit 9a7ec2fcde)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-08-31 09:25:08 -07:00
Miss Islington (bot) ab8fed88fc
bpo-44135: Refine explanation of how passing tuples to issubclass() behaves (GH-26193)
Co-authored-by: Zachary Kneupper <zachary.kneupper@gmail.com>
(cherry picked from commit 08767c73b5)

Co-authored-by: Zack Kneupper <zachary.kneupper@gmail.com>
2021-08-31 07:23:22 -07:00
Miss Islington (bot) c79aa427c0
bpo-44522: Fix inaccurate information in open() function (GH-27650)
- Use "Low surrogate code units" instead of "Unicode Private Use Area"
(cherry picked from commit b05e9b63fc)

Co-authored-by: meowmeowmeowcat <meowmeowcat1211@gmail.com>
2021-08-09 07:35:11 -07:00
Miss Islington (bot) 2d0492091e
Clean up comma usage in Doc/library/functions.rst (GH-27083) (#27243)
(cherry picked from commit 1e651c6ada)

Co-authored-by: α∂мιηιχтяαтσя <sadiqherritage@gmail.com>
2021-07-19 18:38:56 +02: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
Andre Delfino 69a733bda3
[doc] Be more clear on super() regarding multiple base classes methods (GH-21789) 2021-04-28 18:12:15 -07:00
Géry Ogam d35eef3b90
Update Sphinx directive for super from function to class (GH-25489) 2021-04-20 11:58:02 -07:00
Victor Stinner 553ee2781a
bpo-43682: Make staticmethod objects callable (GH-25117)
Static methods (@staticmethod) are now callable as regular functions.
2021-04-12 00:21:22 +02:00
Victor Stinner 507a574de3
bpo-43682: @staticmethod inherits attributes (GH-25268)
Static methods (@staticmethod) and class methods (@classmethod) now
inherit the method attributes (__module__, __name__, __qualname__,
__doc__, __annotations__) and have a new __wrapped__ attribute.

Changes:

* Add a repr() method to staticmethod and classmethod types.
* Add tests on the @classmethod decorator.
2021-04-09 17:51:22 +02:00
Pablo Galindo d9692027f4
bpo-31861: Complete the C-API docs for PyObject_GetAiter and PyAiter_Check (GH-25004) 2021-03-23 23:57:03 +00:00
Joshua Bronson f0a6fde882
bpo-31861: Add aiter and anext to builtins (#23847)
Co-authored-by: jab <jab@users.noreply.github.com>
Co-authored-by: Daniel Pope <mauve@mauveweb.co.uk>
Co-authored-by: Justin Wang <justin39@gmail.com>
2021-03-23 15:47:21 -07:00
Erik Soma 72fcd14a82
bpo-42840: Document providing kwargs to type. (#24173)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-03-01 15:21:04 -08:00
Ken Jin 5f77dee056
Improve docs of PEP 604 Union (#24301) 2021-02-08 17:57:11 -08:00
Terry Jan Reedy 0ec57e25c9
bpo-16781: In 'exec' doc, add 'nonlocal' to 'yield' and 'return' (GH-2446)
These 3 statements cannot be used at module scope -- nor in exec with one namespace.
2021-02-07 00:28:50 -05:00
Ken Jin 2edaf6a4fb
bpo-8264: Document hasattr and getattr behavior for private attributes (GH-23513)
Clarify ``getattr`` and ``setattr`` requirements for accessing name-mangled attributes

Co-Authored-By: Catalin Iacob <iacobcatalin@gmail.com>
2021-02-02 13:06:57 -08:00
Julien Palard 5c1f15b4b1
bpo-42843: Keep Sphinx 1.8 and Sphinx 2 compatibility (GH-24282) 2021-01-25 15:46:06 +01:00
Борис Верховский 644d52818a
bpo-40304: Correct type(name, bases, dict) doc (GH-19553)
Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
2021-01-22 00:47:23 -05:00
Andre Delfino dcc997cd28
[doc] Fix erroneous backslashes in signatures and names (GH-23658)
The issue being resolved is shown in the 3.10 docs (if you select docs for older versions you won't see a visual glitch).

The newer sphinx version that produces the 3.10 docs doesn't treat the backslash to escape things in some situations it previously did.
2020-12-16 17:37:28 -08:00
Antoine fc3dca3e16
Clarify eval() doc from library/functions. (GH-22700) 2020-12-16 16:45:19 +01:00
Rafael Fontenelle b76a840021
bpo-42180: fix plural in arguments and control (GH-23015)
https://bugs.python.org/issue42180
2020-10-29 20:48:21 +00:00
Antoine 0f25c231b3
Add a link to buffer protocol in bytearray() doc (GH-22675) 2020-10-26 14:26:34 +09:00
Saiyang Gou 3f7e990fd4
bpo-41192: Add documentation of undocumented audit events (GH-21308) 2020-10-20 15:23:15 -04:00
Batuhan Taskaya 155938907c
bpo-40484: Document compiler flags under AST module (GH-19885)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
2020-10-19 02:14:11 +01:00
Batuhan Taskaya e799aa8b92
bpo-41887: omit leading spaces/tabs on ast.literal_eval (#22469)
Also document that eval() does this (the same way).
2020-10-03 17:46:44 -07:00
Andre Delfino c8bb24166e
[doc] Update references to NumPy (GH-22458)
Numeric(al) Python to NumPy. It seems the old name hasn't been used for some time.
2020-10-01 16:22:14 -07:00
Victor Stinner 8af239eacf
bpo-41762: Fix usage of productionlist markup in the doc (GH-22281)
Use an unique identifier for the different grammars documented using
the Sphinx productionlist markup.

productionlist markups of the same grammar, like "expressions" or
"compound statements", use the same identifier "python-grammar".
2020-09-18 09:10:15 +02:00
Andre Delfino 802726acf6
Document vars behavior when __dict__ is missing (#21466) 2020-08-21 19:29:34 -03:00
Benjamin Kane 705f145565
Doc: Add a link to tutorial page from `open()` doc (GH-21737)
Adds a link to the "Reading and Writing Files" page so users can
more easily discover how file handles are handled with the `with`
context manager vs without it.
2020-08-08 11:57:03 +09:00
Julien Palard a908bc4dd8
Doc: Builtins functions: faster jump table (GH-21376) 2020-07-09 11:38:41 +02:00
Ram Rachum 77ed29b2c2
Fix typo in functions.rst (GH-21131) 2020-06-25 14:50:37 -07:00
Ram Rachum 59cf853332
bpo-40636: Documentation for zip-strict (#20961) 2020-06-19 13:39:22 -07:00
Windson yang 2831642212
Indicate that abs() method accept argument that implement __abs__(), just like call() method in the docs (GH-20509) 2020-05-29 07:35:34 -04:00
Mark Dickinson c691f20952
Fix "versionchanged" for pow named arguments (GH-19042)
The ability to use named arguments in "pow" was introduced in Python 3.8, not Python 3.9. See https://bugs.python.org/issue38237
2020-03-19 18:12:59 +00:00
idomic fc72ab6913
bpo-38691: importlib ignores PYTHONCASEOK if -E is used (GH-18627)
The importlib module now ignores the PYTHONCASEOK
environment variable when the -E or -I command line
options are being used.
2020-03-09 12:57:53 +01:00
Victor Stinner 942f7a2dea
bpo-39674: Revert "bpo-37330: open() no longer accept 'U' in file mode (GH-16959)" (GH-18767)
This reverts commit e471e72977.

The mode will be removed from Python 3.10.
2020-03-04 18:50:22 +01:00
Victor Stinner 4dee92b0ad
Revert "bpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I flags passed (#18314)" (GH-18553)
This reverts commit d83b6600b2.
2020-02-19 14:23:47 +01:00
idomic d83b6600b2
bpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I flags passed (#18314)
* Hard reset + cherry piciking the changes.

* 📜🤖 Added by blurb_it.

* Added @vstinner News

* Update Misc/NEWS.d/next/Library/2020-02-11-13-01-38.bpo-38691.oND8Sk.rst

Co-Authored-By: Victor Stinner <vstinner@python.org>

* Hard reset to master

* Hard reset to master + latest changes

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2020-02-17 10:05:11 +01:00
Zac Hatfield-Dodds d7c7adde00 bpo-12159: Document sys.maxsize limit in len() function reference (GH-17934) 2020-01-12 10:04:14 +01:00