diff --git a/.travis.yml b/.travis.yml index c41e2f4..f294efc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,6 @@ cache: pip matrix: include: - python: 2.7 - - python: 3.4 - - python: 3.5 - python: 3.6 - python: 3.7 diff --git a/HISTORY.rst b/HISTORY.rst index df4b725..ff21eec 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.0.49 (2020-08-05) ++++++++++++++++++++ +* Fix bug with NoRetryPolicy +* Remove Add Python 3.4,5 in travis configuration and add python 3.8 + 0.0.48 (2019-10-18) +++++++++++++++++++ * Buffer writes to prevent out of memory problems diff --git a/azure/datalake/store/__init__.py b/azure/datalake/store/__init__.py index bda664f..8d91512 100644 --- a/azure/datalake/store/__init__.py +++ b/azure/datalake/store/__init__.py @@ -6,7 +6,7 @@ # license information. # -------------------------------------------------------------------------- -__version__ = "0.0.48" +__version__ = "0.0.49" from .core import AzureDLFileSystem from .multithread import ADLDownloader diff --git a/azure/datalake/store/lib.py b/azure/datalake/store/lib.py index 7655a58..557195d 100644 --- a/azure/datalake/store/lib.py +++ b/azure/datalake/store/lib.py @@ -307,15 +307,15 @@ def check_token_internal(): check_token_internal() def _log_request(self, method, url, op, path, params, headers, retry_count): - msg = "HTTP Request\n{} {}\n".format(method.upper(), url) - msg += "{} '{}' {}\n\n".format( - op, path, - " ".join(["{}={}".format(key, params[key]) for key in params])) - msg += "\n".join(["{}: {}".format(header, headers[header]) + msg = u"HTTP Request\n{} {}\n".format(method.upper(), url) + param_str = u" ".join([u"{}={}".format(key, params[key]) for key in params]) + msg += u"{} '{}' {}\n\n".format( + op, path, param_str) + msg += u"\n".join([u"{}: {}".format(header, headers[header]) for header in headers if header != 'Authorization']) - msg += "\nAuthorization header length:" + str(len(headers['Authorization'])) + msg += u"\nAuthorization header length:" + str(len(headers['Authorization'])) if retry_count > 0: - msg += "retry-count:{}".format(retry_count) + msg += u"retry-count:{}".format(retry_count) logger.debug(msg) def _content_truncated(self, response): @@ -324,27 +324,27 @@ def _content_truncated(self, response): return int(response.headers['content-length']) > MAX_CONTENT_LENGTH def _log_response(self, response, payload=False): - msg = "HTTP Response\n{}\n{}".format( + msg = u"HTTP Response\n{}\n{}".format( response.status_code, - "\n".join(["{}: {}".format(header, response.headers[header]) + u"\n".join([u"{}: {}".format(header, response.headers[header]) for header in response.headers])) if payload: - msg += "\n\n{}".format(response.content[:MAX_CONTENT_LENGTH]) + msg += u"\n\n{}".format(response.content[:MAX_CONTENT_LENGTH]) if self._content_truncated(response): - msg += "\n(Response body was truncated)" + msg += u"\n(Response body was truncated)" logger.debug(msg) def log_response_and_raise(self, response, exception, level=logging.ERROR): - msg = "Exception " + repr(exception) + msg = u"Exception " + repr(exception) if response is not None: - msg += "\n{}\n{}".format( + msg += u"\n{}\n{}".format( response.status_code, - "\n".join([ - "{}: {}".format(header, response.headers[header]) + u"\n".join([ + u"{}: {}".format(header, response.headers[header]) for header in response.headers])) - msg += "\n\n{}".format(response.content[:MAX_CONTENT_LENGTH]) + msg += u"\n\n{}".format(response.content[:MAX_CONTENT_LENGTH]) if self._content_truncated(response): - msg += "\n(Response body was truncated)" + msg += u"\n(Response body was truncated)" logger.log(level, msg) raise exception diff --git a/azure/datalake/store/retry.py b/azure/datalake/store/retry.py index 2206a2f..000e16e 100644 --- a/azure/datalake/store/retry.py +++ b/azure/datalake/store/retry.py @@ -26,7 +26,7 @@ def should_retry(self, *args): class NoRetryPolicy(RetryPolicy): - def should_retry(self): + def should_retry(self, *args): return False diff --git a/setup.py b/setup.py index bd63f9e..108e29d 100644 --- a/setup.py +++ b/setup.py @@ -35,6 +35,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'License :: OSI Approved :: MIT License', ], packages=find_packages(exclude=['tests',