Skip to content

bpo-22640: Add silent mode to py_compile#12976

Merged
berkerpeksag merged 11 commits intopython:masterfrom
nanjekyejoannah:issue22640
May 28, 2019
Merged

bpo-22640: Add silent mode to py_compile#12976
berkerpeksag merged 11 commits intopython:masterfrom
nanjekyejoannah:issue22640

Conversation

@nanjekyejoannah
Copy link
Copy Markdown
Contributor

@nanjekyejoannah nanjekyejoannah commented Apr 26, 2019

I have added silent mode to py_compile.

https://bugs.python.org/issue22640

@nanjekyejoannah nanjekyejoannah changed the title bpo-22640: Add silent mode for py_compile bpo-22640: Add silent mode to py_compile Apr 26, 2019
Copy link
Copy Markdown
Member

@berkerpeksag berkerpeksag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Lib/py_compile.py Outdated
Comment thread Lib/test/test_py_compile.py
Comment thread Lib/test/test_py_compile.py Outdated

def test_quiet(self):
bad_coding = os.path.join(os.path.dirname(__file__), 'bad_coding2.py')
with support.captured_stderr():
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor Author

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. No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:func:`py_compile.compile`

Copy link
Copy Markdown
Member

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.".

Copy link
Copy Markdown
Member

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.

Comment thread Doc/whatsnew/3.8.rst Outdated
Comment thread Doc/library/py_compile.rst Outdated
Comment thread Doc/library/py_compile.rst Outdated
Comment thread Doc/library/py_compile.rst Outdated
Comment thread Doc/library/py_compile.rst Outdated
@bedevere-bot
Copy link
Copy Markdown

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Copy link
Copy Markdown
Contributor

@ZackerySpytz ZackerySpytz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use "quite" instead of "quiet", please.

Comment thread Doc/library/py_compile.rst Outdated
Comment thread Doc/library/py_compile.rst Outdated
Comment thread Lib/py_compile.py Outdated
Comment thread Lib/py_compile.py Outdated
Comment thread Lib/py_compile.py Outdated
Comment thread Lib/test/test_py_compile.py
Comment thread Doc/library/py_compile.rst Outdated
Comment thread Doc/whatsnew/3.8.rst Outdated
@nanjekyejoannah
Copy link
Copy Markdown
Contributor Author

nanjekyejoannah commented Apr 27, 2019

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.

Noted.

@brettcannon
Copy link
Copy Markdown
Member

I'm fine with the idea.

@nanjekyejoannah
Copy link
Copy Markdown
Contributor Author

nanjekyejoannah commented May 8, 2019

Great, I will finish addressing the reviews on this PR as soon as I can.

@nanjekyejoannah
Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again.

@bedevere-bot
Copy link
Copy Markdown

Thanks for making the requested changes!

@berkerpeksag: please review the changes made to this pull request.

Copy link
Copy Markdown
Member

@berkerpeksag berkerpeksag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, thank you! I just left mostly trivial comments.

You may also want to check documentation changes with a native English speaker. I'm not a native speaker, so they may help us to simply documentation changes :)

Comment thread Doc/library/py_compile.rst Outdated
Comment thread Doc/library/py_compile.rst Outdated
Comment thread Doc/library/py_compile.rst Outdated
Comment thread Doc/library/py_compile.rst Outdated
Comment thread Doc/whatsnew/3.8.rst Outdated
Comment thread Doc/whatsnew/3.8.rst Outdated
Comment thread Lib/py_compile.py Outdated
@bedevere-bot
Copy link
Copy Markdown

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Comment thread Doc/whatsnew/3.8.rst Outdated
@ZackerySpytz
Copy link
Copy Markdown
Contributor

@nanjekyejoannah It seems that you marked my comment as "resolved", but the "What's New" entry still falsely states that py_compile.compile is a method. Please fix that.

@nanjekyejoannah
Copy link
Copy Markdown
Contributor Author

@berkerpeksag PTAL .

@nanjekyejoannah
Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again .

@bedevere-bot
Copy link
Copy Markdown

Thanks for making the requested changes!

@berkerpeksag: please review the changes made to this pull request.

@berkerpeksag
Copy link
Copy Markdown
Member

Thanks!

@nanjekyejoannah nanjekyejoannah deleted the issue22640 branch May 29, 2019 00:36
@vstinner
Copy link
Copy Markdown
Member

vstinner commented Jun 4, 2019

Well done @nanjekyejoannah!

@merwok
Copy link
Copy Markdown
Member

merwok commented Nov 15, 2019

Follow-up in #17134 to fix the NameErrors in main.
As this is already released, 3.7 should get a simple fix and 3.8 the missing part of the feature 🙂

@vstinner
Copy link
Copy Markdown
Member

It seems like this change introduced a regression in main(): see https://bugs.python.org/issue40456

@merwok
Copy link
Copy Markdown
Member

merwok commented Apr 30, 2020

It seems that you missed my previous message Victor! 🙂

@vstinner
Copy link
Copy Markdown
Member

It seems that you missed my previous message Victor! slightly_smiling_face

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.

icanhasmath pushed a commit to ActiveState/cpython that referenced this pull request Sep 8, 2023
icanhasmath pushed a commit to ActiveState/cpython that referenced this pull request Sep 14, 2023
icanhasmath pushed a commit to ActiveState/cpython that referenced this pull request Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants