Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/c-api/slots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Definition slots

To define :ref:`module objects <moduleobjects>` and
:ref:`classes <creating-heap-types>` using the C API, you may use
an array of *slots* -- essentally, key-value pairs that describe features
an array of *slots* -- essentially, key-value pairs that describe features
of the object to create.
This decouples the data from the structures used at runtime, allowing CPython
-- and other Python C API implementations -- to update the stuctures without
-- and other Python C API implementations -- to update the structures without
breaking backwards compatibility.

This section documents slots in general.
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/synchronization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ are not available.
.. c:function:: void PyCriticalSection_BeginMutex(PyCriticalSection *c, PyMutex *m);
void PyCriticalSection2_BeginMutex(PyCriticalSection2 *c, PyMutex *m1, PyMutex *m2);

.. (These need to be in a separate section without a Stable ABI anotation.)
.. (These need to be in a separate section without a Stable ABI annotation.)

To be used only as in the macro expansions
listed :ref:`earlier in this section <critical-section-macros>`.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Basic Usage
a string (such as ``"\t"``) is used to indent each level.
If zero, negative, or ``""`` (the empty string),
only newlines are inserted.
If ``None`` (the default), the most compact representation is used.
If ``None`` (the default), no newlines are inserted.
:type indent: int | str | None

:param separators:
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/unittest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1262,10 +1262,10 @@ Test cases
| :meth:`assertNotEndsWith(a, b) | ``not a.endswith(b)`` | 3.14 |
| <TestCase.assertNotEndsWith>` | | |
+---------------------------------------+--------------------------------+--------------+
| :meth:`assertHasAttr(a, b) | ``hastattr(a, b)`` | 3.14 |
| :meth:`assertHasAttr(a, b) | ``hasattr(a, b)`` | 3.14 |
| <TestCase.assertHasAttr>` | | |
+---------------------------------------+--------------------------------+--------------+
| :meth:`assertNotHasAttr(a, b) | ``not hastattr(a, b)`` | 3.14 |
| :meth:`assertNotHasAttr(a, b) | ``not hasattr(a, b)`` | 3.14 |
| <TestCase.assertNotHasAttr>` | | |
+---------------------------------------+--------------------------------+--------------+

Expand Down
6 changes: 6 additions & 0 deletions Doc/whatsnew/3.16.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ sysconfig
which has been deprecated since Python 3.14.
Use the ``vars`` argument of :func:`sysconfig.get_paths` instead.

tarfile
-------

* The undocumented and unused :attr:`!tarfile.TarFile.tarfile` attribute
has been deprecated since Python 3.13.

.. Add removals above alphabetically, not here at the end.


Expand Down
8 changes: 4 additions & 4 deletions Lib/json/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ def dump(obj, fp, *, skipkeys=False, ensure_ascii=True, check_circular=True,

If ``indent`` is a non-negative integer, then JSON array elements and
object members will be pretty-printed with that indent level. An indent
level of 0 will only insert newlines. ``None`` is the most compact
representation.
level of 0 will only insert newlines. ``None`` is the default and gives
a representation with no newlines inserted.

If specified, ``separators`` should be an ``(item_separator,
key_separator)`` tuple. The default is ``(', ', ': ')`` if *indent* is
Expand Down Expand Up @@ -206,8 +206,8 @@ def dumps(obj, *, skipkeys=False, ensure_ascii=True, check_circular=True,

If ``indent`` is a non-negative integer, then JSON array elements and
object members will be pretty-printed with that indent level. An indent
level of 0 will only insert newlines. ``None`` is the most compact
representation.
level of 0 will only insert newlines. ``None`` is the default and gives
a representation with no newlines inserted.

If specified, ``separators`` should be an ``(item_separator,
key_separator)`` tuple. The default is ``(', ', ': ')`` if *indent* is
Expand Down
20 changes: 0 additions & 20 deletions Lib/tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,6 @@ class TarInfo(object):
pax_headers = ('A dictionary containing key-value pairs of an '
'associated pax extended header.'),
sparse = 'Sparse member information.',
_tarfile = None,
_sparse_structs = None,
_link_target = None,
)
Expand Down Expand Up @@ -942,24 +941,6 @@ def __init__(self, name=""):
self.sparse = None # sparse member information
self.pax_headers = {} # pax header information

@property
def tarfile(self):
import warnings
warnings.warn(
'The undocumented "tarfile" attribute of TarInfo objects '
+ 'is deprecated and will be removed in Python 3.16',
DeprecationWarning, stacklevel=2)
return self._tarfile

@tarfile.setter
def tarfile(self, tarfile):
import warnings
warnings.warn(
'The undocumented "tarfile" attribute of TarInfo objects '
+ 'is deprecated and will be removed in Python 3.16',
DeprecationWarning, stacklevel=2)
self._tarfile = tarfile

@property
def path(self):
'In pax headers, "name" is called "path".'
Expand Down Expand Up @@ -2196,7 +2177,6 @@ def gettarinfo(self, name=None, arcname=None, fileobj=None):
# Now, fill the TarInfo object with
# information specific for the file.
tarinfo = self.tarinfo()
tarinfo._tarfile = self # To be removed in 3.16.

# Use os.stat or os.lstat, depending on if symlinks shall be resolved.
if fileobj is None:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove deprecated and unused :attr:`!tarfile.Tarfile.tarfile` attribute.
Loading