[Python-modules-commits] [python-fs] 01/17: Import python-fs_0.5.4.orig.tar.gz

Jan Dittberner jandd at moszumanska.debian.org
Sun Jan 3 19:30:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

jandd pushed a commit to branch master
in repository python-fs.

commit 21729b195c6b02d31adc0cbd26282d28ffbd20bf
Author: Jan Dittberner <jandd at debian.org>
Date:   Sun Jan 3 18:19:29 2016 +0100

    Import python-fs_0.5.4.orig.tar.gz
---
 CHANGES.txt                                 | 106 ++++
 LICENSE.txt                                 |  28 ++
 MANIFEST.in                                 |   5 +
 PKG-INFO                                    |  82 ++-
 README.txt                                  |  67 +++
 fs.egg-info/PKG-INFO                        |  86 ++++
 fs.egg-info/SOURCES.txt                     | 118 +++++
 fs.egg-info/dependency_links.txt            |   1 +
 fs.egg-info/entry_points.txt                |  12 +
 fs.egg-info/pbr.json                        |   1 +
 fs.egg-info/requires.txt                    |   2 +
 fs.egg-info/top_level.txt                   |   1 +
 fs.egg-info/version_info.json               |   6 +
 fs/__init__.py                              |  15 +-
 fs/appdirfs.py                              |  26 +-
 fs/appdirs.py                               |   1 -
 fs/base.py                                  | 742 ++++++++++++++++------------
 fs/batch.py                                 | 155 ------
 fs/browsewin.py                             |   6 +-
 fs/commands/fscat                           |   3 -
 fs/commands/fscp                            |   3 -
 fs/commands/fsinfo                          |   3 -
 fs/commands/fsls                            |   3 -
 fs/commands/fsls.py                         | 138 +++---
 fs/commands/fsmkdir                         |   3 -
 fs/commands/fsmount                         |   3 -
 fs/commands/fsmount.py                      |  75 ++-
 fs/commands/fsmv                            |   3 -
 fs/commands/fsrm                            |   3 -
 fs/commands/fsserve                         |   3 -
 fs/commands/fsserve.py                      |  76 +--
 fs/commands/fstree                          |   3 -
 fs/commands/fstree.py                       |  30 +-
 fs/commands/runner.py                       | 240 ++++-----
 fs/compatibility.py                         |  49 ++
 fs/contrib/archivefs.py                     | 513 +++++++++++++++++++
 fs/contrib/davfs/__init__.py                |  59 ++-
 fs/contrib/davfs/xmlobj.py                  |   1 +
 fs/contrib/sqlitefs.py                      | 705 ++++++++++++++++++++++++++
 fs/contrib/tahoelafs/__init__.py            |   4 +-
 fs/errors.py                                |  42 +-
 fs/expose/django_storage.py                 |   2 +-
 fs/expose/dokan/__init__.py                 | 133 ++---
 fs/expose/ftp.py                            | 292 +++++++++++
 fs/expose/fuse/__init__.py                  | 194 +++++---
 fs/expose/fuse/{fuse_ctypes.py => fuse.py}  | 162 +++---
 fs/expose/fuse/{fuse_ctypes.py => fuse3.py} | 192 ++++---
 fs/expose/fuse/fuse_ctypes.py               |  81 ++-
 fs/expose/http.py                           |  52 +-
 fs/expose/importhook.py                     |  14 +-
 fs/expose/sftp.py                           | 184 ++++---
 fs/expose/wsgi/dirtemplate.py               |  23 +-
 fs/expose/wsgi/serve_home.py                |   8 +-
 fs/expose/wsgi/wsgi.py                      | 113 ++---
 fs/expose/xmlrpc.py                         |  50 +-
 fs/filelike.py                              | 125 ++---
 fs/ftpfs.py                                 | 354 ++++++-------
 fs/httpfs.py                                |  48 +-
 fs/iotools.py                               | 255 ++++++++++
 fs/memoryfs.py                              | 246 +++++----
 fs/mountfs.py                               | 124 +++--
 fs/multifs.py                               | 113 +++--
 fs/opener.py                                | 484 +++++++++---------
 fs/osfs/__init__.py                         | 197 +++++---
 fs/osfs/watch.py                            |   2 +
 fs/osfs/watch_inotify.py                    |   8 +-
 fs/osfs/watch_win32.py                      |  48 +-
 fs/osfs/xattrs.py                           |   8 +-
 fs/path.py                                  | 281 ++++++-----
 fs/remote.py                                | 116 ++---
 fs/remotefs.py                              | 191 +++++++
 fs/rpcfs.py                                 | 174 ++++---
 fs/s3fs.py                                  |  71 ++-
 fs/sftpfs.py                                | 278 ++++++-----
 fs/tempfs.py                                |  62 ++-
 fs/tests/__init__.py                        | 732 ++++++++++++++++-----------
 fs/tests/data/UTF-8-demo.txt                | 212 ++++++++
 fs/tests/test_archivefs.py                  | 198 ++++++++
 fs/tests/test_errors.py                     |   6 +
 fs/tests/test_expose.py                     | 135 +----
 fs/tests/test_fs.py                         |  29 +-
 fs/tests/test_ftpfs.py                      |  36 +-
 fs/tests/test_importhook.py                 |  19 +-
 fs/tests/test_iotools.py                    |  56 +++
 fs/tests/test_mountfs.py                    |  83 ++++
 fs/tests/test_multifs.py                    |  85 ++++
 fs/tests/test_opener.py                     |  32 ++
 fs/tests/test_path.py                       |  41 +-
 fs/tests/test_remote.py                     | 121 ++---
 fs/tests/test_rpcfs.py                      | 100 ++++
 fs/tests/test_s3fs.py                       |  10 +-
 fs/tests/test_sqlitefs.py                   |  17 +
 fs/tests/test_utils.py                      | 115 +++++
 fs/tests/test_watch.py                      |  35 +-
 fs/tests/test_wrapfs.py                     |  11 +-
 fs/tests/test_xattr.py                      |  13 +-
 fs/tests/test_zipfs.py                      |  79 +--
 fs/tests/zipfs_binary_test.py               |  45 ++
 fs/utils.py                                 | 383 +++++++++-----
 fs/watch.py                                 |  57 ++-
 fs/wrapfs/__init__.py                       |  89 ++--
 fs/wrapfs/hidedotfilesfs.py                 |   3 +-
 fs/wrapfs/hidefs.py                         |  54 ++
 fs/wrapfs/lazyfs.py                         |   4 +-
 fs/wrapfs/limitsizefs.py                    |  26 +-
 fs/wrapfs/readonlyfs.py                     |  32 +-
 fs/wrapfs/subfs.py                          |  67 +--
 fs/zipfs.py                                 | 106 ++--
 setup.cfg                                   |   5 +
 setup.py                                    |  44 +-
 110 files changed, 7818 insertions(+), 3369 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
new file mode 100644
index 0000000..6e68a86
--- /dev/null
+++ b/CHANGES.txt
@@ -0,0 +1,106 @@
+
+0.3:
+
+    * New FS implementations:
+        * FTPFS:   access a plain old FTP server
+        * S3FS:    access remote files stored in Amazon S3
+        * RPCFS:   access remote files using a simple XML-RPC protocol
+        * SFTPFS:  access remote files on a SFTP server
+        * WrapFS:  filesystem that wraps an FS object and transparently
+                   modifies its contents (think encryption, compression, ...)
+        * LazyFS:  lazily instantiate an FS object the first time it is used
+        * ReadOnlyFS:   a WrapFS that makes an fs read-only
+    * Ability to expose FS objects to the outside world:
+        * expose.fuse:    expose an FS object using FUSE
+        * expose.xmlrpc:  expose an FS object a simple XML-RPC protocol
+        * expose.sftp:    expose an FS object SFTP
+        * expose.django_storage:  convert FS object to Django Storage object
+    * Extended attribute support (getxattr/setxattr/delxattr/listxattrs)
+    * Change watching support (add_watcher/del_watcher)
+    * Insist on unicode paths throughout:
+        * output paths are always unicode
+        * bytestring input paths are decoded as early as possible
+    * Renamed "fs.helpers" to "fs.path", and renamed the contained functions
+      to match those offered by os.path
+    * fs.remote:  utilities for implementing FS classes that interface
+                  with a remote filesystem
+    * fs.errors:  updated exception hierarchy, with support for converting
+                  to/from standard OSError instances
+    * Added cache_hint method to base.py
+    * Added settimes method to base implementation
+    * New implementation of print_fs, accessible through tree method on base class
+
+
+0.4:
+
+    * New FS implementations (under fs.contrib):
+        * BigFS:    read contents of a BIG file (C&C game file format)
+        * DAVFS:    access remote files stored on a WebDAV server
+        * TahoeLAFS:  access files stored in a Tahoe-LAFS grid
+    * New fs.expose implementations:
+        * dokan:   mount an FS object as a drive using Dokan (win32-only)
+        * importhook:  import modules from files in an FS object
+    * Modified listdir and walk methods to accept callables as well as strings
+      for wildcards.
+    * Added listdirinfo method, which yields both the entry names and the
+      corresponding info dicts in a single operation.
+    * Made SubFS a subclass of WrapFS, and moved it into its own module at
+      fs.wrapfs.subfs.
+    * Path-handling fixes for OSFS on win32:
+        * Work properly when pointing to the root of a drive.
+        * Better handling of remote UNC paths.
+        * Add ability to switch off use of long UNC paths.
+    * OSFSWatchMixin improvements:
+        * watch_inotify:  allow more than one watcher on a single path.
+        * watch_win32:  don't create immortal reference cycles.
+        * watch_win32:  report errors if the filesystem does't support
+                        ReadDirectoryChangesW.
+    * MountFS: added support for mounting at the root directory, and for
+      mounting over an existing mount.
+    * Added 'getpathurl' and 'haspathurl' methods.
+    * Added utils.isdir(fs,path,info) and utils.isfile(fs,path,info); these
+      can often determine whether a path is a file or directory by inspecting
+      the info dict and avoid an additional query to the filesystem.
+    * Added utility module 'fs.filelike' with some helpers for building and
+      manipulating file-like objects.
+    * Added getmeta and hasmeta methods
+    * Separated behaviour of setcontents and createfile
+    * Added a getmmap to base
+    * Added command line scripts fsls, fstree, fscat, fscp, fsmv
+    * Added command line scripts fsmkdir, fsmount
+    * Made SFTP automatically pick up keys if no other authentication
+      is available
+    * Optimized listdir and listdirinfo in SFTPFS
+    * Made memoryfs work with threads
+    * Added copyfile_non_atomic and movefile_non_atomic for improved performance of multi-threaded copies
+    * Added a concept of a writeable FS to MultiFS
+    * Added ilistdir() and ilistdirinfo() methods, which are generator-based
+      variants of listdir() and listdirinfo().
+    * Removed obsolete module fs.objectree; use fs.path.PathMap instead.
+    * Added setcontents_async method to base
+    * Added `appdirfs` module to abstract per-user application directories
+
+0.5:
+
+    * Ported to Python 3.X
+    * Added a DeleteRootError to exceptions thrown when trying to delete '/'
+    * Added a remove_all function to utils
+    * Added sqlitefs to fs.contrib, contributed by Nitin Bhide
+    * Added archivefs to fs.contrib, contributed by btimby
+    * Added some polish to fstree command and unicode box lines rather than ascii art
+
+0.5.1:
+
+    * Fixed a hang bug in readline
+    * Added copydir_progress to fs.utils
+
+0.5.2:
+
+    * Added utils.open_atomic_write
+
+0.5.3:
+
+    * Implemented scandir in listdir if available
+    * Fix for issue where local.getpreferredencoding returns empty string
+
+
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..fc63077
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,28 @@
+Copyright (c) 2009-2015, Will McGugan <will at willmcgugan.com> and contributors.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    1. Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimer.
+
+    2. Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+
+    3. Neither the name of PyFilesystem nor the names of its contributors
+       may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..2720cd5
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,5 @@
+
+include AUTHORS
+include README.txt
+include LICENSE.txt
+include CHANGES.txt
\ No newline at end of file
diff --git a/PKG-INFO b/PKG-INFO
index 0ca571b..dd37040 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,20 +1,86 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: fs
-Version: 0.4.0
-Summary: Filesystem abstraction
-Home-page: http://code.google.com/p/pyfilesystem/
+Version: 0.5.4
+Summary: Filesystem abstraction layer
+Home-page: http://pypi.python.org/pypi/fs/
 Author: Will McGugan
 Author-email: will at willmcgugan.com
 License: BSD
-Download-URL: http://code.google.com/p/pyfilesystem/downloads/list
-Description: Pyfilesystem is a module that provides a simplified common interface to many types of filesystem. Filesystems exposed via Pyfilesystem can also be served over the network, or 'mounted' on the native filesystem.
+Description: PyFilesystem
+        ============
         
-        Even if you only need to work with file and directories on the local hard-drive, Pyfilesystem can simplify your code and make it more robust -- with the added advantage that you can change where the files are located by changing a single line of code.
+        PyFilesystem is an abstraction layer for *filesystems*. In the same way that Python's file-like objects provide a common way of accessing files, PyFilesystem provides a common way of accessing entire filesystems. You can write platform-independent code to work with local files, that also works with any of the supported filesystems (zip, ftp, S3 etc.).
+        
+        Pyfilesystem works with Linux, Windows and Mac.
+        
+        Suported Filesystems
+        ---------------------
+        
+        Here are a few of the filesystems that can be accessed with Pyfilesystem:
+        
+        * **DavFS** access files & directories on a WebDAV server
+        * **FTPFS** access files & directories on an FTP server
+        * **MemoryFS** access files & directories stored in memory (non-permanent but very fast)
+        * **MountFS** creates a virtual directory structure built from other filesystems
+        * **MultiFS** a virtual filesystem that combines a list of filesystems into one, and checks them in order when opening files
+        * **OSFS** the native filesystem
+        * **SFTPFS** access files & directores stored on a Secure FTP server
+        * **S3FS** access files & directories stored on Amazon S3 storage
+        * **TahoeLAFS** access files & directories stored on a Tahoe distributed filesystem
+        * **ZipFS** access files and directories contained in a zip file
+        
+        Example
+        -------
+        
+        The following snippet prints the total number of bytes contained in all your Python files in `C:/projects` (including sub-directories)::
+        
+            from fs.osfs import OSFS
+            projects_fs = OSFS('C:/projects')
+            print sum(projects_fs.getsize(path)
+                      for path in projects_fs.walkfiles(wildcard="*.py"))
+        
+        That is, assuming you are on Windows and have a directory called 'projects' in your C drive. If you are on Linux / Mac, you might replace the second line with something like::
+        
+            projects_fs = OSFS('~/projects')
+        
+        If you later want to display the total size of Python files stored in a zip file, you could make the following change to the first two lines::
+        
+            from fs.zipfs import ZipFS
+            projects_fs = ZipFS('source.zip')
+        
+        In fact, you could use any of the supported filesystems above, and the code would continue to work as before.
+        
+        An alternative to explicitly importing the filesystem class you want, is to use an FS opener which opens a filesystem from a URL-like syntax::
+        
+            from fs.opener import fsopendir
+            projects_fs = fsopendir('C:/projects')
+        
+        You could change ``C:/projects`` to ``zip://source.zip`` to open the zip file, or even ``ftp://ftp.example.org/code/projects/`` to sum up the bytes of Python stored on an ftp server.
+        
+        Screencast
+        ----------
+        
+        This is from an early version of PyFilesystem, but still relevant
+        
+        http://vimeo.com/12680842
+        
+        Discussion Group
+        ----------------
+        
+        http://groups.google.com/group/pyfilesystem-discussion
+        
+        Further Information
+        -------------------
+        
+        http://www.willmcgugan.com/tag/fs/
         
 Platform: any
-Classifier: Development Status :: 3 - Alpha
+Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: BSD License
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
 Classifier: Topic :: System :: Filesystems
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..6ecd021
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,67 @@
+PyFilesystem
+============
+
+PyFilesystem is an abstraction layer for *filesystems*. In the same way that Python's file-like objects provide a common way of accessing files, PyFilesystem provides a common way of accessing entire filesystems. You can write platform-independent code to work with local files, that also works with any of the supported filesystems (zip, ftp, S3 etc.).
+
+Pyfilesystem works with Linux, Windows and Mac.
+
+Suported Filesystems
+---------------------
+
+Here are a few of the filesystems that can be accessed with Pyfilesystem:
+
+* **DavFS** access files & directories on a WebDAV server
+* **FTPFS** access files & directories on an FTP server
+* **MemoryFS** access files & directories stored in memory (non-permanent but very fast)
+* **MountFS** creates a virtual directory structure built from other filesystems
+* **MultiFS** a virtual filesystem that combines a list of filesystems into one, and checks them in order when opening files
+* **OSFS** the native filesystem
+* **SFTPFS** access files & directores stored on a Secure FTP server
+* **S3FS** access files & directories stored on Amazon S3 storage
+* **TahoeLAFS** access files & directories stored on a Tahoe distributed filesystem
+* **ZipFS** access files and directories contained in a zip file
+
+Example
+-------
+
+The following snippet prints the total number of bytes contained in all your Python files in `C:/projects` (including sub-directories)::
+
+    from fs.osfs import OSFS
+    projects_fs = OSFS('C:/projects')
+    print sum(projects_fs.getsize(path)
+              for path in projects_fs.walkfiles(wildcard="*.py"))
+
+That is, assuming you are on Windows and have a directory called 'projects' in your C drive. If you are on Linux / Mac, you might replace the second line with something like::
+
+    projects_fs = OSFS('~/projects')
+
+If you later want to display the total size of Python files stored in a zip file, you could make the following change to the first two lines::
+
+    from fs.zipfs import ZipFS
+    projects_fs = ZipFS('source.zip')
+
+In fact, you could use any of the supported filesystems above, and the code would continue to work as before.
+
+An alternative to explicitly importing the filesystem class you want, is to use an FS opener which opens a filesystem from a URL-like syntax::
+
+    from fs.opener import fsopendir
+    projects_fs = fsopendir('C:/projects')
+
+You could change ``C:/projects`` to ``zip://source.zip`` to open the zip file, or even ``ftp://ftp.example.org/code/projects/`` to sum up the bytes of Python stored on an ftp server.
+
+Screencast
+----------
+
+This is from an early version of PyFilesystem, but still relevant
+
+http://vimeo.com/12680842
+
+Discussion Group
+----------------
+
+http://groups.google.com/group/pyfilesystem-discussion
+
+Further Information
+-------------------
+
+http://www.willmcgugan.com/tag/fs/
diff --git a/fs.egg-info/PKG-INFO b/fs.egg-info/PKG-INFO
new file mode 100644
index 0000000..dd37040
--- /dev/null
+++ b/fs.egg-info/PKG-INFO
@@ -0,0 +1,86 @@
+Metadata-Version: 1.1
+Name: fs
+Version: 0.5.4
+Summary: Filesystem abstraction layer
+Home-page: http://pypi.python.org/pypi/fs/
+Author: Will McGugan
+Author-email: will at willmcgugan.com
+License: BSD
+Description: PyFilesystem
+        ============
+        
+        PyFilesystem is an abstraction layer for *filesystems*. In the same way that Python's file-like objects provide a common way of accessing files, PyFilesystem provides a common way of accessing entire filesystems. You can write platform-independent code to work with local files, that also works with any of the supported filesystems (zip, ftp, S3 etc.).
+        
+        Pyfilesystem works with Linux, Windows and Mac.
+        
+        Suported Filesystems
+        ---------------------
+        
+        Here are a few of the filesystems that can be accessed with Pyfilesystem:
+        
+        * **DavFS** access files & directories on a WebDAV server
+        * **FTPFS** access files & directories on an FTP server
+        * **MemoryFS** access files & directories stored in memory (non-permanent but very fast)
+        * **MountFS** creates a virtual directory structure built from other filesystems
+        * **MultiFS** a virtual filesystem that combines a list of filesystems into one, and checks them in order when opening files
+        * **OSFS** the native filesystem
+        * **SFTPFS** access files & directores stored on a Secure FTP server
+        * **S3FS** access files & directories stored on Amazon S3 storage
+        * **TahoeLAFS** access files & directories stored on a Tahoe distributed filesystem
+        * **ZipFS** access files and directories contained in a zip file
+        
+        Example
+        -------
+        
+        The following snippet prints the total number of bytes contained in all your Python files in `C:/projects` (including sub-directories)::
+        
+            from fs.osfs import OSFS
+            projects_fs = OSFS('C:/projects')
+            print sum(projects_fs.getsize(path)
+                      for path in projects_fs.walkfiles(wildcard="*.py"))
+        
+        That is, assuming you are on Windows and have a directory called 'projects' in your C drive. If you are on Linux / Mac, you might replace the second line with something like::
+        
+            projects_fs = OSFS('~/projects')
+        
+        If you later want to display the total size of Python files stored in a zip file, you could make the following change to the first two lines::
+        
+            from fs.zipfs import ZipFS
+            projects_fs = ZipFS('source.zip')
+        
+        In fact, you could use any of the supported filesystems above, and the code would continue to work as before.
+        
+        An alternative to explicitly importing the filesystem class you want, is to use an FS opener which opens a filesystem from a URL-like syntax::
+        
+            from fs.opener import fsopendir
+            projects_fs = fsopendir('C:/projects')
+        
+        You could change ``C:/projects`` to ``zip://source.zip`` to open the zip file, or even ``ftp://ftp.example.org/code/projects/`` to sum up the bytes of Python stored on an ftp server.
+        
+        Screencast
+        ----------
+        
+        This is from an early version of PyFilesystem, but still relevant
+        
+        http://vimeo.com/12680842
+        
+        Discussion Group
+        ----------------
+        
+        http://groups.google.com/group/pyfilesystem-discussion
+        
+        Further Information
+        -------------------
+        
+        http://www.willmcgugan.com/tag/fs/
+        
+Platform: any
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Topic :: System :: Filesystems
diff --git a/fs.egg-info/SOURCES.txt b/fs.egg-info/SOURCES.txt
new file mode 100644
index 0000000..594d1d3
--- /dev/null
+++ b/fs.egg-info/SOURCES.txt
@@ -0,0 +1,118 @@
+AUTHORS
+CHANGES.txt
+LICENSE.txt
+MANIFEST.in
+README.txt
+setup.py
+fs/__init__.py
+fs/appdirfs.py
+fs/appdirs.py
+fs/base.py
+fs/browsewin.py
+fs/compatibility.py
+fs/errors.py
+fs/filelike.py
+fs/ftpfs.py
+fs/httpfs.py
+fs/iotools.py
+fs/local_functools.py
+fs/memoryfs.py
+fs/mountfs.py
+fs/multifs.py
+fs/opener.py
+fs/path.py
+fs/remote.py
+fs/remotefs.py
+fs/rpcfs.py
+fs/s3fs.py
+fs/sftpfs.py
+fs/tempfs.py
+fs/utils.py
+fs/watch.py
+fs/xattrs.py
+fs/zipfs.py
+fs.egg-info/PKG-INFO
+fs.egg-info/SOURCES.txt
+fs.egg-info/dependency_links.txt
+fs.egg-info/entry_points.txt
+fs.egg-info/pbr.json
+fs.egg-info/requires.txt
+fs.egg-info/top_level.txt
+fs.egg-info/version_info.json
+fs/commands/__init__.py
+fs/commands/fscat.py
+fs/commands/fscp.py
+fs/commands/fsinfo.py
+fs/commands/fsls.py
+fs/commands/fsmkdir.py
+fs/commands/fsmount.py
+fs/commands/fsmv.py
+fs/commands/fsrm.py
+fs/commands/fsserve.py
+fs/commands/fstree.py
+fs/commands/runner.py
+fs/contrib/__init__.py
+fs/contrib/archivefs.py
+fs/contrib/sqlitefs.py
+fs/contrib/bigfs/__init__.py
+fs/contrib/bigfs/subrangefile.py
+fs/contrib/davfs/__init__.py
+fs/contrib/davfs/util.py
+fs/contrib/davfs/xmlobj.py
+fs/contrib/tahoelafs/__init__.py
+fs/contrib/tahoelafs/connection.py
+fs/contrib/tahoelafs/test_tahoelafs.py
+fs/contrib/tahoelafs/util.py
+fs/expose/__init__.py
+fs/expose/django_storage.py
+fs/expose/ftp.py
+fs/expose/http.py
+fs/expose/importhook.py
+fs/expose/sftp.py
+fs/expose/xmlrpc.py
+fs/expose/dokan/__init__.py
+fs/expose/dokan/libdokan.py
+fs/expose/fuse/__init__.py
+fs/expose/fuse/fuse.py
+fs/expose/fuse/fuse3.py
+fs/expose/fuse/fuse_ctypes.py
+fs/expose/wsgi/__init__.py
+fs/expose/wsgi/dirtemplate.py
+fs/expose/wsgi/serve_home.py
+fs/expose/wsgi/wsgi.py
+fs/osfs/__init__.py
+fs/osfs/watch.py
+fs/osfs/watch_inotify.py
+fs/osfs/watch_win32.py
+fs/osfs/xattrs.py
+fs/tests/__init__.py
+fs/tests/test_archivefs.py
+fs/tests/test_errors.py
+fs/tests/test_expose.py
+fs/tests/test_fs.py
+fs/tests/test_ftpfs.py
+fs/tests/test_importhook.py
+fs/tests/test_iotools.py
+fs/tests/test_mountfs.py
+fs/tests/test_multifs.py
+fs/tests/test_opener.py
+fs/tests/test_path.py
+fs/tests/test_remote.py
+fs/tests/test_rpcfs.py
+fs/tests/test_s3fs.py
+fs/tests/test_sqlitefs.py
+fs/tests/test_utils.py
+fs/tests/test_watch.py
+fs/tests/test_wrapfs.py
+fs/tests/test_xattr.py
+fs/tests/test_zipfs.py
+fs/tests/zipfs_binary_test.py
+fs/tests/data/UTF-8-demo.txt
+fs/wrapfs/__init__.py
+fs/wrapfs/debugfs.py
+fs/wrapfs/hidedotfilesfs.py
+fs/wrapfs/hidefs.py
+fs/wrapfs/lazyfs.py
+fs/wrapfs/limitsizefs.py
+fs/wrapfs/readonlyfs.py
+fs/wrapfs/subfs.py
\ No newline at end of file
diff --git a/fs.egg-info/dependency_links.txt b/fs.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/fs.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/fs.egg-info/entry_points.txt b/fs.egg-info/entry_points.txt
new file mode 100644
index 0000000..935283d
--- /dev/null
+++ b/fs.egg-info/entry_points.txt
@@ -0,0 +1,12 @@
+[console_scripts]
+fscat = fs.commands.fscat:run
+fscp = fs.commands.fscp:run
+fsinfo = fs.commands.fsinfo:run
+fsls = fs.commands.fsls:run
+fsmkdir = fs.commands.fsmkdir:run
+fsmount = fs.commands.fsmount:run
+fsmv = fs.commands.fsmv:run
+fsrm = fs.commands.fsrm:run
+fsserve = fs.commands.fsserve:run
+fstree = fs.commands.fstree:run
+
diff --git a/fs.egg-info/pbr.json b/fs.egg-info/pbr.json
new file mode 100644
index 0000000..167f121
--- /dev/null
+++ b/fs.egg-info/pbr.json
@@ -0,0 +1 @@
+{"is_release": false, "git_version": "d685855"}
\ No newline at end of file
diff --git a/fs.egg-info/requires.txt b/fs.egg-info/requires.txt
new file mode 100644
index 0000000..65223c1
--- /dev/null
+++ b/fs.egg-info/requires.txt
@@ -0,0 +1,2 @@
+setuptools
+six
diff --git a/fs.egg-info/top_level.txt b/fs.egg-info/top_level.txt
new file mode 100644
index 0000000..48e49e8
--- /dev/null
+++ b/fs.egg-info/top_level.txt
@@ -0,0 +1 @@
+fs
diff --git a/fs.egg-info/version_info.json b/fs.egg-info/version_info.json
new file mode 100644
index 0000000..ae3737f
--- /dev/null
+++ b/fs.egg-info/version_info.json
@@ -0,0 +1,6 @@
+{
+    "release_date": null, 
+    "version": 0, 
+    "maintainer": "", 
+    "body": ""
+}
\ No newline at end of file
diff --git a/fs/__init__.py b/fs/__init__.py
index abd5fcc..f95b089 100644
--- a/fs/__init__.py
+++ b/fs/__init__.py
@@ -15,26 +15,23 @@ implementations of this interface such as:
 
 """
 
-__version__ = "0.4.0"
+__version__ = "0.5.4"
 __author__ = "Will McGugan (will at willmcgugan.com)"
 
-# No longer necessary - WM
-#from base import *
-
 #  provide these by default so people can use 'fs.path.basename' etc.
-import errors
-import path
+from fs import errors
+from fs import path
 
 _thread_synchronize_default = True
 def set_thread_synchronize_default(sync):
     """Sets the default thread synchronisation flag.
-    
+
     FS objects are made thread-safe through the use of a per-FS threading Lock
     object. Since this can introduce an small overhead it can be disabled with
     this function if the code is single-threaded.
-    
+
     :param sync: Set whether to use thread synchronisation for new FS objects
-    
+
     """
     global _thread_synchronization_default
     _thread_synchronization_default = sync
diff --git a/fs/appdirfs.py b/fs/appdirfs.py
index 913eac8..86d8082 100644
--- a/fs/appdirfs.py
+++ b/fs/appdirfs.py
@@ -6,8 +6,8 @@ A collection of filesystems that map to application specific locations.
 
 These classes abstract away the different requirements for user data across platforms,
 which vary in their conventions. They are all subclasses of :class:`fs.osfs.OSFS`,
-all that differs from `OSFS` is the constructor which detects the appropriate 
-location given the name of the application, author name and other parameters. 
+all that differs from `OSFS` is the constructor which detects the appropriate
+location given the name of the application, author name and other parameters.
 
 Uses `appdirs` (https://github.com/ActiveState/appdirs), written by Trent Mick and Sridhar Ratnakumar <trentm at gmail com; github at srid name>
 
@@ -21,6 +21,7 @@ __all__ = ['UserDataFS',
            'UserCacheFS',
            'UserLogFS']
 
+
 class UserDataFS(OSFS):
     """A filesystem for per-user application data."""
     def __init__(self, appname, appauthor=None, version=None, roaming=False, create=True):
@@ -30,10 +31,10 @@ class UserDataFS(OSFS):
         :param version: optional version string, if a unique location per version of the application is required
         :param roaming: if True, use a *roaming* profile on Windows, see http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx
         :param create: if True (the default) the directory will be created if it does not exist
-        
+
         """
         app_dirs = AppDirs(appname, appauthor, version, roaming)
-        super(self.__class__, self).__init__(app_dirs.user_data_dir, create=create)
+        super(UserDataFS, self).__init__(app_dirs.user_data_dir, create=create)
 
 
 class SiteDataFS(OSFS):
@@ -45,10 +46,10 @@ class SiteDataFS(OSFS):
         :param version: optional version string, if a unique location per version of the application is required
         :param roaming: if True, use a *roaming* profile on Windows, see http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx
         :param create: if True (the default) the directory will be created if it does not exist
-        
+
         """
         app_dirs = AppDirs(appname, appauthor, version, roaming)
-        super(self.__class__, self).__init__(app_dirs.site_data_dir, create=create)
+        super(SiteDataFS, self).__init__(app_dirs.site_data_dir, create=create)
 
 
 class UserCacheFS(OSFS):
@@ -60,10 +61,10 @@ class UserCacheFS(OSFS):
         :param version: optional version string, if a unique location per version of the application is required
         :param roaming: if True, use a *roaming* profile on Windows, see http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx
         :param create: if True (the default) the directory will be created if it does not exist
-        
+
         """
         app_dirs = AppDirs(appname, appauthor, version, roaming)
-        super(self.__class__, self).__init__(app_dirs.user_cache_dir, create=create)
+        super(UserCacheFS, self).__init__(app_dirs.user_cache_dir, create=create)
 
 
 class UserLogFS(OSFS):
@@ -75,13 +76,14 @@ class UserLogFS(OSFS):
         :param version: optional version string, if a unique location per version of the application is required
         :param roaming: if True, use a *roaming* profile on Windows, see http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx
         :param create: if True (the default) the directory will be created if it does not exist
-        
+
         """
         app_dirs = AppDirs(appname, appauthor, version, roaming)
-        super(self.__class__, self).__init__(app_dirs.user_log_dir, create=create)
+        super(UserLogFS, self).__init__(app_dirs.user_log_dir, create=create)
+
 
 if __name__ == "__main__":
-    udfs = UserDataFS('sexytime', appauthor='pyfs')
+    udfs = UserDataFS('exampleapp', appauthor='pyfs')
     print udfs
-    udfs2 = UserDataFS('sexytime2', appauthor='pyfs', create=False)
+    udfs2 = UserDataFS('exampleapp2', appauthor='pyfs', create=False)
     print udfs2
diff --git a/fs/appdirs.py b/fs/appdirs.py
index 94c592f..b83c7ab 100644
--- a/fs/appdirs.py
+++ b/fs/appdirs.py
@@ -319,7 +319,6 @@ if sys.platform == "win32":
         _get_win_folder = _get_win_folder_with_pywin32
     except ImportError:
         try:
-            import ctypes
             _get_win_folder = _get_win_folder_with_ctypes
         except ImportError:
             _get_win_folder = _get_win_folder_from_registry
diff --git a/fs/base.py b/fs/base.py
index 9b4a0fa..8785bb7 100644
--- a/fs/base.py
+++ b/fs/base.py
@@ -12,6 +12,8 @@ For more information regarding implementing a working PyFilesystem interface, se
 
 """
 
+from __future__ import with_statement
+
 __all__ = ['DummyLock',
            'silence_fserrors',
            'NullFile',
@@ -26,6 +28,7 @@ import shutil
 import fnmatch
 import datetime
 import time
+import errno
 try:
     import threading
 except ImportError:
@@ -35,6 +38,10 @@ from fs.path import *
 from fs.errors import *
 from fs.local_functools import wraps
 
+import six
+from six import b
+
+
 class DummyLock(object):
     """A dummy lock object that doesn't do anything.
 
@@ -42,7 +49,7 @@ class DummyLock(object):
     directly use the Lock class from the dummy_threading module, since
     it attempts to sanity-check the sequence of acquire/release calls
     in a way that breaks when real threading is available.
-    
+
     """
 
     def acquire(self, blocking=1):
@@ -54,9 +61,9 @@ class DummyLock(object):
         pass
 
     def __enter__(self):
-        pass
+        return self
 
-    def __exit__(self, *args):
+    def __exit__(self, exc_type, exc_value, traceback):
         pass
 
 
@@ -106,13 +113,13 @@ class NullFile(object):
         raise StopIteration
 
     def readline(self, *args, **kwargs):
-        return ""
+        return b("")
 
     def close(self):
         self.closed = True
 
     def read(self, size=None):
-        return ""
+        return b("")
 
     def seek(self, *args, **kwargs):
         pass
@@ -150,16 +157,16 @@ class FS(object):
 
     _meta = {}
 
-    def __init__(self, thread_synchronize=False):
+    def __init__(self, thread_synchronize=True):
         """The base class for Filesystem objects.
 
         :param thread_synconize: If True, a lock object will be created for the object, otherwise a dummy lock will be used.
         :type thread_synchronize: bool
-        
+
         """
 
-        super(FS, self).__init__()
         self.closed = False
+        super(FS, self).__init__()
         self.thread_synchronize = thread_synchronize
         if thread_synchronize:
             self._lock = threading.RLock()
@@ -168,7 +175,10 @@ class FS(object):
 
     def __del__(self):
         if not getattr(self, 'closed', True):
-            self.close()
+            try:
+                self.close()
+            except:
+                pass
 
     def __enter__(self):
         return self
@@ -196,7 +206,7 @@ class FS(object):
         the filesystem object is garbage collected, but it is good practice
         to call it explicitly so that any attached resourced are freed when they
         are no longer required.
-        
+
         """
         self.closed = True
 
@@ -227,33 +237,34 @@ class FS(object):
 
         Meta values are a way for an FS implementation to report potentially
         useful information associated with the file system.
-        
+
         A meta key is a lower case string with no spaces. Meta keys may also
-        be grouped in namespaces in a dotted notation, e.g. 'atomic.namespaces'.                
+        be grouped in namespaces in a dotted notation, e.g. 'atomic.namespaces'.
         FS implementations aren't obliged to return any meta values, but the
         following are common:
-        
+
          * *read_only* True if the file system cannot be modified
          * *thread_safe* True if the implementation is thread safe
          * *network* True if the file system requires network access
          * *unicode_paths* True if the file system supports unicode paths
-         * *case_insensitive_paths* True if the file system ignores the case of paths        
+         * *case_insensitive_paths* True if the file system ignores the case of paths
          * *atomic.makedir* True if making a directory is an atomic operation
          * *atomic.rename* True if rename is an atomic operation, (and not implemented as a copy followed by a delete)
-         * *atomic.setcontents* True if the implementation supports setting the contents of a file as an atomic operation (without opening a file)        
-         * *free_space* The free space (in bytes) available on the file system   
+         * *atomic.setcontents* True if the implementation supports setting the contents of a file as an atomic operation (without opening a file)
+         * *free_space* The free space (in bytes) available on the file system
          * *total_space* The total space (in bytes) available on the file system
          * *virtual* True if the filesystem defers to other filesystems
-        
+         * *invalid_path_chars* A string containing characters that may not be used in paths
+
         FS implementations may expose non-generic meta data through a self-named namespace. e.g. ``"somefs.some_meta"``
-        
+
         Since no meta value is guaranteed to exist, it is advisable to always supply a
... 19048 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-fs.git



More information about the Python-modules-commits mailing list