From cd6d6df149bd9898b4a2049a4c1c31bcce80e1fc Mon Sep 17 00:00:00 2001 From: Anuj Kumar Date: Fri, 22 Mar 2019 02:13:34 -0700 Subject: [PATCH 1/2] updating dxpy3 to dxpy --- requirements.txt | 3 +-- stor/dx.py | 7 +++---- stor/tests/test_integration_dx.py | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4f88e4f6..f0c19c59 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,8 +3,7 @@ requests!=2.12.2,!=2.13.0,>=2.10.0 boto3>=1.4.0 cached-property contextlib2 -dxpy>=0.265.0; python_version <= '2.7' -dxpy3; python_version > '3.0' +dxpy>=0.278.0 python-keystoneclient>=1.8.1 python-swiftclient six diff --git a/stor/dx.py b/stor/dx.py index 9c307cba..4bf8077c 100644 --- a/stor/dx.py +++ b/stor/dx.py @@ -802,8 +802,7 @@ def upload(self, to_upload, **kwargs): def read_object(self): """Reads an individual object from DX. - - Note dxpy3 automatically decodes the DXFile.read using + Note dxpy for Py3 automatically decodes the DXFile.read using utf-8. Returns: bytes: the raw bytes from the object on DX. @@ -815,8 +814,8 @@ def read_object(self): with _wrap_dx_calls(): result = file_handler.read() if six.PY3: # pragma: no cover - # TODO (akumar): allow other encoding after update of dxpy3 - result = result.encode('utf-8') # dxpy3 already decodes the data with 'utf-8' + # TODO (akumar): allow other encoding after update of encoding in dxpy for Py3 + result = result.encode('utf-8') # dxpy for py3 already decodes the data with 'utf-8' return result def write_object(self, content, **kwargs): diff --git a/stor/tests/test_integration_dx.py b/stor/tests/test_integration_dx.py index a28bf44e..e989606e 100644 --- a/stor/tests/test_integration_dx.py +++ b/stor/tests/test_integration_dx.py @@ -147,7 +147,7 @@ def test_read_string_from_text(self): def test_custom_encoding_text(self): # explicit encoding is only supported for py3 in general - # dxpy3 assumes the encoding is utf-8. can't support other encoding for dx + # dxpy py3 assumes the encoding is utf-8. can't support other encoding for dx pass def test_over_100_files(self): @@ -273,7 +273,7 @@ def test_upload_download_remove(self): time.sleep(.5) self.assertFalse((self.test_dir / which_obj).exists()) - @skipIf(six.PY3, 'dxpy3 assumes utf-8 encoding, not suitable for gzip') + @skipIf(six.PY3, 'dxpy py3 assumes utf-8 encoding, not suitable for gzip') def test_gzip_on_remote(self): self._skip_if_filesystem_python3(self.test_dir) local_gzip = os.path.join(os.path.dirname(__file__), From 1aa464c59c18b5c01971d77a6b9e10e611aa14f2 Mon Sep 17 00:00:00 2001 From: Anuj Kumar Date: Thu, 13 Jun 2019 09:36:50 -0700 Subject: [PATCH 2/2] update release notes --- docs/release_notes.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/release_notes.rst b/docs/release_notes.rst index 7e7f4b73..709b2d79 100644 --- a/docs/release_notes.rst +++ b/docs/release_notes.rst @@ -1,6 +1,10 @@ Release Notes ============= +v3.0.5 +------ +* Changed dxpy3 requirement to dxpy to reflect Python3 updates to dxpy + v3.0.4 ------ * Fix release notes.