Skip to content

Commit 5a2b5f8

Browse files
committed
Quick logging fix for v0.28.1 release
1 parent 1af1b71 commit 5a2b5f8

File tree

6 files changed

+19
-12
lines changed

6 files changed

+19
-12
lines changed

CHANGELOG.md

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

10+
## [0.28.1] - 2024-10-25
11+
12+
### Fixed
13+
- PySHACL no longer overwrites the Python `root` logger and removes all its handlers. How Rude.
14+
1015
## [0.28.0] - 2024-10-23
1116
### Added
1217
- owl:imports now works with bnode values, where it contains the following:
@@ -1177,7 +1182,8 @@ just leaves the files open. Now it is up to the command-line client to close the
11771182

11781183
- Initial version, limited functionality
11791184

1180-
[Unreleased]: https://github.com/RDFLib/pySHACL/compare/v0.28.0...HEAD
1185+
[Unreleased]: https://github.com/RDFLib/pySHACL/compare/v0.28.1...HEAD
1186+
[0.28.1]: https://github.com/RDFLib/pySHACL/compare/v0.28.0...v0.28.1
11811187
[0.28.0]: https://github.com/RDFLib/pySHACL/compare/v0.27.0...v0.28.0
11821188
[0.27.0]: https://github.com/RDFLib/pySHACL/compare/v0.26.0...v0.27.0
11831189
[0.26.0]: https://github.com/RDFLib/pySHACL/compare/v0.25.0...v0.26.0

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ authors:
88
given-names: "Nicholas"
99
orcid: "http://orcid.org/0000-0002-8742-7730"
1010
title: "pySHACL"
11-
version: 0.28.0
11+
version: 0.28.1
1212
doi: 10.5281/zenodo.4750840
1313
license: Apache-2.0
14-
date-released: 2022-01-13
14+
date-released: 2024-10-25
1515
url: "https://github.com/RDFLib/pySHACL"

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ WORKDIR /home/pyshacl
1111
RUN addgroup -g 1000 -S pyshacl &&\
1212
adduser --disabled-password --gecos "" --home "$(pwd)" --ingroup "pyshacl" --no-create-home --uid 1000 pyshacl
1313
WORKDIR /app
14-
LABEL org.opencontainers.image.version="0.28.0"
14+
LABEL org.opencontainers.image.version="0.28.1"
1515
COPY . .
1616
RUN chown -R pyshacl:pyshacl /home/pyshacl /app && chmod -R 775 /home/pyshacl /app
1717
USER pyshacl
1818
ENV PATH="/home/pyshacl/.local/bin:$PATH"
19-
RUN pip3 install "poetry>=1.8.3,<2.0"
19+
RUN pip3 install "poetry>=1.8.4,<2.0"
2020
RUN poetry install --no-dev --extras "js http"
2121
USER root
2222
RUN apk del build-dependencies

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ requires-python = ">=3.8.1"
99

1010
[tool.poetry]
1111
name = "pyshacl"
12-
version = "0.28.0"
12+
version = "0.28.1"
1313
# Don't forget to change the version number in __init__.py, Dockerfile, and CITATION.cff along with this one
1414
description = "Python SHACL Validator"
1515
license = "Apache-2.0"
@@ -211,7 +211,7 @@ toxworkdir={env:TOX_WORK_DIR:.tox}
211211
212212
[testenv]
213213
deps =
214-
poetry>=1.8.2
214+
poetry>=1.8.4
215215
passenv =
216216
DBUS_SESSION_BUS_ADDRESS
217217
PIP_KEYRING_PROVIDER

pyshacl/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from .validator import Validator
88

99
# version compliant with https://www.python.org/dev/peps/pep-0440/
10-
__version__ = '0.28.0'
10+
__version__ = '0.28.1'
1111
# Don't forget to change the version number in pyproject.toml, Dockerfile, and CITATION.cff along with this one
1212

1313
__all__ = ['validate', 'shacl_rules', 'Validator', 'RuleExpandRunner', '__version__', 'Shape', 'ShapesGraph']

pyshacl/entrypoints.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,12 @@ def meta_validate(shacl_graph: Union[GraphLike, str], inference: Optional[str] =
227227
return validate(shacl_graph, shacl_graph=shacl_shacl_graph, inference=inference, **kwargs)
228228

229229

230-
def make_default_logger(name: Union[str, None] = None, debug: bool = False) -> logging.Logger:
230+
def make_default_logger(name: Union[str, None] = None, debug: bool = False, clear_handlers: bool = True) -> logging.Logger:
231231
log_handler = logging.StreamHandler(stderr)
232-
log = logging.getLogger()
233-
for h in log.handlers:
234-
log.removeHandler(h) # pragma:no cover
232+
log = logging.getLogger(name)
233+
if clear_handlers:
234+
for h in log.handlers:
235+
log.removeHandler(h) # pragma:no cover
235236
log.addHandler(log_handler)
236237
log.setLevel(logging.INFO if not debug else logging.DEBUG)
237238
log_handler.setLevel(logging.INFO if not debug else logging.DEBUG)

0 commit comments

Comments
 (0)