From 7a0101e2ba9792780d22f284a4ddec8405793ea8 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 18 Jun 2022 16:37:55 +0300 Subject: [PATCH 01/13] PEP 555, 653: Fix inline literal missing (escaped) space after literal --- pep-0555.rst | 12 +----------- pep-0653.rst | 13 +------------ 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/pep-0555.rst b/pep-0555.rst index f001601aacf..23e7b78934a 100644 --- a/pep-0555.rst +++ b/pep-0555.rst @@ -359,7 +359,7 @@ For code that does not use ``contextvars``, the additions are O(1) and essential More on implementation '''''''''''''''''''''' -The rest of the functionality, including ``contextvars.leaking_yields``, contextvars.capture()``, ``contextvars.get_local_state()`` and ``contextvars.clean_context()`` are in fact quite straightforward to implement, but their implementation will be discussed further in later versions of this proposal. Caching of assigned values is somewhat more complicated, and will be discussed later, but it seems that most cases should achieve O(1) complexity. +The rest of the functionality, including ``contextvars.leaking_yields``, ``contextvars.capture()``, ``contextvars.get_local_state()`` and ``contextvars.clean_context()`` are in fact quite straightforward to implement, but their implementation will be discussed further in later versions of this proposal. Caching of assigned values is somewhat more complicated, and will be discussed later, but it seems that most cases should achieve O(1) complexity. Backwards compatibility ======================= @@ -403,13 +403,3 @@ Copyright ========= This document has been placed in the public domain. - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - coding: utf-8 - End: diff --git a/pep-0653.rst b/pep-0653.rst index 527f0bff9ea..2c80548ebdf 100644 --- a/pep-0653.rst +++ b/pep-0653.rst @@ -107,7 +107,7 @@ Specification Additions to the object model ----------------------------- -The ``__match_container__ ``and ``__match_class__`` attributes will be added to ``object``. +The ``__match_container__`` and ``__match_class__`` attributes will be added to ``object``. ``__match_container__`` should be overridden by classes that want to match mapping or sequence patterns. ``__match_class__`` should be overridden by classes that want to change the default behavior when matching class patterns. @@ -871,14 +871,3 @@ Copyright This document is placed in the public domain or under the CC0-1.0-Universal license, whichever is more permissive. - - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - coding: utf-8 - End: From d08ea4ee8f811a425ead0cc72df7a89e260b4459 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 18 Jun 2022 16:38:36 +0300 Subject: [PATCH 02/13] Add newline at end of file --- pep_sphinx_extensions/LICENCE.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pep_sphinx_extensions/LICENCE.rst b/pep_sphinx_extensions/LICENCE.rst index f147a8023e3..c4665c1ad48 100644 --- a/pep_sphinx_extensions/LICENCE.rst +++ b/pep_sphinx_extensions/LICENCE.rst @@ -1,2 +1,2 @@ This files in this directory are placed in the public domain or under the -CC0-1.0-Universal license, whichever is more permissive. \ No newline at end of file +CC0-1.0-Universal license, whichever is more permissive. From 0e165c9bee01b3e09e08ce2035bf708eb717f0ab Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 2 Jul 2022 23:02:40 +0300 Subject: [PATCH 03/13] PEP 692: Add newline at end of file --- pep-0692.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pep-0692.rst b/pep-0692.rst index 1d6d9b2b7eb..f350109307d 100644 --- a/pep-0692.rst +++ b/pep-0692.rst @@ -602,4 +602,4 @@ Copyright ========= This document is placed in the public domain or under the -CC0-1.0-Universal license, whichever is more permissive. \ No newline at end of file +CC0-1.0-Universal license, whichever is more permissive. From 91e3634c6e3cdcd98defcf3f7d6617db18718fd7 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 18 Jun 2022 16:41:50 +0300 Subject: [PATCH 04/13] PEP 633: Fix missing space before role --- pep-0633.rst | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pep-0633.rst b/pep-0633.rst index becf2af9932..8bcbecf7040 100644 --- a/pep-0633.rst +++ b/pep-0633.rst @@ -65,7 +65,7 @@ In the specification of multiple requirements with the same distribution name (where environment markers choose the appropriate dependency), the chosen solution is similar to `Poetry`_'s, where an array of requirements is allowed. -The direct-reference keys closely align with and utilise pep:`610` and +The direct-reference keys closely align with and utilise :pep:`610` and :pep:`440` as to reduce differences in the packaging ecosystem and rely on previous work in specification. @@ -741,12 +741,3 @@ Copyright This document is placed in the public domain or under the CC0-1.0-Universal license, whichever is more permissive. - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - coding: utf-8 - End: From 89adbfbb31eee943ee10f3b48ad6fd32ededf16a Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 19 Jun 2022 20:50:17 +0300 Subject: [PATCH 05/13] Run sphinx-lint in pre-commit --- .pre-commit-config.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ccd3a4dc0e8..263c47cb01e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ default_stages: [commit] repos: # General file checks and fixers - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.3.0 hooks: - id: mixed-line-ending name: "Normalize mixed line endings" @@ -66,6 +66,15 @@ repos: - id: tox-ini-fmt name: "Format tox.ini" + - repo: https://github.com/sphinx-contrib/sphinx-lint + rev: v0.6.1 + hooks: + - id: sphinx-lint + name: "Sphinx lint" + # Temporarily disable "role-with-double-backticks" due to false positive: + # https://github.com/sphinx-contrib/sphinx-lint/issues/34 + args: ["--disable=role-with-double-backticks,trailing-whitespace"] + # RST checks - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.9.0 From fb521360e0ee6d04e39f6aa5e681b78dbdd7f269 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 3 Oct 2022 12:01:09 -0700 Subject: [PATCH 06/13] PEP 639: Remove rogue backticks --- pep-0639.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pep-0639.rst b/pep-0639.rst index 183017a7232..fbbe704900f 100644 --- a/pep-0639.rst +++ b/pep-0639.rst @@ -781,7 +781,7 @@ Converting legacy metadata Tools MUST NOT use the contents of the ``license.text`` ``[project]`` key (or equivalent tool-specific format), license classifiers or the value of the core metadata ``License`` field -to fill the top-level string value of the ``license`` key `` +to fill the top-level string value of the ``license`` key or the core metadata ``License-Expression`` field without informing the user and requiring unambiguous, affirmative user action to select and confirm the desired license expression value before proceeding. From 798fe415097a731628782b70be7d5a45f9b03c9d Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 4 Oct 2022 16:44:37 -0700 Subject: [PATCH 07/13] PEP 372: Remove rogue backticks --- pep-0372.txt | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/pep-0372.txt b/pep-0372.txt index 0027c0b7bf7..842145da3c6 100644 --- a/pep-0372.txt +++ b/pep-0372.txt @@ -1,7 +1,5 @@ PEP: 372 Title: Adding an ordered dictionary to collections -Version: $Revision$ -Last-Modified: $Date$ Author: Armin Ronacher , Raymond Hettinger Status: Final @@ -148,7 +146,7 @@ constructor? Is the ordered dict a dict subclass? Why? - Yes. Like ``defaultdict``, an ordered dictionary `` subclasses ``dict``. + Yes. Like ``defaultdict``, an ordered dictionary subclasses ``dict``. Being a dict subclass make some of the methods faster (like ``__getitem__`` and ``__len__``). More importantly, being a dict subclass lets ordered dictionaries be usable with tools like json that @@ -315,14 +313,3 @@ Copyright ========= This document has been placed in the public domain. - - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - coding: utf-8 - End: From f806ff56bc2007aa689fe073bb593ad18d319aa6 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 4 Oct 2022 17:07:30 -0700 Subject: [PATCH 08/13] PEP 462: Add missing underscore after closing backtick in hyperlink --- pep-0462.txt | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/pep-0462.txt b/pep-0462.txt index ba4ae5dc9a8..b7465130f16 100644 --- a/pep-0462.txt +++ b/pep-0462.txt @@ -1,7 +1,5 @@ PEP: 462 Title: Core development workflow automation for CPython -Version: $Revision$ -Last-Modified: $Date$ Author: Nick Coghlan Status: Withdrawn Type: Process @@ -403,7 +401,7 @@ Mercurial vs Gerrit/git Gerrit uses git as the actual storage mechanism for patches, and automatically handles merging of approved patches. By contrast, Kallithea -use the RhodeCode created `vcs ` library as +use the RhodeCode created `vcs `_ library as an abstraction layer over specific DVCS implementations (with Mercurial and git backends currently available). @@ -696,12 +694,3 @@ Copyright ========= This document has been placed in the public domain. - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - coding: utf-8 - End: From 75d33661fde24a02037a041a9a2b32310939b8a0 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 4 Oct 2022 17:20:02 -0700 Subject: [PATCH 09/13] PEP 481: Add missing underscore after closing backtick in hyperlinks --- pep-0481.txt | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/pep-0481.txt b/pep-0481.txt index f693e66ff7c..ff80b03794f 100644 --- a/pep-0481.txt +++ b/pep-0481.txt @@ -1,7 +1,5 @@ PEP: 481 Title: Migrate CPython to Git, Github, and Phabricator -Version: $Revision$ -Last-Modified: $Date$ Author: Donald Stufft Status: Withdrawn Type: Process @@ -345,22 +343,11 @@ workflow less reusable with other projects. References ========== -.. [#openhub-stats] `Open Hub Statistics ` -.. [#hg-git] `Hg-Git mercurial plugin ` +.. [#openhub-stats] `Open Hub Statistics `_ +.. [#hg-git] `Hg-Git mercurial plugin `_ Copyright ========= This document has been placed in the public domain. - - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - coding: utf-8 - End: From 4a901cf4005a1167c222063a0db2e67844f5afbe Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 4 Oct 2022 17:41:42 -0700 Subject: [PATCH 10/13] PEP 507: Add missing underscore after closing backtick in hyperlinks --- pep-0507.txt | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/pep-0507.txt b/pep-0507.txt index b12f57c70db..e4ace277d8d 100644 --- a/pep-0507.txt +++ b/pep-0507.txt @@ -1,7 +1,5 @@ PEP: 507 Title: Migrate CPython to Git and GitLab -Version: $Revision$ -Last-Modified: $Date$ Author: Barry Warsaw Status: Rejected Type: Process @@ -310,23 +308,12 @@ Open issues References ========== -.. [#openhub-stats] `Open Hub Statistics ` -.. [#hg-git] `Hg-Git mercurial plugin ` -.. [#GitLab] `https://about.gitlab.com/` +.. [#openhub-stats] `Open Hub Statistics `_ +.. [#hg-git] `Hg-Git mercurial plugin `_ +.. [#GitLab] ``_ Copyright ========= This document has been placed in the public domain. - - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - coding: utf-8 - End: From a25c2f80f3ac496869ea66cdcf3e0cb410f8ff06 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 5 Oct 2022 07:51:10 -0700 Subject: [PATCH 11/13] PEP 453: Add missing underscore after closing backtick in hyperlinks, and convert to links --- pep-0453.txt | 59 ++++++++++++++++++++-------------------------------- 1 file changed, 23 insertions(+), 36 deletions(-) diff --git a/pep-0453.txt b/pep-0453.txt index a8f69cf2cef..9fcd6b9dd4a 100644 --- a/pep-0453.txt +++ b/pep-0453.txt @@ -1,7 +1,5 @@ PEP: 453 Title: Explicit bootstrapping of pip in Python installations -Version: $Revision$ -Last-Modified: $Date$ Author: Donald Stufft , Nick Coghlan BDFL-Delegate: Martin von Löwis @@ -1021,49 +1019,38 @@ site-packages directory rather than the system site-packages). References ========== -.. [1] Discussion thread 1 (distutils-sig) - (https://mail.python.org/pipermail/distutils-sig/2013-August/022529.html) +* `Discussion thread 1 (distutils-sig) + `_ -.. [2] Discussion thread 2 (distutils-sig) - (https://mail.python.org/pipermail/distutils-sig/2013-September/022702.html) +* `Discussion thread 2 (distutils-sig) + `_ -.. [3] Discussion thread 3 (python-dev) - (https://mail.python.org/pipermail/python-dev/2013-September/128723.html) +* `Discussion thread 3 (python-dev) + `_ -.. [4] Discussion thread 4 (python-dev) - (https://mail.python.org/pipermail/python-dev/2013-September/128780.html) +* `Discussion thread 4 (python-dev) + `_ -.. [5] Discussion thread 5 (python-dev) - (https://mail.python.org/pipermail/python-dev/2013-September/128894.html) +* `Discussion thread 5 (python-dev) + `_ -.. [#cert-verification] pip/requests certificate management concerns - (https://mail.python.org/pipermail/python-dev/2013-October/129755.html) +.. [#cert-verification] `pip/requests certificate management concerns + `_ -.. [#windows-incompatibility] Windows installer compatibility concerns - (https://mail.python.org/pipermail/distutils-sig/2013-October/022855.html) +.. [#windows-incompatibility] `Windows installer compatibility concerns + `_ -.. [#ubuntu] `Ubuntu ` -.. [#debian] `Debian ` -.. [#fedora] `Fedora ` -.. [#homebrew] `Homebrew ` -.. [#macports] `MacPorts ` -.. [#fink] `Fink ` -.. [#ContinuumIO] `Anaconda ` -.. [#ActiveState] `ActivePython ` -.. [#Enthought] `Enthought Canopy ` +.. [#ubuntu] `Ubuntu `__ +.. [#debian] `Debian `__ +.. [#fedora] `Fedora `__ +.. [#homebrew] `Homebrew `__ +.. [#macports] `MacPorts `__ +.. [#fink] `Fink `__ +.. [#ContinuumIO] `Anaconda `__ +.. [#ActiveState] `ActivePython `__ +.. [#Enthought] `Enthought Canopy `__ Copyright ========= This document has been placed in the public domain. - - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - coding: utf-8 - End: From 2cd2ac665591b349e060c081ab485a7d4aa0333d Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 5 Oct 2022 07:52:13 -0700 Subject: [PATCH 12/13] PEP 534: Fix inline literal missing (escaped) space after literal --- pep-0534.txt | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/pep-0534.txt b/pep-0534.txt index b6e649fbe2e..4959943d5d5 100644 --- a/pep-0534.txt +++ b/pep-0534.txt @@ -1,7 +1,5 @@ PEP: 534 Title: Improved Errors for Missing Standard Library Modules -Version: $Revision$ -Last-Modified: $Date$ Author: Tomáš Orsava , Petr Viktorin , Nick Coghlan @@ -116,7 +114,7 @@ with two additional functions: * ``sysconfig.get_optional_modules()``, which will list optional public top level standard library module names -The results of ``sysconfig.get_optional_modules()``and the existing +The results of ``sysconfig.get_optional_modules()`` and the existing ``sys.builtin_module_names`` will both be subsets of the full list provided by the new ``sysconfig.get_stdlib_modules()`` function. @@ -374,14 +372,3 @@ Copyright ========= This document has been placed in the public domain. - - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - coding: utf-8 - End: From c513893791dc0dbdefe07a0d8d112e2f6748cf8f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 5 Oct 2022 08:00:10 -0700 Subject: [PATCH 13/13] PEP 372, 453, 462: Redirect BPO to GH --- pep-0372.txt | 8 ++++---- pep-0453.txt | 2 +- pep-0462.txt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pep-0372.txt b/pep-0372.txt index 842145da3c6..84d0443307b 100644 --- a/pep-0372.txt +++ b/pep-0372.txt @@ -25,7 +25,7 @@ Patch A working Py3.1 patch including tests and documentation is at: - `OrderedDict patch `_ + `OrderedDict patch `_ The check-in was in revisions: 70101 and 70102 @@ -195,7 +195,7 @@ How well does OrderedDict work with the json module, PyYAML, and ConfigParser? In Py2.6, the object_hook for json decoders passes-in an already built dictionary so order is lost before the object hook sees it. This problem is being fixed for Python 2.7/3.1 by adding a new hook that - preserves order (see http://bugs.python.org/issue5381 ). + preserves order (see https://github.com/python/cpython/issues/49631 ). With the new hook, order can be preserved:: >>> jtext = '{"one": 1, "two": 2, "three": 3, "four": 4, "five": 5}' @@ -262,7 +262,7 @@ Reference Implementation An implementation with tests and documentation is at: - `OrderedDict patch `_ + `OrderedDict patch `_ The proposed version has several merits: @@ -306,7 +306,7 @@ of the source file. References ========== -.. [1] http://bugs.python.org/issue1371075 +.. [1] https://github.com/python/cpython/issues/42649 Copyright diff --git a/pep-0453.txt b/pep-0453.txt index 9fcd6b9dd4a..2bfd7699a74 100644 --- a/pep-0453.txt +++ b/pep-0453.txt @@ -30,7 +30,7 @@ PEP Acceptance This PEP was accepted for inclusion in Python 3.4 by Martin von Löwis on Tuesday 22nd October, 2013. -`Issue 19347 `__ has been created to +`Issue 19347 `__ has been created to track the implementation of this PEP. diff --git a/pep-0462.txt b/pep-0462.txt index b7465130f16..0c2c7d77869 100644 --- a/pep-0462.txt +++ b/pep-0462.txt @@ -509,7 +509,7 @@ Our current approach to handling NEWS file updates regularly results in spurious conflicts when merging bug fixes forward from an active maintenance branch to a later branch. -`Issue #18967* `__ discusses some +`Issue #18967* `__ discusses some possible improvements in that area, which would be beneficial regardless of whether or not we adopt Zuul as a workflow automation tool.