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

Drop support for Python 3.7 #617

Merged
merged 2 commits into from
Jan 31, 2024
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
14 changes: 7 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Configure pip caching
with:
path: ~/.cache/pip
Expand All @@ -34,12 +34,12 @@ jobs:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Configure pip caching
with:
path: ~/.cache/pip
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ jobs:
spellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- uses: actions/cache@v2
python-version: "3.12"
- uses: actions/cache@v4
name: Configure pip caching
with:
path: ~/.cache/pip
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9
- uses: actions/cache@v2
python-version: "3.11"
- uses: actions/cache@v4
name: Configure pip caching
with:
path: ~/.cache/pip
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
numpy: [0, 1]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Configure pip caching
with:
path: ~/.cache/pip
Expand All @@ -29,8 +29,7 @@ jobs:
- name: Install dependencies
run: |
pip install -e '.[test,mypy,flake8]'
- name: Optionally install tui dependencies (not 3.7)
if: matrix.python-version != '3.7'
- name: Optionally install tui dependencies
run: pip install -e '.[tui]'
- name: Optionally install numpy
if: matrix.numpy == 1
Expand All @@ -50,12 +49,10 @@ jobs:
pytest -v
- name: run mypy
run: mypy sqlite_utils tests
- name: run flake8 if Python 3.8 or higher
if: matrix.python-version >= 3.8
- name: run flake8
run: flake8
- name: Check formatting
run: black . --check
- name: Check if cog needs to be run
if: matrix.python-version != '3.7'
run: |
cog --check README.md docs/*.rst
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,14 @@ def get_long_description():
"Issues": "https://github.com/simonw/sqlite-utils/issues",
"CI": "https://github.com/simonw/sqlite-utils/actions",
},
python_requires=">=3.7",
python_requires=">=3.8",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: End Users/Desktop",
"Topic :: Database",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
3 changes: 1 addition & 2 deletions sqlite_utils/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,7 @@ def register(fn):
fn_name, arity, fn, **dict(kwargs, deterministic=True)
)
registered = True
except (sqlite3.NotSupportedError, TypeError):
# TypeError is Python 3.7 "function takes at most 3 arguments"
except sqlite3.NotSupportedError:
pass
if not registered:
self.conn.create_function(fn_name, arity, fn, **kwargs)
Expand Down
Loading