Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 7.0.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 25.11.0
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
rev: v3.21.2
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/pycqa/flake8
rev: 7.1.0
rev: 7.3.0
hooks:
- id: flake8
exclude: ^(tests/|docs/|setup.py)
additional_dependencies:
- flake8-docstrings
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.5.0
rev: v3.1.0
hooks:
- id: setup-cfg-fmt
args: [--include-version-classifiers]
args: [--include-version-classifiers, --min-py-version=3.8]
#- repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.910-1
# hooks:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/narrative.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ URIs, and finally there's an API to build URIs.
|rfc3986| parses URIs much differently from :mod:`urllib.parse` so users may
see some subtle differences with very specific URLs that contain rough
edgecases. Regardless, we do our best to implement the same API so you should
be able to seemlessly swap |rfc3986| for ``urlparse``.
be able to seamlessly swap |rfc3986| for ``urlparse``.


.. toctree::
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ license_files = LICENSE
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Natural Language :: English
Programming Language :: Python
Programming Language :: Python :: 3
Expand All @@ -22,6 +21,8 @@ classifiers =
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
Programming Language :: Python :: 3.14
Programming Language :: Python :: Implementation :: CPython
project_urls =
Source = https://github.com/python-hyper/rfc3986
Expand Down
22 changes: 11 additions & 11 deletions src/rfc3986/abnf_regexp.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,20 +195,20 @@

# Only wide-unicode gets the high-ranges of UCSCHAR
if sys.maxunicode > 0xFFFF: # pragma: no cover
IPRIVATE = "\uE000-\uF8FF\U000F0000-\U000FFFFD\U00100000-\U0010FFFD"
IPRIVATE = "\ue000-\uf8ff\U000f0000-\U000ffffd\U00100000-\U0010fffd"
UCSCHAR_RE = (
"\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF"
"\U00010000-\U0001FFFD\U00020000-\U0002FFFD"
"\U00030000-\U0003FFFD\U00040000-\U0004FFFD"
"\U00050000-\U0005FFFD\U00060000-\U0006FFFD"
"\U00070000-\U0007FFFD\U00080000-\U0008FFFD"
"\U00090000-\U0009FFFD\U000A0000-\U000AFFFD"
"\U000B0000-\U000BFFFD\U000C0000-\U000CFFFD"
"\U000D0000-\U000DFFFD\U000E1000-\U000EFFFD"
"\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef"
"\U00010000-\U0001fffd\U00020000-\U0002fffd"
"\U00030000-\U0003fffd\U00040000-\U0004fffd"
"\U00050000-\U0005fffd\U00060000-\U0006fffd"
"\U00070000-\U0007fffd\U00080000-\U0008fffd"
"\U00090000-\U0009fffd\U000a0000-\U000afffd"
"\U000b0000-\U000bfffd\U000c0000-\U000cfffd"
"\U000d0000-\U000dfffd\U000e1000-\U000efffd"
)
else: # pragma: no cover
IPRIVATE = "\uE000-\uF8FF"
UCSCHAR_RE = "\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF"
IPRIVATE = "\ue000-\uf8ff"
UCSCHAR_RE = "\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef"

IUNRESERVED_RE = "A-Za-z0-9\\._~\\-" + UCSCHAR_RE
IPCHAR = "([" + IUNRESERVED_RE + SUB_DELIMITERS_RE + ":@]|%s)" % PCT_ENCODED
Expand Down