Skip to content
Open
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

setup(
name='zhconv',
version='1.4.2',
version='1.4.4',
description="A simple implementation of Simplified-Traditional Chinese conversion.",
long_description=LONGDESC,
author='Dingyuan Wang',
Expand Down
10 changes: 7 additions & 3 deletions zhconv/zhconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,20 @@

"""
# Only Python3 can pass the doctest here due to unicode problems.
__version__ = '1.4.2'
__version__ = '1.4.4'

import os
import sys
import re
import json

try:
from pkg_resources import resource_stream
get_module_res = lambda *res: resource_stream(__name__, os.path.join(*res))
if sys.version_info >= (3, 9):
from importlib.resources import files
else:
from importlib_resources import files

get_module_res = lambda *res: files(__name__).joinpath(*res).open('rb')
except ImportError:
get_module_res = lambda *res: open(os.path.normpath(
os.path.join(os.getcwd(), os.path.dirname(__file__), *res)), 'rb')
Expand Down