Skip to content

Commit df21c4b

Browse files
authored
Add support for IRIs and RFC 3987 (#50)
1 parent 9a87fd6 commit df21c4b

File tree

17 files changed

+754
-359
lines changed

17 files changed

+754
-359
lines changed

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
exclude_lines =
33
.* # Python \d.*
44
.* # nocov: Python \d.*
5+
.* # pragma: no cover.*
56
fail_under = 100

docs/source/api-ref/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ can be utilized, please see :ref:`narrative` instead.
1313
builder
1414
uri
1515
validators
16+
iri
1617
miscellaneous

docs/source/api-ref/iri.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
===============
2+
IRI Submodule
3+
===============
4+
5+
.. autoclass:: rfc3986.iri.IRIReference
6+
7+
.. automethod:: rfc3986.iri.IRIReference.encode
8+
9+
.. automethod:: rfc3986.iri.IRIReference.from_string
10+
11+
.. automethod:: rfc3986.iri.IRIReference.unsplit
12+
13+
.. automethod:: rfc3986.iri.IRIReference.resolve_with
14+
15+
.. automethod:: rfc3986.iri.IRIReference.copy_with
16+
17+
.. automethod:: rfc3986.iri.IRIReference.is_absolute
18+
19+
.. automethod:: rfc3986.iri.IRIReference.authority_info

docs/source/release-notes/1.3.0.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
1.3.0 -- 2019-04-20
2+
-------------------
3+
4+
- Add the ``IRIReference`` class which parses data according
5+
to RFC 3987 and encodes into an ``URIReference``.
6+
7+
See also `GitHub #50`_
8+
9+
.. links
10+
11+
.. _GitHub #50:
12+
https://github.com/python-hyper/rfc3986/pull/50

docs/source/release-notes/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ here with the newest releases first.
1010

1111
.. toctree::
1212

13+
1.3.0
1314
1.2.0
1415
1.1.0
1516
1.0.0

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,7 @@
4242
'Programming Language :: Python :: 3.6',
4343
'Programming Language :: Python :: 3.7',
4444
),
45+
extras_require={
46+
'idna2008': ['idna']
47+
}
4548
)

src/rfc3986/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
:license: Apache v2.0, see LICENSE for details
2323
"""
2424

25+
from .api import iri_reference
26+
from .api import IRIReference
2527
from .api import is_valid_uri
2628
from .api import normalize_uri
2729
from .api import uri_reference
@@ -39,9 +41,11 @@
3941
__all__ = (
4042
'ParseResult',
4143
'URIReference',
44+
'IRIReference',
4245
'is_valid_uri',
4346
'normalize_uri',
4447
'uri_reference',
48+
'iri_reference',
4549
'urlparse',
4650
'__title__',
4751
'__author__',

0 commit comments

Comments
 (0)