Skip to content

Commit

Permalink
Merge pull request #96 from Erotemic/dev/0.15.5
Browse files Browse the repository at this point in the history
Dev/0.15.5
  • Loading branch information
Erotemic committed Jun 28, 2021
2 parents e929442 + 7609992 commit ddaad20
Show file tree
Hide file tree
Showing 16 changed files with 270 additions and 65 deletions.
109 changes: 74 additions & 35 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,38 +211,75 @@ workflows:
version: 2
test:
jobs:
- test_full/cp310-310-linux
- test_full/cp39-39-linux
- test_full/cp38-38-linux
- test_full/cp37-37m-linux
- test_full/cp36-36m-linux
- test_full/cp35-35m-linux
- test_full/cp34-34m-linux
- test_full/cp27-27mu-linux

- test_minimal/cp310-310-linux
- test_minimal/cp39-39-linux
- test_minimal/cp38-38-linux
- test_minimal/cp37-37m-linux
- test_minimal/cp36-36m-linux
- test_minimal/cp35-35m-linux
- test_minimal/cp34-34m-linux
- test_minimal/cp27-27mu-linux

- test_minimal/pypy3
- test_full/pypy3

- test_full/pypy3
- gpgsign/cp38-38-linux

#- gpgsign/cp38-38-linux:
# filters:
# branches:
# only:
# - master
# - release
- test_full/cp3_10-3_10-linux:
filters: &__ignore_release__ # this yaml anchor to ignore tests on the release branch
branches:
ignore:
- release
- test_full/cp39-39-linux:
filters:
<<: *__ignore_release__
- test_full/cp38-38-linux:
filters:
<<: *__ignore_release__
- test_full/cp37-37m-linux:
filters:
<<: *__ignore_release__
- test_full/cp36-36m-linux:
filters:
<<: *__ignore_release__
- test_full/cp35-35m-linux:
filters:
<<: *__ignore_release__
- test_full/cp34-34m-linux:
filters:
<<: *__ignore_release__
- test_full/cp27-27mu-linux:
filters:
<<: *__ignore_release__

- test_minimal/cp3_10-3_10-linux:
filters:
<<: *__ignore_release__
- test_minimal/cp39-39-linux:
filters:
<<: *__ignore_release__
- test_minimal/cp38-38-linux:
filters:
<<: *__ignore_release__
- test_minimal/cp37-37m-linux:
filters:
<<: *__ignore_release__
- test_minimal/cp36-36m-linux:
filters:
<<: *__ignore_release__
- test_minimal/cp35-35m-linux:
filters:
<<: *__ignore_release__
- test_minimal/cp34-34m-linux:
filters:
<<: *__ignore_release__
- test_minimal/cp27-27mu-linux:
filters:
<<: *__ignore_release__

- test_minimal/pypy3:
filters:
<<: *__ignore_release__
- test_full/pypy3:
filters:
<<: *__ignore_release__

- gpgsign/cp38-38-linux:
filters:
branches:
only:
- master
- release

- deploy/cp38-38-linux:
requires:
- gpgsign/cp38-38-linux
filters:
branches:
only:
Expand All @@ -260,6 +297,8 @@ jobs:
- PYTHON_EXE: python
docker:
- image: circleci/python
# We shouldnt need a lot of resources to run
resource_class: small
steps:
- checkout
#working_directory: ~/{{ .Environment.CIRCLE_JOB }}
Expand Down Expand Up @@ -347,7 +386,7 @@ jobs:
steps:
- checkout
- run:
name: build_gpg_deps
name: gpg_sign_dist
command: |
$PYTHON_EXE -m venv venv || virtualenv -v venv # first command is python3 || second is python2
. venv/bin/activate
Expand Down Expand Up @@ -417,7 +456,7 @@ jobs:
echo "Tag already exists"
else
git tag $VERSION -m "tarball tag $VERSION"
git push --tags "https://${GIT_PUSH_TOKEN}@${URL_HOST}"
git push --tags "https://${GITHUB_PUSH_TOKEN}@${URL_HOST}"
fi
Expand All @@ -431,7 +470,7 @@ jobs:
# All we need to do is change the base docker image so python is the
# version we want we can reuse everything else from the template
#
test_full/cp310-310-linux:
test_full/cp3_10-3_10-linux:
<<: *test_full_template
docker:
- image: circleci/python:3.10-rc
Expand All @@ -454,7 +493,7 @@ jobs:
test_full/cp36-36m-linux:
<<: *test_full_template
docker:
- image: circleci/python:3.5
- image: circleci/python:3.6

test_full/cp35-35m-linux:
<<: *test_full_template
Expand All @@ -472,7 +511,7 @@ jobs:
- image: circleci/python:2.7

# ------------
test_minimal/cp310-310-linux:
test_minimal/cp3_10-3_10-linux:
<<: *test_minimal_template
docker:
- image: circleci/python:3.10-rc
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ We are currently working on porting this changelog to the specifications in
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## Version 0.15.4 - Unreleased
## Version 0.15.5 - Unreleased

### Changed
* Better message when a pytest skip or exit-test-exception occurs

### Fixed
* Suppressed warning about using internal `FixtureRequest`


## Version 0.15.4 - Released 2021-01-29

### Fixed
* Minor issues with release tarballs.
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ test_script:
# the interpreter you're using - Appveyor does not do anything special
# to put the Python version you want to use on PATH.
- set PYTHONIOENCODING=utf-8
- "%PYTHON%\\python.exe -m pip install pytest-cov==2.8.1"
#- "%PYTHON%\\python.exe -m pip install pytest-cov==2.8.1"
- "%PYTHON%\\python.exe -m xdoctest xdoctest"
- "%PYTHON%\\python.exe -m pytest -s --xdoctest-verbose=3"

Expand Down
60 changes: 60 additions & 0 deletions dev/check_pytest_version_compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

import os
import ubelt as ub
from distutils.version import LooseVersion

os.chdir(ub.expandpath("$HOME/code/pytest"))

info = ub.cmd('git tag')

tags = [t for t in info['out'].split('\n') if t]
tags = sorted(tags, key=LooseVersion)

has_ispytest = {}
language_classifiers = {}

for tag in ub.ProgIter(tags):
ub.cmd('git checkout {}'.format(tag))
info = ub.cmd('grep -I -ER _ispytest')
has_ispytest[tag] = len(info['out'].strip()) > 0
info = ub.cmd('grep -I -ER "Programming Language :: Python" setup.cfg')
language_classifiers[tag] = info['out']


for tag, flag in has_ispytest.items():
if flag:
break
print('First tag with _pytest = {!r}'.format(tag))


pythonversion_to_supported = ub.ddict(list)
for tag, clfs in language_classifiers.items():
if clfs != '':
for line in clfs.split('\n'):
pythonversion_to_supported[line.strip()].append(tag)


keys = [
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',

]
for key in keys:
cands = pythonversion_to_supported[key]
if cands:
max_version = max(cands, key=LooseVersion)
print('key = {} max_version = {!r}'.format(key, max_version))

# key = Programming Language :: Python :: 2.7 max_version = '4.6.11'
# key = Programming Language :: Python :: 3.4 max_version = '4.6.11'
# key = Programming Language :: Python :: 3.5 max_version = '6.2.0.dev0'
# key = Programming Language :: Python :: 3.6 max_version = '6.3.0.dev0'
# key = Programming Language :: Python :: 3.7 max_version = '6.3.0.dev0'
# key = Programming Language :: Python :: 3.8 max_version = '6.3.0.dev0'
# key = Programming Language :: Python :: 3.9 max_version = '6.3.0.dev0'
18 changes: 13 additions & 5 deletions docs/source/installing_python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,19 @@ creating, and activating a virtual environment.
# Download the conda install script into a temporary directory
mkdir -p ~/tmp
cd ~/tmp
CONDA_INSTALL_SCRIPT=Miniconda3-latest-Linux-x86_64.sh
# To update to a newer version see:
# https://docs.conda.io/en/latest/miniconda_hashes.html for updating
CONDA_INSTALL_SCRIPT=Miniconda3-py38_4.9.2-Linux-x86_64.sh
CONDA_EXPECTED_SHA256=1314b90489f154602fd794accfc90446111514a5a72fe1f71ab83e07de9504a7
curl https://repo.anaconda.com/miniconda/$CONDA_INSTALL_SCRIPT > $CONDA_INSTALL_SCRIPT
chmod +x $CONDA_INSTALL_SCRIPT
CONDA_GOT_SHA256=$(sha256sum $CONDA_INSTALL_SCRIPT | cut -d' ' -f1)
# For security, it is important to verify the hash
if [[ "$CONDA_GOT_SHA256" != "$CONDA_EXPECTED_SHA256_HASH" ]]; then
echo "Downloaded file does not match hash! DO NOT CONTINUE!"
exit 1;
fi
chmod +x $CONDA_INSTALL_SCRIPT
# Install miniconda to user local directory
_CONDA_ROOT=$HOME/.local/conda
Expand All @@ -29,8 +39,7 @@ creating, and activating a virtual environment.
conda create --name py38 python=3.8 --yes
# Activate your vitualenv
# I recommend adding the following steps to your ~/.bashrc
_CONDA_ROOT=$HOME/.local/conda
# I recommend doing something similar in your ~/.bashrc
source $_CONDA_ROOT/etc/profile.d/conda.sh
conda activate py38
Expand All @@ -54,5 +63,4 @@ For other operating systems, see the official documentation to install conda
`on Windows <https://docs.conda.io/projects/conda/en/latest/user-guide/install/windows.html>`_ or
`on MacOS <https://docs.conda.io/projects/conda/en/latest/user-guide/install/macos.html>`_.


Once conda is installed the commands for `managing conda virtual environments <https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#>`_ are roughly the same across platforms.
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[pytest]
# ON COVERAGE OF PYTEST PLUGINS:
# http://pytest-cov.readthedocs.io/en/latest/plugins.html
addopts = -p pytester -p no:doctest --xdoctest --ignore-glob=setup.py --ignore=.tox
addopts = -p pytester -p no:doctest --xdoctest --ignore-glob=setup.py --ignore=.tox --ignore=setup.py --ignore=dev
norecursedirs = .git ignore build __pycache__ docs *.egg-info _* dev testing/pybind11_test setup.py
# --pyargs --doctest-modules --ignore=.tox
;rsyncdirs = tox.ini pytest.py _pytest testing
Expand Down
1 change: 0 additions & 1 deletion requirements/jupyter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ nbconvert; python_version>'3.4'
jupyter_client; python_version>'3.4'
IPython; python_version>'3.4'
ipykernel; python_version>'3.4'

23 changes: 21 additions & 2 deletions requirements/tests.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
pytest >= 3.3.1
# Tested with pytest versions:
# 5.4.3
# 6.2.2

# TODO:
# Should run dashboards that test strict and loose versions of the requirements

# Pin maximum pytest versions for older python versions
# TODO: determine what the actual minimum and maximum acceptable versions of
# pytest (that are also compatible with xdoctest) are for each legacy python
# major.minor version.
pytest >= 4.6.0 ; python_version >= '3.7.0' # Python 3.7+
pytest >= 4.6.0 ; python_version < '3.7.0' and python_version >= '3.6.0' # Python 3.6
pytest >= 4.6.0, <= 6.1.2 ; python_version < '3.6.0' and python_version >= '3.5.0' # Python 3.5
pytest >= 3.3.1, <= 4.6.11 ; python_version < '3.5.0' and python_version >= '3.4.0' # Python 3.4
pytest >= 3.3.1, <= 4.6.11 ; python_version < '2.8.0' and python_version >= '2.7.0' # Python 2.7

##
pytest-cov > 2.6.0 ; python_version >= '3.7.0'
pytest-cov > 2.6.0, <= 2.8.1 ; python_version < '3.7.0' and python_version >= '3.6.0'
pytest-cov > 2.0.0, < 2.6.0 ; python_version < '3.6.0'

pytest-cov
codecov >= 2.0.15

typing >= 3.7.4;python_version <= '3.4'

# For testing doctests in binary extension modules
scikit-build
cmake
Expand Down
8 changes: 6 additions & 2 deletions run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@
pytest_args = [
'-p', 'pytester',
'-p', 'no:doctest',
'--xdoctest',
'--cov-config', '.coveragerc',
'--cov-report', 'html',
'--cov-report', 'term',
'--xdoctest',
'--cov=' + package_name,
package_name, 'testing'
]
pytest_args = pytest_args + sys.argv[1:]
sys.exit(pytest.main(pytest_args))
print('pytest.__version__ = {!r}'.format(pytest.__version__))
print('pytest_args = {!r}'.format(pytest_args))
ret = pytest.main(pytest_args)
print('ret = {!r}'.format(ret))
sys.exit(ret)
2 changes: 1 addition & 1 deletion testing/test_binary_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def build_demo_extmod():
else:
try:
from pip.__main__ import _main as pip_main
except AttributeError:
except (AttributeError, ImportError):
from pip._internal import main as pip_main

if callable(pip_main):
Expand Down
2 changes: 1 addition & 1 deletion xdoctest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def fib(n):
mkinit xdoctest --nomods
'''

__version__ = '0.15.4'
__version__ = '0.15.5'


# Expose only select submodules
Expand Down
6 changes: 3 additions & 3 deletions xdoctest/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ def main(argv=None):
argv = sys.argv

version_info = {
'xdoc_version': xdoctest.__version__,
'version': xdoctest.__version__,
'sys_version': sys.version,
}

if '--version' in argv:
print(version_info['xdoc_version'])
print(version_info['version'])
return 0

if '--version-info' in argv:
Expand All @@ -54,7 +54,7 @@ class RawDescriptionDefaultsHelpFormatter(
parser = argparse.ArgumentParser(
prog='xdoctest',
description=(
'Xdoctest {xdoc_version} - on Python - {sys_version} - '
'Xdoctest {version} - on Python - {sys_version} - '
'discover and run doctests within a python package'
).format(**version_info),
formatter_class=RawDescriptionDefaultsHelpFormatter,
Expand Down
Loading

0 comments on commit ddaad20

Please sign in to comment.