From f91e5c32e7b83418048c1d8039f829ae6603231d Mon Sep 17 00:00:00 2001 From: kr0p07k1n <91276442+kr0p07k1n@users.noreply.github.com> Date: Sun, 24 Oct 2021 15:04:11 -0400 Subject: [PATCH 1/3] Support python 3.10 --- setup.py | 9 +++------ setupbase.py | 18 ------------------ 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/setup.py b/setup.py index 952b56ac..b20a1278 100644 --- a/setup.py +++ b/setup.py @@ -16,15 +16,12 @@ sys.path.append(os.path.dirname(__file__)) from setupbase import (create_cmdclass, install_npm, ensure_targets, - combine_commands, ensure_python, get_version) + combine_commands, get_version) pjoin = os.path.join here = os.path.abspath(os.path.dirname(__file__)) -# Minimal Python version sanity check -ensure_python('>=3.6') - # the name of the project name = 'nbdime' version = get_version(pjoin(name, '_version.py')) @@ -112,8 +109,10 @@ 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Framework :: Jupyter', ], + python_requires = '>=3.6', ) @@ -149,8 +148,6 @@ ], } -setup_args['python_requires'] = '>=3.6' - setup_args['entry_points'] = { 'console_scripts': [ 'nbdime = nbdime.__main__:main_dispatch', diff --git a/setupbase.py b/setupbase.py index 45425f4a..910e602f 100644 --- a/setupbase.py +++ b/setupbase.py @@ -91,24 +91,6 @@ def get_version(file, name='__version__'): return version_ns[name] -def ensure_python(specs): - """Given a list of range specifiers for python, ensure compatibility. - """ - if not isinstance(specs, (list, tuple)): - specs = [specs] - v = sys.version_info - part = '%s.%s' % (v.major, v.minor) - for spec in specs: - if part == spec: - return - try: - if eval(part + spec): - return - except SyntaxError: - pass - raise ValueError('Python version %s unsupported' % part) - - def find_packages(top=HERE): """ Find all of the packages. From e77ed97592612d2ac9eb2ad266c544ab53879d08 Mon Sep 17 00:00:00 2001 From: Vidar Tonaas Fauske Date: Mon, 25 Oct 2021 18:48:33 +0100 Subject: [PATCH 2/3] Run CI on 3.10 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 14d96641..b03e3380 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -79,7 +79,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.6, 3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v2 From eabc07310ffe53e8ef3fe68f1d992c6286ff4af5 Mon Sep 17 00:00:00 2001 From: Vidar Tonaas Fauske Date: Mon, 25 Oct 2021 18:50:27 +0100 Subject: [PATCH 3/3] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b03e3380..f7d22203 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -79,7 +79,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.6, 3.7, 3.8, 3.9, 3.10] + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] steps: - uses: actions/checkout@v2