From d7c33e82242d609b91121f7b00ba9d6d573c2077 Mon Sep 17 00:00:00 2001 From: Joe Wesch Date: Thu, 9 Apr 2026 10:38:37 -0500 Subject: [PATCH 1/2] Added python 3.14 to CI matrix --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 674e7ed..28ec42d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,7 +75,7 @@ jobs: strategy: fail-fast: true matrix: - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] ansible-core-version: ["2.16.14"] runs-on: "ubuntu-latest" env: @@ -159,7 +159,7 @@ jobs: strategy: fail-fast: true matrix: - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] ansible-core-version: ["2.16.14"] runs-on: "ubuntu-latest" env: From 67aaab697cf45319a57330d1ef5c54fb56e12d2d Mon Sep 17 00:00:00 2001 From: Joe Wesch Date: Thu, 9 Apr 2026 10:53:51 -0500 Subject: [PATCH 2/2] Changed load_file to use urlparse --- schema_enforcer/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/schema_enforcer/utils.py b/schema_enforcer/utils.py index 32ebad9..9078e16 100755 --- a/schema_enforcer/utils.py +++ b/schema_enforcer/utils.py @@ -5,6 +5,7 @@ import glob from collections.abc import Mapping, Sequence import importlib +from urllib import parse as urlparse from ruamel.yaml import YAML from ruamel.yaml.scalarstring import DoubleQuotedScalarString as DQ @@ -374,10 +375,9 @@ def load_file(filename, file_type=None): if not file_type: file_type = "json" if filename.endswith(".json") else "yaml" - # When called from JsonRef, filename will contain a URI not just a local file, - # but this function only handles local files. See jsonref.JsonLoader for a fuller implementation - if filename.startswith("file:///"): - filename = filename.replace("file://", "") + # When called from JsonRef, filename will contain a file URI not just a local path + if filename.startswith("file:"): + filename = urlparse.urlparse(filename).path handler = YAML_HANDLER if file_type == "yaml" else json with open(filename, "r", encoding="utf-8") as fileh: