mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #19209: Remove import of copyreg from the os module to speed up
interpreter startup. stat_result and statvfs_result are now hard-coded to reside in the os module. The patch is based on Victor Stinner's patch.
This commit is contained in:
parent
1a5fb4e3c1
commit
2582762b1b
5 changed files with 32 additions and 30 deletions
|
@ -431,10 +431,13 @@ class StartupImportTests(unittest.TestCase):
|
|||
modules = eval(stdout.decode('utf-8'))
|
||||
self.assertIn('site', modules)
|
||||
|
||||
# http://bugs.python.org/issue19205
|
||||
re_mods = {'re', '_sre', 'sre_compile', 'sre_constants', 'sre_parse'}
|
||||
self.assertFalse(modules.intersection(re_mods))
|
||||
|
||||
# http://bugs.python.org/issue9548
|
||||
self.assertNotIn('locale', modules)
|
||||
# http://bugs.python.org/issue19209
|
||||
self.assertNotIn('copyreg', modules)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue