File tree 2 files changed +3
-12
lines changed
2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 1
1
from __future__ import absolute_import
2
2
3
3
import abc
4
- import six
5
4
import zipp
6
5
7
- try :
8
- import pathlib
9
- except ImportError :
10
- import pathlib2 as pathlib
6
+ from ._compat import ABC , Path
11
7
12
8
13
- __metaclass__ = type
14
-
15
-
16
- @six .add_metaclass (abc .ABCMeta )
17
- class Traversable :
9
+ class Traversable (ABC ):
18
10
@abc .abstractmethod
19
11
def iterdir (self ):
20
12
"""
@@ -48,7 +40,7 @@ def is_file(self):
48
40
49
41
def from_package (package ):
50
42
"""Return a Traversable object for the given package"""
51
- package_directory = pathlib . Path (package .__spec__ .origin ).parent
43
+ package_directory = Path (package .__spec__ .origin ).parent
52
44
try :
53
45
archive_path = package .__spec__ .loader .archive
54
46
rel_path = package_directory .relative_to (archive_path )
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ install_requires =
24
24
pathlib2; python_version < '3'
25
25
typing; python_version < '3.5'
26
26
zipp >= 0.4
27
- six
28
27
packages = find:
29
28
30
29
[options.package_data]
You can’t perform that action at this time.
0 commit comments