mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-11 23:10:10 +01:00
move compatibility helper
This commit is contained in:
+1
-6
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from dvc.utils.compat import str, StringIO
|
||||
from dvc.utils.compat import str, StringIO, RecursionError
|
||||
from dvc.progress import Tqdm
|
||||
|
||||
import logging
|
||||
@@ -10,11 +10,6 @@ import logging.handlers
|
||||
import logging.config
|
||||
import colorama
|
||||
|
||||
try: # https://docs.python.org/3/library/exceptions.html#RecursionError
|
||||
RecursionError
|
||||
except NameError: # Python < 3.5
|
||||
RecursionError = RuntimeError
|
||||
|
||||
|
||||
class LoggingException(Exception):
|
||||
def __init__(self, record):
|
||||
|
||||
@@ -18,6 +18,10 @@ is_py3 = _ver[0] == 3
|
||||
# simplified version of ipython_genutils/encoding.py
|
||||
DEFAULT_ENCODING = sys.getdefaultencoding()
|
||||
|
||||
# https://docs.python.org/3/library/exceptions.html#RecursionError
|
||||
if _ver[:2] < (3, 5):
|
||||
RecursionError = RuntimeError
|
||||
|
||||
|
||||
def no_code(x, encoding=None):
|
||||
return x
|
||||
|
||||
Reference in New Issue
Block a user