mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-14 17:05:05 +00:00
Update idna library 3.4 (cab054c) → 3.7 (1d365e1).
This commit is contained in:
parent
851cb7786e
commit
958318491c
7 changed files with 2389 additions and 298 deletions
|
@ -1,5 +1,6 @@
|
|||
### 3.32.0 (2024-xx-xx xx:xx:00 UTC)
|
||||
|
||||
* Update idna library 3.4 (cab054c) to 3.7 (1d365e1)
|
||||
* Update Requests library 2.31.0 (8812812) to 2.32.3 (0e322af)
|
||||
* Update urllib3 2.0.7 (56f01e0) to 2.2.1 (54d6edf)
|
||||
|
||||
|
|
|
@ -107,8 +107,8 @@ def search_function(name: str) -> Optional[codecs.CodecInfo]:
|
|||
return None
|
||||
return codecs.CodecInfo(
|
||||
name=name,
|
||||
encode=Codec().encode, # type: ignore
|
||||
decode=Codec().decode, # type: ignore
|
||||
encode=Codec().encode,
|
||||
decode=Codec().decode,
|
||||
incrementalencoder=IncrementalEncoder,
|
||||
incrementaldecoder=IncrementalDecoder,
|
||||
streamwriter=StreamWriter,
|
||||
|
|
|
@ -150,9 +150,11 @@ def valid_contextj(label: str, pos: int) -> bool:
|
|||
joining_type = idnadata.joining_types.get(ord(label[i]))
|
||||
if joining_type == ord('T'):
|
||||
continue
|
||||
if joining_type in [ord('L'), ord('D')]:
|
||||
elif joining_type in [ord('L'), ord('D')]:
|
||||
ok = True
|
||||
break
|
||||
else:
|
||||
break
|
||||
|
||||
if not ok:
|
||||
return False
|
||||
|
@ -162,9 +164,11 @@ def valid_contextj(label: str, pos: int) -> bool:
|
|||
joining_type = idnadata.joining_types.get(ord(label[i]))
|
||||
if joining_type == ord('T'):
|
||||
continue
|
||||
if joining_type in [ord('R'), ord('D')]:
|
||||
elif joining_type in [ord('R'), ord('D')]:
|
||||
ok = True
|
||||
break
|
||||
else:
|
||||
break
|
||||
return ok
|
||||
|
||||
if cp_value == 0x200d:
|
||||
|
@ -236,12 +240,8 @@ 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']):
|
||||
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(
|
||||
if not valid_contextj(label, pos):
|
||||
raise InvalidCodepointContext('Joiner {} not allowed 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):
|
||||
|
@ -262,13 +262,8 @@ def alabel(label: str) -> bytes:
|
|||
except UnicodeEncodeError:
|
||||
pass
|
||||
|
||||
if not label:
|
||||
raise IDNAError('No Input')
|
||||
|
||||
label = str(label)
|
||||
check_label(label)
|
||||
label_bytes = _punycode(label)
|
||||
label_bytes = _alabel_prefix + label_bytes
|
||||
label_bytes = _alabel_prefix + _punycode(label)
|
||||
|
||||
if not valid_label_length(label_bytes):
|
||||
raise IDNAError('Label too long')
|
||||
|
@ -318,7 +313,7 @@ def uts46_remap(domain: str, std3_rules: bool = True, transitional: bool = False
|
|||
status = uts46row[1]
|
||||
replacement = None # type: Optional[str]
|
||||
if len(uts46row) == 3:
|
||||
replacement = uts46row[2] # type: ignore
|
||||
replacement = uts46row[2]
|
||||
if (status == 'V' or
|
||||
(status == 'D' and not transitional) or
|
||||
(status == '3' and not std3_rules and replacement is None)):
|
||||
|
|
2201
lib/idna/idnadata.py
2201
lib/idna/idnadata.py
File diff suppressed because it is too large
Load diff
|
@ -1,2 +1,2 @@
|
|||
__version__ = '3.4'
|
||||
__version__ = '3.7'
|
||||
|
||||
|
|
0
lib/idna/py.typed
Normal file
0
lib/idna/py.typed
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue