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

potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new 5dd0802  Removes arrow higher limits for plexus provider (#16026)
5dd0802 is described below

commit 5dd080279937f1993ee4b093fad9371983ee5523
Author: Jarek Potiuk <[email protected]>
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).
---
 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 c47f23c..f92a422 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',

Reply via email to