Skip to content

Use sys.exit() instead of exit()#12084

Merged
kaxil merged 1 commit intoapache:masterfrom
astronomer:use-sys-ex
Nov 4, 2020
Merged

Use sys.exit() instead of exit()#12084
kaxil merged 1 commit intoapache:masterfrom
astronomer:use-sys-ex

Conversation

@kaxil
Copy link
Member

@kaxil kaxil commented Nov 4, 2020

The exit and quit functions are actually site.Quitter objects and are loaded, at interpreter start up, from site.py. However, if the interpreter is started with the -S flag, or a custom site.py is used then exit and quit may not be present. It is recommended to use sys.exit() which is built into the interpreter and is guaranteed to be present.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

The `exit` and `quit` functions are actually `site.Quitter` objects and are loaded, at interpreter start up, from site.py. However, if the interpreter is started with the `-S` flag, or a custom site.py is used then exit and quit may not be present. It is recommended to use `sys.exit()` which is built into the interpreter and is guaranteed to be present.
@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Nov 4, 2020
@github-actions
Copy link

github-actions bot commented Nov 4, 2020

The PR needs to run all tests because it modifies core of Airflow! Please rebase it to latest master or ask committer to re-run it!

@kaxil kaxil merged commit bec9f3b into apache:master Nov 4, 2020
@kaxil kaxil deleted the use-sys-ex branch November 4, 2020 11:50
potiuk pushed a commit that referenced this pull request Nov 14, 2020
The `exit` and `quit` functions are actually `site.Quitter` objects and are loaded, at interpreter start up, from site.py. However, if the interpreter is started with the `-S` flag, or a custom site.py is used then exit and quit may not be present. It is recommended to use `sys.exit()` which is built into the interpreter and is guaranteed to be present.

(cherry picked from commit bec9f3b)
@potiuk potiuk added the type:misc/internal Changelog: Misc changes that should appear in change log label Nov 14, 2020
@potiuk potiuk added this to the Airflow 1.10.13 milestone Nov 14, 2020
potiuk pushed a commit that referenced this pull request Nov 16, 2020
The `exit` and `quit` functions are actually `site.Quitter` objects and are loaded, at interpreter start up, from site.py. However, if the interpreter is started with the `-S` flag, or a custom site.py is used then exit and quit may not be present. It is recommended to use `sys.exit()` which is built into the interpreter and is guaranteed to be present.

(cherry picked from commit bec9f3b)
potiuk pushed a commit that referenced this pull request Nov 16, 2020
The `exit` and `quit` functions are actually `site.Quitter` objects and are loaded, at interpreter start up, from site.py. However, if the interpreter is started with the `-S` flag, or a custom site.py is used then exit and quit may not be present. It is recommended to use `sys.exit()` which is built into the interpreter and is guaranteed to be present.

(cherry picked from commit bec9f3b)
kaxil added a commit that referenced this pull request Nov 18, 2020
The `exit` and `quit` functions are actually `site.Quitter` objects and are loaded, at interpreter start up, from site.py. However, if the interpreter is started with the `-S` flag, or a custom site.py is used then exit and quit may not be present. It is recommended to use `sys.exit()` which is built into the interpreter and is guaranteed to be present.

(cherry picked from commit bec9f3b)
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
The `exit` and `quit` functions are actually `site.Quitter` objects and are loaded, at interpreter start up, from site.py. However, if the interpreter is started with the `-S` flag, or a custom site.py is used then exit and quit may not be present. It is recommended to use `sys.exit()` which is built into the interpreter and is guaranteed to be present.

(cherry picked from commit bec9f3b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools full tests needed We need to run full set of tests for this PR to merge type:misc/internal Changelog: Misc changes that should appear in change log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants