Skip to content

Commit c18e8b9

Browse files
authored
Merge pull request #216 from RDFLib/drop_37
Drop Python 3.7, drop RDFLib 6.2, update Black and Ruff, bump importlib-metadata
2 parents accd55e + 4a15072 commit c18e8b9

File tree

9 files changed

+362
-432
lines changed

9 files changed

+362
-432
lines changed

.drone.yml

Lines changed: 52 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,3 @@
1-
---
2-
kind: pipeline
3-
name: python-3-7
4-
type: docker
5-
platform:
6-
os: linux
7-
arch: amd64
8-
9-
steps:
10-
- name: test-3-7
11-
image: python:3.7
12-
environment:
13-
TOX_WORK_DIR: /tmp/.tox
14-
volumes:
15-
- name: tox_cache
16-
path: /tmp/.tox
17-
commands:
18-
- pip3 install --upgrade "tox>=4.0.8"
19-
- tox -e py37
20-
21-
volumes:
22-
- name: tox_cache
23-
temp: {}
241

252
---
263
kind: pipeline
@@ -100,6 +77,10 @@ steps:
10077
- pip3 install --upgrade "tox>=4.0.8"
10178
- tox -e py39
10279

80+
volumes:
81+
- name: tox_cache
82+
temp: {}
83+
10384
---
10485
kind: pipeline
10586
name: python-3-10
@@ -141,6 +122,10 @@ steps:
141122
- pip3 install --upgrade "tox>=4.0.8"
142123
- tox -e lint
143124

125+
volumes:
126+
- name: tox_cache
127+
temp: {}
128+
144129
---
145130
kind: pipeline
146131
name: python-3-11
@@ -184,3 +169,47 @@ steps:
184169
volumes:
185170
- name: tox_cache
186171
temp: {}
172+
173+
---
174+
kind: pipeline
175+
name: python-3-12
176+
type: docker
177+
platform:
178+
os: linux
179+
arch: amd64
180+
181+
steps:
182+
- name: test-3-12
183+
image: python:3.12
184+
environment:
185+
TOX_WORK_DIR: /tmp/.tox
186+
volumes:
187+
- name: tox_cache
188+
path: /tmp/.tox
189+
commands:
190+
- pip3 install --upgrade "tox>=4.0.8"
191+
- tox -e py312
192+
- name: type-checking-3-12
193+
image: python:3.12
194+
environment:
195+
TOX_WORK_DIR: /tmp/.tox
196+
volumes:
197+
- name: tox_cache
198+
path: /tmp/.tox
199+
commands:
200+
- pip3 install --upgrade "tox>=4.0.8"
201+
- tox -e type-checking
202+
- name: lint-3-12
203+
image: python:3.12
204+
environment:
205+
TOX_WORK_DIR: /tmp/.tox
206+
volumes:
207+
- name: tox_cache
208+
path: /tmp/.tox
209+
commands:
210+
- pip3 install --upgrade "tox>=4.0.8"
211+
- tox -e lint
212+
213+
volumes:
214+
- name: tox_cache
215+
temp: {}

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ and this project adheres to [Python PEP 440 Versioning](https://www.python.org/d
77
## [Unreleased]
88
- Nothing yet...
99

10+
## [0.25.0] - 2023-11-23
11+
### Changed
12+
- Dropped support for Python 3.7
13+
- Note, for compatibility with RDFLib 7.0, we specify a minimum Python version of v3.8.1
14+
- https://github.com/RDFLib/rdflib/blob/3bee979cd0e5b6efc57296b4fc43dd8ede8cf375/CHANGELOG.md?plain=1#L53
15+
- Add preliminary support for Python 3.12
16+
- Dropped support for RDFLib v6.2.0 and earlier
17+
- Only RDFLib v6.3.2 and v7.0 are supported by PySHACL v0.25.0+
18+
- Bumped to updated version of Black and Ruff
19+
- Reformatted everything according to py38 codestyle
20+
### Fixed
21+
- Do not hard-pin to importlib-metadata. Fixes #214
22+
1023
## [0.24.1] - 2023-11-23
1124
## Note - The 0.24.x series is the last to support Python 3.7
1225
### RDFLib v7.0.0 and some other dependencies already don't support 3.7, so PySHACL will drop it from 0.25+
@@ -1078,7 +1091,8 @@ just leaves the files open. Now it is up to the command-line client to close the
10781091

10791092
- Initial version, limited functionality
10801093

1081-
[Unreleased]: https://github.com/RDFLib/pySHACL/compare/v0.24.1...HEAD
1094+
[Unreleased]: https://github.com/RDFLib/pySHACL/compare/v0.25.0...HEAD
1095+
[0.25.0]: https://github.com/RDFLib/pySHACL/compare/v0.24.1...v0.25.0
10821096
[0.24.1]: https://github.com/RDFLib/pySHACL/compare/v0.24.0...v0.24.1
10831097
[0.24.0]: https://github.com/RDFLib/pySHACL/compare/v0.23.0...v0.24.0
10841098
[0.23.0]: https://github.com/RDFLib/pySHACL/compare/v0.22.2...v0.23.0

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ authors:
88
given-names: "Nicholas"
99
orcid: "http://orcid.org/0000-0002-8742-7730"
1010
title: "pySHACL"
11-
version: 0.24.1
11+
version: 0.25.0
1212
doi: 10.5281/zenodo.4750840
1313
license: Apache-2.0
1414
date-released: 2022-01-13

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ WORKDIR /home/pyshacl
99
RUN addgroup -g 1000 -S pyshacl &&\
1010
adduser --disabled-password --gecos "" --home "$(pwd)" --ingroup "pyshacl" --no-create-home --uid 1000 pyshacl
1111
WORKDIR /app
12-
LABEL org.opencontainers.image.version="0.24.1"
12+
LABEL org.opencontainers.image.version="0.25.0"
1313
COPY . .
1414
RUN chown -R pyshacl:pyshacl /home/pyshacl /app && chmod -R 775 /home/pyshacl /app
1515
USER pyshacl

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ usage: pyshacl [-h] [-s [SHACL]] [-e [ONT]] [-i {none,rdfs,owlrl,both}] [-m]
7070
[-ef {auto,turtle,xml,json-ld,nt,n3}] [-V] [-o [OUTPUT]]
7171
DataGraph
7272

73-
PySHACL 0.24.1 command line tool.
73+
PySHACL 0.25.0 command line tool.
7474

7575
positional arguments:
7676
DataGraph The file containing the Target Data Graph.

poetry.lock

Lines changed: 272 additions & 385 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
requires = ["poetry-core>=1.8.1,<2"]
33
build-backend = "poetry.core.masonry.api"
44

5+
[project]
6+
name = "pyshacl"
7+
# Black and Ruff both now read target-version from [project.requires-python]
8+
requires-python = ">=3.8.1"
9+
510
[tool.poetry]
611
name = "pyshacl"
7-
version = "0.24.1"
12+
version = "0.25.0"
813
# Don't forget to change the version number in __init__.py, Dockerfile, and CITATION.cff along with this one
914
description = "Python SHACL Validator"
1015
license = "Apache-2.0"
@@ -24,11 +29,11 @@ classifiers = [
2429
"Programming Language :: Python :: Implementation :: PyPy",
2530
"Programming Language :: Python :: 3",
2631
"Programming Language :: Python :: 3 :: Only",
27-
"Programming Language :: Python :: 3.7",
2832
"Programming Language :: Python :: 3.8",
2933
"Programming Language :: Python :: 3.9",
3034
"Programming Language :: Python :: 3.10",
3135
"Programming Language :: Python :: 3.11",
36+
"Programming Language :: Python :: 3.12",
3237
"Topic :: Software Development :: Libraries :: Python Modules",
3338
"Operating System :: OS Independent"
3439
]
@@ -54,26 +59,24 @@ include = [
5459
]
5560

5661
[tool.poetry.dependencies]
57-
python = "^3.7.0" # Compatible python versions must be declared here
58-
rdflib = [
59-
{version=">=6.3.2,<8.0", python = ">=3.8.1"},
60-
{version=">=6.2.0,<=6.3.2", python = "<3.8.1"}
61-
]
62+
python = "^3.8.1" # Poetry doesn't read from [project.requires-python]
63+
# Note, 3.8.0 is not supported, only 3.8.1 or above. See:
64+
# https://github.com/RDFLib/rdflib/blob/3bee979cd0e5b6efc57296b4fc43dd8ede8cf375/CHANGELOG.md?plain=1#L53
65+
rdflib = {version=">=6.3.2,<8.0", python = ">=3.8.1"}
6266
html5lib = ">=1.1,<2"
6367
owlrl = ">=6.0.2,<7"
6468
prettytable = [
65-
{version=">=3.5.0,<3.8.0", python = "<3.8"},
6669
{version=">=3.5.0", python = ">=3.8,<3.12"},
6770
{version=">=3.7.0", python = ">=3.12"}
6871
]
6972
packaging = ">=21.3"
70-
importlib-metadata = {version="4.13", python = "<3.11"}
73+
importlib-metadata = {version=">6", python = "<3.12"}
7174
pyduktape2 = {version="^0.4.6", optional=true}
7275
sanic = {version=">=22.12, <23", optional=true} #For the HTTP service
7376
sanic-ext = {version=">=23.3, <23.6", optional=true} #For the HTTP service
7477
sanic-cors = {version="2.2.0", optional=true} #For the HTTP service
75-
ruff = {version="^0.0.267", optional=true}
76-
black = {version="23.3.0", optional=true}
78+
ruff = {version="^0.1.5", optional=true}
79+
black = {version="23.11.0", optional=true}
7780
mypy = [
7881
{version=">=0.812,<0.900", optional=true, python = "<3.10"},
7982
{version=">=0.900,<0.1000", optional=true, python = ">=3.10"}
@@ -87,7 +90,8 @@ pytest-cov = {version="^2.8.1", optional=true}
8790
pytest = "^7.2"
8891
coverage = {version=">6,<7,!=6.0.*,!=6.1,!=6.1.1", optional=true}
8992
pytest-cov = {version="^2.8.1", optional=true}
90-
ruff = {version="^0.0.267", optional=true}
93+
ruff = {version="^0.1.5", optional=true}
94+
black = {version="23.11.0", optional=true}
9195
mypy = [
9296
{version=">=0.812,<0.900", optional=true, python = "<3.10"},
9397
{version=">=0.900,<0.1000", optional=true, python = ">=3.10"}
@@ -113,10 +117,9 @@ from = {format = "poetry", path = "pyproject.toml"}
113117
to = {format = "setuppy", path = "setup.py"}
114118

115119
[tool.black]
116-
required-version = "23.3.0"
120+
required-version = "23.11.0"
117121
line-length = "119"
118122
skip-string-normalization = true
119-
target-version = ['py37']
120123
include = '\.pyi?$'
121124
exclude = '''
122125
(
@@ -184,9 +187,6 @@ line-length = 119
184187
# Allow unused variables when underscore-prefixed.
185188
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
186189

187-
# Assume Python 3.10.
188-
target-version = "py37"
189-
190190
[tool.ruff.mccabe]
191191
# Unlike Flake8, default to a complexity level of 10.
192192
max-complexity = 10
@@ -204,7 +204,7 @@ testpaths = [
204204
legacy_tox_ini = """
205205
[tox]
206206
skipsdist = true
207-
envlist = py38, py39, py310, py311, lint, type-checking
207+
envlist = py38, py39, py310, py311, py312, lint, type-checking
208208
toxworkdir={env:TOX_WORK_DIR:.tox}
209209
210210
[testenv]

pyshacl/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from .validate import Validator, validate
66

77
# version compliant with https://www.python.org/dev/peps/pep-0440/
8-
__version__ = '0.24.1'
8+
__version__ = '0.25.0'
99
# Don't forget to change the version number in pyproject.toml, Dockerfile, and CITATION.cff along with this one
1010

1111
__all__ = ['validate', 'Validator', '__version__', 'Shape', 'ShapesGraph']

pyshacl/extras/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from sys import version_info as python_version
55
from warnings import warn
66

7-
if python_version[:2] < (3, 11):
7+
if python_version[:2] < (3, 12):
88
from importlib_metadata import PackageNotFoundError, metadata
99
else:
1010
from importlib.metadata import PackageNotFoundError, metadata # type: ignore[assignment]

0 commit comments

Comments
 (0)