From 0632c41766196b068e67197bba9d9f090e3c6397 Mon Sep 17 00:00:00 2001 From: "S.Lott" Date: Fri, 20 Nov 2026 19:58:12 -0700 Subject: [PATCH] Changes for issue #162341 All of these files had references to the old https://code.activestate.com. These have all be changed to refer to https://github.com/ActiveState/code --- Doc/builtins/stdtypes.rst | 2 +- Doc/faq/programming.rst | 2 +- Doc/howto/urllib2.rst | 2 +- Doc/library/bisect.rst | 4 ++-- Doc/library/collections.abc.rst | 2 +- Doc/library/collections.rst | 4 ++-- Doc/library/difflib.rst | 2 +- Doc/library/math.rst | 2 +- Doc/library/random.rst | 2 +- Doc/library/shelve.rst | 2 +- Doc/library/sys.rst | 2 +- Doc/whatsnew/3.2.rst | 4 ++-- Lib/collections/__init__.py | 2 +- Lib/heapq.py | 2 +- Lib/importlib/metadata/_functools.py | 2 +- Lib/test/test_math.py | 2 +- Modules/mathmodule.c | 2 +- Tools/peg_generator/pegen/sccutils.py | 2 +- 18 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Doc/builtins/stdtypes.rst b/Doc/builtins/stdtypes.rst index 7072f01e09aa250..f41bae72634906f 100644 --- a/Doc/builtins/stdtypes.rst +++ b/Doc/builtins/stdtypes.rst @@ -1903,7 +1903,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/faq/programming.rst b/Doc/faq/programming.rst index fe2e8587eb201b3..7ad7d26bc35a3fb 100644 --- a/Doc/faq/programming.rst +++ b/Doc/faq/programming.rst @@ -1206,7 +1206,7 @@ How do you remove duplicates from a list? See the Python Cookbook for a long discussion of many ways to do this: - https://code.activestate.com/recipes/52560/ + https://github.com/ActiveState/code/tree/master/recipes/Python/52560_Remove_duplicates/ If you don't mind reordering the list, sort it and then scan from the end of the list, deleting duplicates as you go:: diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst index e4f218f088ba89d..4d9a529a5d8c8cd 100644 --- a/Doc/howto/urllib2.rst +++ b/Doc/howto/urllib2.rst @@ -543,5 +543,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/bisect.rst b/Doc/library/bisect.rst index 39ab75c0904df9c..4ee1b88d24c2e8e 100644 --- a/Doc/library/bisect.rst +++ b/Doc/library/bisect.rst @@ -140,9 +140,9 @@ thoughts in mind: module that uses *bisect* to managed sorted collections of data. * The `SortedCollection recipe - `_ uses + `_ uses bisect to build a full-featured collection class with straight-forward search - methods and support for a key-function. The keys are precomputed to save + methods and support for a key function. The keys are precomputed to save unnecessary calls to the key function during searches. diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index ded557f54457e6d..9ff2017273ece25 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -465,7 +465,7 @@ Notes on using :class:`Set` and :class:`MutableSet` as a mixin: .. seealso:: - * `OrderedSet recipe `_ for an + * `OrderedSet recipe `_ for an example built on :class:`MutableSet`. * For more about ABCs, see the :mod:`abc` module and :pep:`3119`. diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 40f780c7d049d4e..462e8f5ea1eb729 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -131,12 +131,12 @@ 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 + `_ 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 - `_. + `_. :class:`ChainMap` Examples and Recipes diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index 583bf78d1649b60..9974496eeb6cbe2 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -755,7 +755,7 @@ If you want to know how to change the first sequence into the second, use work. * `Simple version control recipe - `_ for a small application + `_ for a small application built with :class:`SequenceMatcher`. diff --git a/Doc/library/math.rst b/Doc/library/math.rst index d601e2b923963ce..f6e715ec1d44d08 100644 --- a/Doc/library/math.rst +++ b/Doc/library/math.rst @@ -533,7 +533,7 @@ Summation and product functions For further discussion and two alternative approaches, see the `ASPN cookbook recipes for accurate floating-point summation - `_\. + `_\. .. function:: hypot(*coordinates) diff --git a/Doc/library/random.rst b/Doc/library/random.rst index 35795cde95d56ff..72ac399b69439f8 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -55,7 +55,7 @@ from sources provided by the operating system. `Complementary-Multiply-with-Carry recipe - `_ for a compatible alternative + `_ for a compatible alternative random number generator with a long period and comparatively simple update operations. diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst index bd3d56f6af595ab..e2fc365e0ea4c4c 100644 --- a/Doc/library/shelve.rst +++ b/Doc/library/shelve.rst @@ -113,7 +113,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/sys.rst b/Doc/library/sys.rst index c3485204fb8b4b9..669173c05a2c4fd 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -1018,7 +1018,7 @@ always available. Unless explicitly noted otherwise, all variables are read-only 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 f826be205e4e324..26cc4bd3ec26ef8 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -785,8 +785,8 @@ 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 + `_\, `recipe 577479 + `_\, :issue:`10586`, and :issue:`10593`.) * The :deco:`functools.wraps` decorator now adds a :attr:`__wrapped__` attribute diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 2239787dd6b51aa..adfac50fc7cbe6c 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -599,7 +599,7 @@ class Counter(dict): # http://en.wikipedia.org/wiki/Multiset # http://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html # http://www.java2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm - # http://code.activestate.com/recipes/259174/ + # https://github.com/ActiveState/code/tree/master/recipes/Python/259174_bag_collection_class/ # Knuth, TAOCP Vol. II section 4.6.3 def __init__(self, iterable=None, /, **kwds): diff --git a/Lib/heapq.py b/Lib/heapq.py index a3af6dc05bff377..43b33c79a2a07c1 100644 --- a/Lib/heapq.py +++ b/Lib/heapq.py @@ -472,7 +472,7 @@ def merge(*iterables, key=None, reverse=False): # 2) Made multiple passes over the data. # 3) Made more comparisons in common cases (small k, large n, semi-random input). # See the more detailed comparison of approach at: -# http://code.activestate.com/recipes/577573-compare-algorithms-for-heapqsmallest +# https://github.com/ActiveState/code/tree/master/recipes/Python/577573_Compare_algorithms/ def nsmallest(n, iterable, key=None): """Find the n smallest elements in a dataset. diff --git a/Lib/importlib/metadata/_functools.py b/Lib/importlib/metadata/_functools.py index c159b46e48959cd..e145a7dc42538b8 100644 --- a/Lib/importlib/metadata/_functools.py +++ b/Lib/importlib/metadata/_functools.py @@ -69,7 +69,7 @@ def method_cache(method, cache_wrapper=None): as ``@property``, which changes the semantics of the function. See also - http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/ + https://github.com/ActiveState/code/tree/master/recipes/Python/577452_memoize_decorator_instance/ for another implementation and additional justification. """ cache_wrapper = cache_wrapper or functools.lru_cache() diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index a1250c668223e7f..6a930a6aab3b3a2 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -699,7 +699,7 @@ 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/ + at https://github.com/ActiveState/code/tree/master/recipes/Python/393090_Binary_floating_point_summatiaccurate_full/ """ tmant, texp = 0, 0 diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 7b8348d25e5d97f..75d85622533c717 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -1349,7 +1349,7 @@ FUNC1D(tanpi, m_tanpi, 0, "expected a finite input not equal to a half-integer, got %s") /* 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 db30fc283465b88..fc754d6a76eeab7 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 https://code.activestate.com/recipes/578507-strongly-connected-components-of-a-directed-graph/. + From https://github.com/ActiveState/code/tree/master/recipes/Python/578507_Strongly_connected_components_directed/. """ identified: set[str] = set() stack: list[str] = []