GNU bug report logs - #38043
Incorrect Python byte-compiling for Python 3.5+ and PyPy3

Previous Next

Package: automake;

Reported by: Michał Górny <mgorny <at> gentoo.org>

Date: Sun, 3 Nov 2019 10:47:02 UTC

Severity: normal

Tags: confirmed, patch

Done: Mike Frysinger <vapier <at> gentoo.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mike Frysinger <vapier <at> gentoo.org>
To: 38043 <at> debbugs.gnu.org
Subject: bug#38043: [PATCH 5/6] py-compile: fix display when compiling multiple files
Date: Sun,  6 Feb 2022 01:57:13 -0500
The compilation steps print the filename as it runs, but forgets to add
a space after it, so they all get squashed together:
$ ./py-compile 1.py 2.py 3.py
Byte-compiling python modules...
1.py2.py.3.py

* lib/py-compile: Add missing write.
---
 lib/py-compile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/py-compile b/lib/py-compile
index 2745d0b6b045..f72d4945da96 100755
--- a/lib/py-compile
+++ b/lib/py-compile
@@ -141,7 +141,7 @@ for file in sys.argv[1:]:
     if not os.path.exists(filepath) or not (len(filepath) >= 3
                                             and filepath[-3:] == '.py'):
 	    continue
-    sys.stdout.write(file)
+    sys.stdout.write(file + ' ')
     sys.stdout.flush()
     if hasattr(sys.implementation, 'cache_tag'):
         py_compile.compile(filepath, importlib.util.cache_from_source(filepath), path)
@@ -163,7 +163,7 @@ for file in sys.argv[1:]:
     if not os.path.exists(filepath) or not (len(filepath) >= 3
                                             and filepath[-3:] == '.py'):
 	    continue
-    sys.stdout.write(file)
+    sys.stdout.write(file + ' ')
     sys.stdout.flush()
     if hasattr(sys.implementation, 'cache_tag'):
         py_compile.compile(filepath, importlib.util.cache_from_source(filepath), path)
-- 
2.34.1





This bug report was last modified 3 years and 140 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.