Switch from pathlib to pathlib2
The pathlib backport module is no longer maintained. The development has moved to the pathlib2 module instead. Quoting from the pathlib's README: "Attention: this backport module isn't maintained anymore. If you want to report issues or contribute patches, please consider the pathlib2 project instead."
This commit is contained in:
+4
-1
@@ -1,7 +1,10 @@
|
||||
from imp import load_source
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
try:
|
||||
from pathlib import Path
|
||||
except ImportError:
|
||||
from pathlib2 import Path
|
||||
from six import text_type
|
||||
from . import const
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
from pathlib import Path
|
||||
try:
|
||||
from pathlib import Path
|
||||
except ImportError:
|
||||
from pathlib2 import Path
|
||||
from .conf import settings
|
||||
from .types import Rule
|
||||
from . import logs
|
||||
|
||||
+4
-1
@@ -10,7 +10,10 @@ from decorator import decorator
|
||||
from difflib import get_close_matches
|
||||
from functools import wraps
|
||||
from inspect import getargspec
|
||||
from pathlib import Path
|
||||
try:
|
||||
from pathlib import Path
|
||||
except ImportError:
|
||||
from pathlib2 import Path
|
||||
from warnings import warn
|
||||
|
||||
DEVNULL = open(os.devnull, 'w')
|
||||
|
||||
Reference in New Issue
Block a user