You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Jarek Potiuk (JIRA)" <ji...@apache.org> on 2019/04/14 07:39:00 UTC

[jira] [Updated] (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 ]

Jarek Potiuk updated AIRFLOW-4308:
----------------------------------
    Description: 
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] 

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:

[https://pendulum.eustace.io/docs/#using-the-timezone-library-directly]

 

 

 

 

  was:
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] 

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}
 

 


> 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] 
> 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:
> [https://pendulum.eustace.io/docs/#using-the-timezone-library-directly]
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)