Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support python 3.10 #607

Merged
merged 3 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 3 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down Expand Up @@ -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',
)


Expand Down Expand Up @@ -149,8 +148,6 @@
],
}

setup_args['python_requires'] = '>=3.6'

setup_args['entry_points'] = {
'console_scripts': [
'nbdime = nbdime.__main__:main_dispatch',
Expand Down
18 changes: 0 additions & 18 deletions setupbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down