diff --git a/send2trash/__init__.py b/send2trash/__init__.py index 5b01f31..d09faa3 100644 --- a/send2trash/__init__.py +++ b/send2trash/__init__.py @@ -6,16 +6,16 @@ import sys -from .exceptions import TrashPermissionError # noqa: F401 +from send2trash.exceptions import TrashPermissionError # noqa: F401 if sys.platform == "darwin": - from .mac import send2trash + from send2trash.mac import send2trash elif sys.platform == "win32": - from .win import send2trash + from send2trash.win import send2trash else: try: # If we can use gio, let's use it - from .plat_gio import send2trash + from send2trash.plat_gio import send2trash except ImportError: # Oh well, let's fallback to our own Freedesktop trash implementation - from .plat_other import send2trash # noqa: F401 + from send2trash.plat_other import send2trash # noqa: F401 diff --git a/send2trash/exceptions.py b/send2trash/exceptions.py index b61c645..9e82766 100644 --- a/send2trash/exceptions.py +++ b/send2trash/exceptions.py @@ -1,5 +1,5 @@ import errno -from .compat import PY3 +from send2trash.compat import PY3 if PY3: _permission_error = PermissionError # noqa: F821 diff --git a/send2trash/mac/__init__.py b/send2trash/mac/__init__.py index 7c10029..beff611 100644 --- a/send2trash/mac/__init__.py +++ b/send2trash/mac/__init__.py @@ -11,10 +11,10 @@ from sys import version_info macos_ver = tuple(int(part) for part in mac_ver()[0].split(".")) if version_info >= (3, 6) and macos_ver >= (10, 9): try: - from .modern import send2trash + from send2trash.mac.modern import send2trash except ImportError: # Try to fall back to ctypes version, although likely problematic still - from .legacy import send2trash + from send2trash.mac.legacy import send2trash else: # Just use the old version otherwise - from .legacy import send2trash # noqa: F401 + from send2trash.mac.legacy import send2trash # noqa: F401 diff --git a/send2trash/mac/legacy.py b/send2trash/mac/legacy.py index 6bb7a8c..82f43d9 100644 --- a/send2trash/mac/legacy.py +++ b/send2trash/mac/legacy.py @@ -9,8 +9,8 @@ from __future__ import unicode_literals from ctypes import cdll, byref, Structure, c_char, c_char_p from ctypes.util import find_library -from ..compat import binary_type -from ..util import preprocess_paths +from send2trash.compat import binary_type +from send2trash.util import preprocess_paths Foundation = cdll.LoadLibrary(find_library("Foundation")) CoreServices = cdll.LoadLibrary(find_library("CoreServices")) diff --git a/send2trash/mac/modern.py b/send2trash/mac/modern.py index 0699ce7..6098d5a 100644 --- a/send2trash/mac/modern.py +++ b/send2trash/mac/modern.py @@ -5,8 +5,8 @@ # http://www.hardcoded.net/licenses/bsd_license from Foundation import NSFileManager, NSURL -from ..compat import text_type -from ..util import preprocess_paths +from send2trash.compat import text_type +from send2trash.util import preprocess_paths def check_op_result(op_result): diff --git a/send2trash/plat_gio.py b/send2trash/plat_gio.py index 0b11c8d..258e4ef 100644 --- a/send2trash/plat_gio.py +++ b/send2trash/plat_gio.py @@ -5,8 +5,8 @@ # http://www.hardcoded.net/licenses/bsd_license from gi.repository import GObject, Gio -from .exceptions import TrashPermissionError -from .util import preprocess_paths +from send2trash.exceptions import TrashPermissionError +from send2trash.util import preprocess_paths def send2trash(paths): diff --git a/send2trash/plat_other.py b/send2trash/plat_other.py index 2680736..517e2a0 100644 --- a/send2trash/plat_other.py +++ b/send2trash/plat_other.py @@ -30,9 +30,9 @@ except ImportError: # Python 2 from urllib import quote -from .compat import text_type, environb -from .util import preprocess_paths -from .exceptions import TrashPermissionError +from send2trash.compat import text_type, environb +from send2trash.util import preprocess_paths +from send2trash.exceptions import TrashPermissionError try: fsencode = os.fsencode # Python 3 diff --git a/send2trash/win/__init__.py b/send2trash/win/__init__.py index 78278d5..4a06123 100644 --- a/send2trash/win/__init__.py +++ b/send2trash/win/__init__.py @@ -11,10 +11,10 @@ from platform import version if int(version().split(".", 1)[0]) >= 6: try: # Attempt to use pywin32 to use IFileOperation - from .modern import send2trash + from send2trash.win.modern import send2trash except ImportError: # use SHFileOperation as fallback - from .legacy import send2trash + from send2trash.win.legacy import send2trash else: # use SHFileOperation as fallback - from .legacy import send2trash # noqa: F401 + from send2trash.win.legacy import send2trash # noqa: F401 diff --git a/send2trash/win/legacy.py b/send2trash/win/legacy.py index 1ae5a0b..5bb3d69 100644 --- a/send2trash/win/legacy.py +++ b/send2trash/win/legacy.py @@ -6,8 +6,8 @@ from __future__ import unicode_literals import os.path as op -from ..compat import text_type -from ..util import preprocess_paths +from send2trash.compat import text_type +from send2trash.util import preprocess_paths from ctypes import ( windll, diff --git a/send2trash/win/modern.py b/send2trash/win/modern.py index 3cd8833..c61de29 100644 --- a/send2trash/win/modern.py +++ b/send2trash/win/modern.py @@ -6,13 +6,13 @@ from __future__ import unicode_literals import os.path as op -from ..compat import text_type -from ..util import preprocess_paths +from send2trash.compat import text_type +from send2trash.util import preprocess_paths from platform import version import pythoncom import pywintypes from win32com.shell import shell, shellcon -from .IFileOperationProgressSink import create_sink +from send2trash.win.IFileOperationProgressSink import create_sink def send2trash(paths):