Commit Graph

210 Commits

Author SHA1 Message Date
Miss Skeleton (bot) 60bef61f71
bpo-29981: Add examples and update index for set, dict, and generator comprehensions'(GH-20272)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
(cherry picked from commit 2d55aa9e37)

Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
2020-10-24 19:53:18 -07:00
Miss Skeleton (bot) eac21a048b
[doc] Fix link to abc.ABCMeta.register in Glossary (GH-22932)
(cherry picked from commit e01e442125)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2020-10-24 17:32:36 -07:00
Victor Stinner 7d0fef56d8
bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844) (GH-21901) (GH-21928)
* bpo-40204: Allow pre-Sphinx 3 syntax in the doc (GH-21844)

Enable Sphinx 3.2 "c_allow_pre_v3" option and disable the
c_warn_on_allowed_pre_v3 option to make the documentation compatible
with Sphinx 2 and Sphinx 3.

(cherry picked from commit 423e77d6de)

* bpo-40204: Fix Sphinx sytanx in howto/instrumentation.rst (GH-21858)

Use generic '.. object::' to declare markers, rather than abusing
'..  c:function::' which fails on Sphinx 3.

(cherry picked from commit 43577c01a2)

* bpo-40204: Fix duplicates in the documentation (GH-21857)

Fix two Sphinx 3 issues:

Doc/c-api/buffer.rst:304: WARNING: Duplicate C declaration, also defined in 'c-api/buffer'.
Declaration is 'PyBUF_ND'.

Doc/c-api/unicode.rst:1603: WARNING: Duplicate C declaration, also defined in 'c-api/unicode'.
Declaration is 'PyObject* PyUnicode_Translate(PyObject *str, PyObject *table, const char *errors)'.

(cherry picked from commit 46d10b1237)

* bpo-40204: Add :noindex: in the documentation (GH-21859)

Add :noindex: to duplicated documentation to fix "duplicate object
description" errors.

For example, fix this Sphinx 3 issue:

Doc/library/configparser.rst:1146: WARNING: duplicate object
description of configparser.ConfigParser.optionxform, other instance
in library/configparser, use :noindex: for one of them

(cherry picked from commit d3ded08048)

* bpo-40204, doc: Fix syntax of C variables (GH-21846)

For example, fix the following Sphinx 3 errors:

Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters
Invalid C declaration: Expected identifier in nested name. [error at 5]
  void \*obj
  -----^

Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*'
Invalid C declaration: Expected end of definition. [error at 8]
  PyObject*
  --------^

The modified documentation is compatible with Sphinx 2 and Sphinx 3.

(cherry picked from commit 474652fe93)

* bpo-40204: Fix reference to terms in the doc (GH-21865)

Sphinx 3 requires to refer to terms with the exact case.

For example, fix the Sphinx 3 warning:

Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case
sensitive match.made a reference to loader instead.

(cherry picked from commit bb0b08540c)

* bpo-40204: Fix duplicated productionlist names in the doc (GH-21900)

Sphinx 3 disallows having more than one productionlist markup with
the same name. Simply remove names in this case, since names are not
shown anyway. For example, fix the Sphinx 3 warning:

Doc/reference/introduction.rst:96: duplicate token description
of *:name, other instance in reference/expressions

(cherry picked from commit 1abeda80f7)
(cherry picked from commit 8f88190af5)
2020-08-20 13:28:49 +02:00
Miss Islington (bot) 56d25add07
Improve asyncio.loop.call_soon() documentation (GH-20883)
* Add a glossary entry for the term "callback"
* Link to it in loop.call_soon() and in the "Concurrency and Multithreading" section

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit a16d697049)

Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
2020-06-22 19:23:49 -07:00
Miss Islington (bot) a240f05456
bpo-39233: Update positional-only section in the glossary (GH-17874)
https://bugs.python.org/issue39233
(cherry picked from commit 9a669d58e8)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2020-01-12 03:03:15 -08:00
Miss Islington (bot) 2f644c0dc9 Fix and improve `asyncio.run()` docs (GH-16403) (GH-16504)
(cherry picked from commit e407013089)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2019-09-30 18:46:43 -07:00
Miss Islington (bot) d04c85f5a7 bpo-38096: Complete the "structseq" and "named tuple" cleanup (GH-16010) (GH-16062)
(cherry picked from commit 4210ad5ebd)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-09-12 08:20:31 -07:00
Paul Ganssle 2bb6bf0c8c bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) (GH-15961) 2019-09-11 19:50:29 -07:00
Julien Palard 0811f2d81a
Doc: Space breaking whole definition. (GH-13615) 2019-05-28 14:04:42 +02:00
Raymond Hettinger cc1c582f6f
bpo-37051: Refine note on what objects are hashable (GH-13587) 2019-05-27 10:21:31 -07:00
Vinodhini Balusamy c0a1a07c7e bpo-32995 - Added context variable in glossary (GH-9741) 2019-05-14 08:11:41 -04:00
Sanyam Khurana 90fb04c1e2 bpo-36822: Fix minor grammatical error in glossary.rst (GH-13145) 2019-05-11 20:04:10 +01:00
Andre Delfino f760610bdd bpo-33832: Add "magic method" glossary entry (GH-7630) 2019-03-26 21:21:27 -04:00
Serhiy Storchaka 2b57c43f21
bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
Sebastián Ramírez 25221b3283 Fix typo in asynchronous generator iterator documentation (GH-10542)
Remove an unnecessary "that":
... will execute that the body ... ->  ... will execute the body ...
2018-11-14 21:51:56 -08:00
Windson yang a9655b7f71 Improve grammar in Glossary. (GH-10474)
a asynchronous generator -> an asynchronous generator
2018-11-12 09:42:38 -08:00
Pablo Galindo b4db249c95 bpo-9842: Add cross-reference to the ellipsis object (GH-4063)
This PR adds a cross-reference to the ellipsis object and the representation of recursive item in containers as indicated in [issue 9842](https://bugs.python.org/issue9842) by @bitdancer.


https://bugs.python.org/issue9842
2018-11-04 14:36:25 -08:00
Stéphane Wirtel e483f02423 bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037) 2018-10-26 12:52:11 +02:00
Zachary Ware 98b976a2f8
Fix struct sequence glossary entry grammar (GH-9030)
... by removing a superfluous "either".

Reported by Никита Люшненко on docs@.
2018-09-01 20:59:27 -05:00
Andrés Delfino cf2c5e8e28 Improve grammar of asynchronous iterator glossary entry (GH-8657) 2018-08-09 08:45:41 -07:00
Andrés Delfino 6868003514 bpo-33571: Improve the glossary description for '...' prompt (GH-6971)
Mention that it can be triggered by triple quotes and after specifying decorators.
2018-06-15 20:46:38 -07:00
Andrés Delfino 7469ff5017 Use singular, we are talking about the access (GH-7727) 2018-06-15 19:42:09 -07:00
Andrés Delfino d689f97619 Remove hyphens from phrase "picks up where it left off" (GH-7410) 2018-06-09 18:43:45 -07:00
Andrés Delfino 2298c0e6a6 Fix typo spotted by Guido (GH-7131) 2018-05-26 11:18:02 -07:00
Andrés Delfino 6e33f810c9 bpo-32769: A new take on annotations/type hinting glossary entries (GH-6829) 2018-05-26 05:43:39 -07:00
Andrés Delfino 268cc7c3f8 Fix lambda parameters being refered as arguments (GH-7037) 2018-05-22 07:57:45 +02:00
Andrés Delfino 0c4be82890 bpo-33580: Make binary/text file glossary entries follow most common "see also" style. (GH-6991) 2018-05-20 18:12:50 +03:00
Andrés Delfino d5f1442608 bpo-33518: Add PEP entry to documentation glossary (GH-6860) 2018-05-17 09:51:50 +02:00
Andrés Delfino f2290fb19a bpo-32769: Write annotation entry for glossary (GH-6657)
https://bugs.python.org/issue32769
2018-05-14 15:04:55 -04:00
INADA Naoki 40a536be53
s/the the/the/ (GH-6287) 2018-03-28 22:07:57 +09:00
Guido van Rossum 95e4d58913 String annotations [PEP 563] (#4390)
* Document `from __future__ import annotations`
* Provide plumbing and tests for `from __future__ import annotations`
* Implement unparsing the AST back to string form

This is required for PEP 563 and as such only implements a part of the
unparsing process that covers expressions.
2018-01-26 08:20:18 -08:00
Antoine Pitrou 4b965930e8
bpo-32377: improve __del__ docs and fix mention about resurrection (#4927)
* Fix #32377: improve __del__ docs and fix mention about resurrection

* Mention that CPython only calls __del__ once.
2017-12-19 19:48:45 +01:00
Benjamin Peterson 42aa93b8ff
closes bpo-31650: PEP 552 (Deterministic pycs) implementation (#4575)
Python now supports checking bytecode cache up-to-dateness with a hash of the
source contents rather than volatile source metadata. See the PEP for details.

While a fairly straightforward idea, quite a lot of code had to be modified due
to the pervasiveness of pyc implementation details in the codebase. Changes in
this commit include:

- The core changes to importlib to understand how to read, validate, and
  regenerate hash-based pycs.

- Support for generating hash-based pycs in py_compile and compileall.

- Modifications to our siphash implementation to support passing a custom
  key. We then expose it to importlib through _imp.

- Updates to all places in the interpreter, standard library, and tests that
  manually generate or parse pyc files to grok the new format.

- Support in the interpreter command line code for long options like
  --check-hash-based-pycs.

- Tests and documentation for all of the above.
2017-12-09 10:26:52 -08:00
Sanyam Khurana 1b4587a246 bpo-25910: Fixes redirection from http to https (#4674) 2017-12-06 17:39:33 +01:00
Raymond Hettinger 0bf287b6e0 bpo-18558: Clarify glossary entry for "Iterable" (#3732) 2017-09-25 00:52:06 -07:00
csabella 64c887ab3a bpo-26947: DOC: clarify wording on hashable in glossary (#948) 2017-04-01 19:50:47 -07:00
Mariatta 33db068dac bpo-29928: Add f-string to the Glossary (GH-864) 2017-03-30 12:12:18 -07:00
Serhiy Storchaka c611a5b1d4 bpo-29746: Update marshal docs to Python 3. (#547) 2017-03-12 08:53:22 +02:00
Xiang Zhang 0710d75425 bpo-29770: remove outdated PYO related info (GH-590) 2017-03-11 13:02:52 +08:00
Yury Selivanov 03660041d2 Issue #28091: Document PEP 525 & PEP 530.
Patch by Eric Appelt.
2016-12-15 17:36:05 -05:00
Yury Selivanov f8cb8a16a3 Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations.
Patch by Ivan Levkivskyi.
2016-09-08 20:50:03 -07:00
Brett Cannon 15552c39e0 Issue #27285: Document the deprecation of the pyvenv script.
As part of the update, the documentation was updated to normalize
around the term "virtual environment" instead of relying too heavily
on "venv" for the same meaning and leading to inconsistent usage of
either.

Thanks to Steve Piercy for the patch.
2016-07-08 10:46:21 -07:00
Brett Cannon c28592bb2f Issue #27186: Define what a "path-like object" is.
Thanks to Dusty Phillips for the initial patch.
2016-06-24 12:21:47 -07:00
Berker Peksag 6bf8e61984 Merge from 3.5 2016-06-11 22:41:03 +03:00
Berker Peksag af51140fa0 Fix typo and silence a Sphinx warning in Doc/glossary.rst 2016-06-11 22:40:41 +03:00
Serhiy Storchaka f41b82fb19 Issue #26282: PyArg_ParseTupleAndKeywords() and Argument Clinic now support
positional-only and keyword parameters in the same function.
2016-06-09 16:30:29 +03:00
Yury Selivanov a6f6edbda8 Issue #27243: Fix __aiter__ protocol 2016-06-09 15:08:31 -04:00
Martin Panter 46f50726a0 Issue #27076: Doc, comment and tests spelling fixes
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-05-26 05:35:26 +00:00
Senthil Kumaran 3858a1c18c Issue23675 - A tiny clarification in the MRO glossary term. 2016-01-09 22:33:54 -08:00
Brett Cannon ccddbb186b Issue #23936: Clarify what finders are.
Thanks to Raúl Cumplido for the bug report and Thomas Kluyver for the
patch.
2015-12-04 15:46:21 -08:00