-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Remove `vistir` and `crayons` - Reimplement heavily relied-upon functionality - Copy over `vistir` utilities used heavily in tests to avoid this as a test dependency as well - Rewrite mocks that relied on vistir-specific invocations - Regenerate lockfile - Begins to address #78 Signed-off-by: Dan Ryan <[email protected]>
- Loading branch information
1 parent
fbd35fa
commit fc054fd
Showing
14 changed files
with
354 additions
and
181 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Reduced dependencies by removing ``vistir``,, ``crayons`` and intermediate calls. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# -*- coding=utf-8 -*- | ||
import sys | ||
|
||
import six | ||
|
||
if sys.version_info[:2] <= (3, 4): | ||
from pathlib2 import Path # type: ignore # noqa | ||
else: | ||
from pathlib import Path | ||
|
||
if six.PY3: | ||
from functools import lru_cache | ||
else: | ||
from backports.functools_lru_cache import lru_cache # type: ignore # noqa | ||
|
||
|
||
def getpreferredencoding(): | ||
import locale | ||
# Borrowed from Invoke | ||
# (see https://github.com/pyinvoke/invoke/blob/93af29d/invoke/runners.py#L881) | ||
_encoding = locale.getpreferredencoding(False) | ||
if six.PY2 and not sys.platform == "win32": | ||
_default_encoding = locale.getdefaultlocale()[1] | ||
if _default_encoding is not None: | ||
_encoding = _default_encoding | ||
return _encoding | ||
|
||
|
||
DEFAULT_ENCODING = getpreferredencoding() | ||
|
||
|
||
def fs_str(string): | ||
"""Encodes a string into the proper filesystem encoding""" | ||
|
||
if isinstance(string, str): | ||
return string | ||
assert not isinstance(string, bytes) | ||
return string.encode(DEFAULT_ENCODING) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.