Upgrading charset-normalizer 2 to 3
Breaking2.1.1 → 3.5.2Breaking18Platform5New19Changed33Fixed34Other10
BreakingUpgrade verdict
17 breaking changes and 5 platform requirement changes.
In plain terms
- UTF-7 will no longer appear as "detected" without a recognized SIG/mark (is unreliable/conflicts with ASCII).
- Coherence detector no longer returns 'Simple English' instead returns 'English'.
- Coherence detector no longer returns 'Classical Chinese' instead returns 'Chinese'.
- Redundant UTF7 BOM marker.
Must act Top 5 of 22 that need code or config changes
Python requirement changed in 3.4.1: >=3.6.0 → >=3.7.
What you must change
Breaking17
UTF-7 will no longer appear as "detected" without a recognized SIG/mark (is unreliable/conflicts with ASCII).
Coherence detector no longer returns 'Simple English' instead returns 'English'.
Coherence detector no longer returns 'Classical Chinese' instead returns 'Chinese'.
Redundant UTF7 BOM marker.
setuptools-scm as a build dependency.
setuptools-scmbuild-requirements.txt as per using pyproject.toml native build configuration.
build-requirements.txtpyproject.tomlsetup.cfg in favor of pyproject.toml metadata configuration.
setup.cfgpyproject.tomlUnused utils.range_scan function.
utils.range_scanSupport for Python 3.6 (PR ).
Method first() and best() from CharsetMatch.
first()best()Class aliases CharsetDetector, CharsetDoctor, CharsetNormalizerMatch and CharsetNormalizerMatches.
Top-level function normalize.
normalizeProperties chaos_secondary_pass, coherence_non_latin and w_counter from CharsetMatch.
chaos_secondary_passcoherence_non_latinw_counterSupport for the backport unicodedata2.
unicodedata2bin/integration.py and bin/serve.py in favor of downstream integration test (see noxfile).
bin/integration.pybin/serve.py(internal) Redundant utils.is_ascii function and unused function is_private_use_only.
(internal) charset_normalizer.assets is moved inside charset_normalizer.constant.
Platform5
Optional mypyc compilation upgraded to version 1.15 for Python >= 3.9.
Optional mypyc compilation upgraded to version 1.14 for Python >= 3.8.
Optional mypyc compilation upgraded to version 1.6.1 for Python >= 3.8.
Optional mypyc compilation upgraded to version 1.5.1 for Python >= 3.8.
Speedup provided using mypy/c 0.990 on Python >= 3.7.