Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't inject unicodedata2 into sys.modules #57

Merged
merged 1 commit into from
Jul 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions charset_normalizer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
from charset_normalizer.version import __version__, VERSION
from charset_normalizer.models import CharsetMatch, CharsetMatches

# Load backport unicodedata2 if available
import charset_normalizer.hook

# Backward-compatible v1 imports
from charset_normalizer.models import CharsetNormalizerMatch
import charset_normalizer.api as CharsetDetector
Expand Down
7 changes: 0 additions & 7 deletions charset_normalizer/hook.py

This file was deleted.

6 changes: 5 additions & 1 deletion charset_normalizer/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import unicodedata
try:
import unicodedata2 as unicodedata
Ousret marked this conversation as resolved.
Show resolved Hide resolved
except ImportError:
import unicodedata

from codecs import IncrementalDecoder
from re import findall
from typing import Optional, Tuple, Union, List, Set
Expand Down