[
https://issues.apache.org/jira/browse/AIRFLOW-4089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16846336#comment-16846336
]
ASF GitHub Bot commented on AIRFLOW-4089:
-----------------------------------------
reggieag commented on pull request #5316: [AIRFLOW-4089] Remove pytz support
from documentation
URL: https://github.com/apache/airflow/pull/5316
Make sure you have checked _all_ steps below.
### Jira
- [x] My PR addresses the following [Airflow
Jira](https://issues.apache.org/jira/projects/AIRFLOW/issues/AIRFLOW-4089?filter=allopenissues)
issues and references them in the PR title.
### Description
- [x] This PR addresses the fact that pytz timezone objects do not have the
attribute `name`. It does have a similar attribute `zone` that could be used
though not with complete compatibility. For example, there are no
`pendulum.tzinfo.name`s for `Africa/Casablanca, Africa/El_Aaiun` but there are
for `pytz.tzinfo.zone`. I propose we just remove the mention of pytz
compatibility from the docs instead of dealing with incompatibilities.
### Tests
- [x] My PR adds the following unit tests __OR__ does not need testing for
this extremely good reason:
No test because just a documentation change.
### Commits
- [x] My commits all reference Jira issues in their subject lines, and I
have squashed multiple commits if they address the same issue. In addition, my
commits follow the guidelines from "[How to write a good git commit
message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
1. Subject is limited to 50 characters (not including Jira issue reference)
1. Subject does not end with a period
1. Subject uses the imperative mood ("add", not "adding")
1. Body wraps at 72 characters
1. Body explains "what" and "why", not "how"
### Documentation
- [x] Updating documentation
### Code Quality
- [x] Passes `flake8`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> pytz.utc has no attribute name
> ------------------------------
>
> Key: AIRFLOW-4089
> URL: https://issues.apache.org/jira/browse/AIRFLOW-4089
> Project: Apache Airflow
> Issue Type: Bug
> Components: DAG
> Affects Versions: 1.10.3
> Reporter: Ricardo Garcia Silva
> Priority: Blocker
>
> According to the
> [docs|https://airflow.readthedocs.io/en/latest/timezone.html#time-zone-aware-dags],
> even though pendulum is recommended, a DAG's timezone may also be set by
> using pytz.
> However, if one uses pytz, models.DAG breaks when trying to use
> {code:python}
> self.timezone.name
> {code}
> pytz timezones do not have a name attribute
> This error is not immediately apparent, but it manifests under certain
> circumstances, such as preventing the scheduler from creating new DAGRuns for
> catching up from previous dates if the DAG has a schedule_interval of
> {code:python}
> 0 0 * * *
> {code}
> This can be fixed by either changing the code not to rely on the existence of
> a *name* attribute on the timezone object, or changing the existing
> documentation in order to clearly state that pendulum *must* be used and not
> pytz or python's timezone
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)