Revert "bpo-42160: tempfile: Reduce overhead of pid check. (GH-22997)"

`_RandomNameSequence` is not true singleton so using `os.register_at_fork` doesn't make sense unlike `random._inst`.

This reverts commit 8e409cebad.
This commit is contained in:
Inada Naoki 2020-10-31 11:15:38 +09:00 committed by GitHub
parent b62bdf71ea
commit 43ca084c88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 13 deletions

View file

@ -153,8 +153,8 @@ class TestRandomNameSequence(BaseTestCase):
self.r = tempfile._RandomNameSequence()
super().setUp()
def test_get_eight_char_str(self):
# _RandomNameSequence returns a eight-character string
def test_get_six_char_str(self):
# _RandomNameSequence returns a six-character string
s = next(self.r)
self.nameCheck(s, '', '', '')