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

Switch away from sys.exit(error_msg) in dmypy #5982

Merged
merged 1 commit into from Nov 30, 2018

Conversation

Projects
None yet
5 participants
@msullivan
Copy link
Collaborator

msullivan commented Nov 30, 2018

This kills a couple birds with one stone:

  1. It fixes an interaction with the new run_dmypy api where
    that message winds up as the return code instead of in
    stderr.
    This additionally fixes a type unsoundness/mypy_mypyc crash
    caused by SystemExit.code being typed as int.
  2. It allows us to standardize the irregular exit codes of dmypy
    as 2.
Switch away from sys.exit(error_msg) in dmypy
This kills a couple birds with one stone:
 1. It fixes an interaction with the new run_dmypy api where
    that message winds up as the return code instead of in
    stderr.
    This additionally fixes a type unsoundness/mypy_mypyc crash
    caused by SystemExit.code being typed as int.
 2. It allows us to standardize the irregular exit codes of dmypy
    as 2.

@msullivan msullivan requested review from gvanrossum and ilevkivskyi Nov 30, 2018

@msullivan msullivan referenced this pull request Nov 30, 2018

Closed

Release 0.650 planning #5960

@ilevkivskyi
Copy link
Collaborator

ilevkivskyi left a comment

Thanks! Looks very good!

@ethanhs
Copy link
Collaborator

ethanhs left a comment

LGTM!

@gvanrossum
Copy link
Member

gvanrossum left a comment

"Perfect" (as they say in California).

@msullivan msullivan merged commit 0cc694d into master Nov 30, 2018

3 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@msullivan msullivan deleted the dmypy-exit branch Nov 30, 2018

@JukkaL

This comment has been minimized.

Copy link
Collaborator

JukkaL commented Dec 3, 2018

Should we document the exit codes?

JukkaL added a commit that referenced this pull request Dec 3, 2018

Switch away from sys.exit(error_msg) in dmypy (#5982)
This kills a couple birds with one stone:
 1. It fixes an interaction with the new run_dmypy api where
    that message winds up as the return code instead of in
    stderr.
    This additionally fixes a type unsoundness/mypy_mypyc crash
    caused by SystemExit.code being typed as int.
 2. It allows us to standardize the irregular exit codes of dmypy
    as 2.
@ilevkivskyi

This comment has been minimized.

Copy link
Collaborator

ilevkivskyi commented Dec 4, 2018

Should we document the exit codes?

Opened #6003 for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment