Skip to content

Commit

Permalink
[AIRFLOW-2973] Add Python 3.6 to Supported Prog Langs
Browse files Browse the repository at this point in the history
  • Loading branch information
kaxil committed Aug 29, 2018
1 parent 1801bae commit a20a648
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ env:
- TOX_ENV=py27-backend_mysql
- TOX_ENV=py27-backend_sqlite
- TOX_ENV=py27-backend_postgres
- 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/
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions tests/contrib/operators/test_mlengine_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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') \
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.

[tox]
envlist = flake8,{py27,py35}-backend_{mysql,sqlite,postgres}
envlist = flake8,{py27,py36}-backend_{mysql,sqlite,postgres}
skipsdist = True

[global]
Expand All @@ -37,7 +37,7 @@ deps =

basepython =
py27: python2.7
py35: python3.5
py36: python3.6

setenv =
HADOOP_DISTRO=cdh
Expand Down

0 comments on commit a20a648

Please sign in to comment.