diff options
author | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2021-08-27 16:29:54 +0200 |
---|---|---|
committer | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2021-08-27 16:29:54 +0200 |
commit | 48221651372ee5570255d8a497d802d5deb0aafd (patch) | |
tree | 09e02bb9362a1f35ddd930835e8cc52c62fe684e | |
parent | 15049053b8c1e92b01d0f90f1e82524215126083 (diff) | |
download | setuptools-scm-48221651372ee5570255d8a497d802d5deb0aafd.tar.gz |
ensure python 3.10 support
-rw-r--r-- | .github/workflows/python-tests.yml | 2 | ||||
-rw-r--r-- | CHANGELOG.rst | 1 | ||||
-rw-r--r-- | src/setuptools_scm/utils.py | 6 | ||||
-rw-r--r-- | testing/test_setuptools_support.py | 3 |
4 files changed, 10 insertions, 2 deletions
diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 17d7410..05dd428 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python_version: [ '3.6', '3.7', '3.8', '3.9', 'pypy3' ] + python_version: [ '3.6', '3.7', '3.8', '3.9', '3.10-dev', 'pypy3' ] os: [windows-latest, ubuntu-latest] #, macos-latest] include: - os: windows-latest diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8965c97..d318783 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,7 @@ v6.2.0 * fix #608: resolve tomli dependency issue by making it a hard dependency as all intended/supported install options use pip/wheel this is only a feature release +* ensure python 3.10 works v6.1.1 ======= diff --git a/src/setuptools_scm/utils.py b/src/setuptools_scm/utils.py index 7ea540d..25e81c1 100644 --- a/src/setuptools_scm/utils.py +++ b/src/setuptools_scm/utils.py @@ -151,7 +151,11 @@ except ImportError: else: def iter_entry_points(group: str, name: Optional[str] = None): - eps = entry_points()[group] + all_eps = entry_points() + if hasattr(all_eps, "select"): + eps = all_eps.select(group=group) + else: + eps = all_eps[group] if name is None: return iter(eps) return (ep for ep in eps if ep.name == name) diff --git a/testing/test_setuptools_support.py b/testing/test_setuptools_support.py index 68ef103..c7230d8 100644 --- a/testing/test_setuptools_support.py +++ b/testing/test_setuptools_support.py @@ -56,6 +56,9 @@ def check(packagedir, expected_version, **env): ) +@pytest.mark.skipif( + sys.version_info[:2] >= (3, 10), reason="old setuptools wont work on python 3.10" +) def test_distlib_setuptools_works(get_setuptools_packagedir): packagedir = get_setuptools_packagedir("45.0.0") check(packagedir, "45.0.0") |