Skip to content

Commit

Permalink
Removes Python 3.6 support (apache#20467)
Browse files Browse the repository at this point in the history
Co-authored-by: Tzu-ping Chung <[email protected]>
  • Loading branch information
potiuk and uranusjr authored Dec 24, 2021
1 parent e63e23c commit 7c45bc3
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 31 deletions.
14 changes: 7 additions & 7 deletions BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
3.7 3.8 3.9 3.6
3.7 3.8 3.9
-a, --install-airflow-version INSTALL_AIRFLOW_VERSION
Uses different version of Airflow when building PROD image.
Expand Down Expand Up @@ -1474,7 +1474,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
3.7 3.8 3.9 3.6
3.7 3.8 3.9
-I, --production-image
Use production image for entering the environment and builds (not for tests).
Expand Down Expand Up @@ -1541,7 +1541,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
3.7 3.8 3.9 3.6
3.7 3.8 3.9
-v, --verbose
Show verbose information about executed docker, kind, kubectl, helm commands. Useful for
Expand Down Expand Up @@ -1632,7 +1632,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
3.7 3.8 3.9 3.6
3.7 3.8 3.9
####################################################################################################
Expand Down Expand Up @@ -1827,7 +1827,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
3.7 3.8 3.9 3.6
3.7 3.8 3.9
-b, --backend BACKEND
Backend to use for tests - it determines which database is used.
Expand Down Expand Up @@ -1896,7 +1896,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
3.7 3.8 3.9 3.6
3.7 3.8 3.9
-F, --force-build-images
Forces building of the local docker images. The images are rebuilt
Expand Down Expand Up @@ -2305,7 +2305,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
3.7 3.8 3.9 3.6
3.7 3.8 3.9
****************************************************************************************************
Choose backend to run for Airflow
Expand Down
2 changes: 1 addition & 1 deletion CI.rst
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ have to be percent-encoded when you access them via UI (/ = %2F)
+--------------+----------------------------------------------------------+----------------------------------------------------------+

* <BRANCH> might be either "main" or "v2-*-test"
* <X.Y> - Python version (Major + Minor).Should be one of ["3.6", "3.7", "3.8", "3.9"].
* <X.Y> - Python version (Major + Minor).Should be one of ["3.7", "3.8", "3.9"].
* <COMMIT_SHA> - full-length SHA of commit either from the tip of the branch (for pushes/schedule) or
commit from the tip of the branch used for the PR.
Expand Down
2 changes: 1 addition & 1 deletion IMAGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ which checks if the image has been released and will pull it and rebuild it if n
export FORCE_ANSWER_TO_QUESTIONS="true"
export CI="true"
for python_version in "3.6" "3.7" "3.8"
for python_version in "3.7" "3.8" "3.9"
do
./breeze build-image --python ${python_version} --build-cache-local \
--check-if-python-base-image-updated --verbose
Expand Down
2 changes: 1 addition & 1 deletion breeze-complete
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# by the BATS tests automatically during pre-commit and CI
# Those cannot be made read-only as the breeze-complete must be re-sourceable

_breeze_allowed_python_major_minor_versions="3.7 3.8 3.9 3.6"
_breeze_allowed_python_major_minor_versions="3.7 3.8 3.9"
_breeze_allowed_backends="sqlite mysql postgres mssql"
_breeze_allowed_integrations="cassandra kerberos mongo openldap pinot rabbitmq redis statsd trino all"
_breeze_allowed_generate_constraints_modes="source-providers pypi-providers no-providers"
Expand Down
4 changes: 2 additions & 2 deletions dev/REFRESHING_CI_CACHE.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ manual refresh might be needed.
# Manually generating constraint files

```bash
export CURRENT_PYTHON_MAJOR_MINOR_VERSIONS_AS_STRING="3.7 3.8 3.9 3.6"
export CURRENT_PYTHON_MAJOR_MINOR_VERSIONS_AS_STRING="3.7 3.8 3.9"
for python_version in $(echo "${CURRENT_PYTHON_MAJOR_MINOR_VERSIONS_AS_STRING}")
do
./breeze build-image --upgrade-to-newer-dependencies --python ${python_version} --build-cache-local
Expand Down Expand Up @@ -90,5 +90,5 @@ If you have fast network and powerful computer, you can refresh the images in pa
or with gnu parallel:

```bash
parallel -j 4 --linebuffer --tagstring '{}' ./dev/refresh_images.sh ::: 3.7 3.8 3.9 3.6
parallel -j 4 --linebuffer --tagstring '{}' ./dev/refresh_images.sh ::: 3.7 3.8 3.9
```
2 changes: 1 addition & 1 deletion dev/prepare_prod_docker_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export AIRFLOW_SOURCES_DIR

set -e

CURRENT_PYTHON_MAJOR_MINOR_VERSIONS=("3.7" "3.8" "3.9" "3.6")
CURRENT_PYTHON_MAJOR_MINOR_VERSIONS=("3.7" "3.8" "3.9")

usage() {
local cmdname
Expand Down
2 changes: 1 addition & 1 deletion dev/provider_packages/prepare_provider_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

from airflow.utils.yaml import safe_load

ALL_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
ALL_PYTHON_VERSIONS = ["3.7", "3.8", "3.9"]

INITIAL_CHANGELOG_CONTENT = """
Expand Down
2 changes: 1 addition & 1 deletion dev/retag_docker_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

import click

PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
PYTHON_VERSIONS = ["3.7", "3.8", "3.9"]

GHCR_IO_PREFIX = "ghcr.io"

Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/libraries/_initialization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ function initialization::initialize_base_variables() {
export PRODUCTION_IMAGE="false"

# All supported major/minor versions of python in all versions of Airflow
ALL_PYTHON_MAJOR_MINOR_VERSIONS+=("3.6" "3.7" "3.8" "3.9")
ALL_PYTHON_MAJOR_MINOR_VERSIONS+=("3.7" "3.8" "3.9")
export ALL_PYTHON_MAJOR_MINOR_VERSIONS

# Currently supported major/minor versions of python
CURRENT_PYTHON_MAJOR_MINOR_VERSIONS+=("3.7" "3.8" "3.9" "3.6")
CURRENT_PYTHON_MAJOR_MINOR_VERSIONS+=("3.7" "3.8" "3.9")
export CURRENT_PYTHON_MAJOR_MINOR_VERSIONS

# Currently supported versions of Postgres
Expand Down
2 changes: 0 additions & 2 deletions scripts/ci/selective_ci_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ function output_all_basic_variables() {
initialization::ga_output default-helm-version "${HELM_VERSION}"

if [[ ${FULL_TESTS_NEEDED_LABEL} == "true" ]]; then
initialization::ga_output postgres-exclude '[{ "python-version": "3.6" }]'
initialization::ga_output mysql-exclude '[{ "python-version": "3.7" }, { "python-version": "3.9" }]'
initialization::ga_output mssql-exclude '[{ "python-version": "3.6" }, { "python-version": "3.8" }]'
initialization::ga_output sqlite-exclude '[{ "python-version": "3.7" }, { "python-version": "3.8" }]'
else
initialization::ga_output postgres-exclude '[]'
Expand Down
7 changes: 2 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ classifiers =
Intended Audience :: Developers
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Expand All @@ -70,7 +69,7 @@ project_urls =
[options]
zip_safe = False
include_package_data = True
python_requires = ~=3.6
python_requires = ~=3.7
packages = find:
setup_requires =
gitpython
Expand All @@ -86,10 +85,8 @@ install_requires =
attrs>=20.0, <21.0
blinker
cached_property~=1.5;python_version<="3.7"
# cattrs >= 1.1.0 dropped support for Python 3.6
cattrs>=1.0, <1.1.0;python_version<="3.6"
# cattrs >= 1.7.0 break lineage - see https://github.com/apache/airflow/issues/16172
cattrs~=1.1, <1.7.0;python_version>"3.6"
cattrs~=1.1, <1.7.0
# Required by vendored-in connexion
clickclick>=1.2
colorlog>=4.0.2, <6.0
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version
]
dask = [
'cloudpickle>=1.4.1, <1.5.0',
'dask<2021.3.1;python_version<"3.7"', # dask stopped supporting python 3.6 in 2021.3.1 version
'dask>=2.9.0, <2021.6.1;python_version>="3.7"', # dask 2021.6.1 does not work with `distributed`
'dask>=2.9.0, <2021.6.1', # dask 2021.6.1 does not work with `distributed`
'distributed>=2.11.1, <2.20',
]
databricks = [
Expand Down Expand Up @@ -872,7 +871,7 @@ def is_package_excluded(package: str, exclusion_list: List[str]) -> bool:

def sort_extras_requirements() -> Dict[str, List[str]]:
"""
For Python 3.6+ the dictionary order remains when keys() are retrieved.
The dictionary order remains when keys() are retrieved.
Sort both: extras and list of dependencies to make it easier to analyse problems
external packages will be first, then if providers are added they are added at the end of the lists.
"""
Expand Down
8 changes: 4 additions & 4 deletions tests/bats/breeze/test_breeze_complete.bats
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
source "${AIRFLOW_SOURCES}/breeze-complete"

breeze_complete::get_known_values_breeze "-p"
assert_equal "${_breeze_known_values}" "3.7 3.8 3.9 3.6"
assert_equal "${_breeze_known_values}" "3.7 3.8 3.9"
}

@test "Test get_known_values long" {
Expand All @@ -34,7 +34,7 @@
source "${AIRFLOW_SOURCES}/breeze-complete"

breeze_complete::get_known_values_breeze "--python"
assert_equal "${_breeze_known_values}" "3.7 3.8 3.9 3.6"
assert_equal "${_breeze_known_values}" "3.7 3.8 3.9"
}

@test "Test wrong get_known_values" {
Expand Down Expand Up @@ -125,7 +125,7 @@
COMP_WORDS=("--python" "")
breeze_complete::_comp_breeze

assert_equal "${COMPREPLY[*]}" "3.7 3.8 3.9 3.6"
assert_equal "${COMPREPLY[*]}" "3.7 3.8 3.9"
}

@test "Test autocomplete --python with prefix" {
Expand All @@ -136,7 +136,7 @@
COMP_WORDS=("--python" "3")
breeze_complete::_comp_breeze

assert_equal "${COMPREPLY[*]}" "3.7 3.8 3.9 3.6"
assert_equal "${COMPREPLY[*]}" "3.7 3.8 3.9"
}

@test "Test autocomplete build-" {
Expand Down

0 comments on commit 7c45bc3

Please sign in to comment.