test against python 3.10
This commit is contained in:
1 parent
781c0d91e6
commit
da6f3a2ebb
3 files changed
+27
-6
No files matched your search
@@ -50,7 +50,7 @@ jobs:
|
||||
name: 🧪 Unit tests
|
||||
strategy:
|
||||
matrix:
|
||||
python: ["2.7", "3.7", "3.8", "3.9"]
|
||||
python: ["2.7", "3.7", "3.8", "3.9", "3.10"]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
needs: build
|
||||
strategy:
|
||||
matrix:
|
||||
python: ["2.7", "3.7", "3.8", "3.9"]
|
||||
python: ["2.7", "3.7", "3.8", "3.9", "3.10"]
|
||||
installable: ["wheel", "sdist"]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: ["ubuntu-latest"]
|
||||
python: ["2.7", "3.7", "3.8", "3.9"]
|
||||
python: ["2.7", "3.7", "3.8", "3.9", "3.10"]
|
||||
branch: ["master"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: ["ubuntu-latest"]
|
||||
python: ["2.7", "3.7", "3.8", "3.9"]
|
||||
python: ["2.7", "3.7", "3.8", "3.9", "3.10"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: 👀 Determine latest release
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from distutils.command.build_py import build_py as _build_py
|
||||
|
||||
@@ -102,8 +103,10 @@ INSTALL_REQUIRES_OSX = [
|
||||
EXTRA_REQUIRES = {
|
||||
"develop": [
|
||||
# Testing dependencies
|
||||
"mock>=3.0.5,<4",
|
||||
"pytest==4.6.10",
|
||||
"mock>=3.0.5,<4 ; python_version < '3'",
|
||||
"pytest==4.6.10 ; python_version < '3'",
|
||||
"mock>=4,<5 ; python_version >= '3'",
|
||||
"pytest>=6.2.5,<7 ; python_version >= '3'",
|
||||
"pytest-doctest-custom>=1.0.0,<2",
|
||||
"ddt",
|
||||
# pre-commit
|
||||
@@ -133,6 +136,22 @@ if int(setuptools.__version__.split(".", 1)[0]) < 18:
|
||||
assert "bdist_wheel" not in sys.argv
|
||||
|
||||
# add optional dependencies for setuptools versions < 18 that don't yet support environment markers
|
||||
def _filter_by_python_version_marker(requirements):
|
||||
for requirement in requirements:
|
||||
req_match = re.match(
|
||||
r"^(?P<req>.+);\s*(?P<marker>python_version.+)$", requirement
|
||||
)
|
||||
if not req_match:
|
||||
yield requirement
|
||||
else:
|
||||
if eval(req_match.group("marker"), {}, {"python_version": sys.version}):
|
||||
yield req_match.group("req")
|
||||
|
||||
EXTRA_REQUIRES = {
|
||||
extra: list(_filter_by_python_version_marker(extra_requirements))
|
||||
for extra, extra_requirements in EXTRA_REQUIRES.items()
|
||||
}
|
||||
|
||||
if sys.version_info[0] < 3:
|
||||
INSTALL_REQUIRES += INSTALL_REQUIRES_PYTHON2
|
||||
else:
|
||||
@@ -273,6 +292,8 @@ def params():
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
"Programming Language :: JavaScript",
|
||||
"Topic :: Printing",
|
||||
|
||||
Reference in new issue
Block a user