You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2019/04/18 10:43:00 UTC

[jira] [Resolved] (AIRFLOW-4308) Changed Time Zone behaviour in Python 3.6+ vs Python 3.5

     [ https://issues.apache.org/jira/browse/AIRFLOW-4308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ash Berlin-Taylor resolved AIRFLOW-4308.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.10.4

> 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
>             Fix For: 1.10.4
>
>
> 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)