New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-22640: Add silent mode to py_compile #12976
Conversation
Please wait for @brettcannon's feedback before addressing my review comments. I opened bpo-22640 years ago and unfortunately I forgot to add Brett to nosy list.
Lib/test/test_py_compile.py
Outdated
@@ -192,6 +192,14 @@ def test_invalidation_mode(self): | |||
fp.read(), 'test', {}) | |||
self.assertEqual(flags, 0b1) | |||
|
|||
def test_quiet(self): | |||
bad_coding = os.path.join(os.path.dirname(__file__), 'bad_coding2.py') | |||
with support.captured_stderr(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with support.captured_stderr(): | |
with support.captured_stderr() as stderr: |
Then we can add something like
self.assertEqual(stderr.getvalue(), '')
to test the quiet
option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you mark this resolved? It still needs to be addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I had confused it with @vadmium 's comment .
@@ -0,0 +1 @@ | |||
`py_compile` now supports silent mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:func:`py_compile.compile`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And please add "Patch by Your Name.".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is still needs to be addressed as well.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Noted. |
I'm fine with the idea. |
Great, I will finish addressing the reviews on this PR as soon as I can. |
I have made the requested changes; please review again. |
Thanks for making the requested changes! @berkerpeksag: please review the changes made to this pull request. |
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
@nanjekyejoannah It seems that you marked my comment as "resolved", but the "What's New" entry still falsely states that |
@berkerpeksag PTAL . |
I have made the requested changes; please review again . |
Thanks for making the requested changes! @berkerpeksag: please review the changes made to this pull request. |
Thanks! |
Well done @nanjekyejoannah! |
Follow-up in #17134 to fix the NameErrors in |
It seems like this change introduced a regression in main(): see https://bugs.python.org/issue40456 |
It seems that you missed my previous message Victor! |
Oh, right. Well, the main() changes of this PR should be reverted in 3.8. #17134 is new feature which should not into 3.8. |
I have added silent mode to py_compile.
https://bugs.python.org/issue22640