Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Commit

Permalink
Add support for Python 3.9 (#526)
Browse files Browse the repository at this point in the history
* Add support for Python 3.9

* Bump version to 3.13.0

* Fix a test

* Update date on LICENSE

* Try using miniforge and mamba again

* Fix installing pyopenssl

* Fix typo

* Try again to fix installing pyopenssl

* Use conda activate

Co-authored-by: Chris Burr <chrisburr@users.noreply.github.com>
  • Loading branch information
eduardo-rodrigues and chrisburr committed Nov 2, 2020
1 parent d9ea740 commit 4cde5ee
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 25 deletions.
38 changes: 15 additions & 23 deletions .travis.yml
Expand Up @@ -19,40 +19,36 @@ env:
- PYVER=3.6 NPY="numpy==1.14.5"
- PYVER=3.6 NPY="numpy>=1.15"

- PYVER=3.7 NPY="numpy==1.14.5"
- PYVER=3.7 NPY="numpy>=1.15"

- PYVER=3.8 NPY="numpy>=1.15"

- PYVER=3.9 NPY="numpy>=1.15"

# - PYVER=pypy2.7 NPY="numpy>=1.15"

- PYVER=pypy3.6 NPY="numpy>=1.15"

install:
# Install conda
- wget -nv http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --add channels conda-forge;
# conda install --quiet --yes -c conda-forge/label/mamba-alpha mamba
- eval "$($HOME/miniconda/bin/python -m conda shell.bash hook)"
- conda install --quiet --yes mamba
- conda config --set always_yes yes --set changeps1 no
# Create the conda testing environment
# FIXME: Mamba decides to upgrade Python here so pin it again
# FIXME: Channel priority is also mixed up
# FIXME: Mamba doesn't install pip by default
# FIXME: Mamba causes pip install numpy to be extremely slow
# pyopenssl is for deployment
- if [[ "${PYVER}" = pypy* ]]; then
conda create --quiet --yes -n testenv ${PYVER};
elif [ "${PYVER}" = "2.7" ] || [ "${PYVER}" = "3.6" ] || [ "${PYVER}" = "3.7" || [ "${PYVER}" = "3.8" ]; then
conda create --quiet --yes -n testenv python=${PYVER} pip;
mamba create --quiet --yes -n testenv ${PYVER};
elif [ "${PYVER}" = "2.7" ] || [ "${PYVER}" = "3.6" ] || [ "${PYVER}" = "3.7" || [ "${PYVER}" = "3.8" ] || [ "${PYVER}" = "3.9" ]; then
mamba create --quiet --yes -n testenv python=${PYVER} pip pyopenssl;
else
conda create --quiet --yes -n testenv python=${PYVER};
mamba create --quiet --yes -n testenv python=${PYVER} pyopenssl;
fi
- source activate testenv
- if [ "${PYVER}" = "2.7" ] || [ "${PYVER}" = "3.6" ] || [ "${PYVER}" = "3.7" || [ "${PYVER}" = "3.8" ]; then
conda install --quiet --yes python=${PYVER} pip root;
source activate testenv;
- conda activate testenv
- if [ "${PYVER}" = "2.7" ] || [ "${PYVER}" = "3.6" ] || [ "${PYVER}" = "3.7" || [ "${PYVER}" = "3.8" ] || [ "${PYVER}" = "3.9" ]; then
mamba install --quiet --yes -n testenv python=${PYVER} pip root;
conda activate testenv;
fi
- pip install --upgrade setuptools-scm
- pip install $NPY
Expand All @@ -64,10 +60,6 @@ install:
- pip install cachetools pkgconfig lz4 zstandard xxhash mock requests "pytest>=3.9" pytest-runner
- if [[ ${PYVER} = "2.7" ]] ; then pip install backports.lzma ; fi
- pip install pandas
# pyopenssl is for deployment
- if [[ ${PYVER} != pypy* ]] ; then
conda install -c anaconda python=${PYVER} pyopenssl;
fi
- wget -O tests/samples/Event.root http://scikit-hep.org/uproot/examples/Event.root
- pip install pytest-error-for-skips

Expand All @@ -78,7 +70,7 @@ addons:
- libatlas-base-dev

script:
if [ "${PYVER}" = "2.7" ] || [ "${PYVER}" = "3.6" ] || [ "${PYVER}" = "3.7" || [ "${PYVER}" = "3.8" ]; then
if [ "${PYVER}" = "2.7" ] || [ "${PYVER}" = "3.6" ] || [ "${PYVER}" = "3.7" || [ "${PYVER}" = "3.8" ] || [ "${PYVER}" = "3.9" ]; then
pytest --error-for-skips -v tests;
else
pytest -v tests;
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2017-2018, Jim Pivarski
Copyright (c) 2017-2020, Jim Pivarski
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
15 changes: 15 additions & 0 deletions appveyor.yml
Expand Up @@ -40,6 +40,21 @@ environment:
PYTHON_ARCH: "64"
NUMPY: "numpy>=1.15"

- PYTHON: "C:\\Python37"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "32"
NUMPY: "numpy>=1.15"

- PYTHON: "C:\\Python38"
PYTHON_VERSION: "3.8.x"
PYTHON_ARCH: "32"
NUMPY: "numpy>=1.15"

- PYTHON: "C:\\Python39"
PYTHON_VERSION: "3.9.x"
PYTHON_ARCH: "32"
NUMPY: "numpy>=1.15"

install:
- "SET PATH=%PYTHON%;%PATH%"
- "python --version"
Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -163,6 +163,7 @@ def get_description():
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Mathematics",
Expand Down
2 changes: 1 addition & 1 deletion uproot/version.py
Expand Up @@ -6,7 +6,7 @@

import re

__version__ = "3.12.1"
__version__ = "3.13.0"
version = __version__
version_info = tuple(re.split(r"[-\.]", __version__))

Expand Down

0 comments on commit 4cde5ee

Please sign in to comment.