| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -235,7 +235,7 @@ class ABC(metaclass=ABCMeta): | |||
| 235 | 235 | """Helper class that provides a standard way to create an ABC using | |
| 236 | 236 | inheritance. | |
| 237 | 237 | """ | |
| 238 | - pass | ||
| 238 | + __slots__ = () | ||
| 239 | 239 | ||
| 240 | 240 | ||
| 241 | 241 | def get_cache_token(): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -402,6 +402,9 @@ class C(A, B): | |||
| 402 | 402 | C() | |
| 403 | 403 | self.assertEqual(B.counter, 1) | |
| 404 | 404 | ||
| 405 | + def test_ABC_has___slots__(self): | ||
| 406 | + self.assertTrue(hasattr(abc.ABC, '__slots__')) | ||
| 407 | + | ||
| 405 | 408 | ||
| 406 | 409 | class TestABCWithInitSubclass(unittest.TestCase): | |
| 407 | 410 | def test_works_with_init_subclass(self): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -345,6 +345,9 @@ Extension Modules | |||
| 345 | 345 | Library | |
| 346 | 346 | ------- | |
| 347 | 347 | ||
| 348 | + - bpo-30463: Addded empty __slots__ to abc.ABC. This allows subclassers | ||
| 349 | + to deny __dict__ and __weakref__ creation. Patch by Aaron Hall. | ||
| 350 | + | ||
| 348 | 351 | - bpo-30520: Loggers are now pickleable. | |
| 349 | 352 | ||
| 350 | 353 | - bpo-30557: faulthandler now correctly filters and displays exception codes | |
| Back | FazBrowse Home | New Git URL |
0 commit comments