forked from pool/python-wcwidth
52 lines
1.6 KiB
Diff
52 lines
1.6 KiB
Diff
|
|
Index: wcwidth-0.2.5/tests/test_core.py
|
||
|
|
===================================================================
|
||
|
|
--- wcwidth-0.2.5.orig/tests/test_core.py
|
||
|
|
+++ wcwidth-0.2.5/tests/test_core.py
|
||
|
|
@@ -1,7 +1,10 @@
|
||
|
|
# coding: utf-8
|
||
|
|
"""Core tests for wcwidth module."""
|
||
|
|
# 3rd party
|
||
|
|
-import pkg_resources
|
||
|
|
+try:
|
||
|
|
+ import importlib.metadata as importmeta
|
||
|
|
+except ImportError:
|
||
|
|
+ import importlib_metadata as importmeta
|
||
|
|
|
||
|
|
# local
|
||
|
|
import wcwidth
|
||
|
|
@@ -10,7 +13,7 @@ import wcwidth
|
||
|
|
def test_package_version():
|
||
|
|
"""wcwidth.__version__ is expected value."""
|
||
|
|
# given,
|
||
|
|
- expected = pkg_resources.get_distribution('wcwidth').version
|
||
|
|
+ expected = importmeta.version('wcwidth')
|
||
|
|
|
||
|
|
# exercise,
|
||
|
|
result = wcwidth.__version__
|
||
|
|
Index: wcwidth-0.2.5/tests/test_ucslevel.py
|
||
|
|
===================================================================
|
||
|
|
--- wcwidth-0.2.5.orig/tests/test_ucslevel.py
|
||
|
|
+++ wcwidth-0.2.5/tests/test_ucslevel.py
|
||
|
|
@@ -6,7 +6,6 @@ import warnings
|
||
|
|
|
||
|
|
# 3rd party
|
||
|
|
import pytest
|
||
|
|
-import pkg_resources
|
||
|
|
|
||
|
|
# local
|
||
|
|
import wcwidth
|
||
|
|
Index: wcwidth-0.2.5/setup.py
|
||
|
|
===================================================================
|
||
|
|
--- wcwidth-0.2.5.orig/setup.py
|
||
|
|
+++ wcwidth-0.2.5/setup.py
|
||
|
|
@@ -52,7 +52,8 @@ def main():
|
||
|
|
author='Jeff Quast',
|
||
|
|
author_email='contact@jeffquast.com',
|
||
|
|
install_requires=('backports.functools-lru-cache>=1.2.1;'
|
||
|
|
- 'python_version < "3.2"'),
|
||
|
|
+ 'python_version < "3.2"',
|
||
|
|
+ 'importlib_metadata;python_version < "3.8"'),
|
||
|
|
license='MIT',
|
||
|
|
packages=['wcwidth'],
|
||
|
|
url='https://github.com/jquast/wcwidth',
|