You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2021/06/22 19:24:47 UTC

[airflow] 09/47: Removes arrow higher limits for plexus provider (#16026)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v2-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 25753cfe78ab08b6556c8507a39cd308f9ae1f6d
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Mon May 24 19:33:26 2021 +0200

    Removes arrow higher limits for plexus provider (#16026)
    
    Plexus provider needlessly limits arrow to <1.0.0. This was added
    in #14781 to fix failing tests, but Plexus uses arrow in a very
    limited way and it turned out that just checking for None value
    before running arrow.get(), fixes the problem (and we can upgrade
    to latest version of arrow as well).
    
    (cherry picked from commit 5dd080279937f1993ee4b093fad9371983ee5523)
---
 airflow/providers/plexus/hooks/plexus.py | 2 +-
 setup.py                                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/airflow/providers/plexus/hooks/plexus.py b/airflow/providers/plexus/hooks/plexus.py
index 78b8e44..21e8069 100644
--- a/airflow/providers/plexus/hooks/plexus.py
+++ b/airflow/providers/plexus/hooks/plexus.py
@@ -67,7 +67,7 @@ class PlexusHook(BaseHook):
     def token(self) -> Any:
         """Returns users token"""
         if self.__token is not None:
-            if arrow.get(self.__token_exp) <= arrow.now():
+            if not self.__token_exp or arrow.get(self.__token_exp) <= arrow.now():
                 self.__token = self._generate_token()
             return self.__token
         else:
diff --git a/setup.py b/setup.py
index 85237a1..da32c3f 100644
--- a/setup.py
+++ b/setup.py
@@ -416,7 +416,7 @@ pinot = [
     'pinotdb>0.1.2,<1.0.0',
 ]
 plexus = [
-    'arrow>=0.16.0,<1.0.0',
+    'arrow>=0.16.0',
 ]
 postgres = [
     'psycopg2-binary>=2.7.4',