[proxy] github.com← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public

Conversation

Copy link
Contributor

gvsheva commented Nov 12, 2019

Fixing missed quiet variable in py_compile.py module.

https://bugs.python.org/issue40456

Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@gvsheva

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

brandtbucher added the type-bug An unexpected behavior, bug, or error label Nov 13, 2019
Copy link
Member

Thanks for your time @gvsheva, and welcome to CPython! 😎

I assume that you've seen the bot's message about the CLA?

Copy link
Member

brandtbucher left a comment

Choose a reason for hiding this comment

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

I'm not sure about this solution.

I don't see that passing -q from the command line is actually documented anywhere, and it would be the only argument that we parse out like this.

It probably makes the most sense to just remove the branching below that references quiet and just always write the error messages.

Copy link
Member

This PR should also have a NEWS entry. Just something simple, like:

Fix a crash during error handling in :meth:`py_compile.main`.

gvsheva changed the title bpo-38731: add missing quiet variable in py_compile.main bpo-38731: fix missing quiet variable in py_compile.main Nov 13, 2019
Copy link
Contributor Author

gvsheva commented Nov 13, 2019

All was done, but I can't understand why Travis CI build was failed.

Copy link
Member

@gvsheva It looks like an issue on Travis's end, unrelated to your changes. Pushing to your branch or closing-and-reopening this PR (not making a new one) should re-trigger the build.

Copy link
Member

brandtbucher left a comment

Choose a reason for hiding this comment

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

Looks good now!

gvsheva closed this Nov 14, 2019
gvsheva reopened this Nov 14, 2019
Copy link
Member

merwok commented Nov 14, 2019

I think that the original intent was to support setting quiet mode on the command line. IMO this PR should be accepted to fix 3.8, but the original feature should be completed on master branch. Could you notify the original issue about this?

Copy link
Contributor Author

gvsheva commented Nov 14, 2019

The original issue is https://bugs.python.org/issue22640

Copy link
Member

merwok commented Nov 15, 2019

Yes, can you add a comment there?

Co-Authored-By: Éric Araujo <merwok@netwok.org>
Copy link
Member

merwok commented Nov 16, 2019

@berkerpeksag do you agree with me?

I think that the original intent was to support setting quiet mode on the command line. IMO this PR should be accepted to fix 3.8, but the original feature should be completed on master branch.

Copy link
Member

pablogsal left a comment

Choose a reason for hiding this comment

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

Hi @gvsheva and thanks for your contribution, could you add a test case for this in the test suite? Thanks!

gvsheva closed this Jul 15, 2020
gvsheva reopened this Jul 15, 2020
gvsheva closed this Jul 16, 2020
gvsheva reopened this Jul 16, 2020
merwok requested a review from nanjekyejoannah July 16, 2020 14:27
Copy link
Contributor Author

gvsheva commented Jul 16, 2020

I have made the requested changes; please review again.

Copy link

Thanks for making the requested changes!

@merwok, @nanjekyejoannah, @pablogsal, @berkerpeksag: please review the changes made to this pull request.

Copy link
Member

I'll make some trivial changes (such as replacing 3.9 with 3.10) to avoid keeping this unmerged any longer and then merge, thanks!

berkerpeksag changed the title bpo-40456: add quiet mode for py_compile main bpo-38731: Add --quiet option to py_compile CLI Jul 25, 2020
Copy link
Member

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 is now ready to go. I've made some adjustments to tests (no need to run them twice) and other random tweaks. I've also made sure that tests are passed without porting CLI to argparse (minus tests related to the --quiet option, of course) I'll submit another PR to fix the regression in 3.8 and 3.9.

Copy link
Member

Thank you!

Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL7 LTO + PGO 3.x has failed when building commit daff390.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/483/builds/857) and take a look at the build logs.
  4. Check if the failure is related to this commit (daff390) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/483/builds/857

Failed tests:

  • test_nntplib

Failed subtests:

  • test_with_statement - test.test_nntplib.NetworkedNNTP_SSLTests

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

408 tests OK.

10 slowest tests:

  • test_peg_generator: 3 min 23 sec
  • test_concurrent_futures: 3 min 16 sec
  • test_tokenize: 1 min 32 sec
  • test_multiprocessing_spawn: 1 min 27 sec
  • test_unparse: 1 min 17 sec
  • test_multiprocessing_forkserver: 1 min 10 sec
  • test_lib2to3: 1 min 10 sec
  • test_asyncio: 1 min 3 sec
  • test_multiprocessing_fork: 58.3 sec
  • test_signal: 48.6 sec

1 test failed:
test_nntplib

14 tests skipped:
test_devpoll test_gdb test_ioctl test_kqueue test_msilib
test_ossaudiodev test_startfile test_tix test_tk test_ttk_guionly
test_winconsoleio test_winreg test_winsound test_zipfile64

1 re-run test:
test_nntplib

Total duration: 6 min 47 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/test/test_nntplib.py", line 277, in test_with_statement
    server = self.NNTP_CLASS(self.NNTP_HOST,
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/nntplib.py", line 1025, in __init__
    super().__init__(host, port, user, password, readermode,
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/nntplib.py", line 334, in __init__
    self.sock = self._create_socket(timeout)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/nntplib.py", line 1031, in _create_socket
    sock = _encrypt_on(sock, self.ssl_context, self.host)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/nntplib.py", line 292, in _encrypt_on
    return context.wrap_socket(sock, server_hostname=hostname)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1121)


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/test/test_nntplib.py", line 250, in wrapped
    meth(self)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/test/test_nntplib.py", line 293, in test_with_statement
    if re.search(r'(?i)KEY.TOO.SMALL', ssl_err.reason):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/re.py", line 201, in search
    return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object

Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL7 LTO 3.x has failed when building commit daff390.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/527/builds/856) and take a look at the build logs.
  4. Check if the failure is related to this commit (daff390) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/527/builds/856

Failed tests:

  • test_nntplib

Failed subtests:

  • test_with_statement - test.test_nntplib.NetworkedNNTP_SSLTests

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

409 tests OK.

10 slowest tests:

  • test_concurrent_futures: 3 min 12 sec
  • test_peg_generator: 2 min 47 sec
  • test_multiprocessing_spawn: 1 min 39 sec
  • test_tokenize: 1 min 36 sec
  • test_unparse: 1 min 26 sec
  • test_asyncio: 1 min 15 sec
  • test_lib2to3: 1 min 8 sec
  • test_multiprocessing_forkserver: 1 min 7 sec
  • test_multiprocessing_fork: 57.5 sec
  • test_signal: 47.9 sec

1 test failed:
test_nntplib

13 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_ossaudiodev
test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio
test_winreg test_winsound test_zipfile64

1 re-run test:
test_nntplib

Total duration: 7 min 6 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/test_nntplib.py", line 250, in wrapped
    meth(self)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/test_nntplib.py", line 293, in test_with_statement
    if re.search(r'(?i)KEY.TOO.SMALL', ssl_err.reason):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/re.py", line 201, in search
    return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/test_nntplib.py", line 277, in test_with_statement
    server = self.NNTP_CLASS(self.NNTP_HOST,
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/nntplib.py", line 1025, in __init__
    super().__init__(host, port, user, password, readermode,
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/nntplib.py", line 334, in __init__
    self.sock = self._create_socket(timeout)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/nntplib.py", line 1031, in _create_socket
    sock = _encrypt_on(sock, self.ssl_context, self.host)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/nntplib.py", line 292, in _encrypt_on
    return context.wrap_socket(sock, server_hostname=hostname)
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/ssl.py", line 1040, in _create
    self.do_handshake()
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1121)

shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Aug 4, 2020
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Aug 20, 2020
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants