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

Pendulum not importing correctly with certain lib #36741

Closed
1 of 2 tasks
teraearlywine opened this issue Jan 11, 2024 · 3 comments
Closed
1 of 2 tasks

Pendulum not importing correctly with certain lib #36741

teraearlywine opened this issue Jan 11, 2024 · 3 comments
Labels
area:core duplicate Issue that is duplicated kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet

Comments

@teraearlywine
Copy link

teraearlywine commented Jan 11, 2024

Apache Airflow version

2.8.0

If "Other Airflow 2 version" selected, which one?

No response

What happened?

When importing airflow, breaking change with pendulum 3.0. Fixed the issue by from pendulum import tz etc..
pendulum 3.0 was released last month

The tz argument is keyword-only, unlike in version 1.x
https://pendulum.eustace.io/docs/

What you think should happen instead?

from pendulum import tz

How to reproduce

install airflow locally and try running script with date used

from airflow import DAG 
schedule = "@once"

...
dag = DAG(
    dag_id=dag_id,
    default_args=default_args,
    schedule_interval=schedule,
    catchup=False,
)

Operating System

macOS

Versions of Apache Airflow Providers

No response

Deployment

Docker-Compose

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@teraearlywine teraearlywine added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Jan 11, 2024
Copy link

boring-cyborg bot commented Jan 11, 2024

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@potiuk potiuk added the duplicate Issue that is duplicated label Jan 11, 2024
@potiuk
Copy link
Member

potiuk commented Jan 11, 2024

You should use constraints to install airflow https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html - it is specifically designed to prevent people instaliing Airflow from experiencing such problems.

That's why Airflow 2.8.0 has Pendulum <3 and I am quite surprised that you were able to install Airlfow 2.8.0 and Pendulum 3 together. This is what you find in Airflow 2.8.0 package metadata:

Requires-Dist: pendulum (<3.0,>=2.0)

You must have done something completely forbidden even if you used constraints.

And yes we know very well that Pendulum 3 is not compatible with Airflow - but it has more breaking changes that you found.

And if you'd search for Pendulum you'd find out that this PR #36281 adds support for Pendulum 3.

For the future I suggest you use search functionality first - that will save you time for reporting issues and maintainers for having to close them.

@potiuk potiuk closed this as completed Jan 11, 2024
@potiuk
Copy link
Member

potiuk commented Jan 12, 2024

BTW. We plan to cherry-pick it for 2.8.1 so likely 2.8.1 will be Pendulum-3 compatible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core duplicate Issue that is duplicated kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet
Projects
None yet
Development

No branches or pull requests

2 participants