Skip to content

Commit f404d81

Browse files
committed
Deploying to gh-pages from @ ef59955 🚀
1 parent 63c57b7 commit f404d81

File tree

595 files changed

+12697
-8446
lines changed

Some content is hidden

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

595 files changed

+12697
-8446
lines changed

.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 1a87dec31120f53897cc46aa07396dae
3+
config: bd9c877a5642f8eb5810ee3ef392ecac
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

_sources/c-api/bytearray.rst.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,22 @@ Direct API functions
4242
Return a new bytearray object from any object, *o*, that implements the
4343
:ref:`buffer protocol <bufferobjects>`.
4444
45+
On failure, return ``NULL`` with an exception set.
46+
4547
4648
.. c:function:: PyObject* PyByteArray_FromStringAndSize(const char *string, Py_ssize_t len)
4749
48-
Create a new bytearray object from *string* and its length, *len*. On
49-
failure, ``NULL`` is returned.
50+
Create a new bytearray object from *string* and its length, *len*.
51+
52+
On failure, return ``NULL`` with an exception set.
5053
5154
5255
.. c:function:: PyObject* PyByteArray_Concat(PyObject *a, PyObject *b)
5356
5457
Concat bytearrays *a* and *b* and return a new bytearray with the result.
5558
59+
On failure, return ``NULL`` with an exception set.
60+
5661
5762
.. c:function:: Py_ssize_t PyByteArray_Size(PyObject *bytearray)
5863

_sources/c-api/init_config.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ PyConfig
499499
The :c:func:`PyConfig_Read` function only parses
500500
:c:member:`PyConfig.argv` arguments once: :c:member:`PyConfig.parse_argv`
501501
is set to ``2`` after arguments are parsed. Since Python arguments are
502-
strippped from :c:member:`PyConfig.argv`, parsing arguments twice would
502+
stripped from :c:member:`PyConfig.argv`, parsing arguments twice would
503503
parse the application options as Python options.
504504
505505
:ref:`Preinitialize Python <c-preinit>` if needed.
@@ -1000,7 +1000,7 @@ PyConfig
10001000
The :c:func:`PyConfig_Read` function only parses
10011001
:c:member:`PyConfig.argv` arguments once: :c:member:`PyConfig.parse_argv`
10021002
is set to ``2`` after arguments are parsed. Since Python arguments are
1003-
strippped from :c:member:`PyConfig.argv`, parsing arguments twice would
1003+
stripped from :c:member:`PyConfig.argv`, parsing arguments twice would
10041004
parse the application options as Python options.
10051005
10061006
Default: ``1`` in Python mode, ``0`` in isolated mode.

_sources/c-api/long.rst.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,17 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
324324
Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate.
325325
326326
327+
.. c:function:: PyObject* PyLong_GetInfo(void)
328+
329+
On success, return a read only :term:`named tuple`, that holds
330+
information about Python's internal representation of integers.
331+
See :data:`sys.int_info` for description of individual fields.
332+
333+
On failure, return ``NULL`` with an exception set.
334+
335+
.. versionadded:: 3.1
336+
337+
327338
.. c:function:: int PyUnstable_Long_IsCompact(const PyLongObject* op)
328339
329340
Return 1 if *op* is compact, 0 otherwise.

_sources/contents.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
installing/index.rst
1515
howto/index.rst
1616
faq/index.rst
17+
deprecations/index.rst
1718
glossary.rst
1819

1920
about.rst
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Pending Removal in Python 3.14
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
* The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules
5+
(:pep:`699`; :gh:`101193`).
6+
7+
* Creating :c:data:`immutable types <Py_TPFLAGS_IMMUTABLETYPE>` with mutable
8+
bases (:gh:`95388`).
9+
10+
* Functions to configure Python's initialization, deprecated in Python 3.11:
11+
12+
* ``PySys_SetArgvEx()``: set :c:member:`PyConfig.argv` instead.
13+
* ``PySys_SetArgv()``: set :c:member:`PyConfig.argv` instead.
14+
* ``Py_SetProgramName()``: set :c:member:`PyConfig.program_name` instead.
15+
* ``Py_SetPythonHome()``: set :c:member:`PyConfig.home` instead.
16+
17+
The :c:func:`Py_InitializeFromConfig` API should be used with
18+
:c:type:`PyConfig` instead.
19+
20+
* Global configuration variables:
21+
22+
* :c:var:`Py_DebugFlag`: use :c:member:`PyConfig.parser_debug` instead.
23+
* :c:var:`Py_VerboseFlag`: use :c:member:`PyConfig.verbose` instead.
24+
* :c:var:`Py_QuietFlag`: use :c:member:`PyConfig.quiet` instead.
25+
* :c:var:`Py_InteractiveFlag`: use :c:member:`PyConfig.interactive` instead.
26+
* :c:var:`Py_InspectFlag`: use :c:member:`PyConfig.inspect` instead.
27+
* :c:var:`Py_OptimizeFlag`: use :c:member:`PyConfig.optimization_level` instead.
28+
* :c:var:`Py_NoSiteFlag`: use :c:member:`PyConfig.site_import` instead.
29+
* :c:var:`Py_BytesWarningFlag`: use :c:member:`PyConfig.bytes_warning` instead.
30+
* :c:var:`Py_FrozenFlag`: use :c:member:`PyConfig.pathconfig_warnings` instead.
31+
* :c:var:`Py_IgnoreEnvironmentFlag`: use :c:member:`PyConfig.use_environment` instead.
32+
* :c:var:`Py_DontWriteBytecodeFlag`: use :c:member:`PyConfig.write_bytecode` instead.
33+
* :c:var:`Py_NoUserSiteDirectory`: use :c:member:`PyConfig.user_site_directory` instead.
34+
* :c:var:`Py_UnbufferedStdioFlag`: use :c:member:`PyConfig.buffered_stdio` instead.
35+
* :c:var:`Py_HashRandomizationFlag`: use :c:member:`PyConfig.use_hash_seed`
36+
and :c:member:`PyConfig.hash_seed` instead.
37+
* :c:var:`Py_IsolatedFlag`: use :c:member:`PyConfig.isolated` instead.
38+
* :c:var:`Py_LegacyWindowsFSEncodingFlag`: use :c:member:`PyPreConfig.legacy_windows_fs_encoding` instead.
39+
* :c:var:`Py_LegacyWindowsStdioFlag`: use :c:member:`PyConfig.legacy_windows_stdio` instead.
40+
* :c:var:`!Py_FileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding` instead.
41+
* :c:var:`!Py_HasFileSystemDefaultEncoding`: use :c:member:`PyConfig.filesystem_encoding` instead.
42+
* :c:var:`!Py_FileSystemDefaultEncodeErrors`: use :c:member:`PyConfig.filesystem_errors` instead.
43+
* :c:var:`!Py_UTF8Mode`: use :c:member:`PyPreConfig.utf8_mode` instead. (see :c:func:`Py_PreInitialize`)
44+
45+
The :c:func:`Py_InitializeFromConfig` API should be used with
46+
:c:type:`PyConfig` instead.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Pending Removal in Python 3.15
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
* The bundled copy of ``libmpdecimal``.
5+
* :c:func:`PyImport_ImportModuleNoBlock`: use :c:func:`PyImport_ImportModule` instead.
6+
* :c:func:`PyWeakref_GET_OBJECT`: use :c:func:`!PyWeakref_GetRef` instead.
7+
* :c:func:`PyWeakref_GetObject`: use :c:func:`!PyWeakref_GetRef` instead.
8+
* :c:type:`!Py_UNICODE_WIDE` type: use :c:type:`wchar_t` instead.
9+
* :c:type:`Py_UNICODE` type: use :c:type:`wchar_t` instead.
10+
* Python initialization functions:
11+
12+
* :c:func:`PySys_ResetWarnOptions`: clear :data:`sys.warnoptions` and
13+
:data:`!warnings.filters` instead.
14+
* :c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix` instead.
15+
* :c:func:`Py_GetPath`: get :data:`sys.path` instead.
16+
* :c:func:`Py_GetPrefix`: get :data:`sys.prefix` instead.
17+
* :c:func:`Py_GetProgramFullPath`: get :data:`sys.executable` instead.
18+
* :c:func:`Py_GetProgramName`: get :data:`sys.executable` instead.
19+
* :c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or
20+
the :envvar:`PYTHONHOME` environment variable instead.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Pending Removal in Future Versions
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
The following APIs are deprecated and will be removed,
5+
although there is currently no date scheduled for their removal.
6+
7+
* :c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: unneeded since Python 3.8.
8+
* :c:func:`PyErr_Fetch`: use :c:func:`PyErr_GetRaisedException` instead.
9+
* :c:func:`PyErr_NormalizeException`: use :c:func:`PyErr_GetRaisedException` instead.
10+
* :c:func:`PyErr_Restore`: use :c:func:`PyErr_SetRaisedException` instead.
11+
* :c:func:`PyModule_GetFilename`: use :c:func:`PyModule_GetFilenameObject` instead.
12+
* :c:func:`PyOS_AfterFork`: use :c:func:`PyOS_AfterFork_Child` instead.
13+
* :c:func:`PySlice_GetIndicesEx`: use :c:func:`PySlice_Unpack` and :c:func:`PySlice_AdjustIndices` instead.
14+
* :c:func:`!PyUnicode_AsDecodedObject`: use :c:func:`PyCodec_Decode` instead.
15+
* :c:func:`!PyUnicode_AsDecodedUnicode`: use :c:func:`PyCodec_Decode` instead.
16+
* :c:func:`!PyUnicode_AsEncodedObject`: use :c:func:`PyCodec_Encode` instead.
17+
* :c:func:`!PyUnicode_AsEncodedUnicode`: use :c:func:`PyCodec_Encode` instead.
18+
* :c:func:`PyUnicode_READY`: unneeded since Python 3.12
19+
* :c:func:`!PyErr_Display`: use :c:func:`PyErr_DisplayException` instead.
20+
* :c:func:`!_PyErr_ChainExceptions`: use ``_PyErr_ChainExceptions1`` instead.
21+
* :c:member:`!PyBytesObject.ob_shash` member:
22+
call :c:func:`PyObject_Hash` instead.
23+
* :c:member:`!PyDictObject.ma_version_tag` member.
24+
* Thread Local Storage (TLS) API:
25+
26+
* :c:func:`PyThread_create_key`: use :c:func:`PyThread_tss_alloc` instead.
27+
* :c:func:`PyThread_delete_key`: use :c:func:`PyThread_tss_free` instead.
28+
* :c:func:`PyThread_set_key_value`: use :c:func:`PyThread_tss_set` instead.
29+
* :c:func:`PyThread_get_key_value`: use :c:func:`PyThread_tss_get` instead.
30+
* :c:func:`PyThread_delete_key_value`: use :c:func:`PyThread_tss_delete` instead.
31+
* :c:func:`PyThread_ReInitTLS`: unneeded since Python 3.7.

_sources/deprecations/index.rst.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Deprecations
2+
============
3+
4+
.. include:: pending-removal-in-3.13.rst
5+
6+
.. include:: pending-removal-in-3.14.rst
7+
8+
.. include:: pending-removal-in-3.15.rst
9+
10+
.. include:: pending-removal-in-3.16.rst
11+
12+
.. include:: pending-removal-in-future.rst
13+
14+
C API Deprecations
15+
------------------
16+
17+
.. include:: c-api-pending-removal-in-3.14.rst
18+
19+
.. include:: c-api-pending-removal-in-3.15.rst
20+
21+
.. include:: c-api-pending-removal-in-future.rst
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Pending Removal in Python 3.13
2+
------------------------------
3+
4+
Modules (see :pep:`594`):
5+
6+
* :mod:`aifc`
7+
* :mod:`audioop`
8+
* :mod:`cgi`
9+
* :mod:`cgitb`
10+
* :mod:`chunk`
11+
* :mod:`crypt`
12+
* :mod:`imghdr`
13+
* :mod:`mailcap`
14+
* :mod:`msilib`
15+
* :mod:`nis`
16+
* :mod:`nntplib`
17+
* :mod:`ossaudiodev`
18+
* :mod:`pipes`
19+
* :mod:`sndhdr`
20+
* :mod:`spwd`
21+
* :mod:`sunau`
22+
* :mod:`telnetlib`
23+
* :mod:`uu`
24+
* :mod:`xdrlib`
25+
26+
Other modules:
27+
28+
* :mod:`!lib2to3`, and the :program:`2to3` program (:gh:`84540`)
29+
30+
APIs:
31+
32+
* :class:`!configparser.LegacyInterpolation` (:gh:`90765`)
33+
* ``locale.resetlocale()`` (:gh:`90817`)
34+
* :meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)
35+
* :func:`!unittest.findTestCases` (:gh:`50096`)
36+
* :func:`!unittest.getTestCaseNames` (:gh:`50096`)
37+
* :func:`!unittest.makeSuite` (:gh:`50096`)
38+
* :meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)
39+
* :class:`!webbrowser.MacOSX` (:gh:`86421`)
40+
* :class:`classmethod` descriptor chaining (:gh:`89519`)
41+
* :mod:`importlib.resources` deprecated methods:
42+
43+
* ``contents()``
44+
* ``is_resource()``
45+
* ``open_binary()``
46+
* ``open_text()``
47+
* ``path()``
48+
* ``read_binary()``
49+
* ``read_text()``
50+
51+
Use :func:`importlib.resources.files()` instead. Refer to `importlib-resources: Migrating from Legacy
52+
<https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy>`_ (:gh:`106531`)

0 commit comments

Comments
 (0)