[issue40456] Complete adding silent mode for py_compile

2020-07-25 Thread Berker Peksag


Berker Peksag  added the comment:

This is a duplicate of issue 38731. The inline patch in msg373791 is incorrect. 
I'll fix the error in maintenance releases by partially reverting commit 
2e33ecd7c9b0cac3efc6fcbdd4547fd086b4e2d1.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> bad input crashes py_compile library

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40456] Complete adding silent mode for py_compile

2020-07-16 Thread Cameron Simpson


Cameron Simpson  added the comment:

Since bad input causes py_compile.py to issue an error like this:

  File 
"/usr/local/Cellar/python@3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/py_compile.py",
 line 213, in main
if quiet < 2:
NameError: name 'quiet' is not defined

I suggest, to save long review of a larger PR elsewhere, can we please just 
initially apply a patch like this:

[~/src/cpython(git:py_compile-quiet-not-initialised)]fleet2*> diff
+ exec git diff
diff --git a/Lib/py_compile.py b/Lib/py_compile.py
index 21736896af..cea851274d 100644
--- a/Lib/py_compile.py
+++ b/Lib/py_compile.py
@@ -186,6 +186,7 @@ def main(args=None):
 """
 if args is None:
 args = sys.argv[1:]
+quiet = 0
 rv = 0
 if args == ['-']:
 while True:

Then the runtime issue goes away, and adding the feature fully can be addressed 
in a more leisurely fashion.

--
nosy: +cameron

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40456] Complete adding silent mode for py_compile

2020-04-30 Thread Gregory Shevchenko


Change by Gregory Shevchenko :


--
keywords: +patch
nosy: +Gregory Shevchenko
nosy_count: 2.0 -> 3.0
pull_requests: +19144
pull_request: https://github.com/python/cpython/pull/17134

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40456] Complete adding silent mode for py_compile

2020-04-30 Thread Éric Araujo

Change by Éric Araujo :


--
stage:  -> patch review
title: py_compile.main(): undefined name 'quiet' -> Complete adding silent mode 
for py_compile
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com