Skip to content

Commit

Permalink
Drop support for Python < 3.8.
Browse files Browse the repository at this point in the history
Also update tox.ini and Github actions:
- unpin some dependencies required for older Python versions
- update action versions to latest version
  • Loading branch information
andialbrecht committed Mar 15, 2024
1 parent 7334ac9 commit 0cd0620
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 20 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -68,4 +68,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
11 changes: 5 additions & 6 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,24 @@ on:
jobs:
test:
name: Run tests on ${{ matrix.py }}
runs-on: ubuntu-20.04 # keep it on 20.04 to have Python 3.6 available
runs-on: ubuntu-latest
strategy:
matrix:
py:
- "3.13-dev"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"
- "3.6"
- "pypy-3.10"
- "pypy-3.9"
- "pypy-3.8"
- "pypy-3.7"

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
allow-prereleases: true
Expand All @@ -47,4 +46,4 @@ jobs:
- name: Test with pytest
run: pytest --cov=sqlparse
- name: Publish to codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Development Version

Notable Changes

* Drop support for Python 3.5.
* Drop support for Python 3.5, 3.6, and 3.7.
* Python 3.12 is now supported (pr725, by hugovk).

Enhancements:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python-sqlparse - Parse SQL statements
sqlparse is a non-validating SQL parser for Python.
It provides support for parsing, splitting and formatting SQL statements.

The module is compatible with Python 3.6+ and released under the terms of the
The module is compatible with Python 3.8+ and released under the terms of the
`New BSD license <https://opensource.org/licenses/BSD-3-Clause>`_.

Visit the project page at https://github.com/andialbrecht/sqlparse for
Expand Down
9 changes: 3 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -28,7 +26,7 @@ classifiers = [
"Topic :: Database",
"Topic :: Software Development",
]
requires-python = ">=3.6"
requires-python = ">=3.8"

[project.urls]
Home = "https://github.com/andialbrecht/sqlparse"
Expand All @@ -42,7 +40,6 @@ sqlformat = "sqlparse.__main__:main"

[project.optional-dependencies]
dev = [
"importlib_metadata<5; python_version <= '3.7'",
"flake8",
"build",
]
Expand All @@ -54,8 +51,8 @@ doc = [
"sphinx",
]
tox = [
"virtualenv<20.22.0", # 20.22.0 dropped Python 3.6 support
"tox<4.5.0", # >=4.5.0 requires virtualenv>=20.22
"virtualenv",
"tox",
]

[tool.flit.sdist]
Expand Down
4 changes: 1 addition & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[tox]
skip_missing_interpreters = True
envlist =
py36
py37
py38
py39
py310
Expand All @@ -22,4 +20,4 @@ commands =
deps =
flake8
commands =
flake8 sqlparse tests setup.py
flake8 sqlparse tests

0 comments on commit 0cd0620

Please sign in to comment.