Skip to content

Commit 36c103a

Browse files
authored
🔖 Release 3.4.0 (#545)
1 parent 7658dfc commit 36c103a

File tree

6 files changed

+17
-5
lines changed

6 files changed

+17
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
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).
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
44

5-
## [3.3.3](https://github.com/Ousret/charset_normalizer/compare/3.3.2...master) (2024-09-??)
5+
## [3.4.0](https://github.com/Ousret/charset_normalizer/compare/3.3.2...master) (2024-10-08)
66

77
### Added
88
- Argument `--no-preemptive` in the CLI to prevent the detector to search for hints.
9+
- Support for Python 3.13 (#512)
910

1011
### Fixed
1112
- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.

build-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
mypy==1.11.2; python_version >= '3.8' and python_version < '3.13'
55
mypy==1.12.0; python_version >= '3.13'
66
mypy==1.4.1; python_version < '3.8'
7-
build==0.10.0
7+
build>=0.10.0,<2
88
wheel==0.42.0

charset_normalizer/api.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,17 @@ def from_bytes(
456456
encoding_iana in [specified_encoding, "ascii", "utf_8"]
457457
and mean_mess_ratio < 0.1
458458
):
459+
# If md says nothing to worry about, then... stop immediately!
460+
if mean_mess_ratio == 0.0:
461+
logger.debug(
462+
"Encoding detection: %s is most likely the one.",
463+
current_match.encoding,
464+
)
465+
if explain:
466+
logger.removeHandler(explain_handler)
467+
logger.setLevel(previous_logger_level)
468+
return CharsetMatches([current_match])
469+
459470
early_stop_results.append(current_match)
460471

461472
if (

charset_normalizer/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
Expose version
33
"""
44

5-
__version__ = "3.3.3"
5+
__version__ = "3.4.0"
66
VERSION = __version__.split(".")

dev-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ chardet==5.1.0
44
isort==5.11.4
55
codecov==2.1.13
66
pytest-cov==4.1.0
7-
build==0.10.0
7+
build>=0.10.0,<2
88
wheel==0.42.0
99
black==23.3.0
1010
mypy==1.11.2; python_version >= '3.8' and python_version < '3.13'

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ long_description_content_type = text/markdown
66
keywords = encoding, charset, charset-detector, detector, normalization, unicode, chardet, detect
77
url = https://github.com/Ousret/charset_normalizer
88
license = MIT
9-
author_email = ahmed.tahri@cloudnursery.dev
9+
author_email = tahri[email protected]
1010
author = Ahmed TAHRI
1111
project_urls =
1212
Bug Reports = https://github.com/Ousret/charset_normalizer/issues

0 commit comments

Comments
 (0)