diff options
| author | robot-piglet <[email protected]> | 2024-09-07 17:11:20 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2024-09-07 17:18:30 +0300 |
| commit | fb7e2db618ca57793e256a099677433c3f8a3005 (patch) | |
| tree | eda33fc426b6bf3c88d3a24cb5035ca058554268 /contrib/python/idna/py3 | |
| parent | 1db34968b62efd36baf1e286042c6c797e33e985 (diff) | |
Intermediate changes
Diffstat (limited to 'contrib/python/idna/py3')
| -rw-r--r-- | contrib/python/idna/py3/.dist-info/METADATA | 18 | ||||
| -rw-r--r-- | contrib/python/idna/py3/README.rst | 12 | ||||
| -rw-r--r-- | contrib/python/idna/py3/idna/core.py | 8 | ||||
| -rw-r--r-- | contrib/python/idna/py3/idna/package_data.py | 2 | ||||
| -rw-r--r-- | contrib/python/idna/py3/tests/test_idna.py | 1 | ||||
| -rw-r--r-- | contrib/python/idna/py3/ya.make | 2 |
6 files changed, 26 insertions, 17 deletions
diff --git a/contrib/python/idna/py3/.dist-info/METADATA b/contrib/python/idna/py3/.dist-info/METADATA index b28f6ecdd5b..a04a7f96576 100644 --- a/contrib/python/idna/py3/.dist-info/METADATA +++ b/contrib/python/idna/py3/.dist-info/METADATA @@ -1,9 +1,9 @@ Metadata-Version: 2.1 Name: idna -Version: 3.7 +Version: 3.8 Summary: Internationalized Domain Names in Applications (IDNA) Author-email: Kim Davies <[email protected]> -Requires-Python: >=3.5 +Requires-Python: >=3.6 Description-Content-Type: text/x-rst Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers @@ -13,7 +13,6 @@ Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 @@ -21,6 +20,7 @@ Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Internet :: Name Service (DNS) @@ -115,7 +115,9 @@ This library provides one such mapping that was developed by the Unicode Consortium. Known as `Unicode IDNA Compatibility Processing <https://unicode.org/reports/tr46/>`_, it provides for both a regular mapping for typical applications, as well as a transitional mapping to -help migrate from older IDNA 2003 applications. +help migrate from older IDNA 2003 applications. Strings are +preprocessed according to Section 4.4 “Preprocessing for IDNA2008” +prior to the IDNA operations. For example, “Königsgäßchen” is not a permissible label as *LATIN CAPITAL LETTER K* is not allowed (nor are capital letters in general). @@ -215,7 +217,7 @@ Additional Notes * **Packages**. The latest tagged release version is published in the `Python Package Index <https://pypi.org/project/idna/>`_. -* **Version support**. This library supports Python 3.5 and higher. +* **Version support**. This library supports Python 3.6 and higher. As this library serves as a low-level toolkit for a variety of applications, many of which strive for broad compatibility with older Python versions, there is no rush to remove older interpreter support. @@ -223,9 +225,9 @@ Additional Notes maintenance burden has become too high. * **Python 2**. Python 2 is supported by version 2.x of this library. - While active development of the version 2.x series has ended, notable - issues being corrected may be backported to 2.x. Use "idna<3" in your - requirements file if you need this library for a Python 2 application. + Use "idna<3" in your requirements file if you need this library for + a Python 2 application. Be advised that these versions are no longer + actively developed. * **Testing**. The library has a test suite based on each rule of the IDNA specification, as well as tests that are provided as part of the diff --git a/contrib/python/idna/py3/README.rst b/contrib/python/idna/py3/README.rst index a4f1f71e728..5f5bd3820ee 100644 --- a/contrib/python/idna/py3/README.rst +++ b/contrib/python/idna/py3/README.rst @@ -83,7 +83,9 @@ This library provides one such mapping that was developed by the Unicode Consortium. Known as `Unicode IDNA Compatibility Processing <https://unicode.org/reports/tr46/>`_, it provides for both a regular mapping for typical applications, as well as a transitional mapping to -help migrate from older IDNA 2003 applications. +help migrate from older IDNA 2003 applications. Strings are +preprocessed according to Section 4.4 “Preprocessing for IDNA2008” +prior to the IDNA operations. For example, “Königsgäßchen” is not a permissible label as *LATIN CAPITAL LETTER K* is not allowed (nor are capital letters in general). @@ -183,7 +185,7 @@ Additional Notes * **Packages**. The latest tagged release version is published in the `Python Package Index <https://pypi.org/project/idna/>`_. -* **Version support**. This library supports Python 3.5 and higher. +* **Version support**. This library supports Python 3.6 and higher. As this library serves as a low-level toolkit for a variety of applications, many of which strive for broad compatibility with older Python versions, there is no rush to remove older interpreter support. @@ -191,9 +193,9 @@ Additional Notes maintenance burden has become too high. * **Python 2**. Python 2 is supported by version 2.x of this library. - While active development of the version 2.x series has ended, notable - issues being corrected may be backported to 2.x. Use "idna<3" in your - requirements file if you need this library for a Python 2 application. + Use "idna<3" in your requirements file if you need this library for + a Python 2 application. Be advised that these versions are no longer + actively developed. * **Testing**. The library has a test suite based on each rule of the IDNA specification, as well as tests that are provided as part of the diff --git a/contrib/python/idna/py3/idna/core.py b/contrib/python/idna/py3/idna/core.py index 0dae61acdbc..69b66ef781f 100644 --- a/contrib/python/idna/py3/idna/core.py +++ b/contrib/python/idna/py3/idna/core.py @@ -240,8 +240,12 @@ def check_label(label: Union[str, bytes, bytearray]) -> None: if intranges_contain(cp_value, idnadata.codepoint_classes['PVALID']): continue elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTJ']): - if not valid_contextj(label, pos): - raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format( + try: + if not valid_contextj(label, pos): + raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format( + _unot(cp_value), pos+1, repr(label))) + except ValueError: + raise IDNAError('Unknown codepoint adjacent to joiner {} at position {} in {}'.format( _unot(cp_value), pos+1, repr(label))) elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTO']): if not valid_contexto(label, pos): diff --git a/contrib/python/idna/py3/idna/package_data.py b/contrib/python/idna/py3/idna/package_data.py index ed811133633..79aa47c5e2b 100644 --- a/contrib/python/idna/py3/idna/package_data.py +++ b/contrib/python/idna/py3/idna/package_data.py @@ -1,2 +1,2 @@ -__version__ = '3.7' +__version__ = '3.8' diff --git a/contrib/python/idna/py3/tests/test_idna.py b/contrib/python/idna/py3/tests/test_idna.py index 81afb322582..0641eeb3dcd 100644 --- a/contrib/python/idna/py3/tests/test_idna.py +++ b/contrib/python/idna/py3/tests/test_idna.py @@ -270,6 +270,7 @@ class IDNATests(unittest.TestCase): self.assertRaises(idna.IDNAError, decode, b'xn--') self.assertRaises(idna.IDNAError, decode, b'\x8d\xd2') self.assertRaises(idna.IDNAError, decode, b'A.A.0.a.a.A.0.a.A.A.0.a.A.0A.2.a.A.A.0.a.A.0.A.a.A0.a.a.A.0.a.fB.A.A.a.A.A.B.A.A.a.A.A.B.A.A.a.A.A.0.a.A.a.a.A.A.0.a.A.0.A.a.A0.a.a.A.0.a.fB.A.A.a.A.A.B.0A.A.a.A.A.B.A.A.a.A.A.a.A.A.B.A.A.a.A.0.a.B.A.A.a.A.B.A.a.A.A.5.a.A.0.a.Ba.A.B.A.A.a.A.0.a.Xn--B.A.A.A.a') + self.assertRaises(idna.IDNAError, decode, b'xn--ukba655qaaaa14431eeaaba.c') if __name__ == '__main__': unittest.main() diff --git a/contrib/python/idna/py3/ya.make b/contrib/python/idna/py3/ya.make index 6d08b94b1b8..cad55a092e0 100644 --- a/contrib/python/idna/py3/ya.make +++ b/contrib/python/idna/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(3.7) +VERSION(3.8) LICENSE(BSD-3-Clause) |
