ThomasTheMaker commited on
Commit
e849982
·
verified ·
1 Parent(s): 28b1609

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .claude/settings.local.json +15 -0
  2. .gitattributes +129 -0
  3. venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/INSTALLER +1 -0
  4. venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/METADATA +764 -0
  5. venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/RECORD +36 -0
  6. venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/REQUESTED +0 -0
  7. venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/WHEEL +7 -0
  8. venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/entry_points.txt +2 -0
  9. venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/licenses/LICENSE +21 -0
  10. venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/top_level.txt +1 -0
  11. venv/lib/python3.10/site-packages/charset_normalizer/md__mypyc.cpython-310-x86_64-linux-gnu.so +3 -0
  12. venv/lib/python3.10/site-packages/contourpy/_contourpy.cpython-310-x86_64-linux-gnu.so +3 -0
  13. venv/lib/python3.10/site-packages/datasets/__pycache__/arrow_dataset.cpython-310.pyc +3 -0
  14. venv/lib/python3.10/site-packages/datasets/__pycache__/dataset_dict.cpython-310.pyc +3 -0
  15. venv/lib/python3.10/site-packages/datasets/__pycache__/iterable_dataset.cpython-310.pyc +3 -0
  16. venv/lib/python3.10/site-packages/exceptiongroup/__init__.py +46 -0
  17. venv/lib/python3.10/site-packages/exceptiongroup/__pycache__/__init__.cpython-310.pyc +0 -0
  18. venv/lib/python3.10/site-packages/exceptiongroup/__pycache__/_catch.cpython-310.pyc +0 -0
  19. venv/lib/python3.10/site-packages/exceptiongroup/__pycache__/_exceptions.cpython-310.pyc +0 -0
  20. venv/lib/python3.10/site-packages/exceptiongroup/__pycache__/_formatting.cpython-310.pyc +0 -0
  21. venv/lib/python3.10/site-packages/exceptiongroup/__pycache__/_suppress.cpython-310.pyc +0 -0
  22. venv/lib/python3.10/site-packages/exceptiongroup/__pycache__/_version.cpython-310.pyc +0 -0
  23. venv/lib/python3.10/site-packages/exceptiongroup/_catch.py +138 -0
  24. venv/lib/python3.10/site-packages/exceptiongroup/_exceptions.py +336 -0
  25. venv/lib/python3.10/site-packages/exceptiongroup/_formatting.py +601 -0
  26. venv/lib/python3.10/site-packages/exceptiongroup/_suppress.py +55 -0
  27. venv/lib/python3.10/site-packages/exceptiongroup/_version.py +21 -0
  28. venv/lib/python3.10/site-packages/exceptiongroup/py.typed +0 -0
  29. venv/lib/python3.10/site-packages/fontTools/__pycache__/agl.cpython-310.pyc +3 -0
  30. venv/lib/python3.10/site-packages/fontTools/cu2qu/cu2qu.cpython-310-x86_64-linux-gnu.so +3 -0
  31. venv/lib/python3.10/site-packages/fontTools/feaLib/lexer.cpython-310-x86_64-linux-gnu.so +3 -0
  32. venv/lib/python3.10/site-packages/fontTools/misc/bezierTools.cpython-310-x86_64-linux-gnu.so +3 -0
  33. venv/lib/python3.10/site-packages/fontTools/otlLib/__pycache__/builder.cpython-310.pyc +3 -0
  34. venv/lib/python3.10/site-packages/fontTools/pens/momentsPen.cpython-310-x86_64-linux-gnu.so +3 -0
  35. venv/lib/python3.10/site-packages/fontTools/qu2cu/qu2cu.cpython-310-x86_64-linux-gnu.so +3 -0
  36. venv/lib/python3.10/site-packages/fontTools/subset/__pycache__/__init__.cpython-310.pyc +3 -0
  37. venv/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/otData.cpython-310.pyc +3 -0
  38. venv/lib/python3.10/site-packages/fontTools/varLib/iup.cpython-310-x86_64-linux-gnu.so +3 -0
  39. venv/lib/python3.10/site-packages/idna/__pycache__/idnadata.cpython-310.pyc +3 -0
  40. venv/lib/python3.10/site-packages/idna/__pycache__/uts46data.cpython-310.pyc +3 -0
  41. venv/lib/python3.10/site-packages/mpmath/__pycache__/function_docs.cpython-310.pyc +3 -0
  42. venv/lib/python3.10/site-packages/multiprocess/tests/__pycache__/__init__.cpython-310.pyc +3 -0
  43. venv/lib/python3.10/site-packages/networkx/algorithms/flow/tests/gl1.gpickle.bz2 +3 -0
  44. venv/lib/python3.10/site-packages/networkx/algorithms/flow/tests/gw1.gpickle.bz2 +3 -0
  45. venv/lib/python3.10/site-packages/networkx/algorithms/flow/tests/netgen-2.gpickle.bz2 +3 -0
  46. venv/lib/python3.10/site-packages/networkx/algorithms/flow/tests/wlm3.gpickle.bz2 +3 -0
  47. venv/lib/python3.10/site-packages/networkx/generators/atlas.dat.gz +3 -0
  48. venv/lib/python3.10/site-packages/nvidia/cublas/lib/libnvblas.so.12 +3 -0
  49. venv/lib/python3.10/site-packages/nvidia/cuda_cupti/lib/libcheckpoint.so +3 -0
  50. venv/lib/python3.10/site-packages/nvidia/cuda_cupti/lib/libcupti.so.12 +3 -0
.claude/settings.local.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(python:*)",
5
+ "Bash(source:*)",
6
+ "Bash(pip show:*)",
7
+ "Bash(nvcc:*)",
8
+ "Bash(pip uninstall:*)",
9
+ "Bash(pip install:*)",
10
+ "Bash(pip cache:*)"
11
+ ],
12
+ "deny": [],
13
+ "ask": []
14
+ }
15
+ }
.gitattributes CHANGED
@@ -33,3 +33,132 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ venv/lib/python3.10/site-packages/pandas/core/indexes/__pycache__/multi.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
37
+ venv/lib/python3.10/site-packages/pandas/core/indexes/__pycache__/base.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
38
+ venv/lib/python3.10/site-packages/pandas/io/formats/__pycache__/style.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
39
+ venv/lib/python3.10/site-packages/pandas/io/__pycache__/stata.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
40
+ venv/lib/python3.10/site-packages/pandas/io/__pycache__/pytables.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
41
+ venv/lib/python3.10/site-packages/pandas/core/strings/__pycache__/accessor.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
42
+ venv/lib/python3.10/site-packages/pandas/core/__pycache__/series.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
43
+ venv/lib/python3.10/site-packages/pandas/core/__pycache__/generic.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
44
+ venv/lib/python3.10/site-packages/pandas/core/__pycache__/frame.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
45
+ venv/lib/python3.10/site-packages/sympy/solvers/ode/tests/__pycache__/test_systems.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
46
+ venv/lib/python3.10/site-packages/sympy/solvers/ode/__pycache__/ode.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
47
+ venv/lib/python3.10/site-packages/sympy/solvers/ode/__pycache__/single.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
48
+ venv/lib/python3.10/site-packages/sympy/solvers/tests/__pycache__/test_solveset.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
49
+ venv/lib/python3.10/site-packages/sympy/solvers/tests/__pycache__/test_solvers.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
50
+ venv/lib/python3.10/site-packages/sympy/solvers/__pycache__/solvers.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
51
+ venv/lib/python3.10/site-packages/sympy/solvers/__pycache__/solveset.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
52
+ venv/lib/python3.10/site-packages/sympy/solvers/diophantine/__pycache__/diophantine.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
53
+ venv/lib/python3.10/site-packages/sympy/parsing/latex/_antlr/__pycache__/latexparser.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
54
+ venv/lib/python3.10/site-packages/sympy/physics/quantum/tests/__pycache__/test_spin.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
55
+ venv/lib/python3.10/site-packages/sympy/physics/continuum_mechanics/__pycache__/beam.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
56
+ venv/lib/python3.10/site-packages/sympy/physics/control/__pycache__/lti.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
57
+ venv/lib/python3.10/site-packages/sympy/core/tests/__pycache__/test_args.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
58
+ venv/lib/python3.10/site-packages/sympy/core/__pycache__/function.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
59
+ venv/lib/python3.10/site-packages/sympy/core/__pycache__/numbers.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
60
+ venv/lib/python3.10/site-packages/sympy/core/__pycache__/expr.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
61
+ venv/lib/python3.10/site-packages/sympy/logic/__pycache__/boolalg.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
62
+ venv/lib/python3.10/site-packages/sympy/combinatorics/__pycache__/perm_groups.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
63
+ venv/lib/python3.10/site-packages/sympy/utilities/tests/__pycache__/test_wester.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
64
+ venv/lib/python3.10/site-packages/sympy/polys/tests/__pycache__/test_polytools.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
65
+ venv/lib/python3.10/site-packages/sympy/polys/matrices/__pycache__/domainmatrix.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
66
+ venv/lib/python3.10/site-packages/sympy/polys/__pycache__/polyquinticconst.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
67
+ venv/lib/python3.10/site-packages/sympy/polys/__pycache__/polytools.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
68
+ venv/lib/python3.10/site-packages/sympy/polys/benchmarks/__pycache__/bench_solvers.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
69
+ venv/lib/python3.10/site-packages/sympy/matrices/tests/__pycache__/test_matrixbase.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
70
+ venv/lib/python3.10/site-packages/sympy/matrices/tests/__pycache__/test_matrices.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
71
+ venv/lib/python3.10/site-packages/sympy/matrices/__pycache__/matrixbase.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
72
+ venv/lib/python3.10/site-packages/sympy/printing/tests/__pycache__/test_latex.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
73
+ venv/lib/python3.10/site-packages/sympy/printing/pretty/tests/__pycache__/test_pretty.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
74
+ venv/lib/python3.10/site-packages/sympy/printing/__pycache__/latex.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
75
+ venv/lib/python3.10/site-packages/sympy/stats/__pycache__/crv_types.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
76
+ venv/lib/python3.10/site-packages/sympy/tensor/__pycache__/tensor.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
77
+ venv/lib/python3.10/site-packages/setuptools/gui-arm64.exe filter=lfs diff=lfs merge=lfs -text
78
+ venv/lib/python3.10/site-packages/setuptools/cli-arm64.exe filter=lfs diff=lfs merge=lfs -text
79
+ venv/lib/python3.10/site-packages/setuptools/_vendor/more_itertools/__pycache__/more.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
80
+ venv/lib/python3.10/site-packages/setuptools/_vendor/__pycache__/pyparsing.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
81
+ venv/lib/python3.10/site-packages/contourpy/_contourpy.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
82
+ venv/lib/python3.10/site-packages/fontTools/qu2cu/qu2cu.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
83
+ venv/lib/python3.10/site-packages/fontTools/feaLib/lexer.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
84
+ venv/lib/python3.10/site-packages/fontTools/subset/__pycache__/__init__.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
85
+ venv/lib/python3.10/site-packages/fontTools/varLib/iup.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
86
+ venv/lib/python3.10/site-packages/fontTools/otlLib/__pycache__/builder.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
87
+ venv/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/otData.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
88
+ venv/lib/python3.10/site-packages/fontTools/misc/bezierTools.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
89
+ venv/lib/python3.10/site-packages/fontTools/pens/momentsPen.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
90
+ venv/lib/python3.10/site-packages/fontTools/__pycache__/agl.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
91
+ venv/lib/python3.10/site-packages/fontTools/cu2qu/cu2qu.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
92
+ venv/lib/python3.10/site-packages/psutil/_psutil_linux.abi3.so filter=lfs diff=lfs merge=lfs -text
93
+ venv/lib/python3.10/site-packages/pillow.libs/libopenjp2-94e588ba.so.2.5.4 filter=lfs diff=lfs merge=lfs -text
94
+ venv/lib/python3.10/site-packages/pillow.libs/libxcb-64009ff3.so.1.1.0 filter=lfs diff=lfs merge=lfs -text
95
+ venv/lib/python3.10/site-packages/pillow.libs/libwebp-d8b9687f.so.7.2.0 filter=lfs diff=lfs merge=lfs -text
96
+ venv/lib/python3.10/site-packages/pillow.libs/libpng16-00127801.so.16.50.0 filter=lfs diff=lfs merge=lfs -text
97
+ venv/lib/python3.10/site-packages/pillow.libs/libfreetype-5bb46249.so.6.20.4 filter=lfs diff=lfs merge=lfs -text
98
+ venv/lib/python3.10/site-packages/pillow.libs/libavif-01e67780.so.16.3.0 filter=lfs diff=lfs merge=lfs -text
99
+ venv/lib/python3.10/site-packages/pillow.libs/liblcms2-cc10e42f.so.2.0.17 filter=lfs diff=lfs merge=lfs -text
100
+ venv/lib/python3.10/site-packages/pillow.libs/libtiff-295fd75c.so.6.2.0 filter=lfs diff=lfs merge=lfs -text
101
+ venv/lib/python3.10/site-packages/pillow.libs/liblzma-64b7ab39.so.5.8.1 filter=lfs diff=lfs merge=lfs -text
102
+ venv/lib/python3.10/site-packages/pillow.libs/libbrotlicommon-c55a5f7a.so.1.1.0 filter=lfs diff=lfs merge=lfs -text
103
+ venv/lib/python3.10/site-packages/pillow.libs/libharfbuzz-525aa570.so.0.61210.0 filter=lfs diff=lfs merge=lfs -text
104
+ venv/lib/python3.10/site-packages/pillow.libs/libzstd-761a17b6.so.1.5.7 filter=lfs diff=lfs merge=lfs -text
105
+ venv/lib/python3.10/site-packages/pillow.libs/libjpeg-a41b0190.so.62.4.0 filter=lfs diff=lfs merge=lfs -text
106
+ venv/lib/python3.10/site-packages/charset_normalizer/md__mypyc.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
107
+ venv/lib/python3.10/site-packages/datasets/__pycache__/iterable_dataset.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
108
+ venv/lib/python3.10/site-packages/datasets/__pycache__/dataset_dict.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
109
+ venv/lib/python3.10/site-packages/datasets/__pycache__/arrow_dataset.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
110
+ venv/lib/python3.10/site-packages/idna/__pycache__/idnadata.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
111
+ venv/lib/python3.10/site-packages/idna/__pycache__/uts46data.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
112
+ venv/lib/python3.10/site-packages/pkg_resources/__pycache__/__init__.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
113
+ venv/lib/python3.10/site-packages/pkg_resources/_vendor/__pycache__/pyparsing.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
114
+ venv/lib/python3.10/site-packages/tokenizers/tokenizers.abi3.so filter=lfs diff=lfs merge=lfs -text
115
+ venv/lib/python3.10/site-packages/multiprocess/tests/__pycache__/__init__.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
116
+ venv/lib/python3.10/site-packages/propcache/_helpers_c.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
117
+ venv/lib/python3.10/site-packages/mpmath/__pycache__/function_docs.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
118
+ venv/lib/python3.10/site-packages/triton/FileCheck filter=lfs diff=lfs merge=lfs -text
119
+ venv/lib/python3.10/site-packages/triton/backends/amd/lib/ocml.bc filter=lfs diff=lfs merge=lfs -text
120
+ venv/lib/python3.10/site-packages/triton/backends/amd/lib/ockl.bc filter=lfs diff=lfs merge=lfs -text
121
+ venv/lib/python3.10/site-packages/triton/backends/nvidia/bin/cuobjdump filter=lfs diff=lfs merge=lfs -text
122
+ venv/lib/python3.10/site-packages/triton/backends/nvidia/lib/libdevice.10.bc filter=lfs diff=lfs merge=lfs -text
123
+ venv/lib/python3.10/site-packages/triton/backends/nvidia/bin/nvdisasm filter=lfs diff=lfs merge=lfs -text
124
+ venv/lib/python3.10/site-packages/triton/backends/nvidia/lib/cupti/libcheckpoint.so filter=lfs diff=lfs merge=lfs -text
125
+ venv/lib/python3.10/site-packages/triton/backends/nvidia/lib/cupti/libcupti.so.2025.1.1 filter=lfs diff=lfs merge=lfs -text
126
+ venv/lib/python3.10/site-packages/triton/backends/nvidia/lib/cupti/libcupti.so.12 filter=lfs diff=lfs merge=lfs -text
127
+ venv/lib/python3.10/site-packages/triton/backends/nvidia/lib/cupti/libpcsamplingutil.so filter=lfs diff=lfs merge=lfs -text
128
+ venv/lib/python3.10/site-packages/triton/backends/nvidia/lib/cupti/libnvperf_target.so filter=lfs diff=lfs merge=lfs -text
129
+ venv/lib/python3.10/site-packages/triton/backends/nvidia/lib/cupti/libcupti.so filter=lfs diff=lfs merge=lfs -text
130
+ venv/lib/python3.10/site-packages/triton/backends/nvidia/lib/cupti/libnvperf_host.so filter=lfs diff=lfs merge=lfs -text
131
+ venv/lib/python3.10/site-packages/triton/backends/nvidia/lib/cupti/libnvperf_host_static.a filter=lfs diff=lfs merge=lfs -text
132
+ venv/lib/python3.10/site-packages/triton/backends/nvidia/bin/ptxas filter=lfs diff=lfs merge=lfs -text
133
+ venv/lib/python3.10/site-packages/triton/backends/nvidia/lib/cupti/libcupti_static.a filter=lfs diff=lfs merge=lfs -text
134
+ venv/lib/python3.10/site-packages/triton/instrumentation/libGPUInstrumentationTestLib.so filter=lfs diff=lfs merge=lfs -text
135
+ venv/lib/python3.10/site-packages/triton/instrumentation/libPrintLoadStoreMemSpaces.so filter=lfs diff=lfs merge=lfs -text
136
+ venv/lib/python3.10/site-packages/triton/language/__pycache__/core.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
137
+ venv/lib/python3.10/site-packages/triton/_C/libproton.so filter=lfs diff=lfs merge=lfs -text
138
+ venv/lib/python3.10/site-packages/nvidia/cufile/lib/libcufile.so.0 filter=lfs diff=lfs merge=lfs -text
139
+ venv/lib/python3.10/site-packages/nvidia/cuda_cupti/lib/libcheckpoint.so filter=lfs diff=lfs merge=lfs -text
140
+ venv/lib/python3.10/site-packages/nvidia/cuda_cupti/lib/libpcsamplingutil.so filter=lfs diff=lfs merge=lfs -text
141
+ venv/lib/python3.10/site-packages/nvidia/cuda_cupti/lib/libcupti.so.12 filter=lfs diff=lfs merge=lfs -text
142
+ venv/lib/python3.10/site-packages/nvidia/cuda_cupti/lib/libnvperf_target.so filter=lfs diff=lfs merge=lfs -text
143
+ venv/lib/python3.10/site-packages/nvidia/cuda_cupti/lib/libnvperf_host.so filter=lfs diff=lfs merge=lfs -text
144
+ venv/lib/python3.10/site-packages/nvidia/cudnn/lib/libcudnn.so.9 filter=lfs diff=lfs merge=lfs -text
145
+ venv/lib/python3.10/site-packages/nvidia/cudnn/lib/libcudnn_cnn.so.9 filter=lfs diff=lfs merge=lfs -text
146
+ venv/lib/python3.10/site-packages/nvidia/cudnn/lib/libcudnn_engines_runtime_compiled.so.9 filter=lfs diff=lfs merge=lfs -text
147
+ venv/lib/python3.10/site-packages/nvidia/cudnn/lib/libcudnn_heuristic.so.9 filter=lfs diff=lfs merge=lfs -text
148
+ venv/lib/python3.10/site-packages/nvidia/cudnn/lib/libcudnn_graph.so.9 filter=lfs diff=lfs merge=lfs -text
149
+ venv/lib/python3.10/site-packages/nvidia/cusolver/lib/libcusolverMg.so.11 filter=lfs diff=lfs merge=lfs -text
150
+ venv/lib/python3.10/site-packages/nvidia/cuda_runtime/lib/libcudart.so.12 filter=lfs diff=lfs merge=lfs -text
151
+ venv/lib/python3.10/site-packages/nvidia/cudnn/lib/libcudnn_ops.so.9 filter=lfs diff=lfs merge=lfs -text
152
+ venv/lib/python3.10/site-packages/nvidia/cusolver/lib/libcusolver.so.11 filter=lfs diff=lfs merge=lfs -text
153
+ venv/lib/python3.10/site-packages/nvidia/nvjitlink/lib/libnvJitLink.so.12 filter=lfs diff=lfs merge=lfs -text
154
+ venv/lib/python3.10/site-packages/nvidia/cublas/lib/libnvblas.so.12 filter=lfs diff=lfs merge=lfs -text
155
+ venv/lib/python3.10/site-packages/nvidia/nvshmem/lib/libnvshmem_device.a filter=lfs diff=lfs merge=lfs -text
156
+ venv/lib/python3.10/site-packages/nvidia/cudnn/lib/libcudnn_adv.so.9 filter=lfs diff=lfs merge=lfs -text
157
+ venv/lib/python3.10/site-packages/nvidia/nvshmem/lib/nvshmem_transport_ibdevx.so.3 filter=lfs diff=lfs merge=lfs -text
158
+ venv/lib/python3.10/site-packages/nvidia/nvshmem/lib/libnvshmem_device.bc filter=lfs diff=lfs merge=lfs -text
159
+ venv/lib/python3.10/site-packages/nvidia/nvshmem/lib/nvshmem_transport_ibrc.so.3 filter=lfs diff=lfs merge=lfs -text
160
+ venv/lib/python3.10/site-packages/nvidia/nvshmem/lib/nvshmem_transport_libfabric.so.3 filter=lfs diff=lfs merge=lfs -text
161
+ venv/lib/python3.10/site-packages/nvidia/nvshmem/lib/nvshmem_transport_ibgda.so.3 filter=lfs diff=lfs merge=lfs -text
162
+ venv/lib/python3.10/site-packages/nvidia/cuda_nvrtc/lib/libnvrtc-builtins.alt.so.12.8 filter=lfs diff=lfs merge=lfs -text
163
+ venv/lib/python3.10/site-packages/nvidia/cuda_nvrtc/lib/libnvrtc-builtins.so.12.8 filter=lfs diff=lfs merge=lfs -text
164
+ venv/lib/python3.10/site-packages/nvidia/curand/lib/libcurand.so.10 filter=lfs diff=lfs merge=lfs -text
venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/METADATA ADDED
@@ -0,0 +1,764 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: charset-normalizer
3
+ Version: 3.4.4
4
+ Summary: The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.
5
+ Author-email: "Ahmed R. TAHRI" <tahri.ahmed@proton.me>
6
+ Maintainer-email: "Ahmed R. TAHRI" <tahri.ahmed@proton.me>
7
+ License: MIT
8
+ Project-URL: Changelog, https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md
9
+ Project-URL: Documentation, https://charset-normalizer.readthedocs.io/
10
+ Project-URL: Code, https://github.com/jawah/charset_normalizer
11
+ Project-URL: Issue tracker, https://github.com/jawah/charset_normalizer/issues
12
+ Keywords: encoding,charset,charset-detector,detector,normalization,unicode,chardet,detect
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.7
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
26
+ Classifier: Programming Language :: Python :: 3 :: Only
27
+ Classifier: Programming Language :: Python :: Implementation :: CPython
28
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
29
+ Classifier: Topic :: Text Processing :: Linguistic
30
+ Classifier: Topic :: Utilities
31
+ Classifier: Typing :: Typed
32
+ Requires-Python: >=3.7
33
+ Description-Content-Type: text/markdown
34
+ License-File: LICENSE
35
+ Provides-Extra: unicode-backport
36
+ Dynamic: license-file
37
+
38
+ <h1 align="center">Charset Detection, for Everyone 👋</h1>
39
+
40
+ <p align="center">
41
+ <sup>The Real First Universal Charset Detector</sup><br>
42
+ <a href="https://pypi.org/project/charset-normalizer">
43
+ <img src="https://img.shields.io/pypi/pyversions/charset_normalizer.svg?orange=blue" />
44
+ </a>
45
+ <a href="https://pepy.tech/project/charset-normalizer/">
46
+ <img alt="Download Count Total" src="https://static.pepy.tech/badge/charset-normalizer/month" />
47
+ </a>
48
+ <a href="https://bestpractices.coreinfrastructure.org/projects/7297">
49
+ <img src="https://bestpractices.coreinfrastructure.org/projects/7297/badge">
50
+ </a>
51
+ </p>
52
+ <p align="center">
53
+ <sup><i>Featured Packages</i></sup><br>
54
+ <a href="https://github.com/jawah/niquests">
55
+ <img alt="Static Badge" src="https://img.shields.io/badge/Niquests-Most_Advanced_HTTP_Client-cyan">
56
+ </a>
57
+ <a href="https://github.com/jawah/wassima">
58
+ <img alt="Static Badge" src="https://img.shields.io/badge/Wassima-Certifi_Replacement-cyan">
59
+ </a>
60
+ </p>
61
+ <p align="center">
62
+ <sup><i>In other language (unofficial port - by the community)</i></sup><br>
63
+ <a href="https://github.com/nickspring/charset-normalizer-rs">
64
+ <img alt="Static Badge" src="https://img.shields.io/badge/Rust-red">
65
+ </a>
66
+ </p>
67
+
68
+ > A library that helps you read text from an unknown charset encoding.<br /> Motivated by `chardet`,
69
+ > I'm trying to resolve the issue by taking a new approach.
70
+ > All IANA character set names for which the Python core library provides codecs are supported.
71
+
72
+ <p align="center">
73
+ >>>>> <a href="https://charsetnormalizerweb.ousret.now.sh" target="_blank">👉 Try Me Online Now, Then Adopt Me 👈 </a> <<<<<
74
+ </p>
75
+
76
+ This project offers you an alternative to **Universal Charset Encoding Detector**, also known as **Chardet**.
77
+
78
+ | Feature | [Chardet](https://github.com/chardet/chardet) | Charset Normalizer | [cChardet](https://github.com/PyYoshi/cChardet) |
79
+ |--------------------------------------------------|:---------------------------------------------:|:--------------------------------------------------------------------------------------------------:|:-----------------------------------------------:|
80
+ | `Fast` | ❌ | ✅ | ✅ |
81
+ | `Universal**` | ❌ | ✅ | ❌ |
82
+ | `Reliable` **without** distinguishable standards | ❌ | ✅ | ✅ |
83
+ | `Reliable` **with** distinguishable standards | ✅ | ✅ | ✅ |
84
+ | `License` | LGPL-2.1<br>_restrictive_ | MIT | MPL-1.1<br>_restrictive_ |
85
+ | `Native Python` | ✅ | ✅ | ❌ |
86
+ | `Detect spoken language` | ❌ | ✅ | N/A |
87
+ | `UnicodeDecodeError Safety` | ❌ | ✅ | ❌ |
88
+ | `Whl Size (min)` | 193.6 kB | 42 kB | ~200 kB |
89
+ | `Supported Encoding` | 33 | 🎉 [99](https://charset-normalizer.readthedocs.io/en/latest/user/support.html#supported-encodings) | 40 |
90
+
91
+ <p align="center">
92
+ <img src="https://i.imgflip.com/373iay.gif" alt="Reading Normalized Text" width="226"/><img src="https://media.tenor.com/images/c0180f70732a18b4965448d33adba3d0/tenor.gif" alt="Cat Reading Text" width="200"/>
93
+ </p>
94
+
95
+ *\*\* : They are clearly using specific code for a specific encoding even if covering most of used one*<br>
96
+
97
+ ## ⚡ Performance
98
+
99
+ This package offer better performance than its counterpart Chardet. Here are some numbers.
100
+
101
+ | Package | Accuracy | Mean per file (ms) | File per sec (est) |
102
+ |-----------------------------------------------|:--------:|:------------------:|:------------------:|
103
+ | [chardet](https://github.com/chardet/chardet) | 86 % | 63 ms | 16 file/sec |
104
+ | charset-normalizer | **98 %** | **10 ms** | 100 file/sec |
105
+
106
+ | Package | 99th percentile | 95th percentile | 50th percentile |
107
+ |-----------------------------------------------|:---------------:|:---------------:|:---------------:|
108
+ | [chardet](https://github.com/chardet/chardet) | 265 ms | 71 ms | 7 ms |
109
+ | charset-normalizer | 100 ms | 50 ms | 5 ms |
110
+
111
+ _updated as of december 2024 using CPython 3.12_
112
+
113
+ Chardet's performance on larger file (1MB+) are very poor. Expect huge difference on large payload.
114
+
115
+ > Stats are generated using 400+ files using default parameters. More details on used files, see GHA workflows.
116
+ > And yes, these results might change at any time. The dataset can be updated to include more files.
117
+ > The actual delays heavily depends on your CPU capabilities. The factors should remain the same.
118
+ > Keep in mind that the stats are generous and that Chardet accuracy vs our is measured using Chardet initial capability
119
+ > (e.g. Supported Encoding) Challenge-them if you want.
120
+
121
+ ## ✨ Installation
122
+
123
+ Using pip:
124
+
125
+ ```sh
126
+ pip install charset-normalizer -U
127
+ ```
128
+
129
+ ## 🚀 Basic Usage
130
+
131
+ ### CLI
132
+ This package comes with a CLI.
133
+
134
+ ```
135
+ usage: normalizer [-h] [-v] [-a] [-n] [-m] [-r] [-f] [-t THRESHOLD]
136
+ file [file ...]
137
+
138
+ The Real First Universal Charset Detector. Discover originating encoding used
139
+ on text file. Normalize text to unicode.
140
+
141
+ positional arguments:
142
+ files File(s) to be analysed
143
+
144
+ optional arguments:
145
+ -h, --help show this help message and exit
146
+ -v, --verbose Display complementary information about file if any.
147
+ Stdout will contain logs about the detection process.
148
+ -a, --with-alternative
149
+ Output complementary possibilities if any. Top-level
150
+ JSON WILL be a list.
151
+ -n, --normalize Permit to normalize input file. If not set, program
152
+ does not write anything.
153
+ -m, --minimal Only output the charset detected to STDOUT. Disabling
154
+ JSON output.
155
+ -r, --replace Replace file when trying to normalize it instead of
156
+ creating a new one.
157
+ -f, --force Replace file without asking if you are sure, use this
158
+ flag with caution.
159
+ -t THRESHOLD, --threshold THRESHOLD
160
+ Define a custom maximum amount of chaos allowed in
161
+ decoded content. 0. <= chaos <= 1.
162
+ --version Show version information and exit.
163
+ ```
164
+
165
+ ```bash
166
+ normalizer ./data/sample.1.fr.srt
167
+ ```
168
+
169
+ or
170
+
171
+ ```bash
172
+ python -m charset_normalizer ./data/sample.1.fr.srt
173
+ ```
174
+
175
+ 🎉 Since version 1.4.0 the CLI produce easily usable stdout result in JSON format.
176
+
177
+ ```json
178
+ {
179
+ "path": "/home/default/projects/charset_normalizer/data/sample.1.fr.srt",
180
+ "encoding": "cp1252",
181
+ "encoding_aliases": [
182
+ "1252",
183
+ "windows_1252"
184
+ ],
185
+ "alternative_encodings": [
186
+ "cp1254",
187
+ "cp1256",
188
+ "cp1258",
189
+ "iso8859_14",
190
+ "iso8859_15",
191
+ "iso8859_16",
192
+ "iso8859_3",
193
+ "iso8859_9",
194
+ "latin_1",
195
+ "mbcs"
196
+ ],
197
+ "language": "French",
198
+ "alphabets": [
199
+ "Basic Latin",
200
+ "Latin-1 Supplement"
201
+ ],
202
+ "has_sig_or_bom": false,
203
+ "chaos": 0.149,
204
+ "coherence": 97.152,
205
+ "unicode_path": null,
206
+ "is_preferred": true
207
+ }
208
+ ```
209
+
210
+ ### Python
211
+ *Just print out normalized text*
212
+ ```python
213
+ from charset_normalizer import from_path
214
+
215
+ results = from_path('./my_subtitle.srt')
216
+
217
+ print(str(results.best()))
218
+ ```
219
+
220
+ *Upgrade your code without effort*
221
+ ```python
222
+ from charset_normalizer import detect
223
+ ```
224
+
225
+ The above code will behave the same as **chardet**. We ensure that we offer the best (reasonable) BC result possible.
226
+
227
+ See the docs for advanced usage : [readthedocs.io](https://charset-normalizer.readthedocs.io/en/latest/)
228
+
229
+ ## 😇 Why
230
+
231
+ When I started using Chardet, I noticed that it was not suited to my expectations, and I wanted to propose a
232
+ reliable alternative using a completely different method. Also! I never back down on a good challenge!
233
+
234
+ I **don't care** about the **originating charset** encoding, because **two different tables** can
235
+ produce **two identical rendered string.**
236
+ What I want is to get readable text, the best I can.
237
+
238
+ In a way, **I'm brute forcing text decoding.** How cool is that ? 😎
239
+
240
+ Don't confuse package **ftfy** with charset-normalizer or chardet. ftfy goal is to repair Unicode string whereas charset-normalizer to convert raw file in unknown encoding to unicode.
241
+
242
+ ## 🍰 How
243
+
244
+ - Discard all charset encoding table that could not fit the binary content.
245
+ - Measure noise, or the mess once opened (by chunks) with a corresponding charset encoding.
246
+ - Extract matches with the lowest mess detected.
247
+ - Additionally, we measure coherence / probe for a language.
248
+
249
+ **Wait a minute**, what is noise/mess and coherence according to **YOU ?**
250
+
251
+ *Noise :* I opened hundred of text files, **written by humans**, with the wrong encoding table. **I observed**, then
252
+ **I established** some ground rules about **what is obvious** when **it seems like** a mess (aka. defining noise in rendered text).
253
+ I know that my interpretation of what is noise is probably incomplete, feel free to contribute in order to
254
+ improve or rewrite it.
255
+
256
+ *Coherence :* For each language there is on earth, we have computed ranked letter appearance occurrences (the best we can). So I thought
257
+ that intel is worth something here. So I use those records against decoded text to check if I can detect intelligent design.
258
+
259
+ ## ⚡ Known limitations
260
+
261
+ - Language detection is unreliable when text contains two or more languages sharing identical letters. (eg. HTML (english tags) + Turkish content (Sharing Latin characters))
262
+ - Every charset detector heavily depends on sufficient content. In common cases, do not bother run detection on very tiny content.
263
+
264
+ ## ⚠️ About Python EOLs
265
+
266
+ **If you are running:**
267
+
268
+ - Python >=2.7,<3.5: Unsupported
269
+ - Python 3.5: charset-normalizer < 2.1
270
+ - Python 3.6: charset-normalizer < 3.1
271
+ - Python 3.7: charset-normalizer < 4.0
272
+
273
+ Upgrade your Python interpreter as soon as possible.
274
+
275
+ ## 👤 Contributing
276
+
277
+ Contributions, issues and feature requests are very much welcome.<br />
278
+ Feel free to check [issues page](https://github.com/ousret/charset_normalizer/issues) if you want to contribute.
279
+
280
+ ## 📝 License
281
+
282
+ Copyright © [Ahmed TAHRI @Ousret](https://github.com/Ousret).<br />
283
+ This project is [MIT](https://github.com/Ousret/charset_normalizer/blob/master/LICENSE) licensed.
284
+
285
+ Characters frequencies used in this project © 2012 [Denny Vrandečić](http://simia.net/letters/)
286
+
287
+ ## 💼 For Enterprise
288
+
289
+ Professional support for charset-normalizer is available as part of the [Tidelift
290
+ Subscription][1]. Tidelift gives software development teams a single source for
291
+ purchasing and maintaining their software, with professional grade assurances
292
+ from the experts who know it best, while seamlessly integrating with existing
293
+ tools.
294
+
295
+ [1]: https://tidelift.com/subscription/pkg/pypi-charset-normalizer?utm_source=pypi-charset-normalizer&utm_medium=readme
296
+
297
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7297/badge)](https://www.bestpractices.dev/projects/7297)
298
+
299
+ # Changelog
300
+ All notable changes to charset-normalizer will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
301
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
302
+
303
+ ## [3.4.4](https://github.com/Ousret/charset_normalizer/compare/3.4.2...3.4.4) (2025-10-13)
304
+
305
+ ### Changed
306
+ - Bound `setuptools` to a specific constraint `setuptools>=68,<=81`.
307
+ - Raised upper bound of mypyc for the optional pre-built extension to v1.18.2
308
+
309
+ ### Removed
310
+ - `setuptools-scm` as a build dependency.
311
+
312
+ ### Misc
313
+ - Enforced hashes in `dev-requirements.txt` and created `ci-requirements.txt` for security purposes.
314
+ - Additional pre-built wheels for riscv64, s390x, and armv7l architectures.
315
+ - Restore ` multiple.intoto.jsonl` in GitHub releases in addition to individual attestation file per wheel.
316
+
317
+ ## [3.4.3](https://github.com/Ousret/charset_normalizer/compare/3.4.2...3.4.3) (2025-08-09)
318
+
319
+ ### Changed
320
+ - mypy(c) is no longer a required dependency at build time if `CHARSET_NORMALIZER_USE_MYPYC` isn't set to `1`. (#595) (#583)
321
+ - automatically lower confidence on small bytes samples that are not Unicode in `detect` output legacy function. (#391)
322
+
323
+ ### Added
324
+ - Custom build backend to overcome inability to mark mypy as an optional dependency in the build phase.
325
+ - Support for Python 3.14
326
+
327
+ ### Fixed
328
+ - sdist archive contained useless directories.
329
+ - automatically fallback on valid UTF-16 or UTF-32 even if the md says it's noisy. (#633)
330
+
331
+ ### Misc
332
+ - SBOM are automatically published to the relevant GitHub release to comply with regulatory changes.
333
+ Each published wheel comes with its SBOM. We choose CycloneDX as the format.
334
+ - Prebuilt optimized wheel are no longer distributed by default for CPython 3.7 due to a change in cibuildwheel.
335
+
336
+ ## [3.4.2](https://github.com/Ousret/charset_normalizer/compare/3.4.1...3.4.2) (2025-05-02)
337
+
338
+ ### Fixed
339
+ - Addressed the DeprecationWarning in our CLI regarding `argparse.FileType` by backporting the target class into the package. (#591)
340
+ - Improved the overall reliability of the detector with CJK Ideographs. (#605) (#587)
341
+
342
+ ### Changed
343
+ - Optional mypyc compilation upgraded to version 1.15 for Python >= 3.8
344
+
345
+ ## [3.4.1](https://github.com/Ousret/charset_normalizer/compare/3.4.0...3.4.1) (2024-12-24)
346
+
347
+ ### Changed
348
+ - Project metadata are now stored using `pyproject.toml` instead of `setup.cfg` using setuptools as the build backend.
349
+ - Enforce annotation delayed loading for a simpler and consistent types in the project.
350
+ - Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8
351
+
352
+ ### Added
353
+ - pre-commit configuration.
354
+ - noxfile.
355
+
356
+ ### Removed
357
+ - `build-requirements.txt` as per using `pyproject.toml` native build configuration.
358
+ - `bin/integration.py` and `bin/serve.py` in favor of downstream integration test (see noxfile).
359
+ - `setup.cfg` in favor of `pyproject.toml` metadata configuration.
360
+ - Unused `utils.range_scan` function.
361
+
362
+ ### Fixed
363
+ - Converting content to Unicode bytes may insert `utf_8` instead of preferred `utf-8`. (#572)
364
+ - Deprecation warning "'count' is passed as positional argument" when converting to Unicode bytes on Python 3.13+
365
+
366
+ ## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...3.4.0) (2024-10-08)
367
+
368
+ ### Added
369
+ - Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.
370
+ - Support for Python 3.13 (#512)
371
+
372
+ ### Fixed
373
+ - Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.
374
+ - Improved the general reliability of the detector based on user feedbacks. (#520) (#509) (#498) (#407) (#537)
375
+ - Declared charset in content (preemptive detection) not changed when converting to utf-8 bytes. (#381)
376
+
377
+ ## [3.3.2](https://github.com/Ousret/charset_normalizer/compare/3.3.1...3.3.2) (2023-10-31)
378
+
379
+ ### Fixed
380
+ - Unintentional memory usage regression when using large payload that match several encoding (#376)
381
+ - Regression on some detection case showcased in the documentation (#371)
382
+
383
+ ### Added
384
+ - Noise (md) probe that identify malformed arabic representation due to the presence of letters in isolated form (credit to my wife)
385
+
386
+ ## [3.3.1](https://github.com/Ousret/charset_normalizer/compare/3.3.0...3.3.1) (2023-10-22)
387
+
388
+ ### Changed
389
+ - Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8
390
+ - Improved the general detection reliability based on reports from the community
391
+
392
+ ## [3.3.0](https://github.com/Ousret/charset_normalizer/compare/3.2.0...3.3.0) (2023-09-30)
393
+
394
+ ### Added
395
+ - Allow to execute the CLI (e.g. normalizer) through `python -m charset_normalizer.cli` or `python -m charset_normalizer`
396
+ - Support for 9 forgotten encoding that are supported by Python but unlisted in `encoding.aliases` as they have no alias (#323)
397
+
398
+ ### Removed
399
+ - (internal) Redundant utils.is_ascii function and unused function is_private_use_only
400
+ - (internal) charset_normalizer.assets is moved inside charset_normalizer.constant
401
+
402
+ ### Changed
403
+ - (internal) Unicode code blocks in constants are updated using the latest v15.0.0 definition to improve detection
404
+ - Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8
405
+
406
+ ### Fixed
407
+ - Unable to properly sort CharsetMatch when both chaos/noise and coherence were close due to an unreachable condition in \_\_lt\_\_ (#350)
408
+
409
+ ## [3.2.0](https://github.com/Ousret/charset_normalizer/compare/3.1.0...3.2.0) (2023-06-07)
410
+
411
+ ### Changed
412
+ - Typehint for function `from_path` no longer enforce `PathLike` as its first argument
413
+ - Minor improvement over the global detection reliability
414
+
415
+ ### Added
416
+ - Introduce function `is_binary` that relies on main capabilities, and optimized to detect binaries
417
+ - Propagate `enable_fallback` argument throughout `from_bytes`, `from_path`, and `from_fp` that allow a deeper control over the detection (default True)
418
+ - Explicit support for Python 3.12
419
+
420
+ ### Fixed
421
+ - Edge case detection failure where a file would contain 'very-long' camel cased word (Issue #289)
422
+
423
+ ## [3.1.0](https://github.com/Ousret/charset_normalizer/compare/3.0.1...3.1.0) (2023-03-06)
424
+
425
+ ### Added
426
+ - Argument `should_rename_legacy` for legacy function `detect` and disregard any new arguments without errors (PR #262)
427
+
428
+ ### Removed
429
+ - Support for Python 3.6 (PR #260)
430
+
431
+ ### Changed
432
+ - Optional speedup provided by mypy/c 1.0.1
433
+
434
+ ## [3.0.1](https://github.com/Ousret/charset_normalizer/compare/3.0.0...3.0.1) (2022-11-18)
435
+
436
+ ### Fixed
437
+ - Multi-bytes cutter/chunk generator did not always cut correctly (PR #233)
438
+
439
+ ### Changed
440
+ - Speedup provided by mypy/c 0.990 on Python >= 3.7
441
+
442
+ ## [3.0.0](https://github.com/Ousret/charset_normalizer/compare/2.1.1...3.0.0) (2022-10-20)
443
+
444
+ ### Added
445
+ - Extend the capability of explain=True when cp_isolation contains at most two entries (min one), will log in details of the Mess-detector results
446
+ - Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES
447
+ - Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio
448
+ - `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)
449
+
450
+ ### Changed
451
+ - Build with static metadata using 'build' frontend
452
+ - Make the language detection stricter
453
+ - Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1
454
+
455
+ ### Fixed
456
+ - CLI with opt --normalize fail when using full path for files
457
+ - TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it
458
+ - Sphinx warnings when generating the documentation
459
+
460
+ ### Removed
461
+ - Coherence detector no longer return 'Simple English' instead return 'English'
462
+ - Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'
463
+ - Breaking: Method `first()` and `best()` from CharsetMatch
464
+ - UTF-7 will no longer appear as "detected" without a recognized SIG/mark (is unreliable/conflict with ASCII)
465
+ - Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches
466
+ - Breaking: Top-level function `normalize`
467
+ - Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch
468
+ - Support for the backport `unicodedata2`
469
+
470
+ ## [3.0.0rc1](https://github.com/Ousret/charset_normalizer/compare/3.0.0b2...3.0.0rc1) (2022-10-18)
471
+
472
+ ### Added
473
+ - Extend the capability of explain=True when cp_isolation contains at most two entries (min one), will log in details of the Mess-detector results
474
+ - Support for alternative language frequency set in charset_normalizer.assets.FREQUENCIES
475
+ - Add parameter `language_threshold` in `from_bytes`, `from_path` and `from_fp` to adjust the minimum expected coherence ratio
476
+
477
+ ### Changed
478
+ - Build with static metadata using 'build' frontend
479
+ - Make the language detection stricter
480
+
481
+ ### Fixed
482
+ - CLI with opt --normalize fail when using full path for files
483
+ - TooManyAccentuatedPlugin induce false positive on the mess detection when too few alpha character have been fed to it
484
+
485
+ ### Removed
486
+ - Coherence detector no longer return 'Simple English' instead return 'English'
487
+ - Coherence detector no longer return 'Classical Chinese' instead return 'Chinese'
488
+
489
+ ## [3.0.0b2](https://github.com/Ousret/charset_normalizer/compare/3.0.0b1...3.0.0b2) (2022-08-21)
490
+
491
+ ### Added
492
+ - `normalizer --version` now specify if current version provide extra speedup (meaning mypyc compilation whl)
493
+
494
+ ### Removed
495
+ - Breaking: Method `first()` and `best()` from CharsetMatch
496
+ - UTF-7 will no longer appear as "detected" without a recognized SIG/mark (is unreliable/conflict with ASCII)
497
+
498
+ ### Fixed
499
+ - Sphinx warnings when generating the documentation
500
+
501
+ ## [3.0.0b1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...3.0.0b1) (2022-08-15)
502
+
503
+ ### Changed
504
+ - Optional: Module `md.py` can be compiled using Mypyc to provide an extra speedup up to 4x faster than v2.1
505
+
506
+ ### Removed
507
+ - Breaking: Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches
508
+ - Breaking: Top-level function `normalize`
509
+ - Breaking: Properties `chaos_secondary_pass`, `coherence_non_latin` and `w_counter` from CharsetMatch
510
+ - Support for the backport `unicodedata2`
511
+
512
+ ## [2.1.1](https://github.com/Ousret/charset_normalizer/compare/2.1.0...2.1.1) (2022-08-19)
513
+
514
+ ### Deprecated
515
+ - Function `normalize` scheduled for removal in 3.0
516
+
517
+ ### Changed
518
+ - Removed useless call to decode in fn is_unprintable (#206)
519
+
520
+ ### Fixed
521
+ - Third-party library (i18n xgettext) crashing not recognizing utf_8 (PEP 263) with underscore from [@aleksandernovikov](https://github.com/aleksandernovikov) (#204)
522
+
523
+ ## [2.1.0](https://github.com/Ousret/charset_normalizer/compare/2.0.12...2.1.0) (2022-06-19)
524
+
525
+ ### Added
526
+ - Output the Unicode table version when running the CLI with `--version` (PR #194)
527
+
528
+ ### Changed
529
+ - Re-use decoded buffer for single byte character sets from [@nijel](https://github.com/nijel) (PR #175)
530
+ - Fixing some performance bottlenecks from [@deedy5](https://github.com/deedy5) (PR #183)
531
+
532
+ ### Fixed
533
+ - Workaround potential bug in cpython with Zero Width No-Break Space located in Arabic Presentation Forms-B, Unicode 1.1 not acknowledged as space (PR #175)
534
+ - CLI default threshold aligned with the API threshold from [@oleksandr-kuzmenko](https://github.com/oleksandr-kuzmenko) (PR #181)
535
+
536
+ ### Removed
537
+ - Support for Python 3.5 (PR #192)
538
+
539
+ ### Deprecated
540
+ - Use of backport unicodedata from `unicodedata2` as Python is quickly catching up, scheduled for removal in 3.0 (PR #194)
541
+
542
+ ## [2.0.12](https://github.com/Ousret/charset_normalizer/compare/2.0.11...2.0.12) (2022-02-12)
543
+
544
+ ### Fixed
545
+ - ASCII miss-detection on rare cases (PR #170)
546
+
547
+ ## [2.0.11](https://github.com/Ousret/charset_normalizer/compare/2.0.10...2.0.11) (2022-01-30)
548
+
549
+ ### Added
550
+ - Explicit support for Python 3.11 (PR #164)
551
+
552
+ ### Changed
553
+ - The logging behavior have been completely reviewed, now using only TRACE and DEBUG levels (PR #163 #165)
554
+
555
+ ## [2.0.10](https://github.com/Ousret/charset_normalizer/compare/2.0.9...2.0.10) (2022-01-04)
556
+
557
+ ### Fixed
558
+ - Fallback match entries might lead to UnicodeDecodeError for large bytes sequence (PR #154)
559
+
560
+ ### Changed
561
+ - Skipping the language-detection (CD) on ASCII (PR #155)
562
+
563
+ ## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) (2021-12-03)
564
+
565
+ ### Changed
566
+ - Moderating the logging impact (since 2.0.8) for specific environments (PR #147)
567
+
568
+ ### Fixed
569
+ - Wrong logging level applied when setting kwarg `explain` to True (PR #146)
570
+
571
+ ## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) (2021-11-24)
572
+ ### Changed
573
+ - Improvement over Vietnamese detection (PR #126)
574
+ - MD improvement on trailing data and long foreign (non-pure latin) data (PR #124)
575
+ - Efficiency improvements in cd/alphabet_languages from [@adbar](https://github.com/adbar) (PR #122)
576
+ - call sum() without an intermediary list following PEP 289 recommendations from [@adbar](https://github.com/adbar) (PR #129)
577
+ - Code style as refactored by Sourcery-AI (PR #131)
578
+ - Minor adjustment on the MD around european words (PR #133)
579
+ - Remove and replace SRTs from assets / tests (PR #139)
580
+ - Initialize the library logger with a `NullHandler` by default from [@nmaynes](https://github.com/nmaynes) (PR #135)
581
+ - Setting kwarg `explain` to True will add provisionally (bounded to function lifespan) a specific stream handler (PR #135)
582
+
583
+ ### Fixed
584
+ - Fix large (misleading) sequence giving UnicodeDecodeError (PR #137)
585
+ - Avoid using too insignificant chunk (PR #137)
586
+
587
+ ### Added
588
+ - Add and expose function `set_logging_handler` to configure a specific StreamHandler from [@nmaynes](https://github.com/nmaynes) (PR #135)
589
+ - Add `CHANGELOG.md` entries, format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) (PR #141)
590
+
591
+ ## [2.0.7](https://github.com/Ousret/charset_normalizer/compare/2.0.6...2.0.7) (2021-10-11)
592
+ ### Added
593
+ - Add support for Kazakh (Cyrillic) language detection (PR #109)
594
+
595
+ ### Changed
596
+ - Further, improve inferring the language from a given single-byte code page (PR #112)
597
+ - Vainly trying to leverage PEP263 when PEP3120 is not supported (PR #116)
598
+ - Refactoring for potential performance improvements in loops from [@adbar](https://github.com/adbar) (PR #113)
599
+ - Various detection improvement (MD+CD) (PR #117)
600
+
601
+ ### Removed
602
+ - Remove redundant logging entry about detected language(s) (PR #115)
603
+
604
+ ### Fixed
605
+ - Fix a minor inconsistency between Python 3.5 and other versions regarding language detection (PR #117 #102)
606
+
607
+ ## [2.0.6](https://github.com/Ousret/charset_normalizer/compare/2.0.5...2.0.6) (2021-09-18)
608
+ ### Fixed
609
+ - Unforeseen regression with the loss of the backward-compatibility with some older minor of Python 3.5.x (PR #100)
610
+ - Fix CLI crash when using --minimal output in certain cases (PR #103)
611
+
612
+ ### Changed
613
+ - Minor improvement to the detection efficiency (less than 1%) (PR #106 #101)
614
+
615
+ ## [2.0.5](https://github.com/Ousret/charset_normalizer/compare/2.0.4...2.0.5) (2021-09-14)
616
+ ### Changed
617
+ - The project now comply with: flake8, mypy, isort and black to ensure a better overall quality (PR #81)
618
+ - The BC-support with v1.x was improved, the old staticmethods are restored (PR #82)
619
+ - The Unicode detection is slightly improved (PR #93)
620
+ - Add syntax sugar \_\_bool\_\_ for results CharsetMatches list-container (PR #91)
621
+
622
+ ### Removed
623
+ - The project no longer raise warning on tiny content given for detection, will be simply logged as warning instead (PR #92)
624
+
625
+ ### Fixed
626
+ - In some rare case, the chunks extractor could cut in the middle of a multi-byte character and could mislead the mess detection (PR #95)
627
+ - Some rare 'space' characters could trip up the UnprintablePlugin/Mess detection (PR #96)
628
+ - The MANIFEST.in was not exhaustive (PR #78)
629
+
630
+ ## [2.0.4](https://github.com/Ousret/charset_normalizer/compare/2.0.3...2.0.4) (2021-07-30)
631
+ ### Fixed
632
+ - The CLI no longer raise an unexpected exception when no encoding has been found (PR #70)
633
+ - Fix accessing the 'alphabets' property when the payload contains surrogate characters (PR #68)
634
+ - The logger could mislead (explain=True) on detected languages and the impact of one MBCS match (PR #72)
635
+ - Submatch factoring could be wrong in rare edge cases (PR #72)
636
+ - Multiple files given to the CLI were ignored when publishing results to STDOUT. (After the first path) (PR #72)
637
+ - Fix line endings from CRLF to LF for certain project files (PR #67)
638
+
639
+ ### Changed
640
+ - Adjust the MD to lower the sensitivity, thus improving the global detection reliability (PR #69 #76)
641
+ - Allow fallback on specified encoding if any (PR #71)
642
+
643
+ ## [2.0.3](https://github.com/Ousret/charset_normalizer/compare/2.0.2...2.0.3) (2021-07-16)
644
+ ### Changed
645
+ - Part of the detection mechanism has been improved to be less sensitive, resulting in more accurate detection results. Especially ASCII. (PR #63)
646
+ - According to the community wishes, the detection will fall back on ASCII or UTF-8 in a last-resort case. (PR #64)
647
+
648
+ ## [2.0.2](https://github.com/Ousret/charset_normalizer/compare/2.0.1...2.0.2) (2021-07-15)
649
+ ### Fixed
650
+ - Empty/Too small JSON payload miss-detection fixed. Report from [@tseaver](https://github.com/tseaver) (PR #59)
651
+
652
+ ### Changed
653
+ - Don't inject unicodedata2 into sys.modules from [@akx](https://github.com/akx) (PR #57)
654
+
655
+ ## [2.0.1](https://github.com/Ousret/charset_normalizer/compare/2.0.0...2.0.1) (2021-07-13)
656
+ ### Fixed
657
+ - Make it work where there isn't a filesystem available, dropping assets frequencies.json. Report from [@sethmlarson](https://github.com/sethmlarson). (PR #55)
658
+ - Using explain=False permanently disable the verbose output in the current runtime (PR #47)
659
+ - One log entry (language target preemptive) was not show in logs when using explain=True (PR #47)
660
+ - Fix undesired exception (ValueError) on getitem of instance CharsetMatches (PR #52)
661
+
662
+ ### Changed
663
+ - Public function normalize default args values were not aligned with from_bytes (PR #53)
664
+
665
+ ### Added
666
+ - You may now use charset aliases in cp_isolation and cp_exclusion arguments (PR #47)
667
+
668
+ ## [2.0.0](https://github.com/Ousret/charset_normalizer/compare/1.4.1...2.0.0) (2021-07-02)
669
+ ### Changed
670
+ - 4x to 5 times faster than the previous 1.4.0 release. At least 2x faster than Chardet.
671
+ - Accent has been made on UTF-8 detection, should perform rather instantaneous.
672
+ - The backward compatibility with Chardet has been greatly improved. The legacy detect function returns an identical charset name whenever possible.
673
+ - The detection mechanism has been slightly improved, now Turkish content is detected correctly (most of the time)
674
+ - The program has been rewritten to ease the readability and maintainability. (+Using static typing)+
675
+ - utf_7 detection has been reinstated.
676
+
677
+ ### Removed
678
+ - This package no longer require anything when used with Python 3.5 (Dropped cached_property)
679
+ - Removed support for these languages: Catalan, Esperanto, Kazakh, Baque, Volapük, Azeri, Galician, Nynorsk, Macedonian, and Serbocroatian.
680
+ - The exception hook on UnicodeDecodeError has been removed.
681
+
682
+ ### Deprecated
683
+ - Methods coherence_non_latin, w_counter, chaos_secondary_pass of the class CharsetMatch are now deprecated and scheduled for removal in v3.0
684
+
685
+ ### Fixed
686
+ - The CLI output used the relative path of the file(s). Should be absolute.
687
+
688
+ ## [1.4.1](https://github.com/Ousret/charset_normalizer/compare/1.4.0...1.4.1) (2021-05-28)
689
+ ### Fixed
690
+ - Logger configuration/usage no longer conflict with others (PR #44)
691
+
692
+ ## [1.4.0](https://github.com/Ousret/charset_normalizer/compare/1.3.9...1.4.0) (2021-05-21)
693
+ ### Removed
694
+ - Using standard logging instead of using the package loguru.
695
+ - Dropping nose test framework in favor of the maintained pytest.
696
+ - Choose to not use dragonmapper package to help with gibberish Chinese/CJK text.
697
+ - Require cached_property only for Python 3.5 due to constraint. Dropping for every other interpreter version.
698
+ - Stop support for UTF-7 that does not contain a SIG.
699
+ - Dropping PrettyTable, replaced with pure JSON output in CLI.
700
+
701
+ ### Fixed
702
+ - BOM marker in a CharsetNormalizerMatch instance could be False in rare cases even if obviously present. Due to the sub-match factoring process.
703
+ - Not searching properly for the BOM when trying utf32/16 parent codec.
704
+
705
+ ### Changed
706
+ - Improving the package final size by compressing frequencies.json.
707
+ - Huge improvement over the larges payload.
708
+
709
+ ### Added
710
+ - CLI now produces JSON consumable output.
711
+ - Return ASCII if given sequences fit. Given reasonable confidence.
712
+
713
+ ## [1.3.9](https://github.com/Ousret/charset_normalizer/compare/1.3.8...1.3.9) (2021-05-13)
714
+
715
+ ### Fixed
716
+ - In some very rare cases, you may end up getting encode/decode errors due to a bad bytes payload (PR #40)
717
+
718
+ ## [1.3.8](https://github.com/Ousret/charset_normalizer/compare/1.3.7...1.3.8) (2021-05-12)
719
+
720
+ ### Fixed
721
+ - Empty given payload for detection may cause an exception if trying to access the `alphabets` property. (PR #39)
722
+
723
+ ## [1.3.7](https://github.com/Ousret/charset_normalizer/compare/1.3.6...1.3.7) (2021-05-12)
724
+
725
+ ### Fixed
726
+ - The legacy detect function should return UTF-8-SIG if sig is present in the payload. (PR #38)
727
+
728
+ ## [1.3.6](https://github.com/Ousret/charset_normalizer/compare/1.3.5...1.3.6) (2021-02-09)
729
+
730
+ ### Changed
731
+ - Amend the previous release to allow prettytable 2.0 (PR #35)
732
+
733
+ ## [1.3.5](https://github.com/Ousret/charset_normalizer/compare/1.3.4...1.3.5) (2021-02-08)
734
+
735
+ ### Fixed
736
+ - Fix error while using the package with a python pre-release interpreter (PR #33)
737
+
738
+ ### Changed
739
+ - Dependencies refactoring, constraints revised.
740
+
741
+ ### Added
742
+ - Add python 3.9 and 3.10 to the supported interpreters
743
+
744
+ MIT License
745
+
746
+ Copyright (c) 2025 TAHRI Ahmed R.
747
+
748
+ Permission is hereby granted, free of charge, to any person obtaining a copy
749
+ of this software and associated documentation files (the "Software"), to deal
750
+ in the Software without restriction, including without limitation the rights
751
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
752
+ copies of the Software, and to permit persons to whom the Software is
753
+ furnished to do so, subject to the following conditions:
754
+
755
+ The above copyright notice and this permission notice shall be included in all
756
+ copies or substantial portions of the Software.
757
+
758
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
759
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
760
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
761
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
762
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
763
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
764
+ SOFTWARE.
venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/RECORD ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ../../../bin/normalizer,sha256=oiDq6K-grvLUiSkKIxkolsrsOOclcWa_k6p3fs8C0rg,231
2
+ charset_normalizer-3.4.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
3
+ charset_normalizer-3.4.4.dist-info/METADATA,sha256=jVuUFBti8dav19YLvWissTihVdF2ozUY4KKMw7jdkBQ,37303
4
+ charset_normalizer-3.4.4.dist-info/RECORD,,
5
+ charset_normalizer-3.4.4.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ charset_normalizer-3.4.4.dist-info/WHEEL,sha256=DZl4yYurviXJJQsilHH1qAzCRDsdz--oNtDZ-hUrZUk,190
7
+ charset_normalizer-3.4.4.dist-info/entry_points.txt,sha256=ADSTKrkXZ3hhdOVFi6DcUEHQRS0xfxDIE_pEz4wLIXA,65
8
+ charset_normalizer-3.4.4.dist-info/licenses/LICENSE,sha256=bQ1Bv-FwrGx9wkjJpj4lTQ-0WmDVCoJX0K-SxuJJuIc,1071
9
+ charset_normalizer-3.4.4.dist-info/top_level.txt,sha256=7ASyzePr8_xuZWJsnqJjIBtyV8vhEo0wBCv1MPRRi3Q,19
10
+ charset_normalizer/__init__.py,sha256=OKRxRv2Zhnqk00tqkN0c1BtJjm165fWXLydE52IKuHc,1590
11
+ charset_normalizer/__main__.py,sha256=yzYxMR-IhKRHYwcSlavEv8oGdwxsR89mr2X09qXGdps,109
12
+ charset_normalizer/__pycache__/__init__.cpython-310.pyc,,
13
+ charset_normalizer/__pycache__/__main__.cpython-310.pyc,,
14
+ charset_normalizer/__pycache__/api.cpython-310.pyc,,
15
+ charset_normalizer/__pycache__/cd.cpython-310.pyc,,
16
+ charset_normalizer/__pycache__/constant.cpython-310.pyc,,
17
+ charset_normalizer/__pycache__/legacy.cpython-310.pyc,,
18
+ charset_normalizer/__pycache__/md.cpython-310.pyc,,
19
+ charset_normalizer/__pycache__/models.cpython-310.pyc,,
20
+ charset_normalizer/__pycache__/utils.cpython-310.pyc,,
21
+ charset_normalizer/__pycache__/version.cpython-310.pyc,,
22
+ charset_normalizer/api.py,sha256=V07i8aVeCD8T2fSia3C-fn0i9t8qQguEBhsqszg32Ns,22668
23
+ charset_normalizer/cd.py,sha256=WKTo1HDb-H9HfCDc3Bfwq5jzS25Ziy9SE2a74SgTq88,12522
24
+ charset_normalizer/cli/__init__.py,sha256=D8I86lFk2-py45JvqxniTirSj_sFyE6sjaY_0-G1shc,136
25
+ charset_normalizer/cli/__main__.py,sha256=dMaXG6IJXRvqq8z2tig7Qb83-BpWTln55ooiku5_uvg,12646
26
+ charset_normalizer/cli/__pycache__/__init__.cpython-310.pyc,,
27
+ charset_normalizer/cli/__pycache__/__main__.cpython-310.pyc,,
28
+ charset_normalizer/constant.py,sha256=7UVY4ldYhmQMHUdgQ_sgZmzcQ0xxYxpBunqSZ-XJZ8U,42713
29
+ charset_normalizer/legacy.py,sha256=sYBzSpzsRrg_wF4LP536pG64BItw7Tqtc3SMQAHvFLM,2731
30
+ charset_normalizer/md.cpython-310-x86_64-linux-gnu.so,sha256=vmQPHNPc6Z0rbXxiiMeoCQxfjjh5z8umtRgKpBckk7E,15912
31
+ charset_normalizer/md.py,sha256=-_oN3h3_X99nkFfqamD3yu45DC_wfk5odH0Tr_CQiXs,20145
32
+ charset_normalizer/md__mypyc.cpython-310-x86_64-linux-gnu.so,sha256=mIEu_3ENI9UWZgXaH2Nbe2wh501Z-RpM1BR17EkEVWA,286264
33
+ charset_normalizer/models.py,sha256=lKXhOnIPtiakbK3i__J9wpOfzx3JDTKj7Dn3Rg0VaRI,12394
34
+ charset_normalizer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
+ charset_normalizer/utils.py,sha256=sTejPgrdlNsKNucZfJCxJ95lMTLA0ShHLLE3n5wpT9Q,12170
36
+ charset_normalizer/version.py,sha256=nKE4qBNk5WA4LIJ_yIH_aSDfvtsyizkWMg-PUG-UZVk,115
venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/REQUESTED ADDED
File without changes
venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/WHEEL ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp310-cp310-manylinux_2_17_x86_64
5
+ Tag: cp310-cp310-manylinux2014_x86_64
6
+ Tag: cp310-cp310-manylinux_2_28_x86_64
7
+
venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/entry_points.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [console_scripts]
2
+ normalizer = charset_normalizer.cli:cli_detect
venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/licenses/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2025 TAHRI Ahmed R.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
venv/lib/python3.10/site-packages/charset_normalizer-3.4.4.dist-info/top_level.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ charset_normalizer
venv/lib/python3.10/site-packages/charset_normalizer/md__mypyc.cpython-310-x86_64-linux-gnu.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98812eff710d23d5166605da1f635b7b6c21e74d59f91a4cd41475ec49045560
3
+ size 286264
venv/lib/python3.10/site-packages/contourpy/_contourpy.cpython-310-x86_64-linux-gnu.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f22b7f307c1f94161cda346e6b9295057635e2064eeccb87e8602e4159bc57e1
3
+ size 854312
venv/lib/python3.10/site-packages/datasets/__pycache__/arrow_dataset.cpython-310.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c473b302835398bbf511025f84104bd8f45cdc6a2e6ac07112345e89e1b20604
3
+ size 242511
venv/lib/python3.10/site-packages/datasets/__pycache__/dataset_dict.cpython-310.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:662336ec50c058e5d1b8fd99fca7b8133eb794a8dee1b7bd94af9a6269c8e97a
3
+ size 113908
venv/lib/python3.10/site-packages/datasets/__pycache__/iterable_dataset.cpython-310.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f8221f2a25c6bc032eb1b053269552248238fc49dcab3d4a39eea20d83fdaa9
3
+ size 164936
venv/lib/python3.10/site-packages/exceptiongroup/__init__.py ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ __all__ = [
2
+ "BaseExceptionGroup",
3
+ "ExceptionGroup",
4
+ "catch",
5
+ "format_exception",
6
+ "format_exception_only",
7
+ "print_exception",
8
+ "print_exc",
9
+ "suppress",
10
+ ]
11
+
12
+ import os
13
+ import sys
14
+
15
+ from ._catch import catch
16
+ from ._version import version as __version__ # noqa: F401
17
+
18
+ if sys.version_info < (3, 11):
19
+ from ._exceptions import BaseExceptionGroup, ExceptionGroup
20
+ from ._formatting import (
21
+ format_exception,
22
+ format_exception_only,
23
+ print_exc,
24
+ print_exception,
25
+ )
26
+
27
+ if os.getenv("EXCEPTIONGROUP_NO_PATCH") != "1":
28
+ from . import _formatting # noqa: F401
29
+
30
+ BaseExceptionGroup.__module__ = __name__
31
+ ExceptionGroup.__module__ = __name__
32
+ else:
33
+ from traceback import (
34
+ format_exception,
35
+ format_exception_only,
36
+ print_exc,
37
+ print_exception,
38
+ )
39
+
40
+ BaseExceptionGroup = BaseExceptionGroup
41
+ ExceptionGroup = ExceptionGroup
42
+
43
+ if sys.version_info < (3, 12, 1):
44
+ from ._suppress import suppress
45
+ else:
46
+ from contextlib import suppress
venv/lib/python3.10/site-packages/exceptiongroup/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (875 Bytes). View file
 
venv/lib/python3.10/site-packages/exceptiongroup/__pycache__/_catch.cpython-310.pyc ADDED
Binary file (3.26 kB). View file
 
venv/lib/python3.10/site-packages/exceptiongroup/__pycache__/_exceptions.cpython-310.pyc ADDED
Binary file (10.2 kB). View file
 
venv/lib/python3.10/site-packages/exceptiongroup/__pycache__/_formatting.cpython-310.pyc ADDED
Binary file (12.3 kB). View file
 
venv/lib/python3.10/site-packages/exceptiongroup/__pycache__/_suppress.cpython-310.pyc ADDED
Binary file (1.56 kB). View file
 
venv/lib/python3.10/site-packages/exceptiongroup/__pycache__/_version.cpython-310.pyc ADDED
Binary file (555 Bytes). View file
 
venv/lib/python3.10/site-packages/exceptiongroup/_catch.py ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import inspect
4
+ import sys
5
+ from collections.abc import Callable, Iterable, Mapping
6
+ from contextlib import AbstractContextManager
7
+ from types import TracebackType
8
+ from typing import TYPE_CHECKING, Any
9
+
10
+ if sys.version_info < (3, 11):
11
+ from ._exceptions import BaseExceptionGroup
12
+
13
+ if TYPE_CHECKING:
14
+ _Handler = Callable[[BaseExceptionGroup[Any]], Any]
15
+
16
+
17
+ class _Catcher:
18
+ def __init__(self, handler_map: Mapping[tuple[type[BaseException], ...], _Handler]):
19
+ self._handler_map = handler_map
20
+
21
+ def __enter__(self) -> None:
22
+ pass
23
+
24
+ def __exit__(
25
+ self,
26
+ etype: type[BaseException] | None,
27
+ exc: BaseException | None,
28
+ tb: TracebackType | None,
29
+ ) -> bool:
30
+ if exc is not None:
31
+ unhandled = self.handle_exception(exc)
32
+ if unhandled is exc:
33
+ return False
34
+ elif unhandled is None:
35
+ return True
36
+ else:
37
+ if isinstance(exc, BaseExceptionGroup):
38
+ try:
39
+ raise unhandled from exc.__cause__
40
+ except BaseExceptionGroup:
41
+ # Change __context__ to __cause__ because Python 3.11 does this
42
+ # too
43
+ unhandled.__context__ = exc.__cause__
44
+ raise
45
+
46
+ raise unhandled from exc
47
+
48
+ return False
49
+
50
+ def handle_exception(self, exc: BaseException) -> BaseException | None:
51
+ excgroup: BaseExceptionGroup | None
52
+ if isinstance(exc, BaseExceptionGroup):
53
+ excgroup = exc
54
+ else:
55
+ excgroup = BaseExceptionGroup("", [exc])
56
+
57
+ new_exceptions: list[BaseException] = []
58
+ for exc_types, handler in self._handler_map.items():
59
+ matched, excgroup = excgroup.split(exc_types)
60
+ if matched:
61
+ try:
62
+ try:
63
+ raise matched
64
+ except BaseExceptionGroup:
65
+ result = handler(matched)
66
+ except BaseExceptionGroup as new_exc:
67
+ if new_exc is matched:
68
+ new_exceptions.append(new_exc)
69
+ else:
70
+ new_exceptions.extend(new_exc.exceptions)
71
+ except BaseException as new_exc:
72
+ new_exceptions.append(new_exc)
73
+ else:
74
+ if inspect.iscoroutine(result):
75
+ raise TypeError(
76
+ f"Error trying to handle {matched!r} with {handler!r}. "
77
+ "Exception handler must be a sync function."
78
+ ) from exc
79
+
80
+ if not excgroup:
81
+ break
82
+
83
+ if new_exceptions:
84
+ if len(new_exceptions) == 1:
85
+ return new_exceptions[0]
86
+
87
+ return BaseExceptionGroup("", new_exceptions)
88
+ elif (
89
+ excgroup and len(excgroup.exceptions) == 1 and excgroup.exceptions[0] is exc
90
+ ):
91
+ return exc
92
+ else:
93
+ return excgroup
94
+
95
+
96
+ def catch(
97
+ __handlers: Mapping[type[BaseException] | Iterable[type[BaseException]], _Handler],
98
+ ) -> AbstractContextManager[None]:
99
+ if not isinstance(__handlers, Mapping):
100
+ raise TypeError("the argument must be a mapping")
101
+
102
+ handler_map: dict[
103
+ tuple[type[BaseException], ...], Callable[[BaseExceptionGroup]]
104
+ ] = {}
105
+ for type_or_iterable, handler in __handlers.items():
106
+ iterable: tuple[type[BaseException]]
107
+ if isinstance(type_or_iterable, type) and issubclass(
108
+ type_or_iterable, BaseException
109
+ ):
110
+ iterable = (type_or_iterable,)
111
+ elif isinstance(type_or_iterable, Iterable):
112
+ iterable = tuple(type_or_iterable)
113
+ else:
114
+ raise TypeError(
115
+ "each key must be either an exception classes or an iterable thereof"
116
+ )
117
+
118
+ if not callable(handler):
119
+ raise TypeError("handlers must be callable")
120
+
121
+ for exc_type in iterable:
122
+ if not isinstance(exc_type, type) or not issubclass(
123
+ exc_type, BaseException
124
+ ):
125
+ raise TypeError(
126
+ "each key must be either an exception classes or an iterable "
127
+ "thereof"
128
+ )
129
+
130
+ if issubclass(exc_type, BaseExceptionGroup):
131
+ raise TypeError(
132
+ "catching ExceptionGroup with catch() is not allowed. "
133
+ "Use except instead."
134
+ )
135
+
136
+ handler_map[iterable] = handler
137
+
138
+ return _Catcher(handler_map)
venv/lib/python3.10/site-packages/exceptiongroup/_exceptions.py ADDED
@@ -0,0 +1,336 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import sys
4
+ from collections.abc import Callable, Sequence
5
+ from functools import partial
6
+ from inspect import getmro, isclass
7
+ from typing import TYPE_CHECKING, Generic, Type, TypeVar, cast, overload
8
+
9
+ if sys.version_info < (3, 13):
10
+ from typing_extensions import TypeVar
11
+
12
+ _BaseExceptionT_co = TypeVar(
13
+ "_BaseExceptionT_co", bound=BaseException, covariant=True, default=BaseException
14
+ )
15
+ _BaseExceptionT = TypeVar("_BaseExceptionT", bound=BaseException)
16
+ _ExceptionT_co = TypeVar(
17
+ "_ExceptionT_co", bound=Exception, covariant=True, default=Exception
18
+ )
19
+ _ExceptionT = TypeVar("_ExceptionT", bound=Exception)
20
+ # using typing.Self would require a typing_extensions dependency on py<3.11
21
+ _ExceptionGroupSelf = TypeVar("_ExceptionGroupSelf", bound="ExceptionGroup")
22
+ _BaseExceptionGroupSelf = TypeVar("_BaseExceptionGroupSelf", bound="BaseExceptionGroup")
23
+
24
+
25
+ def check_direct_subclass(
26
+ exc: BaseException, parents: tuple[type[BaseException]]
27
+ ) -> bool:
28
+ for cls in getmro(exc.__class__)[:-1]:
29
+ if cls in parents:
30
+ return True
31
+
32
+ return False
33
+
34
+
35
+ def get_condition_filter(
36
+ condition: type[_BaseExceptionT]
37
+ | tuple[type[_BaseExceptionT], ...]
38
+ | Callable[[_BaseExceptionT_co], bool],
39
+ ) -> Callable[[_BaseExceptionT_co], bool]:
40
+ if isclass(condition) and issubclass(
41
+ cast(Type[BaseException], condition), BaseException
42
+ ):
43
+ return partial(check_direct_subclass, parents=(condition,))
44
+ elif isinstance(condition, tuple):
45
+ if all(isclass(x) and issubclass(x, BaseException) for x in condition):
46
+ return partial(check_direct_subclass, parents=condition)
47
+ elif callable(condition):
48
+ return cast("Callable[[BaseException], bool]", condition)
49
+
50
+ raise TypeError("expected a function, exception type or tuple of exception types")
51
+
52
+
53
+ def _derive_and_copy_attributes(self, excs):
54
+ eg = self.derive(excs)
55
+ eg.__cause__ = self.__cause__
56
+ eg.__context__ = self.__context__
57
+ eg.__traceback__ = self.__traceback__
58
+ if hasattr(self, "__notes__"):
59
+ # Create a new list so that add_note() only affects one exceptiongroup
60
+ eg.__notes__ = list(self.__notes__)
61
+ return eg
62
+
63
+
64
+ class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]):
65
+ """A combination of multiple unrelated exceptions."""
66
+
67
+ def __new__(
68
+ cls: type[_BaseExceptionGroupSelf],
69
+ __message: str,
70
+ __exceptions: Sequence[_BaseExceptionT_co],
71
+ ) -> _BaseExceptionGroupSelf:
72
+ if not isinstance(__message, str):
73
+ raise TypeError(f"argument 1 must be str, not {type(__message)}")
74
+ if not isinstance(__exceptions, Sequence):
75
+ raise TypeError("second argument (exceptions) must be a sequence")
76
+ if not __exceptions:
77
+ raise ValueError(
78
+ "second argument (exceptions) must be a non-empty sequence"
79
+ )
80
+
81
+ for i, exc in enumerate(__exceptions):
82
+ if not isinstance(exc, BaseException):
83
+ raise ValueError(
84
+ f"Item {i} of second argument (exceptions) is not an exception"
85
+ )
86
+
87
+ if cls is BaseExceptionGroup:
88
+ if all(isinstance(exc, Exception) for exc in __exceptions):
89
+ cls = ExceptionGroup
90
+
91
+ if issubclass(cls, Exception):
92
+ for exc in __exceptions:
93
+ if not isinstance(exc, Exception):
94
+ if cls is ExceptionGroup:
95
+ raise TypeError(
96
+ "Cannot nest BaseExceptions in an ExceptionGroup"
97
+ )
98
+ else:
99
+ raise TypeError(
100
+ f"Cannot nest BaseExceptions in {cls.__name__!r}"
101
+ )
102
+
103
+ instance = super().__new__(cls, __message, __exceptions)
104
+ instance._exceptions = tuple(__exceptions)
105
+ return instance
106
+
107
+ def __init__(
108
+ self,
109
+ __message: str,
110
+ __exceptions: Sequence[_BaseExceptionT_co],
111
+ *args: object,
112
+ ) -> None:
113
+ BaseException.__init__(self, __message, __exceptions, *args)
114
+
115
+ def add_note(self, note: str) -> None:
116
+ if not isinstance(note, str):
117
+ raise TypeError(
118
+ f"Expected a string, got note={note!r} (type {type(note).__name__})"
119
+ )
120
+
121
+ if not hasattr(self, "__notes__"):
122
+ self.__notes__: list[str] = []
123
+
124
+ self.__notes__.append(note)
125
+
126
+ @property
127
+ def message(self) -> str:
128
+ return self.args[0]
129
+
130
+ @property
131
+ def exceptions(
132
+ self,
133
+ ) -> tuple[_BaseExceptionT_co | BaseExceptionGroup[_BaseExceptionT_co], ...]:
134
+ return tuple(self._exceptions)
135
+
136
+ @overload
137
+ def subgroup(
138
+ self, __condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...]
139
+ ) -> ExceptionGroup[_ExceptionT] | None: ...
140
+
141
+ @overload
142
+ def subgroup(
143
+ self, __condition: type[_BaseExceptionT] | tuple[type[_BaseExceptionT], ...]
144
+ ) -> BaseExceptionGroup[_BaseExceptionT] | None: ...
145
+
146
+ @overload
147
+ def subgroup(
148
+ self,
149
+ __condition: Callable[[_BaseExceptionT_co | _BaseExceptionGroupSelf], bool],
150
+ ) -> BaseExceptionGroup[_BaseExceptionT_co] | None: ...
151
+
152
+ def subgroup(
153
+ self,
154
+ __condition: type[_BaseExceptionT]
155
+ | tuple[type[_BaseExceptionT], ...]
156
+ | Callable[[_BaseExceptionT_co | _BaseExceptionGroupSelf], bool],
157
+ ) -> BaseExceptionGroup[_BaseExceptionT] | None:
158
+ condition = get_condition_filter(__condition)
159
+ modified = False
160
+ if condition(self):
161
+ return self
162
+
163
+ exceptions: list[BaseException] = []
164
+ for exc in self.exceptions:
165
+ if isinstance(exc, BaseExceptionGroup):
166
+ subgroup = exc.subgroup(__condition)
167
+ if subgroup is not None:
168
+ exceptions.append(subgroup)
169
+
170
+ if subgroup is not exc:
171
+ modified = True
172
+ elif condition(exc):
173
+ exceptions.append(exc)
174
+ else:
175
+ modified = True
176
+
177
+ if not modified:
178
+ return self
179
+ elif exceptions:
180
+ group = _derive_and_copy_attributes(self, exceptions)
181
+ return group
182
+ else:
183
+ return None
184
+
185
+ @overload
186
+ def split(
187
+ self, __condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...]
188
+ ) -> tuple[
189
+ ExceptionGroup[_ExceptionT] | None,
190
+ BaseExceptionGroup[_BaseExceptionT_co] | None,
191
+ ]: ...
192
+
193
+ @overload
194
+ def split(
195
+ self, __condition: type[_BaseExceptionT] | tuple[type[_BaseExceptionT], ...]
196
+ ) -> tuple[
197
+ BaseExceptionGroup[_BaseExceptionT] | None,
198
+ BaseExceptionGroup[_BaseExceptionT_co] | None,
199
+ ]: ...
200
+
201
+ @overload
202
+ def split(
203
+ self,
204
+ __condition: Callable[[_BaseExceptionT_co | _BaseExceptionGroupSelf], bool],
205
+ ) -> tuple[
206
+ BaseExceptionGroup[_BaseExceptionT_co] | None,
207
+ BaseExceptionGroup[_BaseExceptionT_co] | None,
208
+ ]: ...
209
+
210
+ def split(
211
+ self,
212
+ __condition: type[_BaseExceptionT]
213
+ | tuple[type[_BaseExceptionT], ...]
214
+ | Callable[[_BaseExceptionT_co], bool],
215
+ ) -> (
216
+ tuple[
217
+ ExceptionGroup[_ExceptionT] | None,
218
+ BaseExceptionGroup[_BaseExceptionT_co] | None,
219
+ ]
220
+ | tuple[
221
+ BaseExceptionGroup[_BaseExceptionT] | None,
222
+ BaseExceptionGroup[_BaseExceptionT_co] | None,
223
+ ]
224
+ | tuple[
225
+ BaseExceptionGroup[_BaseExceptionT_co] | None,
226
+ BaseExceptionGroup[_BaseExceptionT_co] | None,
227
+ ]
228
+ ):
229
+ condition = get_condition_filter(__condition)
230
+ if condition(self):
231
+ return self, None
232
+
233
+ matching_exceptions: list[BaseException] = []
234
+ nonmatching_exceptions: list[BaseException] = []
235
+ for exc in self.exceptions:
236
+ if isinstance(exc, BaseExceptionGroup):
237
+ matching, nonmatching = exc.split(condition)
238
+ if matching is not None:
239
+ matching_exceptions.append(matching)
240
+
241
+ if nonmatching is not None:
242
+ nonmatching_exceptions.append(nonmatching)
243
+ elif condition(exc):
244
+ matching_exceptions.append(exc)
245
+ else:
246
+ nonmatching_exceptions.append(exc)
247
+
248
+ matching_group: _BaseExceptionGroupSelf | None = None
249
+ if matching_exceptions:
250
+ matching_group = _derive_and_copy_attributes(self, matching_exceptions)
251
+
252
+ nonmatching_group: _BaseExceptionGroupSelf | None = None
253
+ if nonmatching_exceptions:
254
+ nonmatching_group = _derive_and_copy_attributes(
255
+ self, nonmatching_exceptions
256
+ )
257
+
258
+ return matching_group, nonmatching_group
259
+
260
+ @overload
261
+ def derive(self, __excs: Sequence[_ExceptionT]) -> ExceptionGroup[_ExceptionT]: ...
262
+
263
+ @overload
264
+ def derive(
265
+ self, __excs: Sequence[_BaseExceptionT]
266
+ ) -> BaseExceptionGroup[_BaseExceptionT]: ...
267
+
268
+ def derive(
269
+ self, __excs: Sequence[_BaseExceptionT]
270
+ ) -> BaseExceptionGroup[_BaseExceptionT]:
271
+ return BaseExceptionGroup(self.message, __excs)
272
+
273
+ def __str__(self) -> str:
274
+ suffix = "" if len(self._exceptions) == 1 else "s"
275
+ return f"{self.message} ({len(self._exceptions)} sub-exception{suffix})"
276
+
277
+ def __repr__(self) -> str:
278
+ return f"{self.__class__.__name__}({self.args[0]!r}, {self.args[1]!r})"
279
+
280
+
281
+ class ExceptionGroup(BaseExceptionGroup[_ExceptionT_co], Exception):
282
+ def __new__(
283
+ cls: type[_ExceptionGroupSelf],
284
+ __message: str,
285
+ __exceptions: Sequence[_ExceptionT_co],
286
+ ) -> _ExceptionGroupSelf:
287
+ return super().__new__(cls, __message, __exceptions)
288
+
289
+ if TYPE_CHECKING:
290
+
291
+ @property
292
+ def exceptions(
293
+ self,
294
+ ) -> tuple[_ExceptionT_co | ExceptionGroup[_ExceptionT_co], ...]: ...
295
+
296
+ @overload # type: ignore[override]
297
+ def subgroup(
298
+ self, __condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...]
299
+ ) -> ExceptionGroup[_ExceptionT] | None: ...
300
+
301
+ @overload
302
+ def subgroup(
303
+ self, __condition: Callable[[_ExceptionT_co | _ExceptionGroupSelf], bool]
304
+ ) -> ExceptionGroup[_ExceptionT_co] | None: ...
305
+
306
+ def subgroup(
307
+ self,
308
+ __condition: type[_ExceptionT]
309
+ | tuple[type[_ExceptionT], ...]
310
+ | Callable[[_ExceptionT_co], bool],
311
+ ) -> ExceptionGroup[_ExceptionT] | None:
312
+ return super().subgroup(__condition)
313
+
314
+ @overload
315
+ def split(
316
+ self, __condition: type[_ExceptionT] | tuple[type[_ExceptionT], ...]
317
+ ) -> tuple[
318
+ ExceptionGroup[_ExceptionT] | None, ExceptionGroup[_ExceptionT_co] | None
319
+ ]: ...
320
+
321
+ @overload
322
+ def split(
323
+ self, __condition: Callable[[_ExceptionT_co | _ExceptionGroupSelf], bool]
324
+ ) -> tuple[
325
+ ExceptionGroup[_ExceptionT_co] | None, ExceptionGroup[_ExceptionT_co] | None
326
+ ]: ...
327
+
328
+ def split(
329
+ self: _ExceptionGroupSelf,
330
+ __condition: type[_ExceptionT]
331
+ | tuple[type[_ExceptionT], ...]
332
+ | Callable[[_ExceptionT_co], bool],
333
+ ) -> tuple[
334
+ ExceptionGroup[_ExceptionT_co] | None, ExceptionGroup[_ExceptionT_co] | None
335
+ ]:
336
+ return super().split(__condition)
venv/lib/python3.10/site-packages/exceptiongroup/_formatting.py ADDED
@@ -0,0 +1,601 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # traceback_exception_init() adapted from trio
2
+ #
3
+ # _ExceptionPrintContext and traceback_exception_format() copied from the standard
4
+ # library
5
+ from __future__ import annotations
6
+
7
+ import collections.abc
8
+ import sys
9
+ import textwrap
10
+ import traceback
11
+ from functools import singledispatch
12
+ from types import TracebackType
13
+ from typing import Any, List, Optional
14
+
15
+ from ._exceptions import BaseExceptionGroup
16
+
17
+ max_group_width = 15
18
+ max_group_depth = 10
19
+ _cause_message = (
20
+ "\nThe above exception was the direct cause of the following exception:\n\n"
21
+ )
22
+
23
+ _context_message = (
24
+ "\nDuring handling of the above exception, another exception occurred:\n\n"
25
+ )
26
+
27
+
28
+ def _format_final_exc_line(etype, value):
29
+ valuestr = _safe_string(value, "exception")
30
+ if value is None or not valuestr:
31
+ line = f"{etype}\n"
32
+ else:
33
+ line = f"{etype}: {valuestr}\n"
34
+
35
+ return line
36
+
37
+
38
+ def _safe_string(value, what, func=str):
39
+ try:
40
+ return func(value)
41
+ except BaseException:
42
+ return f"<{what} {func.__name__}() failed>"
43
+
44
+
45
+ class _ExceptionPrintContext:
46
+ def __init__(self):
47
+ self.seen = set()
48
+ self.exception_group_depth = 0
49
+ self.need_close = False
50
+
51
+ def indent(self):
52
+ return " " * (2 * self.exception_group_depth)
53
+
54
+ def emit(self, text_gen, margin_char=None):
55
+ if margin_char is None:
56
+ margin_char = "|"
57
+ indent_str = self.indent()
58
+ if self.exception_group_depth:
59
+ indent_str += margin_char + " "
60
+
61
+ if isinstance(text_gen, str):
62
+ yield textwrap.indent(text_gen, indent_str, lambda line: True)
63
+ else:
64
+ for text in text_gen:
65
+ yield textwrap.indent(text, indent_str, lambda line: True)
66
+
67
+
68
+ def exceptiongroup_excepthook(
69
+ etype: type[BaseException], value: BaseException, tb: TracebackType | None
70
+ ) -> None:
71
+ sys.stderr.write("".join(traceback.format_exception(etype, value, tb)))
72
+
73
+
74
+ class PatchedTracebackException(traceback.TracebackException):
75
+ def __init__(
76
+ self,
77
+ exc_type: type[BaseException],
78
+ exc_value: BaseException,
79
+ exc_traceback: TracebackType | None,
80
+ *,
81
+ limit: int | None = None,
82
+ lookup_lines: bool = True,
83
+ capture_locals: bool = False,
84
+ compact: bool = False,
85
+ _seen: set[int] | None = None,
86
+ ) -> None:
87
+ kwargs: dict[str, Any] = {}
88
+ if sys.version_info >= (3, 10):
89
+ kwargs["compact"] = compact
90
+
91
+ is_recursive_call = _seen is not None
92
+ if _seen is None:
93
+ _seen = set()
94
+ _seen.add(id(exc_value))
95
+
96
+ self.stack = traceback.StackSummary.extract(
97
+ traceback.walk_tb(exc_traceback),
98
+ limit=limit,
99
+ lookup_lines=lookup_lines,
100
+ capture_locals=capture_locals,
101
+ )
102
+ self.exc_type = exc_type
103
+ # Capture now to permit freeing resources: only complication is in the
104
+ # unofficial API _format_final_exc_line
105
+ self._str = _safe_string(exc_value, "exception")
106
+ try:
107
+ self.__notes__ = getattr(exc_value, "__notes__", None)
108
+ except KeyError:
109
+ # Workaround for https://github.com/python/cpython/issues/98778 on Python
110
+ # <= 3.9, and some 3.10 and 3.11 patch versions.
111
+ HTTPError = getattr(sys.modules.get("urllib.error", None), "HTTPError", ())
112
+ if sys.version_info[:2] <= (3, 11) and isinstance(exc_value, HTTPError):
113
+ self.__notes__ = None
114
+ else:
115
+ raise
116
+
117
+ if exc_type and issubclass(exc_type, SyntaxError):
118
+ # Handle SyntaxError's specially
119
+ self.filename = exc_value.filename
120
+ lno = exc_value.lineno
121
+ self.lineno = str(lno) if lno is not None else None
122
+ self.text = exc_value.text
123
+ self.offset = exc_value.offset
124
+ self.msg = exc_value.msg
125
+ if sys.version_info >= (3, 10):
126
+ end_lno = exc_value.end_lineno
127
+ self.end_lineno = str(end_lno) if end_lno is not None else None
128
+ self.end_offset = exc_value.end_offset
129
+ elif (
130
+ exc_type
131
+ and issubclass(exc_type, (NameError, AttributeError))
132
+ and getattr(exc_value, "name", None) is not None
133
+ ):
134
+ suggestion = _compute_suggestion_error(exc_value, exc_traceback)
135
+ if suggestion:
136
+ self._str += f". Did you mean: '{suggestion}'?"
137
+
138
+ if lookup_lines:
139
+ # Force all lines in the stack to be loaded
140
+ for frame in self.stack:
141
+ frame.line
142
+
143
+ self.__suppress_context__ = (
144
+ exc_value.__suppress_context__ if exc_value is not None else False
145
+ )
146
+
147
+ # Convert __cause__ and __context__ to `TracebackExceptions`s, use a
148
+ # queue to avoid recursion (only the top-level call gets _seen == None)
149
+ if not is_recursive_call:
150
+ queue = [(self, exc_value)]
151
+ while queue:
152
+ te, e = queue.pop()
153
+
154
+ if e and e.__cause__ is not None and id(e.__cause__) not in _seen:
155
+ cause = PatchedTracebackException(
156
+ type(e.__cause__),
157
+ e.__cause__,
158
+ e.__cause__.__traceback__,
159
+ limit=limit,
160
+ lookup_lines=lookup_lines,
161
+ capture_locals=capture_locals,
162
+ _seen=_seen,
163
+ )
164
+ else:
165
+ cause = None
166
+
167
+ if compact:
168
+ need_context = (
169
+ cause is None and e is not None and not e.__suppress_context__
170
+ )
171
+ else:
172
+ need_context = True
173
+ if (
174
+ e
175
+ and e.__context__ is not None
176
+ and need_context
177
+ and id(e.__context__) not in _seen
178
+ ):
179
+ context = PatchedTracebackException(
180
+ type(e.__context__),
181
+ e.__context__,
182
+ e.__context__.__traceback__,
183
+ limit=limit,
184
+ lookup_lines=lookup_lines,
185
+ capture_locals=capture_locals,
186
+ _seen=_seen,
187
+ )
188
+ else:
189
+ context = None
190
+
191
+ # Capture each of the exceptions in the ExceptionGroup along with each
192
+ # of their causes and contexts
193
+ if e and isinstance(e, BaseExceptionGroup):
194
+ exceptions = []
195
+ for exc in e.exceptions:
196
+ texc = PatchedTracebackException(
197
+ type(exc),
198
+ exc,
199
+ exc.__traceback__,
200
+ lookup_lines=lookup_lines,
201
+ capture_locals=capture_locals,
202
+ _seen=_seen,
203
+ )
204
+ exceptions.append(texc)
205
+ else:
206
+ exceptions = None
207
+
208
+ te.__cause__ = cause
209
+ te.__context__ = context
210
+ te.exceptions = exceptions
211
+ if cause:
212
+ queue.append((te.__cause__, e.__cause__))
213
+ if context:
214
+ queue.append((te.__context__, e.__context__))
215
+ if exceptions:
216
+ queue.extend(zip(te.exceptions, e.exceptions))
217
+
218
+ def format(self, *, chain=True, _ctx=None, **kwargs):
219
+ if _ctx is None:
220
+ _ctx = _ExceptionPrintContext()
221
+
222
+ output = []
223
+ exc = self
224
+ if chain:
225
+ while exc:
226
+ if exc.__cause__ is not None:
227
+ chained_msg = _cause_message
228
+ chained_exc = exc.__cause__
229
+ elif exc.__context__ is not None and not exc.__suppress_context__:
230
+ chained_msg = _context_message
231
+ chained_exc = exc.__context__
232
+ else:
233
+ chained_msg = None
234
+ chained_exc = None
235
+
236
+ output.append((chained_msg, exc))
237
+ exc = chained_exc
238
+ else:
239
+ output.append((None, exc))
240
+
241
+ for msg, exc in reversed(output):
242
+ if msg is not None:
243
+ yield from _ctx.emit(msg)
244
+ if exc.exceptions is None:
245
+ if exc.stack:
246
+ yield from _ctx.emit("Traceback (most recent call last):\n")
247
+ yield from _ctx.emit(exc.stack.format())
248
+ yield from _ctx.emit(exc.format_exception_only())
249
+ elif _ctx.exception_group_depth > max_group_depth:
250
+ # exception group, but depth exceeds limit
251
+ yield from _ctx.emit(f"... (max_group_depth is {max_group_depth})\n")
252
+ else:
253
+ # format exception group
254
+ is_toplevel = _ctx.exception_group_depth == 0
255
+ if is_toplevel:
256
+ _ctx.exception_group_depth += 1
257
+
258
+ if exc.stack:
259
+ yield from _ctx.emit(
260
+ "Exception Group Traceback (most recent call last):\n",
261
+ margin_char="+" if is_toplevel else None,
262
+ )
263
+ yield from _ctx.emit(exc.stack.format())
264
+
265
+ yield from _ctx.emit(exc.format_exception_only())
266
+ num_excs = len(exc.exceptions)
267
+ if num_excs <= max_group_width:
268
+ n = num_excs
269
+ else:
270
+ n = max_group_width + 1
271
+ _ctx.need_close = False
272
+ for i in range(n):
273
+ last_exc = i == n - 1
274
+ if last_exc:
275
+ # The closing frame may be added by a recursive call
276
+ _ctx.need_close = True
277
+
278
+ if max_group_width is not None:
279
+ truncated = i >= max_group_width
280
+ else:
281
+ truncated = False
282
+ title = f"{i + 1}" if not truncated else "..."
283
+ yield (
284
+ _ctx.indent()
285
+ + ("+-" if i == 0 else " ")
286
+ + f"+---------------- {title} ----------------\n"
287
+ )
288
+ _ctx.exception_group_depth += 1
289
+ if not truncated:
290
+ yield from exc.exceptions[i].format(chain=chain, _ctx=_ctx)
291
+ else:
292
+ remaining = num_excs - max_group_width
293
+ plural = "s" if remaining > 1 else ""
294
+ yield from _ctx.emit(
295
+ f"and {remaining} more exception{plural}\n"
296
+ )
297
+
298
+ if last_exc and _ctx.need_close:
299
+ yield _ctx.indent() + "+------------------------------------\n"
300
+ _ctx.need_close = False
301
+ _ctx.exception_group_depth -= 1
302
+
303
+ if is_toplevel:
304
+ assert _ctx.exception_group_depth == 1
305
+ _ctx.exception_group_depth = 0
306
+
307
+ def format_exception_only(self, **kwargs):
308
+ """Format the exception part of the traceback.
309
+ The return value is a generator of strings, each ending in a newline.
310
+ Normally, the generator emits a single string; however, for
311
+ SyntaxError exceptions, it emits several lines that (when
312
+ printed) display detailed information about where the syntax
313
+ error occurred.
314
+ The message indicating which exception occurred is always the last
315
+ string in the output.
316
+ """
317
+ if self.exc_type is None:
318
+ yield traceback._format_final_exc_line(None, self._str)
319
+ return
320
+
321
+ stype = self.exc_type.__qualname__
322
+ smod = self.exc_type.__module__
323
+ if smod not in ("__main__", "builtins"):
324
+ if not isinstance(smod, str):
325
+ smod = "<unknown>"
326
+ stype = smod + "." + stype
327
+
328
+ if not issubclass(self.exc_type, SyntaxError):
329
+ yield _format_final_exc_line(stype, self._str)
330
+ elif traceback_exception_format_syntax_error is not None:
331
+ yield from traceback_exception_format_syntax_error(self, stype)
332
+ else:
333
+ yield from traceback_exception_original_format_exception_only(self)
334
+
335
+ if isinstance(self.__notes__, collections.abc.Sequence):
336
+ for note in self.__notes__:
337
+ note = _safe_string(note, "note")
338
+ yield from [line + "\n" for line in note.split("\n")]
339
+ elif self.__notes__ is not None:
340
+ yield _safe_string(self.__notes__, "__notes__", func=repr)
341
+
342
+
343
+ traceback_exception_original_format = traceback.TracebackException.format
344
+ traceback_exception_original_format_exception_only = (
345
+ traceback.TracebackException.format_exception_only
346
+ )
347
+ traceback_exception_format_syntax_error = getattr(
348
+ traceback.TracebackException, "_format_syntax_error", None
349
+ )
350
+ if sys.excepthook is sys.__excepthook__:
351
+ traceback.TracebackException.__init__ = ( # type: ignore[assignment]
352
+ PatchedTracebackException.__init__
353
+ )
354
+ traceback.TracebackException.format = ( # type: ignore[assignment]
355
+ PatchedTracebackException.format
356
+ )
357
+ traceback.TracebackException.format_exception_only = ( # type: ignore[assignment]
358
+ PatchedTracebackException.format_exception_only
359
+ )
360
+ sys.excepthook = exceptiongroup_excepthook
361
+
362
+ # Ubuntu's system Python has a sitecustomize.py file that imports
363
+ # apport_python_hook and replaces sys.excepthook.
364
+ #
365
+ # The custom hook captures the error for crash reporting, and then calls
366
+ # sys.__excepthook__ to actually print the error.
367
+ #
368
+ # We don't mind it capturing the error for crash reporting, but we want to
369
+ # take over printing the error. So we monkeypatch the apport_python_hook
370
+ # module so that instead of calling sys.__excepthook__, it calls our custom
371
+ # hook.
372
+ #
373
+ # More details: https://github.com/python-trio/trio/issues/1065
374
+ if getattr(sys.excepthook, "__name__", None) in (
375
+ "apport_excepthook",
376
+ # on ubuntu 22.10 the hook was renamed to partial_apport_excepthook
377
+ "partial_apport_excepthook",
378
+ ):
379
+ # patch traceback like above
380
+ traceback.TracebackException.__init__ = ( # type: ignore[assignment]
381
+ PatchedTracebackException.__init__
382
+ )
383
+ traceback.TracebackException.format = ( # type: ignore[assignment]
384
+ PatchedTracebackException.format
385
+ )
386
+ traceback.TracebackException.format_exception_only = ( # type: ignore[assignment]
387
+ PatchedTracebackException.format_exception_only
388
+ )
389
+
390
+ from types import ModuleType
391
+
392
+ import apport_python_hook
393
+
394
+ # monkeypatch the sys module that apport has imported
395
+ fake_sys = ModuleType("exceptiongroup_fake_sys")
396
+ fake_sys.__dict__.update(sys.__dict__)
397
+ fake_sys.__excepthook__ = exceptiongroup_excepthook
398
+ apport_python_hook.sys = fake_sys
399
+
400
+
401
+ @singledispatch
402
+ def format_exception_only(__exc: BaseException, **kwargs: Any) -> List[str]:
403
+ return list(
404
+ PatchedTracebackException(
405
+ type(__exc), __exc, None, compact=True
406
+ ).format_exception_only()
407
+ )
408
+
409
+
410
+ @format_exception_only.register
411
+ def _(__exc: type, value: BaseException, **kwargs: Any) -> List[str]:
412
+ return format_exception_only(value)
413
+
414
+
415
+ @singledispatch
416
+ def format_exception(
417
+ __exc: BaseException, limit: Optional[int] = None, chain: bool = True, **kwargs: Any
418
+ ) -> List[str]:
419
+ return list(
420
+ PatchedTracebackException(
421
+ type(__exc), __exc, __exc.__traceback__, limit=limit, compact=True
422
+ ).format(chain=chain)
423
+ )
424
+
425
+
426
+ @format_exception.register
427
+ def _(
428
+ __exc: type,
429
+ value: BaseException,
430
+ tb: TracebackType,
431
+ limit: Optional[int] = None,
432
+ chain: bool = True,
433
+ **kwargs: Any,
434
+ ) -> List[str]:
435
+ return format_exception(value, limit, chain)
436
+
437
+
438
+ @singledispatch
439
+ def print_exception(
440
+ __exc: BaseException,
441
+ limit: Optional[int] = None,
442
+ file: Any = None,
443
+ chain: bool = True,
444
+ **kwargs: Any,
445
+ ) -> None:
446
+ if file is None:
447
+ file = sys.stderr
448
+
449
+ for line in PatchedTracebackException(
450
+ type(__exc), __exc, __exc.__traceback__, limit=limit
451
+ ).format(chain=chain):
452
+ print(line, file=file, end="")
453
+
454
+
455
+ @print_exception.register
456
+ def _(
457
+ __exc: type,
458
+ value: BaseException,
459
+ tb: TracebackType,
460
+ limit: Optional[int] = None,
461
+ file: Any = None,
462
+ chain: bool = True,
463
+ ) -> None:
464
+ print_exception(value, limit, file, chain)
465
+
466
+
467
+ def print_exc(
468
+ limit: Optional[int] = None,
469
+ file: Any | None = None,
470
+ chain: bool = True,
471
+ ) -> None:
472
+ value = sys.exc_info()[1]
473
+ print_exception(value, limit, file, chain)
474
+
475
+
476
+ # Python levenshtein edit distance code for NameError/AttributeError
477
+ # suggestions, backported from 3.12
478
+
479
+ _MAX_CANDIDATE_ITEMS = 750
480
+ _MAX_STRING_SIZE = 40
481
+ _MOVE_COST = 2
482
+ _CASE_COST = 1
483
+ _SENTINEL = object()
484
+
485
+
486
+ def _substitution_cost(ch_a, ch_b):
487
+ if ch_a == ch_b:
488
+ return 0
489
+ if ch_a.lower() == ch_b.lower():
490
+ return _CASE_COST
491
+ return _MOVE_COST
492
+
493
+
494
+ def _compute_suggestion_error(exc_value, tb):
495
+ wrong_name = getattr(exc_value, "name", None)
496
+ if wrong_name is None or not isinstance(wrong_name, str):
497
+ return None
498
+ if isinstance(exc_value, AttributeError):
499
+ obj = getattr(exc_value, "obj", _SENTINEL)
500
+ if obj is _SENTINEL:
501
+ return None
502
+ obj = exc_value.obj
503
+ try:
504
+ d = dir(obj)
505
+ except Exception:
506
+ return None
507
+ else:
508
+ assert isinstance(exc_value, NameError)
509
+ # find most recent frame
510
+ if tb is None:
511
+ return None
512
+ while tb.tb_next is not None:
513
+ tb = tb.tb_next
514
+ frame = tb.tb_frame
515
+
516
+ d = list(frame.f_locals) + list(frame.f_globals) + list(frame.f_builtins)
517
+ if len(d) > _MAX_CANDIDATE_ITEMS:
518
+ return None
519
+ wrong_name_len = len(wrong_name)
520
+ if wrong_name_len > _MAX_STRING_SIZE:
521
+ return None
522
+ best_distance = wrong_name_len
523
+ suggestion = None
524
+ for possible_name in d:
525
+ if possible_name == wrong_name:
526
+ # A missing attribute is "found". Don't suggest it (see GH-88821).
527
+ continue
528
+ # No more than 1/3 of the involved characters should need changed.
529
+ max_distance = (len(possible_name) + wrong_name_len + 3) * _MOVE_COST // 6
530
+ # Don't take matches we've already beaten.
531
+ max_distance = min(max_distance, best_distance - 1)
532
+ current_distance = _levenshtein_distance(
533
+ wrong_name, possible_name, max_distance
534
+ )
535
+ if current_distance > max_distance:
536
+ continue
537
+ if not suggestion or current_distance < best_distance:
538
+ suggestion = possible_name
539
+ best_distance = current_distance
540
+ return suggestion
541
+
542
+
543
+ def _levenshtein_distance(a, b, max_cost):
544
+ # A Python implementation of Python/suggestions.c:levenshtein_distance.
545
+
546
+ # Both strings are the same
547
+ if a == b:
548
+ return 0
549
+
550
+ # Trim away common affixes
551
+ pre = 0
552
+ while a[pre:] and b[pre:] and a[pre] == b[pre]:
553
+ pre += 1
554
+ a = a[pre:]
555
+ b = b[pre:]
556
+ post = 0
557
+ while a[: post or None] and b[: post or None] and a[post - 1] == b[post - 1]:
558
+ post -= 1
559
+ a = a[: post or None]
560
+ b = b[: post or None]
561
+ if not a or not b:
562
+ return _MOVE_COST * (len(a) + len(b))
563
+ if len(a) > _MAX_STRING_SIZE or len(b) > _MAX_STRING_SIZE:
564
+ return max_cost + 1
565
+
566
+ # Prefer shorter buffer
567
+ if len(b) < len(a):
568
+ a, b = b, a
569
+
570
+ # Quick fail when a match is impossible
571
+ if (len(b) - len(a)) * _MOVE_COST > max_cost:
572
+ return max_cost + 1
573
+
574
+ # Instead of producing the whole traditional len(a)-by-len(b)
575
+ # matrix, we can update just one row in place.
576
+ # Initialize the buffer row
577
+ row = list(range(_MOVE_COST, _MOVE_COST * (len(a) + 1), _MOVE_COST))
578
+
579
+ result = 0
580
+ for bindex in range(len(b)):
581
+ bchar = b[bindex]
582
+ distance = result = bindex * _MOVE_COST
583
+ minimum = sys.maxsize
584
+ for index in range(len(a)):
585
+ # 1) Previous distance in this row is cost(b[:b_index], a[:index])
586
+ substitute = distance + _substitution_cost(bchar, a[index])
587
+ # 2) cost(b[:b_index], a[:index+1]) from previous row
588
+ distance = row[index]
589
+ # 3) existing result is cost(b[:b_index+1], a[index])
590
+
591
+ insert_delete = min(result, distance) + _MOVE_COST
592
+ result = min(insert_delete, substitute)
593
+
594
+ # cost(b[:b_index+1], a[:index+1])
595
+ row[index] = result
596
+ if result < minimum:
597
+ minimum = result
598
+ if minimum > max_cost:
599
+ # Everything in this row is too big, so bail early.
600
+ return max_cost + 1
601
+ return result
venv/lib/python3.10/site-packages/exceptiongroup/_suppress.py ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import sys
4
+ from contextlib import AbstractContextManager
5
+ from types import TracebackType
6
+ from typing import TYPE_CHECKING, Optional, Type, cast
7
+
8
+ if sys.version_info < (3, 11):
9
+ from ._exceptions import BaseExceptionGroup
10
+
11
+ if TYPE_CHECKING:
12
+ # requires python 3.9
13
+ BaseClass = AbstractContextManager[None]
14
+ else:
15
+ BaseClass = AbstractContextManager
16
+
17
+
18
+ class suppress(BaseClass):
19
+ """Backport of :class:`contextlib.suppress` from Python 3.12.1."""
20
+
21
+ def __init__(self, *exceptions: type[BaseException]):
22
+ self._exceptions = exceptions
23
+
24
+ def __enter__(self) -> None:
25
+ pass
26
+
27
+ def __exit__(
28
+ self,
29
+ exctype: Optional[Type[BaseException]],
30
+ excinst: Optional[BaseException],
31
+ exctb: Optional[TracebackType],
32
+ ) -> bool:
33
+ # Unlike isinstance and issubclass, CPython exception handling
34
+ # currently only looks at the concrete type hierarchy (ignoring
35
+ # the instance and subclass checking hooks). While Guido considers
36
+ # that a bug rather than a feature, it's a fairly hard one to fix
37
+ # due to various internal implementation details. suppress provides
38
+ # the simpler issubclass based semantics, rather than trying to
39
+ # exactly reproduce the limitations of the CPython interpreter.
40
+ #
41
+ # See http://bugs.python.org/issue12029 for more details
42
+ if exctype is None:
43
+ return False
44
+
45
+ if issubclass(exctype, self._exceptions):
46
+ return True
47
+
48
+ if issubclass(exctype, BaseExceptionGroup):
49
+ match, rest = cast(BaseExceptionGroup, excinst).split(self._exceptions)
50
+ if rest is None:
51
+ return True
52
+
53
+ raise rest
54
+
55
+ return False
venv/lib/python3.10/site-packages/exceptiongroup/_version.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # file generated by setuptools-scm
2
+ # don't change, don't track in version control
3
+
4
+ __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
+
6
+ TYPE_CHECKING = False
7
+ if TYPE_CHECKING:
8
+ from typing import Tuple
9
+ from typing import Union
10
+
11
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
12
+ else:
13
+ VERSION_TUPLE = object
14
+
15
+ version: str
16
+ __version__: str
17
+ __version_tuple__: VERSION_TUPLE
18
+ version_tuple: VERSION_TUPLE
19
+
20
+ __version__ = version = '1.3.0'
21
+ __version_tuple__ = version_tuple = (1, 3, 0)
venv/lib/python3.10/site-packages/exceptiongroup/py.typed ADDED
File without changes
venv/lib/python3.10/site-packages/fontTools/__pycache__/agl.cpython-310.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bce6e4445000caaac945fe32490ec96c2cef269b6b114b63cee662fd1dde5bf2
3
+ size 111031
venv/lib/python3.10/site-packages/fontTools/cu2qu/cu2qu.cpython-310-x86_64-linux-gnu.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e9b3f83a57766d7c9394aba1cc86f81015d6a09713d60b0459dadca907de2c9
3
+ size 1032920
venv/lib/python3.10/site-packages/fontTools/feaLib/lexer.cpython-310-x86_64-linux-gnu.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:becf0902a4b7a86361cd625a01626ee909755049d57434c0f3c4b6197e94ba72
3
+ size 1401640
venv/lib/python3.10/site-packages/fontTools/misc/bezierTools.cpython-310-x86_64-linux-gnu.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:475935ae16c26c631b4286384daab2e47ce02b413bc825d38a2e8988cd7f1984
3
+ size 4719904
venv/lib/python3.10/site-packages/fontTools/otlLib/__pycache__/builder.cpython-310.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4faba732c9b334e18b968a0e02daebc2168b777eacab80e88622a626c848cee9
3
+ size 112526
venv/lib/python3.10/site-packages/fontTools/pens/momentsPen.cpython-310-x86_64-linux-gnu.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a38e31378ae8150fd15b8421db88968cb4342cc3f62fed1feba0dea34910b69
3
+ size 916480
venv/lib/python3.10/site-packages/fontTools/qu2cu/qu2cu.cpython-310-x86_64-linux-gnu.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7842fc68b0a6fab17bbd6262a4408d2a541f209244bbf0cf618d14e07a34990c
3
+ size 1120824
venv/lib/python3.10/site-packages/fontTools/subset/__pycache__/__init__.cpython-310.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d2fa0b9f7a4261706133f66eddbeb2d6f087383a494e25e57922c76575c64dd6
3
+ size 109685
venv/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/otData.cpython-310.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6725f8bb2123b2a7c2b4548024d99d7cfb14755df62e7694d3f493980b08a1db
3
+ size 107116
venv/lib/python3.10/site-packages/fontTools/varLib/iup.cpython-310-x86_64-linux-gnu.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:922744076688f660b557f1267d926ecf4f133692a1c72818f3d8a84747ab5f5d
3
+ size 1565056
venv/lib/python3.10/site-packages/idna/__pycache__/idnadata.cpython-310.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:331646aa4aa94bb6b87ec4097df6e09cf9d70929b9332f510cb9a7dff15c9dbd
3
+ size 198632
venv/lib/python3.10/site-packages/idna/__pycache__/uts46data.cpython-310.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:399b335e861029837bcf57ae220e6b80afd96fc32511f89168f130fa2199e4bf
3
+ size 155201
venv/lib/python3.10/site-packages/mpmath/__pycache__/function_docs.cpython-310.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b8d94fee15aa10b0464b23113785be452c449215ea8324961567bad53a95b65
3
+ size 283824
venv/lib/python3.10/site-packages/multiprocess/tests/__pycache__/__init__.cpython-310.pyc ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f07df5927f13d3e35bb396f4db6ac9b71be58df7ec3cfaf1bec489da23b173bb
3
+ size 171791
venv/lib/python3.10/site-packages/networkx/algorithms/flow/tests/gl1.gpickle.bz2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf8f81ceb5eaaee1621aa60b892d83e596a6173f6f6517359b679ff3daa1b0f8
3
+ size 44623
venv/lib/python3.10/site-packages/networkx/algorithms/flow/tests/gw1.gpickle.bz2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6f79f0e90fa4c51ec79165f15963e1ed89477576e06bcaa67ae622c260411931
3
+ size 42248
venv/lib/python3.10/site-packages/networkx/algorithms/flow/tests/netgen-2.gpickle.bz2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b17e66cdeda8edb8d1dec72626c77f1f65dd4675e3f76dc2fc4fd84aa038e30
3
+ size 18972
venv/lib/python3.10/site-packages/networkx/algorithms/flow/tests/wlm3.gpickle.bz2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ccacba1e0fbfb30bec361f0e48ec88c999d3474fcda5ddf93bd444ace17cfa0e
3
+ size 88132
venv/lib/python3.10/site-packages/networkx/generators/atlas.dat.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73fc416df0164923607751cb759f4ae81deb5f6550bf25be59c86de3b747e41d
3
+ size 8887
venv/lib/python3.10/site-packages/nvidia/cublas/lib/libnvblas.so.12 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d244820d32966f0af47afe6c9ee6f34b230fafe87ea0141dc71241a5d2b340c
3
+ size 753824
venv/lib/python3.10/site-packages/nvidia/cuda_cupti/lib/libcheckpoint.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06ba82bd09237b934cf16da2172ed5943c582caa35c79b52cfcfeb0ff71f7250
3
+ size 1644872
venv/lib/python3.10/site-packages/nvidia/cuda_cupti/lib/libcupti.so.12 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fccdc5fcc7c32f8cf4b3ed9b17f7f187a185a6fa0a5bcc06e3434cbd1687c808
3
+ size 7595792