diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7fe11f17..30b7664bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,12 +7,7 @@ jobs: strategy: matrix: os: [macos-latest, windows-latest, ubuntu-latest] - python-version: [3.7, 3.8, 3.9, '3.10', '3.11', pypy-3.7] - exclude: - - os: windows-latest - python-version: 3.7 - - os: windows-latest - python-version: pypy-3.7 + python-version: [3.8, 3.9, '3.10', '3.11', pypy-3.9] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 32f413da8..1b86c3250 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,8 @@ +Unreleased +---------- + +* Drop Python 3.7 support (end-of-life was June 5, 2023). + 1.1.1 - February 22, 2023 ------------------------- diff --git a/csvkit/utilities/csvsql.py b/csvkit/utilities/csvsql.py index 521534455..ccc512595 100644 --- a/csvkit/utilities/csvsql.py +++ b/csvkit/utilities/csvsql.py @@ -5,12 +5,16 @@ import agate import agatesql # noqa: F401 -from pkg_resources import iter_entry_points from sqlalchemy import create_engine, dialects from csvkit.cli import CSVKitUtility, isatty -DIALECTS = dialects.__all__ + tuple(e.name for e in iter_entry_points('sqlalchemy.dialects')) +try: + import importlib_metadata +except ImportError: + import importlib.metadata as importlib_metadata + +DIALECTS = dialects.__all__ + tuple(e.name for e in importlib_metadata.entry_points(group='sqlalchemy.dialects')) class CSVSQL(CSVKitUtility): diff --git a/setup.py b/setup.py index 227624f58..5791d311d 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,6 @@ 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', @@ -61,6 +60,9 @@ 'agate-excel>=0.2.2', 'agate-dbf>=0.2.2', 'agate-sql>=0.5.3', + # “selectable” entry points were introduced in Python 3.10. + # https://docs.python.org/3/library/importlib.metadata.html + 'importlib_metadata; python_version < "3.10"', ], extras_require={ 'test': [