Skip to content

Commit e497228

Browse files
authored
Updates 3.6 limits for latest versions of a few libraries (#15209)
This PR sets Pythong 3.6 specific limits for some of the packages that recently dropped support for Python 3.6 binary packages released via PyPI. Even if those packages did not drop the Python 3.6 support entirely, it gets more and more difficult to get those packages installed (both locally and in the Docker image) because the require the packages to be compiled and they often require a number of external dependencies to do so. This makes it difficult to automatically upgrade dependencies, because such upgrade fails for Python 3.6 images if we attempt to do so. This PR limits several of those dependencies (dask/pandas/numpy) to not use the lates major releases for those packages but limits them to the latest released versions. Also comment/clarification was added to recently (#15114) added limit for `pandas-gbq`. This limit has been added because of broken import for bigquery provider, but the comment about it was missing so the comment is added now.
1 parent 1087226 commit e497228

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

β€Žairflow/models/baseoperator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1523,7 +1523,7 @@ def cross_downstream(
15231523
class BaseOperatorLink(metaclass=ABCMeta):
15241524
"""Abstract base class that defines how we get an operator link."""
15251525

1526-
operators: ClassVar[List[Type[BaseOperator]]] = []
1526+
operators: ClassVar[List[Type[BaseOperator]]] = [] # pylint: disable=invalid-name
15271527
"""
15281528
This property will be used by Airflow Plugins to find the Operators to which you want
15291529
to assign this Operator Link

β€Žairflow/providers/google/cloud/operators/dataflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ class CheckJobRunning(Enum):
4343
WaitForRun - wait for job to finish and then continue with new job
4444
"""
4545

46-
IgnoreJob = 1
47-
FinishIfRunning = 2
48-
WaitForRun = 3
46+
IgnoreJob = 1 # pylint: disable=invalid-name
47+
FinishIfRunning = 2 # pylint: disable=invalid-name
48+
WaitForRun = 3 # pylint: disable=invalid-name
4949

5050

5151
class DataflowConfiguration:

β€Žsetup.cfg

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,12 @@ install_requires =
110110
markdown>=2.5.2, <4.0
111111
markupsafe>=1.1.1, <2.0
112112
marshmallow-oneofschema>=2.0.1
113-
pandas>=0.17.1, <2.0
113+
# Numpy stopped releasing 3.6 binaries for 1.20.* series.
114+
numpy<1.20;python_version<"3.7"
115+
numpy;python_version>="3.7"
116+
# Pandas stopped releasing 3.6 binaries for 1.2.* series.
117+
pandas>=0.17.1, <1.2;python_version<"3.7"
118+
pandas>=0.17.1, <2.0;python_version>="3.7"
114119
pendulum~=2.0
115120
pep562~=1.0;python_version<"3.7"
116121
psutil>=4.2.0, <6.0.0

β€Žsetup.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,12 @@ def get_sphinx_theme_version() -> str:
237237
cloudant = [
238238
'cloudant>=2.0',
239239
]
240-
dask = ['cloudpickle>=1.4.1, <1.5.0', 'distributed>=2.11.1, <2.20']
240+
dask = [
241+
'cloudpickle>=1.4.1, <1.5.0',
242+
'dask<2021.3.1;python_version>"3.7"', # dask stopped supporting python 3.6 in 2021.3.1 version
243+
'dask>=2.9.0;python_version>="3.7"',
244+
'distributed>=2.11.1, <2.20',
245+
]
241246
databricks = [
242247
'requests>=2.20.0, <3',
243248
]
@@ -313,6 +318,8 @@ def get_sphinx_theme_version() -> str:
313318
'google-cloud-workflows>=0.1.0,<2.0.0',
314319
'grpcio-gcp>=0.2.2',
315320
'json-merge-patch~=0.2',
321+
# pandas-gbq 0.15.0 release broke google provider's bigquery import
322+
# _check_google_client_version (airflow/providers/google/cloud/hooks/bigquery.py:49)
316323
'pandas-gbq<0.15.0',
317324
'plyvel',
318325
]

0 commit comments

Comments
 (0)