Commit e832689f by rfkelly0

rename "functools" to "local_functools".

It can't have the same name as the module it's trying to emulate.  Python's
local-imports-first rule means it would shadow the stdlib functools module and
we would always get the fallback version.
parent 67df67c1
......@@ -31,7 +31,7 @@ except ImportError:
from fs.path import *
from fs.errors import *
from fs.functools import wraps
from fs.local_functools import wraps
class DummyLock(object):
......
......@@ -31,7 +31,7 @@ import sys
import errno
from fs.path import *
from fs.functools import wraps
from fs.local_functools import wraps
class FSError(Exception):
......
......@@ -68,7 +68,7 @@ kernel32 = ctypes.windll.kernel32
from fs.base import threading
from fs.errors import *
from fs.path import *
from fs.functools import wraps
from fs.local_functools import wraps
try:
import libdokan
......
......@@ -61,7 +61,7 @@ import pickle
from fs.base import flags_to_mode, threading
from fs.errors import *
from fs.path import *
from fs.functools import wraps
from fs.local_functools import wraps
try:
import fuse_ctypes as fuse
......
......@@ -36,7 +36,7 @@ import paramiko
from fs.base import flags_to_mode
from fs.path import *
from fs.errors import *
from fs.functools import wraps
from fs.local_functools import wraps
# Default host key used by BaseSFTPServer
......
......@@ -27,7 +27,7 @@ from time import sleep
import datetime
import re
from socket import error as socket_error
from fs.functools import wraps
from fs.local_functools import wraps
try:
from cStringIO import StringIO
......
"""A version of wraps for Python versions that don't support it"""
"""
A version of functools.wraps for Python versions that don't support it.
Note that this module can't be named "functools" because it would shadow the
stdlib module that it tries to emulate. Absolute imports would fix this
problem but are only availabe from Python 2.5.
"""
try:
from functools import wraps as wraps
except ImportError:
wraps = lambda f: lambda f: f
\ No newline at end of file
wraps = lambda f: lambda f: f
......@@ -29,7 +29,7 @@ from fs.wrapfs import WrapFS, wrap_fs_methods
from fs.wrapfs.lazyfs import LazyFS
from fs.path import *
from fs.errors import *
from fs.functools import wraps
from fs.local_functools import wraps
try:
from tempfile import SpooledTemporaryFile
......
......@@ -17,7 +17,7 @@ from fs.remote import *
from fs.wrapfs import WrapFS, wrap_fs_methods
from fs.tempfs import TempFS
from fs.path import *
from fs.functools import wraps
from fs.local_functools import wraps
class TestCacheFS(unittest.TestCase,FSTestCases,ThreadingTestCases):
......
......@@ -21,7 +21,7 @@ import fnmatch
from fs.base import FS, threading, synchronize
from fs.errors import *
from fs.functools import wraps
from fs.local_functools import wraps
def rewrite_errors(func):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment