Skip to content
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

Fixing exception types to include TypeError, which is what is raised in #40012

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

leakec
Copy link
Contributor

@leakec leakec commented Jun 2, 2024

closes: #40011
related: #39980

This issue closes #40011. It modifies the exception line to include TypeError in addition to AttributeError. In Python 3.12, the error that this exception is trying to catch is raised as a TypeError rather than an AttributeError.


Copy link

boring-cyborg bot commented Jun 2, 2024

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 pre-commits 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 Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment 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 for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • 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

@eladkal
Copy link
Contributor

eladkal commented Jun 2, 2024

Can you add unit test to avoid regression?

@leakec
Copy link
Contributor Author

leakec commented Jun 2, 2024

@eladkal sure thing. May be a little bit as I've got a busy week coming up, but I will add a unit test for this.

EDIT: @o-nikolas added a unit test for this in #40035.

@eladkal eladkal requested a review from o-nikolas June 3, 2024 18:59
@vincbeck vincbeck added this to the Airflow 2.9.2 milestone Jun 3, 2024
@potiuk potiuk merged commit f4c90f7 into apache:main Jun 4, 2024
49 checks passed
Copy link

boring-cyborg bot commented Jun 4, 2024

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jun 4, 2024
@ephraimbuddy ephraimbuddy removed this from the Airflow 2.9.2 milestone Jun 4, 2024
o-nikolas added a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jun 4, 2024
A unit test which triggers the scenario of a current Celery executor
with the new signature of change_state run against an older version of
Airflow with the old signature of change_state on the BaseExecutor
class.

related apache#40011
related apache#39980
related apache#40012
@eladkal eladkal removed the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jun 5, 2024
eladkal pushed a commit that referenced this pull request Jun 5, 2024
A unit test which triggers the scenario of a current Celery executor
with the new signature of change_state run against an older version of
Airflow with the old signature of change_state on the BaseExecutor
class.

related #40011
related #39980
related #40012
@potiuk potiuk added this to the Airflow 2.9.2 milestone Jun 6, 2024
fdemiane pushed a commit to fdemiane/airflow that referenced this pull request Jun 6, 2024
…in (apache#40012)

Python 3.12.
Fixes apache#40011

Co-authored-by: leake <carl.leake@jpl.nasa.gov>
fdemiane pushed a commit to fdemiane/airflow that referenced this pull request Jun 6, 2024
A unit test which triggers the scenario of a current Celery executor
with the new signature of change_state run against an older version of
Airflow with the old signature of change_state on the BaseExecutor
class.

related apache#40011
related apache#39980
related apache#40012
syedahsn pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Jun 7, 2024
…in (apache#40012)

Python 3.12.
Fixes apache#40011

Co-authored-by: leake <carl.leake@jpl.nasa.gov>
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
…in (apache#40012)

Python 3.12.
Fixes apache#40011

Co-authored-by: leake <carl.leake@jpl.nasa.gov>
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
A unit test which triggers the scenario of a current Celery executor
with the new signature of change_state run against an older version of
Airflow with the old signature of change_state on the BaseExecutor
class.

related apache#40011
related apache#39980
related apache#40012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Numerous error reports in airflow logs due to function argument mismatch
5 participants