Skip to content

Commit

Permalink
Removes arrow higher limits for plexus provider (apache#16026)
Browse files Browse the repository at this point in the history
Plexus provider needlessly limits arrow to <1.0.0. This was added
in apache#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 5dd0802)
  • Loading branch information
potiuk committed Jun 22, 2021
1 parent 602550a commit 25753cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion airflow/providers/plexus/hooks/plexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _generate_token(self) -> Any:
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:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ def get_sphinx_theme_version() -> str:
'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',
Expand Down

0 comments on commit 25753cf

Please sign in to comment.