Skip to content

Commit 7474d24

Browse files
Deploy preview for PR 1231 🛫
1 parent 9490fca commit 7474d24

588 files changed

Lines changed: 6146 additions & 6105 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pr-preview/pr-1231/_sources/deprecations/pending-removal-in-3.15.rst.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,6 @@ Pending removal in Python 3.15
3333

3434
* ``load_module()`` method: use ``exec_module()`` instead.
3535

36-
* :class:`locale`:
37-
38-
* The :func:`~locale.getdefaultlocale` function
39-
has been deprecated since Python 3.11.
40-
Its removal was originally planned for Python 3.13 (:gh:`90817`),
41-
but has been postponed to Python 3.15.
42-
Use :func:`~locale.getlocale`, :func:`~locale.setlocale`,
43-
and :func:`~locale.getencoding` instead.
44-
(Contributed by Hugo van Kemenade in :gh:`111187`.)
45-
4636
* :mod:`pathlib`:
4737

4838
* :meth:`.PurePath.is_reserved`

pr-preview/pr-1231/_sources/library/dataclasses.rst.txt

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,25 @@ Module contents
103103
ignored.
104104

105105
- *eq*: If true (the default), an :meth:`~object.__eq__` method will be
106-
generated. This method compares the class as if it were a tuple
107-
of its fields, in order. Both instances in the comparison must
108-
be of the identical type.
106+
generated.
109107

110-
If the class already defines :meth:`!__eq__`, this parameter is
111-
ignored.
108+
This method compares the class by comparing each field in order. Both
109+
instances in the comparison must be of the identical type.
110+
111+
If the class already defines :meth:`!__eq__`, this parameter is ignored.
112+
113+
.. versionchanged:: 3.13
114+
The generated ``__eq__`` method now compares each field individually
115+
(for example, ``self.a == other.a and self.b == other.b``), rather than
116+
comparing tuples of fields as in previous versions.
117+
118+
This change makes the comparison faster but it may alter results in cases
119+
where attributes compare equal by identity but not by value (such as
120+
``float('nan')``).
121+
122+
In Python 3.12 and earlier, the comparison was performed by creating
123+
tuples of the fields and comparing them (for example,
124+
``(self.a, self.b) == (other.a, other.b)``).
112125

113126
- *order*: If true (the default is ``False``), :meth:`~object.__lt__`,
114127
:meth:`~object.__le__`, :meth:`~object.__gt__`, and :meth:`~object.__ge__` methods will be

pr-preview/pr-1231/_sources/library/locale.rst.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,6 @@ The :mod:`!locale` module defines the following exception and functions:
367367
determined.
368368
The "C" locale is represented as ``(None, None)``.
369369

370-
.. deprecated-removed:: 3.11 3.15
371-
372370

373371
.. function:: getlocale(category=LC_CTYPE)
374372

pr-preview/pr-1231/_sources/library/stdtypes.rst.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5870,6 +5870,15 @@ creation::
58705870
>>> type(l)
58715871
<class 'list'>
58725872

5873+
5874+
Instances of ``GenericAlias`` are not classes at runtime, even though they behave like classes (they can be instantiated and subclassed)::
5875+
5876+
>>> import inspect
5877+
>>> inspect.isclass(list[int])
5878+
False
5879+
5880+
This is true for :ref:`user-defined generics <user-defined-generics>` also.
5881+
58735882
Calling :func:`repr` or :func:`str` on a generic shows the parameterized type::
58745883

58755884
>>> repr(list[int])

pr-preview/pr-1231/_sources/library/unittest.mock.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2224,7 +2224,7 @@ return something else::
22242224
>>> mock == 3
22252225
True
22262226

2227-
The return value of :meth:`MagicMock.__iter__` can be any iterable object and isn't
2227+
The return value of :meth:`!__iter__` can be any iterable object and isn't
22282228
required to be an iterator:
22292229

22302230
>>> mock = MagicMock()

pr-preview/pr-1231/_sources/tutorial/venv.rst.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ For example:
8888
'~/envs/tutorial-env/lib/python3.5/site-packages']
8989
>>>
9090
91+
Note that the activated virtual environment does not alter the ``PYTHONPATH`` variable in any way.
92+
This may lead to unexpected results if the path includes references to code which is incompatible with
93+
the Python version the virtual environment is using. The best practice is to ``unset PYTHONPATH``
94+
in bash or the equivalent for the shell you are using.
95+
9196
To deactivate a virtual environment, type::
9297

9398
deactivate

pr-preview/pr-1231/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ <h3>導航</h3>
356356
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
357357
<br>
358358
<br>
359-
最後更新於 6月 11, 2026 (00:49 UTC)。
359+
最後更新於 6月 12, 2026 (00:51 UTC)。
360360

361361
<a href="/bugs.html">發現 bug</a>
362362

pr-preview/pr-1231/bugs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ <h3>導航</h3>
393393
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
394394
<br>
395395
<br>
396-
最後更新於 6月 11, 2026 (00:49 UTC)。
396+
最後更新於 6月 12, 2026 (00:51 UTC)。
397397

398398
<a href="/bugs.html">發現 bug</a>
399399

pr-preview/pr-1231/c-api/abstract.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ <h3>導航</h3>
365365
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
366366
<br>
367367
<br>
368-
最後更新於 6月 11, 2026 (00:49 UTC)。
368+
最後更新於 6月 12, 2026 (00:51 UTC)。
369369

370370
<a href="/bugs.html">發現 bug</a>
371371

pr-preview/pr-1231/c-api/allocation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ <h3>導航</h3>
577577
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
578578
<br>
579579
<br>
580-
最後更新於 6月 11, 2026 (00:49 UTC)。
580+
最後更新於 6月 12, 2026 (00:51 UTC)。
581581

582582
<a href="/bugs.html">發現 bug</a>
583583

0 commit comments

Comments
 (0)