Skip to content

Commit 40eccd0

Browse files
Merge pull request #188 from networktocode/release-v1.5.2
Release v1.5.2
2 parents 611d534 + ac167a4 commit 40eccd0

File tree

10 files changed

+640
-567
lines changed

10 files changed

+640
-567
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
strategy:
7676
fail-fast: true
7777
matrix:
78-
python-version: ["3.10", "3.11", "3.12", "3.13"]
78+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
7979
ansible-core-version: ["2.16.14"]
8080
runs-on: "ubuntu-latest"
8181
env:
@@ -159,7 +159,7 @@ jobs:
159159
strategy:
160160
fail-fast: true
161161
matrix:
162-
python-version: ["3.10", "3.11", "3.12", "3.13"]
162+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
163163
ansible-core-version: ["2.16.14"]
164164
runs-on: "ubuntu-latest"
165165
env:

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v1.5.2 - 2026-04-09
4+
5+
- #185 Added Python 3.14 support.
6+
- #187 Updated CI to use Python 3.14.
7+
- #187 Changed `load_file` to use `urlparse` to handle file URIs.
8+
39
## v1.5.1 - 2025-11-12
410

511
- #179 Added Python 3.13 support.

poetry.lock

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

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "schema-enforcer"
3-
version = "1.5.1"
3+
version = "1.5.2"
44
description = "Tool/Framework for testing structured data against schema definitions"
55
authors = ["Network to Code, LLC <info@networktocode.com>"]
66
license = "Apache-2.0"
@@ -15,6 +15,7 @@ classifiers = [
1515
"Programming Language :: Python :: 3.11",
1616
"Programming Language :: Python :: 3.12",
1717
"Programming Language :: Python :: 3.13",
18+
"Programming Language :: Python :: 3.14",
1819
]
1920
include = [
2021
"CHANGELOG.md",
@@ -26,7 +27,7 @@ packages = [
2627
]
2728

2829
[tool.poetry.dependencies]
29-
python = ">=3.10,<3.14"
30+
python = ">=3.10,<3.15"
3031
# Packages
3132
click = ">=8.2.0"
3233
jinja2 = ">=3.1.6,<4.0.0"

schema_enforcer/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import glob
66
from collections.abc import Mapping, Sequence
77
import importlib
8+
from urllib import parse as urlparse
89

910
from ruamel.yaml import YAML
1011
from ruamel.yaml.scalarstring import DoubleQuotedScalarString as DQ
@@ -374,10 +375,9 @@ def load_file(filename, file_type=None):
374375
if not file_type:
375376
file_type = "json" if filename.endswith(".json") else "yaml"
376377

377-
# When called from JsonRef, filename will contain a URI not just a local file,
378-
# but this function only handles local files. See jsonref.JsonLoader for a fuller implementation
379-
if filename.startswith("file:///"):
380-
filename = filename.replace("file://", "")
378+
# When called from JsonRef, filename will contain a file URI not just a local path
379+
if filename.startswith("file:"):
380+
filename = urlparse.urlparse(filename).path
381381

382382
handler = YAML_HANDLER if file_type == "yaml" else json
383383
with open(filename, "r", encoding="utf-8") as fileh:

tests/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from schema_enforcer.utils import load_file
66
from schema_enforcer.schemas.jsonschema import JsonSchema
77

8-
98
FIXTURES_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "fixtures", "test_jsonschema")
109
FORMAT_CHECK_ERROR_MESSAGE_MAPPING = {
1110
"incorrect_regex_format": "'[' is not a 'regex'",

tests/fixtures/test_validators_pydantic/pydantic_validators/models/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44

55
from schema_enforcer.schemas.manager import PydanticManager
66

7-
87
manager1 = PydanticManager(models=[Hostname, Interfaces])
98
manager2 = PydanticManager(prefix="pydantic", models=[Hostname, Interfaces, Dns])

tests/test_ansible_inventory.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
from schema_enforcer.ansible_inventory import AnsibleInventory
77

8-
98
INVENTORY_DIR = "tests/mocks/inventory"
109

1110

tests/test_jsonschema.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# pylint: disable=redefined-outer-name
22
"""Tests to validate functions defined in jsonschema.py"""
3+
34
import os
45
import pytest
56

tests/test_schemas_schema_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# pylint: disable=redefined-outer-name
22
"""Test manager.py SchemaManager class"""
3+
34
import os
45
import pytest
56
from schema_enforcer.schemas.manager import SchemaManager

0 commit comments

Comments
 (0)