Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ff48739e
Commit
ff48739e
authored
Jun 06, 2017
by
Aaron Hall, MBA
Committed by
Serhiy Storchaka
Jun 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-30463: Add an empty __slots__ to abc.ABC.
parent
ec19ba21
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
Lib/abc.py
Lib/abc.py
+1
-1
Lib/test/test_abc.py
Lib/test/test_abc.py
+3
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/abc.py
View file @
ff48739e
...
...
@@ -235,7 +235,7 @@ class ABC(metaclass=ABCMeta):
"""Helper class that provides a standard way to create an ABC using
inheritance.
"""
pass
__slots__
=
()
def
get_cache_token
():
...
...
Lib/test/test_abc.py
View file @
ff48739e
...
...
@@ -402,6 +402,9 @@ class TestABC(unittest.TestCase):
C
()
self
.
assertEqual
(
B
.
counter
,
1
)
def
test_ABC_has___slots__
(
self
):
self
.
assertTrue
(
hasattr
(
abc
.
ABC
,
'__slots__'
))
class
TestABCWithInitSubclass
(
unittest
.
TestCase
):
def
test_works_with_init_subclass
(
self
):
...
...
Misc/NEWS
View file @
ff48739e
...
...
@@ -345,6 +345,9 @@ Extension Modules
Library
-------
- bpo-30463: Addded empty __slots__ to abc.ABC. This allows subclassers
to deny __dict__ and __weakref__ creation. Patch by Aaron Hall.
- bpo-30520: Loggers are now pickleable.
- bpo-30557: faulthandler now correctly filters and displays exception codes
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment