diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3d0cc15..9cb0f6c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: test: strategy: matrix: - python: ['3.9', '3.10', '3.11', '3.12'] + python: ['3.9', '3.10', '3.11', '3.12', '3.13'] platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: diff --git a/noxfile.py b/noxfile.py index d1c8d85..fa8177a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -37,7 +37,7 @@ def build_and_check_dists(session): session.run("python", "-m", "twine", "check", "dist/*") -@nox.session(python=["3.9", "3.10", "3.11", "3.12"]) +@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13"]) def tests(session): session.install("pytest") session.install("pytest-asyncio") diff --git a/src/jsonata/functions.py b/src/jsonata/functions.py index e392f12..9b2c849 100644 --- a/src/jsonata/functions.py +++ b/src/jsonata/functions.py @@ -722,7 +722,7 @@ def safe_replace_first(s: str, pattern: re.Pattern, replacement: str) -> Optiona r = None for i in range(0, 10): try: - r = re.sub(pattern, replacement, s, 1) + r = re.sub(pattern, replacement, s, count=1) break except Exception as e: msg = str(e)