stale[bot] closed pull request #3816: [HOLD][AIRFLOW-2973] Use Python 3.6.x
everywhere possible
URL: https://github.com/apache/incubator-airflow/pull/3816
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/.travis.yml b/.travis.yml
index 5bd750453a..1e04f8cd8e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,8 +32,12 @@ env:
- TOX_ENV=py35-backend_mysql PYTHON_VERSION=3
- TOX_ENV=py35-backend_sqlite PYTHON_VERSION=3
- TOX_ENV=py35-backend_postgres PYTHON_VERSION=3
+ - TOX_ENV=py36-backend_mysql PYTHON_VERSION=3
+ - TOX_ENV=py36-backend_sqlite PYTHON_VERSION=3
+ - TOX_ENV=py36-backend_postgres PYTHON_VERSION=3
- TOX_ENV=py27-backend_postgres KUBERNETES_VERSION=v1.9.0
- TOX_ENV=py35-backend_postgres KUBERNETES_VERSION=v1.10.0 PYTHON_VERSION=3
+ - TOX_ENV=py36-backend_postgres KUBERNETES_VERSION=v1.10.0 PYTHON_VERSION=3
cache:
directories:
- $HOME/.wheelhouse/
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index beaf609b5a..f84c7501ec 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -87,7 +87,7 @@ There are three ways to setup an Apache Airflow development
environment.
1. Using tools and libraries installed directly on your system.
- Install Python (2.7.x or 3.4.x), MySQL, and libxml by using system-level
package
+ Install Python (2.7.x or 3.6.x), MySQL, and libxml by using system-level
package
managers like yum, apt-get for Linux, or Homebrew for Mac OS at first. Refer
to the [base CI
Dockerfile](https://github.com/apache/incubator-airflow-ci/blob/master/Dockerfile.base)
for
a comprehensive list of required packages.
@@ -146,7 +146,7 @@ There are three ways to setup an Apache Airflow development
environment.
# From the container
pip install -e .[devel]
# Run all the tests with python and mysql through tox
- tox -e py35-backend_mysql
+ tox -e py36-backend_mysql
```
### Running unit tests
@@ -195,7 +195,7 @@ meets these guidelines:
1. Preface your commit's subject & PR's title with **[AIRFLOW-XXX]** where
*XXX* is the JIRA number. We compose release notes (i.e. for Airflow releases)
from all commit titles in a release. By placing the JIRA number in the commit
title and hence in the release notes, Airflow users can look into JIRA and
Github PRs for more details about a particular change.
1. Add an [Apache License](http://www.apache.org/legal/src-headers.html)
header to all new files
1. If the pull request adds functionality, the docs should be updated as part
of the same PR. Doc string are often sufficient. Make sure to follow the
Sphinx compatible standards.
-1. The pull request should work for Python 2.7 and 3.4. If you need help
writing code that works in both Python 2 and 3, see the documentation at the
[Python-Future project](http://python-future.org) (the future package is an
Airflow requirement and should be used where possible).
+1. The pull request should work for Python 2.7 and 3.6. If you need help
writing code that works in both Python 2 and 3, see the documentation at the
[Python-Future project](http://python-future.org) (the future package is an
Airflow requirement and should be used where possible).
1. As Airflow grows as a project, we try to enforce a more consistent style
and try to follow the Python community guidelines. We track this using
[landscape.io](https://landscape.io/github/apache/incubator-airflow/), which
you can setup on your fork as well to check before you submit your PR. We
currently enforce most [PEP8](https://www.python.org/dev/peps/pep-0008/) and a
few other linting rules. It is usually a good idea to lint locally as well
using [flake8](https://flake8.readthedocs.org/en/latest/) using `flake8 airflow
tests`. `git diff upstream/master -u -- "*.py" | flake8 --diff` will return any
changed files in your branch that require linting.
1. Please read this excellent
[article](http://chris.beams.io/posts/git-commit/) on commit messages and
adhere to them. It makes the lives of those who come after you a lot easier.
diff --git
a/airflow/contrib/kubernetes/kubernetes_request_factory/pod_request_factory.py
b/airflow/contrib/kubernetes/kubernetes_request_factory/pod_request_factory.py
index 95d6c829de..00f92161d3 100644
---
a/airflow/contrib/kubernetes/kubernetes_request_factory/pod_request_factory.py
+++
b/airflow/contrib/kubernetes/kubernetes_request_factory/pod_request_factory.py
@@ -85,7 +85,7 @@ class ExtractXcomPodRequestFactory(KubernetesRequestFactory):
- name: xcom
mountPath: {xcomMountPath}
- name: {sidecarContainerName}
- image: python:3.5-alpine
+ image: python:3.6-alpine
command: ["python", "-m", "http.server"]
volumeMounts:
- name: xcom
diff --git a/setup.py b/setup.py
index e5b669d0c1..df83373981 100644
--- a/setup.py
+++ b/setup.py
@@ -398,6 +398,7 @@ def do_setup():
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
'Topic :: System :: Monitoring',
],
author='Apache Software Foundation',
diff --git a/tests/contrib/operators/test_mlengine_operator.py
b/tests/contrib/operators/test_mlengine_operator.py
index 9a8d56cfb2..9c5c6dd29b 100644
--- a/tests/contrib/operators/test_mlengine_operator.py
+++ b/tests/contrib/operators/test_mlengine_operator.py
@@ -327,7 +327,7 @@ def testSuccessCreateTrainingJob(self):
def testSuccessCreateTrainingJobWithOptionalArgs(self):
training_input = copy.deepcopy(self.TRAINING_INPUT)
training_input['trainingInput']['runtimeVersion'] = '1.6'
- training_input['trainingInput']['pythonVersion'] = '3.5'
+ training_input['trainingInput']['pythonVersion'] = '3.6'
training_input['trainingInput']['jobDir'] =
'gs://some-bucket/jobs/test_training'
with patch('airflow.contrib.operators.mlengine_operator.MLEngineHook')
\
@@ -339,7 +339,7 @@ def testSuccessCreateTrainingJobWithOptionalArgs(self):
training_op = MLEngineTrainingOperator(
runtime_version='1.6',
- python_version='3.5',
+ python_version='3.6',
job_dir='gs://some-bucket/jobs/test_training',
**self.TRAINING_DEFAULT_ARGS)
training_op.execute(None)
diff --git a/tox.ini b/tox.ini
index c4b74a1e55..24baccfee9 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,7 +17,7 @@
# under the License.
[tox]
-envlist = flake8,{py27,py35}-backend_{mysql,sqlite,postgres}
+envlist = flake8,{py27,py35,py36}-backend_{mysql,sqlite,postgres}
skipsdist = True
[global]
@@ -38,6 +38,7 @@ deps =
basepython =
py27: python2.7
py35: python3.5
+ py36: python3.6
setenv =
HADOOP_DISTRO=cdh
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services