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

chore: support 3.12 #478

Merged
merged 1 commit into from
Oct 7, 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
4 changes: 2 additions & 2 deletions .github/workflows/python-package-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Run tests with latest dependencies

on:
schedule:
- cron: '0 6 * * *'
- cron: '0 6 * * *'
workflow_dispatch:

jobs:
Expand All @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v2
Expand Down
22 changes: 11 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exclude: '^docs/conf.py'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
Expand Down Expand Up @@ -30,20 +30,20 @@ repos:
# ]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
rev: 7.0.0
hooks:
- id: flake8
exclude: ^templates/
## You can add flake8 plugins via `additional_dependencies`:
# additional_dependencies: [flake8-bugbear]
additional_dependencies: [flake8-pyproject]
args: [--config=pyproject.toml]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.11.1' # Use the sha / tag you want to point at
rev: 'v1.11.2' # Use the sha / tag you want to point at
hooks:
- id: mypy
exclude: ^templates/
Expand All @@ -55,7 +55,7 @@ repos:
- types-PyYAML
- types-tabulate
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.1.0
rev: v3.1.0
hooks:
- id: add-trailing-comma
#- repo: https://github.com/asottile/reorder_python_imports
Expand All @@ -65,7 +65,7 @@ repos:
# args: [--application-directories=.:src]

- repo: https://github.com/hadialqattan/pycln
rev: v2.1.2
rev: v2.4.0
hooks:
- id: pycln
args: [--config=pyproject.toml]
Expand All @@ -82,14 +82,14 @@ repos:
args: [--disable=use-implicit-booleaness-not-comparison]

- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
rev: v3.17.0
hooks:
- id: pyupgrade
args:
- --py38-plus
- --py39-plus

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.7
rev: v0.6.9
hooks:
- id: ruff
args: [ --fix ]
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Changelog
Next
====

- Support Python 3.12, drop support for 3.8 (#478)

Version 1.3.0 - 2024-09-26
==========================

Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AUTODOCDIR = api

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $?), 1)
$(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/")
$(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://sphinx-doc.org/")
endif

.PHONY: help clean Makefile
Expand Down
46 changes: 25 additions & 21 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@

import os
import sys
import inspect
import shutil

# -- Path setup --------------------------------------------------------------

__location__ = os.path.join(
os.getcwd(), os.path.dirname(inspect.getfile(inspect.currentframe()))
)
__location__ = os.path.dirname(__file__)

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -26,7 +23,7 @@
# -- Run sphinx-apidoc -------------------------------------------------------
# This hack is necessary since RTD does not issue `sphinx-apidoc` before running
# `sphinx-build -b html . _build/html`. See Issue:
# https://github.com/rtfd/readthedocs.org/issues/1139
# https://github.com/readthedocs/readthedocs.org/issues/1139
# DON'T FORGET: Check the box "Install your project inside a virtualenv using
# setup.py install" in the RTD Advanced Settings.
# Additionally it helps us to avoid running apidoc manually
Expand All @@ -46,10 +43,7 @@
try:
import sphinx

cmd_line_template = (
"sphinx-apidoc --implicit-namespaces -f -o {outputdir} {moduledir}"
)
cmd_line = cmd_line_template.format(outputdir=output_dir, moduledir=module_dir)
cmd_line = f"sphinx-apidoc --implicit-namespaces -f -o {output_dir} {module_dir}"

args = cmd_line.split(" ")
if tuple(sphinx.__version__.split(".")) >= ("1", "7"):
Expand Down Expand Up @@ -100,10 +94,19 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = "" # Is set by calling `setup.py docs`
# The full version, including alpha/beta/rc tags.
release = "" # Is set by calling `setup.py docs`
# version: The short X.Y version.
# release: The full version, including alpha/beta/rc tags.
# If you don’t need the separation provided between version and release,
# just set them both to the same value.
try:
from shillelagh import __version__ as version
except ImportError:
version = ""

if not version or version.lower() == "unknown":
version = os.getenv("READTHEDOCS_VERSION", "unknown") # automatically set by RTD

release = version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -142,6 +145,9 @@
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False

# If this is True, todo emits a warning for each TODO entries. The default is False.
todo_emit_warnings = True


# -- Options for HTML output -------------------------------------------------

Expand All @@ -159,12 +165,7 @@

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
try:
from shillelagh import __version__ as version
except ImportError:
pass
else:
release = version
# html_title = None

# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None
Expand Down Expand Up @@ -268,12 +269,15 @@
# -- External mapping --------------------------------------------------------
python_version = ".".join(map(str, sys.version_info[0:2]))
intersphinx_mapping = {
"sphinx": ("http://www.sphinx-doc.org/en/stable", None),
"sphinx": ("https://www.sphinx-doc.org/en/master", None),
"python": ("https://docs.python.org/" + python_version, None),
"matplotlib": ("https://matplotlib.org", None),
"numpy": ("https://docs.scipy.org/doc/numpy", None),
"numpy": ("https://numpy.org/doc/stable", None),
"sklearn": ("https://scikit-learn.org/stable", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
"setuptools": ("https://setuptools.pypa.io/en/stable/", None),
"pyscaffold": ("https://pyscaffold.org/en/stable", None),
}

print(f"loading configurations for {project} {version} ...", file=sys.stderr)
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
# AVOID CHANGING REQUIRES: IT WILL BE UPDATED BY PYSCAFFOLD!
requires = ["setuptools>=46.1.0,<50", "setuptools_scm[toml]>=5", "wheel"]
requires = ["setuptools>=46.1.0", "setuptools_scm[toml]>=5", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
Expand All @@ -9,8 +9,10 @@ version_scheme = "no-guess-dev"

[tool.flake8]
max-line-length = 90
extend-ignore = ["E203", "E501"]

[tool.ruff]
exclude = [
"templates",
]
exclude = ["templates"]

[tool.black]
line-length = 90
40 changes: 20 additions & 20 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,54 @@
#
-e file:.
# via -r requirements/base.in
apsw==3.45.3.0
apsw==3.46.1.0
# via shillelagh
attrs==23.1.0
attrs==24.2.0
# via
# cattrs
# requests-cache
cattrs==23.1.2
cattrs==24.1.2
# via requests-cache
certifi==2022.6.15
certifi==2024.8.30
# via requests
charset-normalizer==2.1.0
charset-normalizer==3.3.2
# via requests
exceptiongroup==1.1.3
exceptiongroup==1.2.2
# via cattrs
greenlet==2.0.2
# via
# shillelagh
# sqlalchemy
idna==3.3
greenlet==3.1.1
# via shillelagh
idna==3.10
# via requests
importlib-metadata==8.5.0
# via shillelagh
packaging==24.1
# via shillelagh
platformdirs==3.11.0
platformdirs==4.3.6
# via requests-cache
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
# via shillelagh
requests==2.31.0
requests==2.32.3
# via
# requests-cache
# shillelagh
requests-cache==1.1.0
requests-cache==1.2.1
# via shillelagh
six==1.16.0
# via
# python-dateutil
# url-normalize
sqlalchemy==1.4.39
# via shillelagh
typing-extensions==4.3.0
sqlalchemy==2.0.35
# via shillelagh
typing-extensions==4.12.2
# via
# cattrs
# shillelagh
# sqlalchemy
url-normalize==1.4.3
# via requests-cache
urllib3==1.26.10
urllib3==2.2.3
# via
# requests
# requests-cache
zipp==3.15.0
zipp==3.20.2
# via importlib-metadata
Loading
Loading