Skip to content

Commit a814cd9

Browse files
Added patch for charset-normalizer == 3.1.0
`utils.py` has changed slightly: https://github.com/Ousret/charset_normalizer/blob/3.1.0/charset_normalizer/utils.py ``` Collecting charset-normalizer<4.0,>=2.0 Downloading charset_normalizer-3.1.0-py3-none-any.whl (46 kB) |████████████████████████████████| 46 kB 631 kB/s Looking for GraalPy patches for charset_normalizer Patching package charset_normalizer using /Library/Java/JavaVirtualMachines/graalvm-ce-java19-22.3.1/Contents/Home/languages/python/lib-graalpython/patches/charset_normalizer/whl/charset_normalizer.patch patching file charset_normalizer/utils.py Hunk #1 FAILED at 11. Hunk #2 succeeded at 258 with fuzz 2 (offset 11 lines). 1 out of 2 hunks FAILED -- saving rejects to file charset_normalizer/utils.py.rej ```
1 parent edf3549 commit a814cd9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
diff --git a/charset_normalizer/utils.py b/charset_normalizer/utils.py
2+
index dcb14df..12079e3 100644
3+
--- a/charset_normalizer/utils.py
4+
+++ b/charset_normalizer/utils.py
5+
@@ -11,7 +11,10 @@ from functools import lru_cache
6+
from re import findall
7+
from typing import List, Optional, Set, Tuple, Union
8+
9+
-from _multibytecodec import MultibyteIncrementalDecoder
10+
+try:
11+
+ from _multibytecodec import MultibyteIncrementalDecoder
12+
+except ImportError:
13+
+ MultibyteIncrementalDecoder = None
14+
15+
from .constant import (
16+
ENCODING_MARKS,
17+
@@ -244,7 +247,7 @@ def is_multi_byte_encoding(name: str) -> bool:
18+
} or issubclass(
19+
importlib.import_module("encodings.{}".format(name)).IncrementalDecoder, # type: ignore
20+
MultibyteIncrementalDecoder,
21+
- )
22+
+ ) if MultibyteIncrementalDecoder else False
23+
24+
25+
def identify_sig_or_bom(sequence: bytes) -> Tuple[Optional[str], bytes]:
26+
--
27+
3.1.0

0 commit comments

Comments
 (0)