Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e14e49

Browse files
Quentin Agrenmiss-islington
authored andcommitted
bpo-35024: Remove redundant and possibly incorrect verbose message after writing '.pyc' (GH-9998)
Since `SourceFileLoader.set_data()` catches exceptions raised by `_write_atomic()` and logs an informative message consequently, always logging successful outcome in 'SourceLoader.get_code()' seems redundant. https://bugs.python.org/issue35024
1 parent 4e3a53b commit 9e14e49

3 files changed

Lines changed: 1346 additions & 1346 deletions

File tree

Lib/importlib/_bootstrap_external.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,6 @@ def get_code(self, fullname):
920920
len(source_bytes))
921921
try:
922922
self._cache_bytecode(source_path, bytecode_path, data)
923-
_bootstrap._verbose_message('wrote {!r}', bytecode_path)
924923
except NotImplementedError:
925924
pass
926925
return code_object
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
`importlib` no longer logs `wrote <bytecode path>` redundantly after
2+
`(created|could not create) <bytecode path>` is already logged.
3+
Patch by Quentin Agren.

0 commit comments

Comments
 (0)