Skip to content

Commit b93c20f

Browse files
srittauAA-Turner
andauthored
Change links from 'typing.readthedocs.io' to 'typing.python.org' (#4291)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
1 parent 62f7e19 commit b93c20f

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

pep_sphinx_extensions/pep_processor/parsing/pep_banner_directive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from docutils.parsers import rst
77

88
PYPA_SPEC_BASE_URL = "https://packaging.python.org/en/latest/specifications/"
9-
TYPING_SPEC_BASE_URL = "https://typing.readthedocs.io/en/latest/spec/"
9+
TYPING_SPEC_BASE_URL = "https://typing.python.org/en/latest/spec/"
1010

1111

1212
class PEPBanner(rst.Directive):
@@ -113,7 +113,7 @@ class CanonicalTypingSpecBanner(PEPBanner):
113113
admonition_pre_text = admonition_pre_template
114114
admonition_post_text = (
115115
"See the `typing specification update process "
116-
"<https://typing.readthedocs.io/en/latest/spec/meta.html>`__ "
116+
"<https://typing.python.org/en/latest/spec/meta.html>`__ "
117117
"for how to propose changes to the typing spec."
118118
)
119119
css_classes = ["canonical-typing-spec", "sticky-banner"]

peps/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"py3.14": ("https://docs.python.org/3.14/", None),
7676
"python": ("https://docs.python.org/3/", None),
7777
"trio": ("https://trio.readthedocs.io/en/latest/", None),
78-
"typing": ("https://typing.readthedocs.io/en/latest/", None),
78+
"typing": ("https://typing.python.org/en/latest/", None),
7979
}
8080
intersphinx_disabled_reftypes = []
8181

peps/pep-0012.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ You can use
656656
to other Sphinx sites,
657657
such as the `Python documentation <https://docs.python.org/>`_
658658
`packaging.python.org <https://packaging.python.org/>`_,
659-
and `typing.readthedocs.io <https://typing.readthedocs.io/>`_,
659+
and `typing.python.org <https://typing.python.org/>`_,
660660
to easily cross-reference pages, sections and Python/C objects.
661661

662662
For example,

peps/pep-0688.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ How to Teach This
349349
=================
350350

351351
We will add notes pointing to ``collections.abc.Buffer`` in appropriate places in the
352-
documentation, such as `typing.readthedocs.io <https://typing.readthedocs.io/en/latest/>`__
352+
documentation, such as `typing.python.org <https://typing.python.org/en/latest/>`__
353353
and the `mypy cheat sheet <https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html>`__.
354354
Type checkers may provide additional pointers in their error messages. For example,
355355
when they encounter a buffer object being passed to a function that

peps/pep-0692.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ This PEP could be linked in the ``typing`` module's documentation. Moreover, a
457457
new section on using ``Unpack`` could be added to the aforementioned docs.
458458
Similar sections could be also added to the
459459
`mypy documentation <https://mypy.readthedocs.io/>`_ and the
460-
`typing RTD documentation <https://typing.readthedocs.io/>`_.
460+
`typing documentation <https://typing.python.org/>`_.
461461

462462
Reference Implementation
463463
========================

peps/pep-0728.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ assignable to the ``extra_items`` argument.
160160
There are some advantages to this approach:
161161

162162
- We can build on top of the `assignability rules defined in the typing spec
163-
<https://typing.readthedocs.io/en/latest/spec/typeddict.html#assignability>`__,
163+
<https://typing.python.org/en/latest/spec/typeddict.html#assignability>`__,
164164
where ``extra_items`` can be treated as a pseudo-item.
165165

166166
- There is no need to introduce a grammar change to specify the type of the
@@ -182,7 +182,7 @@ If ``extra_items`` is specified, extra items are treated as :ref:`non-required
182182
<typing:required-notrequired>`
183183
items matching the ``extra_items`` argument, whose keys are allowed when
184184
determining `supported and unsupported operations
185-
<https://typing.readthedocs.io/en/latest/spec/typeddict.html#supported-and-unsupported-operations>`__.
185+
<https://typing.python.org/en/latest/spec/typeddict.html#supported-and-unsupported-operations>`__.
186186

187187
The ``extra_items`` Class Parameter
188188
-----------------------------------
@@ -306,9 +306,9 @@ It is an error to use ``Required[]`` or ``NotRequired[]`` with ``extra_items``.
306306
``total=False`` and ``total=True`` have no effect on ``extra_items`` itself.
307307

308308
The extra items are non-required, regardless of the `totality
309-
<https://typing.readthedocs.io/en/latest/spec/typeddict.html#totality>`__ of the
309+
<https://typing.python.org/en/latest/spec/typeddict.html#totality>`__ of the
310310
TypedDict. `Operations
311-
<https://typing.readthedocs.io/en/latest/spec/typeddict.html#supported-and-unsupported-operations>`__
311+
<https://typing.python.org/en/latest/spec/typeddict.html#supported-and-unsupported-operations>`__
312312
that are available to ``NotRequired`` items should also be available to the
313313
extra items::
314314

@@ -356,7 +356,7 @@ Inheritance
356356

357357
``extra_items`` is inherited in a similar way as a regular ``key: value_type``
358358
item. As with the other keys, the `inheritance rules
359-
<https://typing.readthedocs.io/en/latest/spec/typeddict.html#inheritance>`__
359+
<https://typing.python.org/en/latest/spec/typeddict.html#inheritance>`__
360360
and :ref:`Read-only Items <typing:readonly>` inheritance rules apply.
361361

362362
We need to reinterpret these rules to define how ``extra_items`` interacts with
@@ -594,7 +594,7 @@ are assignable to ``VT``. For the purpose of this rule, a
594594
TypedDict that does not have ``extra_items=`` or ``closed=`` set is considered
595595
to have an item with a value of type ``object``. This extends the current
596596
assignability rule from the `typing spec
597-
<https://typing.readthedocs.io/en/latest/spec/typeddict.html#assignability>`__.
597+
<https://typing.python.org/en/latest/spec/typeddict.html#assignability>`__.
598598

599599
For example::
600600

peps/pep-0729.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ documentation for normal usage.
367367

368368
Therefore, a separate user-facing reference for the type system would be
369369
useful. Such an effort could expand the documentation on
370-
`typing.readthedocs.io <https://typing.readthedocs.io/en/latest/>`_ and
370+
`typing.python.org <https://typing.python.org/en/latest/>`_ and
371371
reuse material from the documentation sections of individual type checkers
372372
and the CPython documentation.
373373

peps/pep-0767.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Those requirements are satisfiable at runtime by all of the following:
111111
* an object with a ``@property`` ``def name(self) -> T``,
112112
* an object with a custom descriptor, such as :func:`functools.cached_property`.
113113

114-
The current `typing spec <https://typing.readthedocs.io/en/latest/spec/protocol.html#protocol-members>`_
114+
The current `typing spec <https://typing.python.org/en/latest/spec/protocol.html#protocol-members>`_
115115
allows creation of such protocol members using (abstract) properties::
116116

117117
class HasName(Protocol):
@@ -554,11 +554,11 @@ following the footsteps of :pep:`705#how-to-teach-this`:
554554
a ``TypedDict`` as read-only.
555555

556556
* Add a standalone entry for ``ReadOnly`` under the
557-
`type qualifiers <https://typing.readthedocs.io/en/latest/spec/qualifiers.html>`_ section:
557+
`type qualifiers <https://typing.python.org/en/latest/spec/qualifiers.html>`_ section:
558558

559559
The ``ReadOnly`` type qualifier in class attribute annotations indicates
560560
that the attribute of the class may be read, but not reassigned or ``del``\ eted.
561-
For usage in ``TypedDict``, see `ReadOnly <https://typing.readthedocs.io/en/latest/spec/typeddict.html#typing-readonly-type-qualifier>`_.
561+
For usage in ``TypedDict``, see `ReadOnly <https://typing.python.org/en/latest/spec/typeddict.html#typing-readonly-type-qualifier>`_.
562562

563563

564564
Rejected Ideas
@@ -611,7 +611,7 @@ read-only attributes in such methods. It is unclear whether the rules could be
611611
satisfyingly shaped in a way that is inclusive of those 3rd party hooks, while
612612
upkeeping the invariants associated with the read-only-ness of those attributes.
613613

614-
The Python type system has a long and detailed `specification <https://typing.readthedocs.io/en/latest/spec/constructors.html>`_
614+
The Python type system has a long and detailed `specification <https://typing.python.org/en/latest/spec/constructors.html>`_
615615
regarding the behavior of ``__new__`` and ``__init__``. It is rather unfeasible
616616
to expect the same level of detail from 3rd party hooks.
617617

@@ -641,7 +641,7 @@ Footnotes
641641
`[Pyre] <https://pyre-check.org/play/?input=%23%20pyre-strict%0Afrom%20abc%20import%20abstractmethod%0Afrom%20functools%20import%20cached_property%0Afrom%20typing%20import%20ClassVar%2C%20Protocol%2C%20final%0A%0A%0Aclass%20HasFoo(Protocol)%3A%0A%20%20%20%20%40property%0A%20%20%20%20%40abstractmethod%0A%20%20%20%20def%20foo(self)%20-%3E%20int%3A%20...%0A%0A%0A%23%20assignability%0A%0A%0Aclass%20FooAttribute%3A%0A%20%20%20%20foo%3A%20int%0A%0Aclass%20FooProperty%3A%0A%20%20%20%20%40property%0A%20%20%20%20def%20foo(self)%20-%3E%20int%3A%20return%200%0A%0Aclass%20FooClassVar%3A%0A%20%20%20%20foo%3A%20ClassVar%5Bint%5D%20%3D%200%0A%0Aclass%20FooDescriptor%3A%0A%20%20%20%20%40cached_property%0A%20%20%20%20def%20foo(self)%20-%3E%20int%3A%20return%200%0A%0Aclass%20FooPropertyCovariant%3A%0A%20%20%20%20%40property%0A%20%20%20%20def%20foo(self)%20-%3E%20bool%3A%20return%20False%0A%0Aclass%20FooInvalid%3A%0A%20%20%20%20foo%3A%20str%0A%0Aclass%20NoFoo%3A%0A%20%20%20%20bar%3A%20str%0A%0A%0Aobj%3A%20HasFoo%0Aobj%20%3D%20FooAttribute()%20%20%23%20ok%0Aobj%20%3D%20FooProperty()%20%20%20%23%20ok%0Aobj%20%3D%20FooClassVar%20%20%20%20%20%23%20ok%0Aobj%20%3D%20FooClassVar()%20%20%20%23%20ok%0Aobj%20%3D%20FooDescriptor()%20%23%20ok%0Aobj%20%3D%20FooPropertyCovariant()%20%23%20ok%0Aobj%20%3D%20FooInvalid()%20%20%20%20%23%20err%0Aobj%20%3D%20NoFoo()%20%20%20%20%20%20%20%20%20%23%20err%0Aobj%20%3D%20None%20%20%20%20%20%20%20%20%20%20%20%20%23%20err%0A%0A%0A%23%20explicit%20impl%0A%0A%0Aclass%20FooAttributeImpl(HasFoo)%3A%0A%20%20%20%20foo%3A%20int%0A%0Aclass%20FooPropertyImpl(HasFoo)%3A%0A%20%20%20%20%40property%0A%20%20%20%20def%20foo(self)%20-%3E%20int%3A%20return%200%0A%0Aclass%20FooClassVarImpl(HasFoo)%3A%0A%20%20%20%20foo%3A%20ClassVar%5Bint%5D%20%3D%200%0A%0Aclass%20FooDescriptorImpl(HasFoo)%3A%0A%20%20%20%20%40cached_property%0A%20%20%20%20def%20foo(self)%20-%3E%20int%3A%20return%200%0A%0Aclass%20FooPropertyCovariantImpl(HasFoo)%3A%0A%20%20%20%20%40property%0A%20%20%20%20def%20foo(self)%20-%3E%20bool%3A%20return%20False%0A%0Aclass%20FooInvalidImpl(HasFoo)%3A%0A%20%20%20%20foo%3A%20str%0A%0A%40final%0Aclass%20NoFooImpl(HasFoo)%3A%0A%20%20%20%20bar%3A%20str%0A>`_
642642
643643
.. [#final_mutability]
644-
As noted above the second-to-last code example of https://typing.readthedocs.io/en/latest/spec/qualifiers.html#semantics-and-examples
644+
As noted above the second-to-last code example of https://typing.python.org/en/latest/spec/qualifiers.html#semantics-and-examples
645645
646646
647647
Copyright

0 commit comments

Comments
 (0)