Skip to content

Commit

Permalink
Don't inject unicodedata2 into sys.modules (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
akx authored Jul 14, 2021
1 parent 929f13c commit 53b2dab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
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
except ImportError:
import unicodedata

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

0 comments on commit 53b2dab

Please sign in to comment.