Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
22a9705
fix: grammar according to RFC3987
jkowalleck Jul 24, 2025
917adfe
fix: grammar according to RFC3987
jkowalleck Jul 24, 2025
ac70a09
tests: additional tests for ucschar, iprivate, IPv6address
jkowalleck Aug 15, 2025
448ba8c
Merge branch 'tests/grammar_according_t-rfxc3987' into fix/grammar_ac…
jkowalleck Aug 15, 2025
5416e51
ci: add test pipeline (#3)
jkowalleck Jul 14, 2026
bdcbb98
zizmor (#4)
jkowalleck Jul 14, 2026
c49af76
chore: prep fork publishing (#2)
jkowalleck Jul 14, 2026
8bc7a45
chore: prep v1.1.1 (#5)
jkowalleck Jul 14, 2026
7895fe3
docs: readme (#8)
jkowalleck Jul 16, 2026
d3b1492
Merge remote-tracking branch 'origin/main' into fix/grammar_according…
jkowalleck Jul 16, 2026
2d392a6
Merge remote-tracking branch 'origin/main' into tests/grammar_accordi…
jkowalleck Jul 16, 2026
646076a
Merge branch 'tests/grammar_according_t-rfxc3987' into fix/grammar_ac…
jkowalleck Jul 16, 2026
a2a5bd5
chore: add codeowners (#11)
jkowalleck Jul 16, 2026
9eebff5
docs: readme shields (#12)
jkowalleck Jul 16, 2026
fa0439b
tests
jkowalleck Jul 16, 2026
aec0237
docs
jkowalleck Jul 16, 2026
e58a2e9
lark
jkowalleck Jul 16, 2026
9895f2c
docs: remove cite (#13)
jkowalleck Jul 16, 2026
31b5a21
tests: parameterize (#7)
jkowalleck Jul 16, 2026
593e46c
tests: move test data (#14)
jkowalleck Jul 16, 2026
4043ef2
tests: typing (#15)
jkowalleck Jul 16, 2026
42d5986
chore: editorconfig (#17)
jkowalleck Jul 16, 2026
d172ffb
feat: typing (#16)
jkowalleck Jul 16, 2026
f775a9e
Merge remote-tracking branch 'origin/main' into fix/grammar_according…
jkowalleck Jul 16, 2026
0b0486d
docs
jkowalleck Jul 16, 2026
f05b302
docs
jkowalleck Jul 16, 2026
f829dc4
docs: chaneglog streamlined (#18)
jkowalleck Jul 16, 2026
8e3e6f0
docs
jkowalleck Jul 16, 2026
293fa43
Merge remote-tracking branch 'origin/main' into fix/grammar_according…
jkowalleck Jul 16, 2026
105b24f
Apply suggestions from code review
jkowalleck Jul 16, 2026
f661bd3
docs
jkowalleck Jul 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# EditorConfig is awesome: https://EditorConfig.org

root = true

[*]
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf

[*.py]
indent_style = space
indent_size = 4

[*.lark]
indent_style = space

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.json]
indent_style = space
indent_size = 4

[*.toml]
indent_style = space
indent_size = 4

[*.md]
charset = latin1
indent_style = space
indent_size = 2
# 2 trailing spaces indicate line breaks.
trim_trailing_whitespace = false

[*.{rst,txt}]
indent_style = space
indent_size = 4

[{*.ini,.bandit,.flake8}]
charset = latin1
indent_style = space
indent_size = 4
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# see https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners


# all maintainers are default-reviewers of new pull requests.
* @jkowalleck
76 changes: 56 additions & 20 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,66 @@ name: Upload Python Package

on:
release:
types: [published]
types: [ published ]

env:
PYTHON_VERSION_DEFAULT: "3.14"

permissions:
contents: read

jobs:
deploy:

quick-test:
name: QuickTest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Python Environment
# see https://github.com/actions/setup-python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
architecture: 'x64'
- name: Validate Python Environment
shell: python
run: |
import sys
print('Python %s on %s in %s' % (sys.version, sys.platform, sys.getdefaultencoding()))
- name: Install env dependencies
run: python -m pip install --upgrade pip
- name: Install project
run: python -m pip install --user -e ".[testing]"
- name: Run Tests
run: python -m pytest tests
publish:
name: Publish
needs:
- quick-test
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Python Environment
# see https://github.com/actions/setup-python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
architecture: 'x64'
- name: Install env dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build package
run: python -m build
- name: Publish package
# see https://github.com/pypa/gh-action-pypi-publish
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
107 changes: 107 additions & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.


name: Python CI

on:
workflow_dispatch:
pull_request:
push:
tags: [ 'v*' ] # run again on release tags to have tools mark them
branches: [ 'main', 'next' ]
schedule:
# schedule daily tests, since some dependencies are not intended to be pinned
# this means: at 23:42 every day
- cron: '42 23 * * *'

env:
PYTHON_VERSION_DEFAULT: "3.14"

permissions:
contents: read

jobs:
static-code-analysis:
name: StaticCodingAnalysis (py${{ matrix.python-version}} ${{ matrix.toxenv-factors }})
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- python-version: '3.14' # latest
os: ubuntu-latest
- python-version: '3.9' # lowest
os: ubuntu-latest
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Python Environment
# see https://github.com/actions/setup-python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Install project
run: pip install --user -e ".[testing]"
- name: Run Mypy
run: python -m mypy -v
build-and-test:
name: Test (${{ matrix.os }} py${{ matrix.python-version }} ${{ matrix.toxenv-factors }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- "3.14" # highest supported
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9" # lowest supported
exclude:
- os: macos-latest # macos-latest is incompatible with some PY versions
python-version: "3.10"
- os: macos-latest # macos-latest is incompatible with some PY versions
python-version: "3.9"
steps:
- name: Disabled Git auto EOL CRLF transforms
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Python Environment
# see https://github.com/actions/setup-python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Validate Python Environment
shell: python
run: |
import sys
print('Python %s on %s in %s' % (sys.version, sys.platform, sys.getdefaultencoding()))
- name: Install env dependencies
run: python -m pip install --upgrade pip
- name: Install project
run: pip install --user -e ".[testing]"
- name: Run Tests
run: python -m pytest tests
44 changes: 44 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Analyzes all GitHub Actions workflows for security issues using zizmor.
# docs: https://docs.zizmor.sh/
name: Zizmor

on:
push:
branches: [ 'master', 'main' ]
pull_request:
branches: [ '**' ]
workflow_dispatch:
schedule:
- cron: '0 0 * * 6'

permissions: { }

concurrency:
group: '${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true

jobs:
zizmor:
name: Zizmor
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Run zizmor 🌈
# see https://github.com/zizmorcore/zizmor-action
uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa # v0.5.7
with:
# advanced-security: false => emit findings as workflow-command annotations (::error file=…) rather than
# uploading a SARIF report to GitHub's Security tab.
# Uploading SARIF requires `security-events: write` and GitHub Advanced Security (GHAS),
# both of which are unnecessary here and would violate the least-privilege policy.
# The two modes are mutually exclusive: advanced-security must be false for
# annotations to take effect.
advanced-security: false
annotations: true
34 changes: 34 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[mypy]

files = src/

show_error_codes = True
pretty = True

warn_unreachable = True
allow_redefinition = False

# ignore_missing_imports = False
# follow_imports = normal
# follow_imports_for_stubs = True

### Strict mode ###
warn_unused_configs = True
disallow_subclassing_any = True
disallow_any_generics = True
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
no_implicit_optional = True
warn_redundant_casts = True
warn_unused_ignores = True
warn_return_any = True
no_implicit_reexport = True

[mypy-pytest.*]
ignore_missing_imports = True

[mypy-tests.*]
disallow_untyped_decorators = False
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Changelog

All notable changes to this project will be documented in this file.

## Unreleased

<!-- unreleased things below this line -->

* Fixed
* Align RFC 3987 grammar handling with the specification (via [#10])
* Fix RFC 3986-delegated IRI parsing edge cases (via [#10])
* Changed
* Update grammar rules used by `is_valid_syntax(...)` and term-specific validators (via [#10])
* Added
* Validate IPv6 compression (via [#10])
* Assert static typing (via [#16])
* Tests
* Add grammar regression tests (via [#10])

[#10]: https://github.com/jkowalleck/rfc3987-syntax2/pull/10
[#16]: https://github.com/jkowalleck/rfc3987-syntax2/pull/16

## v1.1.1 - 2026-07-14

### Fork release `rfc3987-syntax2`
* Forked from [`willynilly/rfc3987-syntax`](https://github.com/willynilly/rfc3987-syntax).
* Published this project as an independently maintained package under the new distribution name `rfc3987-syntax2`.
* Preserved upstream functionality as the baseline for this initial fork release.

### Notes for `rfc3987-syntax2`
* This is the first release of the fork.
* No intentional behavioral changes from upstream are introduced in this release unless explicitly listed above.

## v1.1.0 - 2025-07-18

Original release: <https://github.com/willynilly/rfc3987-syntax/releases/tag/v1.1.0>

* Features
* Added add support for IRI-reference and absolute-IRI
* Bugs
* Fixed single quote sub-delimiter

## v1.0.0 - 2025-05-18

Original release: <https://github.com/willynilly/rfc3987-syntax/releases/tag/v1.0.0>
Loading