You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "harshadkhetpal (via GitHub)" <gi...@apache.org> on 2026/04/14 09:21:11 UTC
[PR] fix: replace bare except with Exception in pytest_plugin.py [airflow]
harshadkhetpal opened a new pull request, #65199:
URL: https://github.com/apache/airflow/pull/65199
## Summary
Replaces a bare `except:` clause with `except Exception:` in `devel-common/src/tests_common/pytest_plugin.py`.
## Motivation
Bare `except:` clauses catch `BaseException`, which includes `KeyboardInterrupt` and `SystemExit`. This can mask critical signals like Ctrl-C. PEP 8 flags this as [E722](https://www.flake8rules.com/rules/E722.html).
## Change
```python
# Before
try:
...
except:
...
# After
try:
...
except Exception:
...
```
## Testing
No behavior change in normal error paths — only `KeyboardInterrupt`/`SystemExit` now propagate as expected.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: replace bare except with Exception in pytest_plugin.py [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #65199:
URL: https://github.com/apache/airflow/pull/65199#issuecomment-4299712333
@harshadkhetpal Thank you for taking the time to open a PR — closing this one without approving CI because the changes don't match the PR title and don't look intended for the upstream `apache/airflow` repository:
- The title is *"fix: replace bare except with Exception"*, but the actual diff is a personal fork-intro section added to `README.md` (under `## 🧑💻 My Fork — Harshad Khetpal (DevOps / MLOps Engineer)`) plus a standalone `dags/ml_pipeline_dag.py`. Those changes make sense in your own fork — and you are welcome to keep them there — but they aren't changes that the upstream `apache/airflow` repository can merge.
If you'd like to contribute upstream, we'd warmly welcome it. A good starting point is the [contributors guide](https://github.com/apache/airflow/blob/main/contributing-docs/README.rst) and the [first-time-contributor issues](https://github.com/apache/airflow/contribute). Pick something concrete (a typo fix, a docstring clarification, a small bug fix from a GitHub issue), make sure the PR title and diff describe the same thing, and we'll review it.
Closing this one — please reopen with a PR that matches its title, or open a fresh one against a specific issue. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: replace bare except with Exception in pytest_plugin.py [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #65199:
URL: https://github.com/apache/airflow/pull/65199#issuecomment-4242757901
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our [Contributors' Guide](https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:
- Pay attention to the quality of your code (ruff, mypy and type annotations). Our [prek-hooks]( https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#prerequisites-for-prek-hooks) will help you with that.
- In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/airflow-core/docs/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/dev/breeze/doc/README.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
- Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
- Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
- Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#coding-style-and-best-practices).
- Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
Apache Airflow is a community-driven project and together we are making it better 🚀.
In case of doubts contact the developers at:
Mailing List: dev@airflow.apache.org
Slack: https://s.apache.org/airflow-slack
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: replace bare except with Exception in pytest_plugin.py [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed pull request #65199: fix: replace bare except with Exception in pytest_plugin.py
URL: https://github.com/apache/airflow/pull/65199
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org