From 13806b257ee1ca539f694451e5d44b6a5008380e Mon Sep 17 00:00:00 2001 From: trag1c Date: Tue, 7 May 2024 19:07:04 +0200 Subject: [PATCH 1/4] Updated dead ActiveState links --- Doc/howto/urllib2.rst | 2 +- Doc/library/collections.rst | 6 +++--- Doc/library/difflib.rst | 4 ++-- Doc/library/math.rst | 2 +- Doc/library/random.rst | 6 +++--- Doc/library/shelve.rst | 2 +- Doc/library/stdtypes.rst | 3 ++- Doc/library/sys.rst | 3 ++- Doc/whatsnew/3.2.rst | 7 ++++--- Lib/test/test_math.py | 4 ++-- Modules/mathmodule.c | 2 +- Tools/peg_generator/pegen/sccutils.py | 4 ++-- 12 files changed, 24 insertions(+), 21 deletions(-) diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst index 7f54a410881514..33a2a7ea89ea07 100644 --- a/Doc/howto/urllib2.rst +++ b/Doc/howto/urllib2.rst @@ -594,5 +594,5 @@ This document was reviewed and revised by John Lee. scripts with a localhost server, I have to prevent urllib from using the proxy. .. [#] urllib opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe - `_. + `_. diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index f868799e7f5c10..eed8156f12b17a 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -134,9 +134,9 @@ The class can be used to simulate nested scopes and is useful in templating. :attr:`~collections.ChainMap.parents` property. * The `Nested Contexts recipe - `_ has options to control - whether writes and other mutations apply only to the first mapping or to - any mapping in the chain. + `_ + has options to control whether writes and other mutations apply only to the + first mapping or to any mapping in the chain. * A `greatly simplified read-only version of Chainmap `_. diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index d45e46448207a4..640df7f737b3ab 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -631,8 +631,8 @@ If you want to know how to change the first sequence into the second, use work. * `Simple version control recipe - `_ for a small application - built with :class:`SequenceMatcher`. + `_ + for a small application built with :class:`SequenceMatcher`. .. _differ-objects: diff --git a/Doc/library/math.rst b/Doc/library/math.rst index 1475d26486de5f..ab9236cc7cfb81 100644 --- a/Doc/library/math.rst +++ b/Doc/library/math.rst @@ -134,7 +134,7 @@ Number-theoretic and representation functions For further discussion and two alternative approaches, see the `ASPN cookbook recipes for accurate floating point summation - `_\. + `_\. .. function:: gcd(*integers) diff --git a/Doc/library/random.rst b/Doc/library/random.rst index 4584bbc40aa07b..483620f2d032eb 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -55,9 +55,9 @@ from sources provided by the operating system. `Complementary-Multiply-with-Carry recipe - `_ for a compatible alternative - random number generator with a long period and comparatively simple update - operations. + `_ + for a compatible alternative random number generator with a long period and + comparatively simple update operations. .. note:: The global random number generator and instances of :class:`Random` are thread-safe. diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst index 95c54991887022..1fa614f6584170 100644 --- a/Doc/library/shelve.rst +++ b/Doc/library/shelve.rst @@ -86,7 +86,7 @@ Two additional methods are supported: .. seealso:: - `Persistent dictionary recipe `_ + `Persistent dictionary recipe `_ with widely supported storage formats and having the speed of native dictionaries. diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 6c13bd015d5691..eecc4412e40d57 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1496,7 +1496,8 @@ objects that compare equal might have different :attr:`~range.start`, .. seealso:: - * The `linspace recipe `_ + * The `linspace recipe + `_ shows how to implement a lazy version of range suitable for floating point applications. diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 91afa9d58e87e6..6d6f0bbffc1f82 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -877,7 +877,8 @@ always available. additional garbage collector overhead if the object is managed by the garbage collector. - See `recursive sizeof recipe `_ + See `recursive sizeof recipe + `_ for an example of using :func:`getsizeof` recursively to find the size of containers and all their contents. diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index 52474517f5facc..bd349a4dd73dc6 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -785,9 +785,10 @@ functools (Contributed by Raymond Hettinger and incorporating design ideas from Jim Baker, Miki Tebeka, and Nick Coghlan; see `recipe 498245 - `_\, `recipe 577479 - `_\, :issue:`10586`, and - :issue:`10593`.) + `_\, + `recipe 577479 + `_\, + :issue:`10586`, and :issue:`10593`.) * The :func:`functools.wraps` decorator now adds a :attr:`__wrapped__` attribute pointing to the original callable function. This allows wrapped functions to diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index 0e4dbc0b64a439..81f35eddb4ee18 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -656,8 +656,8 @@ def testFsum(self): def msum(iterable): """Full precision summation. Compute sum(iterable) without any - intermediate accumulation of error. Based on the 'lsum' function - at http://code.activestate.com/recipes/393090/ + intermediate accumulation of error. Based on the 'lsum' function at + https://code.activestate.com/recipes/393090-binary-floating-point-summation-accurate-to-full-p/ """ tmant, texp = 0, 0 diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index a3cbfc383761a0..a79694730a8e4e 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -1253,7 +1253,7 @@ FUNC1(tanh, tanh, 0, "Return the hyperbolic tangent of x.") /* Precision summation function as msum() by Raymond Hettinger in - , + , enhanced with the exact partials sum and roundoff from Mark Dickinson's post at . See those links for more details, proofs and other references. diff --git a/Tools/peg_generator/pegen/sccutils.py b/Tools/peg_generator/pegen/sccutils.py index 1f0586bb2f7d6d..da4c9331625dd9 100644 --- a/Tools/peg_generator/pegen/sccutils.py +++ b/Tools/peg_generator/pegen/sccutils.py @@ -18,7 +18,7 @@ def strongly_connected_components( exactly once; vertices not part of a SCC are returned as singleton sets. - From http://code.activestate.com/recipes/578507/. + From https://code.activestate.com/recipes/578507-strongly-connected-components-of-a-directed-graph/. """ identified: Set[str] = set() stack: List[str] = [] @@ -81,7 +81,7 @@ def topsort( {B, C} {A} - From http://code.activestate.com/recipes/577413/. + From https://code.activestate.com/recipes/577413-topological-sort/history/1/. """ # TODO: Use a faster algorithm? for k, v in data.items(): From 9ff694e678e880168d56167bf16390acbadf5b7e Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 18:29:23 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Documentation/2024-05-07-18-29-22.gh-issue-118671.xEvJIc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Documentation/2024-05-07-18-29-22.gh-issue-118671.xEvJIc.rst diff --git a/Misc/NEWS.d/next/Documentation/2024-05-07-18-29-22.gh-issue-118671.xEvJIc.rst b/Misc/NEWS.d/next/Documentation/2024-05-07-18-29-22.gh-issue-118671.xEvJIc.rst new file mode 100644 index 00000000000000..c258e72c83f653 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2024-05-07-18-29-22.gh-issue-118671.xEvJIc.rst @@ -0,0 +1 @@ +Updated dead ActiveState links. From 58c349a932493fb9b609ef02530951d14a9864ab Mon Sep 17 00:00:00 2001 From: trag1c Date: Tue, 7 May 2024 20:31:50 +0200 Subject: [PATCH 3/4] Removed NEWS entry --- .../Documentation/2024-05-07-18-29-22.gh-issue-118671.xEvJIc.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2024-05-07-18-29-22.gh-issue-118671.xEvJIc.rst diff --git a/Misc/NEWS.d/next/Documentation/2024-05-07-18-29-22.gh-issue-118671.xEvJIc.rst b/Misc/NEWS.d/next/Documentation/2024-05-07-18-29-22.gh-issue-118671.xEvJIc.rst deleted file mode 100644 index c258e72c83f653..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2024-05-07-18-29-22.gh-issue-118671.xEvJIc.rst +++ /dev/null @@ -1 +0,0 @@ -Updated dead ActiveState links. From becc7c956fb1f782da9e6376b18c1e55758c27f5 Mon Sep 17 00:00:00 2001 From: trag1c Date: Tue, 7 May 2024 22:32:46 +0200 Subject: [PATCH 4/4] Reverted some wrappings to simplify diff --- Doc/library/collections.rst | 6 +++--- Doc/library/difflib.rst | 4 ++-- Doc/library/random.rst | 6 +++--- Doc/library/stdtypes.rst | 3 +-- Doc/library/sys.rst | 3 +-- Doc/whatsnew/3.2.rst | 7 +++---- Lib/test/test_math.py | 4 ++-- 7 files changed, 15 insertions(+), 18 deletions(-) diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index eed8156f12b17a..19b89ad79c7414 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -134,9 +134,9 @@ The class can be used to simulate nested scopes and is useful in templating. :attr:`~collections.ChainMap.parents` property. * The `Nested Contexts recipe - `_ - has options to control whether writes and other mutations apply only to the - first mapping or to any mapping in the chain. + `_ has options to control + whether writes and other mutations apply only to the first mapping or to + any mapping in the chain. * A `greatly simplified read-only version of Chainmap `_. diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index 640df7f737b3ab..6a34f2e4d7f5e1 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -631,8 +631,8 @@ If you want to know how to change the first sequence into the second, use work. * `Simple version control recipe - `_ - for a small application built with :class:`SequenceMatcher`. + `_ for a small application + built with :class:`SequenceMatcher`. .. _differ-objects: diff --git a/Doc/library/random.rst b/Doc/library/random.rst index 483620f2d032eb..22a799c706b7e2 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -55,9 +55,9 @@ from sources provided by the operating system. `Complementary-Multiply-with-Carry recipe - `_ - for a compatible alternative random number generator with a long period and - comparatively simple update operations. + `_ for a compatible alternative + random number generator with a long period and comparatively simple update + operations. .. note:: The global random number generator and instances of :class:`Random` are thread-safe. diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index eecc4412e40d57..8f5f9ee519a573 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1496,8 +1496,7 @@ objects that compare equal might have different :attr:`~range.start`, .. seealso:: - * The `linspace recipe - `_ + * The `linspace recipe `_ shows how to implement a lazy version of range suitable for floating point applications. diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 6d6f0bbffc1f82..19a396d2300011 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -877,8 +877,7 @@ always available. additional garbage collector overhead if the object is managed by the garbage collector. - See `recursive sizeof recipe - `_ + See `recursive sizeof recipe `_ for an example of using :func:`getsizeof` recursively to find the size of containers and all their contents. diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index bd349a4dd73dc6..a6b38207b70c93 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -785,10 +785,9 @@ functools (Contributed by Raymond Hettinger and incorporating design ideas from Jim Baker, Miki Tebeka, and Nick Coghlan; see `recipe 498245 - `_\, - `recipe 577479 - `_\, - :issue:`10586`, and :issue:`10593`.) + `_\, `recipe 577479 + `_\, :issue:`10586`, and + :issue:`10593`.) * The :func:`functools.wraps` decorator now adds a :attr:`__wrapped__` attribute pointing to the original callable function. This allows wrapped functions to diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index 81f35eddb4ee18..b68c442013c09f 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -656,8 +656,8 @@ def testFsum(self): def msum(iterable): """Full precision summation. Compute sum(iterable) without any - intermediate accumulation of error. Based on the 'lsum' function at - https://code.activestate.com/recipes/393090-binary-floating-point-summation-accurate-to-full-p/ + intermediate accumulation of error. Based on the 'lsum' function + at https://code.activestate.com/recipes/393090-binary-floating-point-summation-accurate-to-full-p/ """ tmant, texp = 0, 0