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

Use pre-release version of pendulum in CI and breeze #35798

Closed
wants to merge 6 commits into from

Conversation

Taragolis
Copy link
Contributor

@Taragolis Taragolis commented Nov 22, 2023

Continuation of (basically merged together in branch into the apache/airflow repo):


In pendulum 3 (beta) there is no access to pendulum.tz.timezone anymore otherwise we should call pendulum.timezone for convert string/integer to pendulum timezones

>>> import pendulum
>>> pendulum.__version__
'2.1.2'

>>> pendulum.tz.timezone("UTC")
Timezone('UTC')
>>> pendulum.tz.timezone("Europe/London")
Timezone('Europe/London')
>>> pendulum.tz.timezone(3600)
Timezone('+01:00')

>>> pendulum.timezone("UTC")
Timezone('UTC')
>>> pendulum.timezone("Europe/London")
Timezone('Europe/London')
>>> pendulum.timezone(3600)
Timezone('+01:00')
>>> import pendulum
>>> pendulum.__version__
'3.0.0b1'

>>> pendulum.tz.timezone("UTC")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable
>>> pendulum.tz.timezone("Europe/London")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable

>>> pendulum.timezone("UTC")
Timezone('UTC')
>>> pendulum.timezone("Europe/London")
Timezone('Europe/London')
>>> pendulum.timezone(3600)
FixedTimezone(3600, name="+01:00")

closes: #35483


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@potiuk
Copy link
Member

potiuk commented Nov 22, 2023

FYI: There will be some changes needed (but it will be generally way better in simpler) after I merge #35801

@Taragolis
Copy link
Contributor Author

Well, at least it show errors in place where I didn't except to see or in another word in places where I didn't test it 🤣

@Taragolis
Copy link
Contributor Author

closed in favor of:

@Taragolis Taragolis closed this Dec 23, 2023
@Taragolis Taragolis deleted the pendulum-prerelease branch December 23, 2023 16:31
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.

Passing a DagRun to a PythonVirtualenvOperator gives NameError: name 'timedelta' is not defined
2 participants