Skip to content

Commit faacc8d

Browse files
Joe Hammanshoyer
Joe Hamman
authored andcommitted
DEP: drop python 2 support and associated ci mods (#2637)
* drop python 2 support and associated ci mods * add py35-min env file * fix python version in py37-windows env * fix setup.py * move iris and pynio to py36 env * add cdms2 to 36 test env * testing with UVCDAT_ANONYMOUS_LOG=no * use pytest-env * pip for pytest plugins
1 parent 11e6aac commit faacc8d

22 files changed

+71
-96
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ branches:
1010
matrix:
1111
fast_finish: true
1212
include:
13-
- env: CONDA_ENV=py27-min
14-
- env: CONDA_ENV=py27-cdat+iris+pynio
13+
- env: CONDA_ENV=py35-min
1514
- env: CONDA_ENV=py35
1615
- env: CONDA_ENV=py36
1716
- env: CONDA_ENV=py37

appveyor.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ branches:
77
environment:
88

99
matrix:
10-
- PYTHON: "C:\\Python27-conda64"
11-
PYTHON_VERSION: "2.7"
12-
PYTHON_ARCH: "64"
13-
CONDA_ENV: "py27-windows"
14-
1510
- PYTHON: "C:\\Python36-conda64"
1611
PYTHON_VERSION: "3.6"
1712
PYTHON_ARCH: "64"
1813
CONDA_ENV: "py36-windows"
14+
- PYTHON: "C:\\Python37-conda64"
15+
PYTHON_VERSION: "3.7"
16+
PYTHON_ARCH: "64"
17+
CONDA_ENV: "py37-windows"
1918

2019
install:
2120
# Install miniconda Python

ci/requirements-py27-cdat+iris+pynio.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: test_env
22
dependencies:
3-
- python=2.7
3+
- python=3.5
44
- pytest
55
- flake8
66
- mock
77
- numpy=1.12
88
- pandas=0.19
99
- pip:
10-
- coveralls
10+
- pytest-env
1111
- pytest-cov
12+
- coveralls

ci/requirements-py35.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ dependencies:
1010
- matplotlib=1.5
1111
- netcdf4
1212
- pytest
13+
- pytest-env
14+
- pytest-cov
15+
- coveralls
1316
- flake8
1417
- numpy
1518
- pandas
@@ -18,6 +21,3 @@ dependencies:
1821
- toolz
1922
- rasterio
2023
- zarr
21-
- pip:
22-
- coveralls
23-
- pytest-cov

ci/requirements-py36-bottleneck-dev.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ dependencies:
1111
- matplotlib
1212
- netcdf4
1313
- pytest
14+
- pytest-env
15+
- pytest-cov
16+
- coveralls
1417
- flake8
1518
- numpy
1619
- pandas
@@ -19,5 +22,3 @@ dependencies:
1922
- toolz
2023
- pip:
2124
- git+https://github.com/kwgoodman/bottleneck.git
22-
- coveralls
23-
- pytest-cov

ci/requirements-py36-condaforge-rc.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ dependencies:
1212
- matplotlib
1313
- netcdf4
1414
- pytest
15+
- pytest-env
16+
- pytest-cov
17+
- coveralls
1518
- flake8
1619
- numpy
1720
- pandas
1821
- seaborn
1922
- scipy
2023
- toolz
21-
- pip:
22-
- coveralls
23-
- pytest-cov

ci/requirements-py36-dask-dev.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ dependencies:
99
- matplotlib
1010
- netcdf4
1111
- pytest
12+
- pytest-env
13+
- pytest-cov
14+
- coveralls
1215
- flake8
1316
- numpy
1417
- pandas
@@ -20,7 +23,5 @@ dependencies:
2023
- zarr
2124
- pseudonetcdf>=3.0.1
2225
- pip:
23-
- coveralls
24-
- pytest-cov
2526
- git+https://github.com/dask/dask.git
2627
- git+https://github.com/dask/distributed.git

ci/requirements-py36-hypothesis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ dependencies:
1010
- matplotlib
1111
- netcdf4
1212
- pytest
13+
- pytest-env
14+
- pytest-cov
15+
- coveralls
16+
- hypothesis
1317
- flake8
1418
- numpy
1519
- pandas
@@ -19,9 +23,5 @@ dependencies:
1923
- rasterio
2024
- bottleneck
2125
- zarr
22-
- pip:
23-
- coveralls
24-
- pytest-cov
25-
- pydap
26-
- lxml
27-
- hypothesis
26+
- pydap
27+
- lxml

ci/requirements-py36-netcdf4-dev.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ dependencies:
1010
- h5netcdf
1111
- matplotlib
1212
- pytest
13+
- pytest-env
14+
- pytest-cov
15+
- coveralls
1316
- flake8
1417
- numpy
1518
- pandas
1619
- scipy
1720
- toolz
1821
- pip:
19-
- coveralls
20-
- pytest-cov
2122
- git+https://github.com/Unidata/netcdf4-python.git
2223
- git+https://github.com/Unidata/cftime.git

ci/requirements-py36-pandas-dev.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ dependencies:
1212
- matplotlib
1313
- netcdf4
1414
- pytest
15+
- pytest-env
16+
- pytest-cov
17+
- coveralls
1518
- flake8
1619
- numpy
1720
- scipy
1821
- toolz
1922
- pip:
20-
- coveralls
21-
- pytest-cov
2223
- git+https://github.com/pydata/pandas.git

ci/requirements-py36-pynio-dev.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ dependencies:
1313
- netcdf4
1414
- pynio=dev
1515
- pytest
16+
- pytest-env
17+
- pytest-cov
18+
- coveralls
1619
- numpy
1720
- pandas
1821
- scipy
1922
- seaborn
2023
- toolz
2124
- rasterio
2225
- bottleneck
23-
- pip:
24-
- coveralls
25-
- pytest-cov
26-
- pydap
26+
- pydap

ci/requirements-py36-rasterio.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ dependencies:
1111
- matplotlib
1212
- netcdf4
1313
- pytest
14+
- pytest-env
15+
- pytest-cov
16+
- coveralls
1417
- numpy
1518
- pandas
1619
- scipy
1720
- seaborn
1821
- toolz
1922
- rasterio>=1.0
2023
- bottleneck
21-
- pip:
22-
- coveralls
23-
- pytest-cov
24-
- pydap
24+
- pydap

ci/requirements-py36-windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ dependencies:
1111
- matplotlib
1212
- netcdf4
1313
- pytest
14+
- pytest-env
1415
- numpy
1516
- pandas
1617
- scipy

ci/requirements-py36-zarr-dev.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ dependencies:
88
- distributed
99
- matplotlib
1010
- pytest
11+
- pytest-env
12+
- pytest-cov
13+
- coveralls
1114
- flake8
1215
- numpy
1316
- pandas
@@ -16,6 +19,4 @@ dependencies:
1619
- toolz
1720
- bottleneck
1821
- pip:
19-
- coveralls
20-
- pytest-cov
2122
- git+https://github.com/zarr-developers/zarr.git

ci/requirements-py36.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ dependencies:
1111
- matplotlib
1212
- netcdf4
1313
- pytest
14+
- pytest-cov
15+
- pytest-env
16+
- coveralls
1417
- flake8
1518
- numpy
1619
- pandas
@@ -22,9 +25,10 @@ dependencies:
2225
- zarr
2326
- pseudonetcdf>=3.0.1
2427
- eccodes
28+
- cdms2
29+
- pynio
30+
- iris>=1.10
31+
- pydap
32+
- lxml
2533
- pip:
26-
- coveralls
27-
- pytest-cov
28-
- pydap
29-
- lxml
3034
- cfgrib>=0.9.2

ci/requirements-py27-windows.yml renamed to ci/requirements-py37-windows.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,20 @@ name: test_env
22
channels:
33
- conda-forge
44
dependencies:
5-
- python=2.7
5+
- python=3.7
6+
- cftime
67
- dask
78
- distributed
89
- h5py
910
- h5netcdf
1011
- matplotlib
11-
- pathlib2
12+
- netcdf4
1213
- pytest
13-
- flake8
14-
- mock
14+
- pytest-env
1515
- numpy
1616
- pandas
1717
- scipy
1818
- seaborn
1919
- toolz
2020
- rasterio
2121
- zarr
22-
- pip:
23-
- netcdf4

ci/requirements-py37.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ dependencies:
1111
- matplotlib
1212
- netcdf4
1313
- pytest
14+
- pytest-cov
15+
- pytest-env
16+
- coveralls
1417
- flake8
1518
- numpy
1619
- pandas
@@ -21,10 +24,8 @@ dependencies:
2124
- bottleneck
2225
- zarr
2326
- pseudonetcdf>=3.0.1
27+
- lxml
2428
- eccodes
29+
- pydap
2530
- pip:
26-
- coveralls
27-
- pytest-cov
28-
- pydap
29-
- lxml
3031
- cfgrib>=0.9.2

doc/installing.rst

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Installation
66
Required dependencies
77
---------------------
88

9-
- Python 2.7 [1]_, 3.5, 3.6, or 3.7
9+
- Python 3.5, 3.6, or 3.7
1010
- `numpy <http://www.numpy.org/>`__ (1.12 or later)
1111
- `pandas <http://pandas.pydata.org/>`__ (0.19.2 or later)
1212

@@ -111,14 +111,4 @@ To run these benchmark tests in a local machine, first install
111111
- `airspeed-velocity <https://asv.readthedocs.io/en/latest/>`__: a tool for benchmarking Python packages over their lifetime.
112112

113113
and run
114-
``asv run # this will install some conda environments in ./.asv/envs``
115-
116-
.. [1] Xarray plans to drop support for python 2.7 at the end of 2018. This
117-
means that new releases of xarray published after this date will only be
118-
installable on python 3+ environments, but older versions of xarray will
119-
always be available to python 2.7 users. For more information see the
120-
following references:
121-
122-
- `Xarray Github issue discussing dropping Python 2 <https://github.com/pydata/xarray/issues/1829>`__
123-
- `Python 3 Statement <http://www.python3statement.org/>`__
124-
- `Tips on porting to Python 3 <https://docs.python.org/3/howto/pyporting.html>`__
114+
``asv run # this will install some conda environments in ./.asv/envs``

doc/whats-new.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ v0.11.2 (unreleased)
2121
Breaking changes
2222
~~~~~~~~~~~~~~~~
2323

24+
- Remove support for Python 2. This is the first version of xarray that is
25+
Python 3 only. (:issue:`1876`).
26+
By `Joe Hamman <https://github.com/jhamman>`_.
27+
2428
Enhancements
2529
~~~~~~~~~~~~
2630

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ testpaths=xarray/tests
77
# Fixed upstream in https://github.com/kwgoodman/bottleneck/pull/199
88
filterwarnings =
99
ignore:Using a non-tuple sequence for multidimensional indexing is deprecated:FutureWarning
10+
env =
11+
UVCDAT_ANONYMOUS_LOG=no
1012

1113
[flake8]
1214
max-line-length=79

0 commit comments

Comments
 (0)