Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kjd/idna
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.8
Choose a base ref
...
head repository: kjd/idna
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.9
Choose a head ref
  • 7 commits
  • 10 files changed
  • 4 contributors

Commits on Dec 4, 2018

  1. Check a-label does not contain a trailing hyphen (#64)

    From RFC5891 § 4.2.1
     "If only an A-label was provided and the conversion to a U-label is
      not performed, the registry MUST still verify that the A-label is
      superficially valid, i.e., that it does not violate any of the rules
      of Punycode encoding [RFC3492] such as the prohibition on trailing
      hyphen-minus, (...)"
    j-bernard authored and kjd committed Dec 4, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    032fc55 View commit details

Commits on Feb 17, 2020

  1. Test Python 3.7 and 3.8 on Travis (#70)

    Document support through trove classifiers.
    jdufresne authored Feb 17, 2020

    Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    ddba701 View commit details
  2. Copy the full SHA
    1f1518b View commit details
  3. Copy the full SHA
    ef0a187 View commit details
  4. Update to Unicode 12.1.0 (#75)

    kjd authored Feb 17, 2020
    Copy the full SHA
    ac949bc View commit details
  5. Copy the full SHA
    a1f6bb3 View commit details
  6. Release v2.9

    kjd committed Feb 17, 2020
    Copy the full SHA
    1233a73 View commit details
Showing with 477 additions and 382 deletions.
  1. +3 −1 .travis.yml
  2. +9 −0 HISTORY.rst
  3. +3 −49 LICENSE.rst
  4. +3 −1 idna/core.py
  5. +34 −22 idna/idnadata.py
  6. +1 −1 idna/package_data.py
  7. +418 −306 idna/uts46data.py
  8. +4 −0 setup.py
  9. +1 −1 tests/test_idna_uts46.py
  10. +1 −1 tools/idna-data
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -4,8 +4,10 @@ python:
- "3.4"
- "3.5"
- "3.6"
- "3.7-dev"
- "3.7"
- "3.8"
- "pypy"
- "pypy3"
install:
- pip install .
script:
9 changes: 9 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -3,6 +3,15 @@
History
-------

2.9 (2020-02-16)
++++++++++++++++

- Update to Unicode 12.1.0.
- Prohibit A-labels ending with a hyphen (Thanks, Julien Bernard!)
- Future-proofing: Test on Python 3.7 and 3.8, don't immediately
fail should Python 4 come along.
- Made BSD 3-clause license clearer

2.8 (2018-12-04)
++++++++++++++++

52 changes: 3 additions & 49 deletions LICENSE.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
License
-------

Copyright (c) 2013-2018, Kim Davies. All rights reserved.
License: bsd-3-clause

Copyright (c) 2013-2020, Kim Davies. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -30,51 +32,3 @@ modification, are permitted provided that the following conditions are met:
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

Portions of the codec implementation and unit tests are derived from the
Python standard library, which carries the `Python Software Foundation
License <https://docs.python.org/2/license.html>`_:

Copyright (c) 2001-2014 Python Software Foundation; All Rights Reserved

Portions of the unit tests are derived from the Unicode standard, which
is subject to the Unicode, Inc. License Agreement:

Copyright (c) 1991-2014 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in
<http://www.unicode.org/copyright.html>.

Permission is hereby granted, free of charge, to any person obtaining
a copy of the Unicode data files and any associated documentation
(the "Data Files") or Unicode software and any associated documentation
(the "Software") to deal in the Data Files or Software
without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, and/or sell copies of
the Data Files or Software, and to permit persons to whom the Data Files
or Software are furnished to do so, provided that

(a) this copyright and permission notice appear with all copies
of the Data Files or Software,

(b) this copyright and permission notice appear in associated
documentation, and

(c) there is clear notice in each modified Data File or in the Software
as well as in the documentation associated with the Data File(s) or
Software that the data or software has been modified.

THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THE DATA FILES OR SOFTWARE.

Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in these Data Files or Software without prior
written authorization of the copyright holder.
4 changes: 3 additions & 1 deletion idna/core.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
_alabel_prefix = b'xn--'
_unicode_dots_re = re.compile(u'[\u002e\u3002\uff0e\uff61]')

if sys.version_info[0] == 3:
if sys.version_info[0] >= 3:
unicode = str
unichr = chr

@@ -300,6 +300,8 @@ def ulabel(label):
label = label.lower()
if label.startswith(_alabel_prefix):
label = label[len(_alabel_prefix):]
if label.decode('ascii')[-1] == '-':
raise IDNAError('A-label must not end with a hyphen')
else:
check_label(label)
return label.decode('ascii')
56 changes: 34 additions & 22 deletions idna/idnadata.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is automatically generated by tools/idna-data

__version__ = "11.0.0"
__version__ = "12.1.0"
scripts = {
'Greek': (
0x37000000374,
@@ -74,6 +74,7 @@
0x304100003097,
0x309d000030a0,
0x1b0010001b11f,
0x1b1500001b153,
0x1f2000001f201,
),
'Katakana': (
@@ -85,6 +86,7 @@
0xff660000ff70,
0xff710000ff9e,
0x1b0000001b001,
0x1b1640001b168,
),
}
joining_types = {
@@ -824,6 +826,7 @@
0x1e941: 68,
0x1e942: 68,
0x1e943: 68,
0x1e94b: 84,
}
codepoint_classes = {
'PVALID': (
@@ -1258,18 +1261,11 @@
0xe5000000e5a,
0xe8100000e83,
0xe8400000e85,
0xe8700000e89,
0xe8a00000e8b,
0xe8d00000e8e,
0xe9400000e98,
0xe9900000ea0,
0xea100000ea4,
0xe8600000e8b,
0xe8c00000ea4,
0xea500000ea6,
0xea700000ea8,
0xeaa00000eac,
0xead00000eb3,
0xeb400000eba,
0xebb00000ebe,
0xea700000eb3,
0xeb400000ebe,
0xec000000ec5,
0xec600000ec7,
0xec800000ece,
@@ -1370,7 +1366,7 @@
0x1c4000001c4a,
0x1c4d00001c7e,
0x1cd000001cd3,
0x1cd400001cfa,
0x1cd400001cfb,
0x1d0000001d2c,
0x1d2f00001d30,
0x1d3b00001d3c,
@@ -1727,6 +1723,10 @@
0xa7b50000a7b6,
0xa7b70000a7b8,
0xa7b90000a7ba,
0xa7bb0000a7bc,
0xa7bd0000a7be,
0xa7bf0000a7c0,
0xa7c30000a7c4,
0xa7f70000a7f8,
0xa7fa0000a828,
0xa8400000a874,
@@ -1753,7 +1753,7 @@
0xab200000ab27,
0xab280000ab2f,
0xab300000ab5b,
0xab600000ab66,
0xab600000ab68,
0xabc00000abeb,
0xabec0000abee,
0xabf00000abfa,
@@ -1830,6 +1830,7 @@
0x10f0000010f1d,
0x10f2700010f28,
0x10f3000010f51,
0x10fe000010ff7,
0x1100000011047,
0x1106600011070,
0x1107f000110bb,
@@ -1871,7 +1872,7 @@
0x1137000011375,
0x114000001144b,
0x114500001145a,
0x1145e0001145f,
0x1145e00011460,
0x11480000114c6,
0x114c7000114c8,
0x114d0000114da,
@@ -1881,18 +1882,21 @@
0x1160000011641,
0x1164400011645,
0x116500001165a,
0x11680000116b8,
0x11680000116b9,
0x116c0000116ca,
0x117000001171b,
0x1171d0001172c,
0x117300001173a,
0x118000001183b,
0x118c0000118ea,
0x118ff00011900,
0x119a0000119a8,
0x119aa000119d8,
0x119da000119e2,
0x119e3000119e5,
0x11a0000011a3f,
0x11a4700011a48,
0x11a5000011a84,
0x11a8600011a9a,
0x11a5000011a9a,
0x11a9d00011a9e,
0x11ac000011af9,
0x11c0000011c09,
@@ -1931,13 +1935,16 @@
0x16b6300016b78,
0x16b7d00016b90,
0x16e6000016e80,
0x16f0000016f45,
0x16f5000016f7f,
0x16f0000016f4b,
0x16f4f00016f88,
0x16f8f00016fa0,
0x16fe000016fe2,
0x17000000187f2,
0x16fe300016fe4,
0x17000000187f8,
0x1880000018af3,
0x1b0000001b11f,
0x1b1500001b153,
0x1b1640001b168,
0x1b1700001b2fc,
0x1bc000001bc6b,
0x1bc700001bc7d,
@@ -1955,9 +1962,14 @@
0x1e01b0001e022,
0x1e0230001e025,
0x1e0260001e02b,
0x1e1000001e12d,
0x1e1300001e13e,
0x1e1400001e14a,
0x1e14e0001e14f,
0x1e2c00001e2fa,
0x1e8000001e8c5,
0x1e8d00001e8d7,
0x1e9220001e94b,
0x1e9220001e94c,
0x1e9500001e95a,
0x200000002a6d7,
0x2a7000002b735,
2 changes: 1 addition & 1 deletion idna/package_data.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '2.8'
__version__ = '2.9'

Loading