Skip to content

Commit a66cea5

Browse files
committed
Fix import errors
1 parent 756d082 commit a66cea5

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

functools32/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .functools32 import *

functools32.py renamed to functools32/functools32.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414
from _functools import partial, reduce
1515
from collections import MutableMapping, namedtuple
16-
from reprlib32 import recursive_repr as _recursive_repr
16+
from .reprlib32 import recursive_repr as _recursive_repr
1717
from weakref import proxy as _proxy
1818
import sys as _sys
1919
try:
2020
from _thread import allocate_lock as Lock
2121
except:
22-
from _dummy_thread32 import allocate_lock as Lock
22+
from ._dummy_thread32 import allocate_lock as Lock
2323

2424
################################################################################
2525
### OrderedDict
File renamed without changes.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def main():
2323
maintainer_email='djmchl@gmail.com',
2424
url='https://github.com/MiCHiLU/python-functools32',
2525

26-
py_modules=['functools32'],
26+
packages=['functools32'],
2727
)
2828

2929

test_functools32.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from weakref import proxy
77
import pickle
88
from random import choice
9-
from functools32 import OrderedDict
9+
from functools32.functools32 import OrderedDict
1010

1111
@staticmethod
1212
def PythonPartial(func, *args, **keywords):
@@ -617,10 +617,10 @@ def fib(n):
617617
self.assertEqual([fib(n) for n in range(16)],
618618
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610])
619619
self.assertEqual(fib.cache_info(),
620-
functools._CacheInfo(hits=28, misses=16, maxsize=None, currsize=16))
620+
functools.functools32._CacheInfo(hits=28, misses=16, maxsize=None, currsize=16))
621621
fib.cache_clear()
622622
self.assertEqual(fib.cache_info(),
623-
functools._CacheInfo(hits=0, misses=0, maxsize=None, currsize=0))
623+
functools.functools32._CacheInfo(hits=0, misses=0, maxsize=None, currsize=0))
624624

625625
def test_lru_with_exceptions(self):
626626
# Verify that user_function exceptions get passed through without

0 commit comments

Comments
 (0)