diff --git a/CHANGES b/CHANGES index 398050d..40ebe83 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,14 @@ HdfsCLI ======= + +Version 1.0.1 (2015/06/17) +-------------------------- + +* Added support for Windows. +* Added support for remote filepaths with `=` characters. + + Version 0.3.0 (2014/11/14) -------------------------- @@ -11,13 +19,15 @@ Breaking changes: * Renamed `--info` command to `--list`. * Made `--interactive` the new default command. + Version 0.2.6 (2014/08/04) -------------------------- * Added parallelized downloading. * Added Avro-format reading and writing. * Added `hdfs.ext.dataframe` extension. - + + Version 0.2.0 (2014/04/26) -------------------------- diff --git a/hdfs/__init__.py b/hdfs/__init__.py index 3b3e99b..4c77ad4 100644 --- a/hdfs/__init__.py +++ b/hdfs/__init__.py @@ -3,7 +3,7 @@ """HdfsCLI.""" -__version__ = '1.0.0' +__version__ = '1.0.1' import logging as lg try: diff --git a/hdfs/client.py b/hdfs/client.py index 5e28352..1b2c383 100644 --- a/hdfs/client.py +++ b/hdfs/client.py @@ -228,7 +228,7 @@ def expand_latest(match): # #LATEST expansion (could cache the pattern, but not worth it) self._logger.debug('Resolved path %r to %r.', hdfs_path, path) - return quote(path) + return quote(path, '/=').replace(os.sep, '/') def content(self, hdfs_path): """Get content summary for a file or folder on HDFS. diff --git a/test/test_client.py b/test/test_client.py index 322527f..ddf82ae 100644 --- a/test/test_client.py +++ b/test/test_client.py @@ -139,6 +139,11 @@ def test_resolve_filename(self): encoded = self.client.resolve(path) eq_(encoded.split('/')[-2:], ['fo%26o', 'a%3F%25a']) + def test_resolve_filename_with_safe_characters(self): + path = 'foo=1' + encoded = self.client.resolve(path) + eq_(encoded.split('/')[-1], 'foo=1') + def test_create_file_with_reserved_characters(self): path = 'fo&o/a?a' self.client.write(path, data='hello')