bpo-40521: Empty frozenset is no longer a singleton (GH-21085)

* Revert "bpo-40521: Make the empty frozenset per interpreter (GH-21068)"

This reverts commit 261cfedf76.

* bpo-40521: Empty frozensets are no longer singletons

* Complete the removal of the frozenset singleton
This commit is contained in:
Raymond Hettinger 2020-06-23 08:42:55 -07:00 committed by GitHub
parent 522691c46e
commit f9bd05e83e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 8 additions and 54 deletions

View file

@ -158,13 +158,6 @@ class ContainerTestCase(unittest.TestCase, HelperMixin):
for constructor in (set, frozenset):
self.helper(constructor(self.d.keys()))
@support.cpython_only
def test_empty_frozenset_singleton(self):
# marshal.loads() must reuse the empty frozenset singleton
obj = frozenset()
obj2 = marshal.loads(marshal.dumps(obj))
self.assertIs(obj2, obj)
class BufferTestCase(unittest.TestCase, HelperMixin):