Browse Source

Update idna library 2.7 (0f50bdc) → 2.8 (032fc55).

pull/1200/head
JackDandy 7 years ago
parent
commit
f4c70c3955
  1. 1
      CHANGES.md
  2. 7
      lib/idna/core.py
  3. 2
      lib/idna/package_data.py

1
CHANGES.md

@ -4,6 +4,7 @@
* Update Certifi 2018.08.24 (8be9f89) to 2018.10.15 (a462d21)
* Update dateutil 2.7.2 (49690ee) to 2.7.5 (e954819)
* Update html5lib 1.1-dev (e9ef538) to 1.1-dev (4f92357)
* Update idna library 2.7 (0f50bdc) to 2.8 (032fc55)
* Update MsgPack 0.5.6 (d4675be) to 0.6.0 (197e307)
* Update Requests library 2.19.1 (2c6a842) to 2.20.1 (57d7284)
* Update Six compatibility library 1.11.0 (68112f3) to 1.11.0 (0b4265e)

7
lib/idna/core.py

@ -267,10 +267,7 @@ def alabel(label):
try:
label = label.encode('ascii')
try:
ulabel(label)
except IDNAError:
raise IDNAError('The label {0} is not a valid A-label'.format(label))
ulabel(label)
if not valid_label_length(label):
raise IDNAError('Label too long')
return label
@ -303,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')

2
lib/idna/package_data.py

@ -1,2 +1,2 @@
__version__ = '2.7'
__version__ = '2.8'

Loading…
Cancel
Save