mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 05:31:15 -07:00
Bump idna from 3.6 to 3.7 (#2304)
* Bump idna from 3.6 to 3.7 Bumps [idna](https://github.com/kjd/idna) from 3.6 to 3.7. - [Release notes](https://github.com/kjd/idna/releases) - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst) - [Commits](https://github.com/kjd/idna/compare/v3.6...v3.7) --- updated-dependencies: - dependency-name: idna dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update idna==3.7 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
This commit is contained in:
parent
80984bd296
commit
07166ae6b2
4 changed files with 2157 additions and 67 deletions
|
@ -150,9 +150,11 @@ def valid_contextj(label: str, pos: int) -> bool:
|
||||||
joining_type = idnadata.joining_types.get(ord(label[i]))
|
joining_type = idnadata.joining_types.get(ord(label[i]))
|
||||||
if joining_type == ord('T'):
|
if joining_type == ord('T'):
|
||||||
continue
|
continue
|
||||||
if joining_type in [ord('L'), ord('D')]:
|
elif joining_type in [ord('L'), ord('D')]:
|
||||||
ok = True
|
ok = True
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
if not ok:
|
if not ok:
|
||||||
return False
|
return False
|
||||||
|
@ -162,9 +164,11 @@ def valid_contextj(label: str, pos: int) -> bool:
|
||||||
joining_type = idnadata.joining_types.get(ord(label[i]))
|
joining_type = idnadata.joining_types.get(ord(label[i]))
|
||||||
if joining_type == ord('T'):
|
if joining_type == ord('T'):
|
||||||
continue
|
continue
|
||||||
if joining_type in [ord('R'), ord('D')]:
|
elif joining_type in [ord('R'), ord('D')]:
|
||||||
ok = True
|
ok = True
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
break
|
||||||
return ok
|
return ok
|
||||||
|
|
||||||
if cp_value == 0x200d:
|
if cp_value == 0x200d:
|
||||||
|
@ -236,13 +240,9 @@ def check_label(label: Union[str, bytes, bytearray]) -> None:
|
||||||
if intranges_contain(cp_value, idnadata.codepoint_classes['PVALID']):
|
if intranges_contain(cp_value, idnadata.codepoint_classes['PVALID']):
|
||||||
continue
|
continue
|
||||||
elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTJ']):
|
elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTJ']):
|
||||||
try:
|
|
||||||
if not valid_contextj(label, pos):
|
if not valid_contextj(label, pos):
|
||||||
raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format(
|
raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format(
|
||||||
_unot(cp_value), pos+1, repr(label)))
|
_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']):
|
elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTO']):
|
||||||
if not valid_contexto(label, pos):
|
if not valid_contexto(label, pos):
|
||||||
raise InvalidCodepointContext('Codepoint {} not allowed at position {} in {}'.format(_unot(cp_value), pos+1, repr(label)))
|
raise InvalidCodepointContext('Codepoint {} not allowed at position {} in {}'.format(_unot(cp_value), pos+1, repr(label)))
|
||||||
|
@ -262,13 +262,8 @@ def alabel(label: str) -> bytes:
|
||||||
except UnicodeEncodeError:
|
except UnicodeEncodeError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if not label:
|
|
||||||
raise IDNAError('No Input')
|
|
||||||
|
|
||||||
label = str(label)
|
|
||||||
check_label(label)
|
check_label(label)
|
||||||
label_bytes = _punycode(label)
|
label_bytes = _alabel_prefix + _punycode(label)
|
||||||
label_bytes = _alabel_prefix + label_bytes
|
|
||||||
|
|
||||||
if not valid_label_length(label_bytes):
|
if not valid_label_length(label_bytes):
|
||||||
raise IDNAError('Label too long')
|
raise IDNAError('Label too long')
|
||||||
|
|
2197
lib/idna/idnadata.py
2197
lib/idna/idnadata.py
File diff suppressed because it is too large
Load diff
|
@ -1,2 +1,2 @@
|
||||||
__version__ = '3.6'
|
__version__ = '3.7'
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ ga4mp==2.0.4
|
||||||
gntp==1.0.3
|
gntp==1.0.3
|
||||||
html5lib==1.1
|
html5lib==1.1
|
||||||
httpagentparser==1.9.5
|
httpagentparser==1.9.5
|
||||||
idna==3.6
|
idna==3.7
|
||||||
importlib-metadata==7.1.0
|
importlib-metadata==7.1.0
|
||||||
importlib-resources==6.4.0
|
importlib-resources==6.4.0
|
||||||
git+https://github.com/Tautulli/ipwhois.git@master#egg=ipwhois
|
git+https://github.com/Tautulli/ipwhois.git@master#egg=ipwhois
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue