[
https://issues.apache.org/jira/browse/AIRFLOW-4308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16819961#comment-16819961
]
ASF GitHub Bot commented on AIRFLOW-4308:
-----------------------------------------
ashb commented on pull request #5095: [AIRFLOW-4308] Fix test-only bug of DST
behaviour on python 3.6
URL: https://github.com/apache/airflow/pull/5095
----------------------------------------------------------------
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]
> Changed Time Zone behaviour in Python 3.6+ vs Python 3.5
> --------------------------------------------------------
>
> Key: AIRFLOW-4308
> URL: https://issues.apache.org/jira/browse/AIRFLOW-4308
> Project: Apache Airflow
> Issue Type: Bug
> Reporter: Jarek Potiuk
> Priority: Major
>
> It seems that one of the tests is failing in Python 3.5 vs. Python 3.6
> -related to different behaviour of python with regards to TZ environment
> variable: [https://bugs.python.org/issue30062]- - see Update below:
> We've yet have to determine whether this is a problem with the test or
> Airflow code:
>
> The test below works fine in Python 3.5.
> {code:java}
> + nosetests
> tests.models.test_dag:DagTest.test_following_previous_schedule_daily_dag_CEST_to_CET
> .
> ----------------------------------------------------------------------
> Ran 1 test in 0.005s
> OK
> {code}
>
> But it fails in Python 3.6:
> {code:java}
> nosetests
> tests.models.test_dag:DagTest.test_following_previous_schedule_daily_dag_CEST_to_CET
> F
> ======================================================================
> FAIL: Make sure DST transitions are properly observed
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/opt/airflow/tests/models/test_dag.py", line 800, in
> test_following_previous_schedule_daily_dag_CEST_to_CET
> self.assertEqual(next_local.isoformat(), "2018-10-28T03:00:00+01:00")
> AssertionError: '2018-10-28T02:00:00+01:00' != '2018-10-28T03:00:00+01:00'
> - 2018-10-28T02:00:00+01:00
> ? ^
> + 2018-10-28T03:00:00+01:00
> ? ^{code}
>
> *Update*: it is likely related to the differences how `fold` works
> differently in different python versions and not to the TZ bug:
> [https://pendulum.eustace.io/docs/#using-the-timezone-library-directly]
> And here is the python 3.6 change that triggers it most likely : Local Time
> disambiguation changed in Python 3.6:
> [https://docs.python.org/3/whatsnew/3.6.html#pep-495-local-time-disambiguation]
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)