| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4575098 commit eb51faa
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -72,6 +72,11 @@ C API | |||
| 72 | 72 | - Issue #26754: PyUnicode_FSDecoder() accepted a filename argument encoded as | |
| 73 | 73 | an iterable of integers. Now only strings and bytes-like objects are accepted. | |
| 74 | 74 | ||
| 75 | + Tools/Demos | ||
| 76 | + ----------- | ||
| 77 | + | ||
| 78 | + - Issue #27418: Fixed Tools/importbench/importbench.py. | ||
| 79 | + | ||
| 75 | 80 | ||
| 76 | 81 | What's New in Python 3.5.2? | |
| 77 | 82 | =========================== | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,6 @@ | |||
| 5 | 5 | ||
| 6 | 6 | """ | |
| 7 | 7 | from test.test_importlib import util | |
| 8 | - from test.test_importlib.source import util as source_util | ||
| 9 | 8 | import decimal | |
| 10 | 9 | import imp | |
| 11 | 10 | import importlib | |
@@ -65,11 +64,11 @@ def source_wo_bytecode(seconds, repeat): | |||
| 65 | 64 | try: | |
| 66 | 65 | name = '__importlib_test_benchmark__' | |
| 67 | 66 | # Clears out sys.modules and puts an entry at the front of sys.path. | |
| 68 | - with source_util.create_modules(name) as mapping: | ||
| 67 | + with util.create_modules(name) as mapping: | ||
| 69 | 68 | assert not os.path.exists(imp.cache_from_source(mapping[name])) | |
| 70 | 69 | sys.meta_path.append(importlib.machinery.PathFinder) | |
| 71 | 70 | loader = (importlib.machinery.SourceFileLoader, | |
| 72 | - importlib.machinery.SOURCE_SUFFIXES, True) | ||
| 71 | + importlib.machinery.SOURCE_SUFFIXES) | ||
| 73 | 72 | sys.path_hooks.append(importlib.machinery.FileFinder.path_hook(loader)) | |
| 74 | 73 | yield from bench(name, lambda: sys.modules.pop(name), repeat=repeat, | |
| 75 | 74 | seconds=seconds) | |
@@ -102,10 +101,10 @@ def source_writing_bytecode(seconds, repeat): | |||
| 102 | 101 | """Source writing bytecode: small""" | |
| 103 | 102 | assert not sys.dont_write_bytecode | |
| 104 | 103 | name = '__importlib_test_benchmark__' | |
| 105 | - with source_util.create_modules(name) as mapping: | ||
| 104 | + with util.create_modules(name) as mapping: | ||
| 106 | 105 | sys.meta_path.append(importlib.machinery.PathFinder) | |
| 107 | 106 | loader = (importlib.machinery.SourceFileLoader, | |
| 108 | - importlib.machinery.SOURCE_SUFFIXES, True) | ||
| 107 | + importlib.machinery.SOURCE_SUFFIXES) | ||
| 109 | 108 | sys.path_hooks.append(importlib.machinery.FileFinder.path_hook(loader)) | |
| 110 | 109 | def cleanup(): | |
| 111 | 110 | sys.modules.pop(name) | |
@@ -136,10 +135,10 @@ def cleanup(): | |||
| 136 | 135 | def source_using_bytecode(seconds, repeat): | |
| 137 | 136 | """Source w/ bytecode: small""" | |
| 138 | 137 | name = '__importlib_test_benchmark__' | |
| 139 | - with source_util.create_modules(name) as mapping: | ||
| 138 | + with util.create_modules(name) as mapping: | ||
| 140 | 139 | sys.meta_path.append(importlib.machinery.PathFinder) | |
| 141 | 140 | loader = (importlib.machinery.SourceFileLoader, | |
| 142 | - importlib.machinery.SOURCE_SUFFIXES, True) | ||
| 141 | + importlib.machinery.SOURCE_SUFFIXES) | ||
| 143 | 142 | sys.path_hooks.append(importlib.machinery.FileFinder.path_hook(loader)) | |
| 144 | 143 | py_compile.compile(mapping[name]) | |
| 145 | 144 | assert os.path.exists(imp.cache_from_source(mapping[name])) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments