diff --git a/.travis.yml b/.travis.yml index 8c2ee3ab0d5..fbb7221d7ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,7 @@ branches: matrix: fast_finish: true include: - - env: CONDA_ENV=py27-min - - env: CONDA_ENV=py27-cdat+iris+pynio + - env: CONDA_ENV=py35-min - env: CONDA_ENV=py35 - env: CONDA_ENV=py36 - env: CONDA_ENV=py37 diff --git a/appveyor.yml b/appveyor.yml index 7020adae572..347883b96cb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,15 +7,14 @@ branches: environment: matrix: - - PYTHON: "C:\\Python27-conda64" - PYTHON_VERSION: "2.7" - PYTHON_ARCH: "64" - CONDA_ENV: "py27-windows" - - PYTHON: "C:\\Python36-conda64" PYTHON_VERSION: "3.6" PYTHON_ARCH: "64" CONDA_ENV: "py36-windows" + - PYTHON: "C:\\Python37-conda64" + PYTHON_VERSION: "3.7" + PYTHON_ARCH: "64" + CONDA_ENV: "py37-windows" install: # Install miniconda Python diff --git a/ci/requirements-py27-cdat+iris+pynio.yml b/ci/requirements-py27-cdat+iris+pynio.yml deleted file mode 100644 index 116e323d517..00000000000 --- a/ci/requirements-py27-cdat+iris+pynio.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: test_env -channels: - - conda-forge -dependencies: - - python=2.7 - - cdat-lite - - cftime - - cyordereddict - - dask - - distributed - - h5py - - h5netcdf - - matplotlib - - netcdf4 - - numpy - - pandas - - pathlib2 - - pynio - - pytest - - flake8 - - mock - - scipy - - seaborn - - toolz - - rasterio - - iris>=1.10 - - zarr - - pip: - - coveralls - - pytest-cov diff --git a/ci/requirements-py27-min.yml b/ci/requirements-py35-min.yml similarity index 71% rename from ci/requirements-py27-min.yml rename to ci/requirements-py35-min.yml index 118b629271e..1f41d0d9dc1 100644 --- a/ci/requirements-py27-min.yml +++ b/ci/requirements-py35-min.yml @@ -1,11 +1,12 @@ name: test_env dependencies: - - python=2.7 + - python=3.5 - pytest - flake8 - mock - numpy=1.12 - pandas=0.19 - pip: - - coveralls + - pytest-env - pytest-cov + - coveralls \ No newline at end of file diff --git a/ci/requirements-py35.yml b/ci/requirements-py35.yml index 9615aeba9aa..29f4bb020fc 100644 --- a/ci/requirements-py35.yml +++ b/ci/requirements-py35.yml @@ -10,6 +10,9 @@ dependencies: - matplotlib=1.5 - netcdf4 - pytest + - pytest-env + - pytest-cov + - coveralls - flake8 - numpy - pandas @@ -18,6 +21,3 @@ dependencies: - toolz - rasterio - zarr - - pip: - - coveralls - - pytest-cov diff --git a/ci/requirements-py36-bottleneck-dev.yml b/ci/requirements-py36-bottleneck-dev.yml index b8619658929..bdf0349b5c0 100644 --- a/ci/requirements-py36-bottleneck-dev.yml +++ b/ci/requirements-py36-bottleneck-dev.yml @@ -11,6 +11,9 @@ dependencies: - matplotlib - netcdf4 - pytest + - pytest-env + - pytest-cov + - coveralls - flake8 - numpy - pandas @@ -19,5 +22,3 @@ dependencies: - toolz - pip: - git+https://github.com/kwgoodman/bottleneck.git - - coveralls - - pytest-cov diff --git a/ci/requirements-py36-condaforge-rc.yml b/ci/requirements-py36-condaforge-rc.yml index 8436d4e3e83..ba980deeeea 100644 --- a/ci/requirements-py36-condaforge-rc.yml +++ b/ci/requirements-py36-condaforge-rc.yml @@ -12,12 +12,12 @@ dependencies: - matplotlib - netcdf4 - pytest + - pytest-env + - pytest-cov + - coveralls - flake8 - numpy - pandas - seaborn - scipy - toolz - - pip: - - coveralls - - pytest-cov diff --git a/ci/requirements-py36-dask-dev.yml b/ci/requirements-py36-dask-dev.yml index e580aaf3889..20b10fe29ee 100644 --- a/ci/requirements-py36-dask-dev.yml +++ b/ci/requirements-py36-dask-dev.yml @@ -9,6 +9,9 @@ dependencies: - matplotlib - netcdf4 - pytest + - pytest-env + - pytest-cov + - coveralls - flake8 - numpy - pandas @@ -20,7 +23,5 @@ dependencies: - zarr - pseudonetcdf>=3.0.1 - pip: - - coveralls - - pytest-cov - git+https://github.com/dask/dask.git - git+https://github.com/dask/distributed.git diff --git a/ci/requirements-py36-hypothesis.yml b/ci/requirements-py36-hypothesis.yml index 29f4ae33538..c5c228095a4 100644 --- a/ci/requirements-py36-hypothesis.yml +++ b/ci/requirements-py36-hypothesis.yml @@ -10,6 +10,10 @@ dependencies: - matplotlib - netcdf4 - pytest + - pytest-env + - pytest-cov + - coveralls + - hypothesis - flake8 - numpy - pandas @@ -19,9 +23,5 @@ dependencies: - rasterio - bottleneck - zarr - - pip: - - coveralls - - pytest-cov - - pydap - - lxml - - hypothesis + - pydap + - lxml diff --git a/ci/requirements-py36-netcdf4-dev.yml b/ci/requirements-py36-netcdf4-dev.yml index a473ceb5b0a..2616a113fa4 100644 --- a/ci/requirements-py36-netcdf4-dev.yml +++ b/ci/requirements-py36-netcdf4-dev.yml @@ -10,13 +10,14 @@ dependencies: - h5netcdf - matplotlib - pytest + - pytest-env + - pytest-cov + - coveralls - flake8 - numpy - pandas - scipy - toolz - pip: - - coveralls - - pytest-cov - git+https://github.com/Unidata/netcdf4-python.git - git+https://github.com/Unidata/cftime.git diff --git a/ci/requirements-py36-pandas-dev.yml b/ci/requirements-py36-pandas-dev.yml index 1f1acabcae9..2b914f746ab 100644 --- a/ci/requirements-py36-pandas-dev.yml +++ b/ci/requirements-py36-pandas-dev.yml @@ -12,11 +12,12 @@ dependencies: - matplotlib - netcdf4 - pytest + - pytest-env + - pytest-cov + - coveralls - flake8 - numpy - scipy - toolz - pip: - - coveralls - - pytest-cov - git+https://github.com/pydata/pandas.git diff --git a/ci/requirements-py36-pynio-dev.yml b/ci/requirements-py36-pynio-dev.yml index 2caaa8affe5..b8987611a6e 100644 --- a/ci/requirements-py36-pynio-dev.yml +++ b/ci/requirements-py36-pynio-dev.yml @@ -13,6 +13,9 @@ dependencies: - netcdf4 - pynio=dev - pytest + - pytest-env + - pytest-cov + - coveralls - numpy - pandas - scipy @@ -20,7 +23,4 @@ dependencies: - toolz - rasterio - bottleneck - - pip: - - coveralls - - pytest-cov - - pydap + - pydap diff --git a/ci/requirements-py36-rasterio.yml b/ci/requirements-py36-rasterio.yml index 2ec75f5d8b2..dda9ea8cd29 100644 --- a/ci/requirements-py36-rasterio.yml +++ b/ci/requirements-py36-rasterio.yml @@ -11,6 +11,9 @@ dependencies: - matplotlib - netcdf4 - pytest + - pytest-env + - pytest-cov + - coveralls - numpy - pandas - scipy @@ -18,7 +21,4 @@ dependencies: - toolz - rasterio>=1.0 - bottleneck - - pip: - - coveralls - - pytest-cov - - pydap + - pydap diff --git a/ci/requirements-py36-windows.yml b/ci/requirements-py36-windows.yml index 62f08318087..b139d5c78ca 100644 --- a/ci/requirements-py36-windows.yml +++ b/ci/requirements-py36-windows.yml @@ -11,6 +11,7 @@ dependencies: - matplotlib - netcdf4 - pytest + - pytest-env - numpy - pandas - scipy diff --git a/ci/requirements-py36-zarr-dev.yml b/ci/requirements-py36-zarr-dev.yml index 6ed466ba5cb..9966cf74815 100644 --- a/ci/requirements-py36-zarr-dev.yml +++ b/ci/requirements-py36-zarr-dev.yml @@ -8,6 +8,9 @@ dependencies: - distributed - matplotlib - pytest + - pytest-env + - pytest-cov + - coveralls - flake8 - numpy - pandas @@ -16,6 +19,4 @@ dependencies: - toolz - bottleneck - pip: - - coveralls - - pytest-cov - git+https://github.com/zarr-developers/zarr.git diff --git a/ci/requirements-py36.yml b/ci/requirements-py36.yml index 321f3087ea2..2986dc33adb 100644 --- a/ci/requirements-py36.yml +++ b/ci/requirements-py36.yml @@ -11,6 +11,9 @@ dependencies: - matplotlib - netcdf4 - pytest + - pytest-cov + - pytest-env + - coveralls - flake8 - numpy - pandas @@ -22,9 +25,10 @@ dependencies: - zarr - pseudonetcdf>=3.0.1 - eccodes + - cdms2 + - pynio + - iris>=1.10 + - pydap + - lxml - pip: - - coveralls - - pytest-cov - - pydap - - lxml - cfgrib>=0.9.2 diff --git a/ci/requirements-py27-windows.yml b/ci/requirements-py37-windows.yml similarity index 74% rename from ci/requirements-py27-windows.yml rename to ci/requirements-py37-windows.yml index 967b7c584b9..24a7f556b2c 100644 --- a/ci/requirements-py27-windows.yml +++ b/ci/requirements-py37-windows.yml @@ -2,16 +2,16 @@ name: test_env channels: - conda-forge dependencies: - - python=2.7 + - python=3.7 + - cftime - dask - distributed - h5py - h5netcdf - matplotlib - - pathlib2 + - netcdf4 - pytest - - flake8 - - mock + - pytest-env - numpy - pandas - scipy @@ -19,5 +19,3 @@ dependencies: - toolz - rasterio - zarr - - pip: - - netcdf4 diff --git a/ci/requirements-py37.yml b/ci/requirements-py37.yml index 6292c4c5eb6..86a44ed5398 100644 --- a/ci/requirements-py37.yml +++ b/ci/requirements-py37.yml @@ -11,6 +11,9 @@ dependencies: - matplotlib - netcdf4 - pytest + - pytest-cov + - pytest-env + - coveralls - flake8 - numpy - pandas @@ -21,10 +24,8 @@ dependencies: - bottleneck - zarr - pseudonetcdf>=3.0.1 + - lxml - eccodes + - pydap - pip: - - coveralls - - pytest-cov - - pydap - - lxml - cfgrib>=0.9.2 \ No newline at end of file diff --git a/doc/installing.rst b/doc/installing.rst index fbe6a316936..083ac6c450a 100644 --- a/doc/installing.rst +++ b/doc/installing.rst @@ -6,7 +6,7 @@ Installation Required dependencies --------------------- -- Python 2.7 [1]_, 3.5, 3.6, or 3.7 +- Python 3.5, 3.6, or 3.7 - `numpy `__ (1.12 or later) - `pandas `__ (0.19.2 or later) @@ -111,14 +111,4 @@ To run these benchmark tests in a local machine, first install - `airspeed-velocity `__: a tool for benchmarking Python packages over their lifetime. and run -``asv run # this will install some conda environments in ./.asv/envs`` - -.. [1] Xarray plans to drop support for python 2.7 at the end of 2018. This - means that new releases of xarray published after this date will only be - installable on python 3+ environments, but older versions of xarray will - always be available to python 2.7 users. For more information see the - following references: - - - `Xarray Github issue discussing dropping Python 2 `__ - - `Python 3 Statement `__ - - `Tips on porting to Python 3 `__ +``asv run # this will install some conda environments in ./.asv/envs`` \ No newline at end of file diff --git a/doc/whats-new.rst b/doc/whats-new.rst index ea3a12aae0d..b1c80ced761 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -21,6 +21,10 @@ v0.11.2 (unreleased) Breaking changes ~~~~~~~~~~~~~~~~ +- Remove support for Python 2. This is the first version of xarray that is + Python 3 only. (:issue:`1876`). + By `Joe Hamman `_. + Enhancements ~~~~~~~~~~~~ diff --git a/setup.cfg b/setup.cfg index 51261be0b36..847415ac04d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,6 +7,8 @@ testpaths=xarray/tests # Fixed upstream in https://github.com/kwgoodman/bottleneck/pull/199 filterwarnings = ignore:Using a non-tuple sequence for multidimensional indexing is deprecated:FutureWarning +env = + UVCDAT_ANONYMOUS_LOG=no [flake8] max-line-length=79 diff --git a/setup.py b/setup.py index eaf57dff81d..ac226c4cab5 100644 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ 'Topic :: Scientific/Engineering', ] +PYTHON_REQUIRES = '>=3.5' INSTALL_REQUIRES = ['numpy >= 1.12', 'pandas >= 0.19.2'] SETUP_REQUIRES = ['pytest-runner >= 4.2'] TESTS_REQUIRE = ['pytest >= 2.7.1'] @@ -66,10 +67,10 @@ classifiers=CLASSIFIERS, description=DESCRIPTION, long_description=LONG_DESCRIPTION, + python_requires=PYTHON_REQUIRES, install_requires=INSTALL_REQUIRES, setup_requires=SETUP_REQUIRES, tests_require=TESTS_REQUIRE, url=URL, - python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*', packages=find_packages(), package_data={'xarray': ['tests/data/*']})