summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/_pydatetime.py2
-rw-r--r--Misc/NEWS.d/next/Library/2023-09-16-15-44-16.gh-issue-109495.m2H5Bk.rst1
2 files changed, 2 insertions, 1 deletions
diff --git a/Lib/_pydatetime.py b/Lib/_pydatetime.py
index 8827548..bca2acf 100644
--- a/Lib/_pydatetime.py
+++ b/Lib/_pydatetime.py
@@ -1684,7 +1684,7 @@ class datetime(date):
The year, month and day arguments are required. tzinfo may be None, or an
instance of a tzinfo subclass. The remaining arguments may be ints.
"""
- __slots__ = date.__slots__ + time.__slots__
+ __slots__ = time.__slots__
def __new__(cls, year, month=None, day=None, hour=0, minute=0, second=0,
microsecond=0, tzinfo=None, *, fold=0):
diff --git a/Misc/NEWS.d/next/Library/2023-09-16-15-44-16.gh-issue-109495.m2H5Bk.rst b/Misc/NEWS.d/next/Library/2023-09-16-15-44-16.gh-issue-109495.m2H5Bk.rst
new file mode 100644
index 0000000..a7e1b3a
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2023-09-16-15-44-16.gh-issue-109495.m2H5Bk.rst
@@ -0,0 +1 @@
+Remove unnecessary extra ``__slots__`` in :py:class:`datetime`\'s pure python implementation to reduce memory size, as they are defined in the superclass. Patch by James Hilton-Balfe