Skip to content

Commit

Permalink
🔖 Release 3.4.0 (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ousret authored Oct 8, 2024
1 parent 7658dfc commit 36c103a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
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).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

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

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

### Fixed
- Relax the TypeError exception thrown when trying to compare a CharsetMatch with anything else than a CharsetMatch.
Expand Down
2 changes: 1 addition & 1 deletion build-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
mypy==1.11.2; python_version >= '3.8' and python_version < '3.13'
mypy==1.12.0; python_version >= '3.13'
mypy==1.4.1; python_version < '3.8'
build==0.10.0
build>=0.10.0,<2
wheel==0.42.0
11 changes: 11 additions & 0 deletions charset_normalizer/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,17 @@ def from_bytes(
encoding_iana in [specified_encoding, "ascii", "utf_8"]
and mean_mess_ratio < 0.1
):
# If md says nothing to worry about, then... stop immediately!
if mean_mess_ratio == 0.0:
logger.debug(
"Encoding detection: %s is most likely the one.",
current_match.encoding,
)
if explain:
logger.removeHandler(explain_handler)
logger.setLevel(previous_logger_level)
return CharsetMatches([current_match])

early_stop_results.append(current_match)

if (
Expand Down
2 changes: 1 addition & 1 deletion charset_normalizer/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
Expose version
"""

__version__ = "3.3.3"
__version__ = "3.4.0"
VERSION = __version__.split(".")
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ chardet==5.1.0
isort==5.11.4
codecov==2.1.13
pytest-cov==4.1.0
build==0.10.0
build>=0.10.0,<2
wheel==0.42.0
black==23.3.0
mypy==1.11.2; python_version >= '3.8' and python_version < '3.13'
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ long_description_content_type = text/markdown
keywords = encoding, charset, charset-detector, detector, normalization, unicode, chardet, detect
url = https://github.com/Ousret/charset_normalizer
license = MIT
author_email = ahmed.tahri@cloudnursery.dev
author_email = tahri[email protected]
author = Ahmed TAHRI
project_urls =
Bug Reports = https://github.com/Ousret/charset_normalizer/issues
Expand Down

0 comments on commit 36c103a

Please sign in to comment.