summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwillmcgugan@gmail.com <willmcgugan@gmail.com@67cdc799-7952-0410-af00-57a81ceafa0f>2014-03-14 18:01:33 +0000
committerwillmcgugan@gmail.com <willmcgugan@gmail.com@67cdc799-7952-0410-af00-57a81ceafa0f>2014-03-14 18:01:33 +0000
commit058e82519a62d19b02aee9bf36a8f25afd993e89 (patch)
tree5c931446eb4b51c4366b2a88033ed35d33311b4e
parent6c4e125931824947c34527c07ff15a87f1e4c90a (diff)
downloadpyfilesystem-058e82519a62d19b02aee9bf36a8f25afd993e89.tar.gz
doc tweaks
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@891 67cdc799-7952-0410-af00-57a81ceafa0f
-rw-r--r--docs/browsewin.rst3
-rw-r--r--docs/index.rst2
-rw-r--r--docs/releasenotes.rst20
3 files changed, 24 insertions, 1 deletions
diff --git a/docs/browsewin.rst b/docs/browsewin.rst
index 30f7e0e..9c033f0 100644
--- a/docs/browsewin.rst
+++ b/docs/browsewin.rst
@@ -1,2 +1,5 @@
+fs.browsewin
+============
+
.. automodule:: fs.browsewin
:members: \ No newline at end of file
diff --git a/docs/index.rst b/docs/index.rst
index d5bcaaf..ee9dc63 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -12,7 +12,7 @@ Guide
-----
.. toctree::
- :maxdepth: 3
+ :maxdepth: 2
introduction.rst
getting_started.rst
diff --git a/docs/releasenotes.rst b/docs/releasenotes.rst
new file mode 100644
index 0000000..f4f4514
--- /dev/null
+++ b/docs/releasenotes.rst
@@ -0,0 +1,20 @@
+Release Notes
+=============
+
+PyFilesystem has reached a point where the interface is relatively stable. The were some backwards incompatibilities introduced with version 0.5.0, due to Python 3 support.
+
+Changes from 0.5.0
+------------------
+
+Python 3.X support was added. The interface has remained much the same, but the ``open`` method now works like Python 3's builtin, which handles text encoding more elegantly. i.e. if you open a file in text mode, you get a stream that reads or writes unicode rather than binary strings.
+
+The new signature to the ``open`` method (and ``safeopen``) is as follows::
+
+ def open(self, path, mode='r', buffering=-1, encoding=None, errors=None, newline=None, line_buffering=False, **kwargs):
+
+In order to keep the same signature across both Python 2 and 3, PyFilesystems uses the ``io`` module from the standard library. Unfortunately this is only available from Python 2.6 onwards, so Python 2.5 support has been dropped. If you need Python 2.5 support, consider sticking to PyFilesystem 0.4.0.
+
+By default the new ``open`` method now returns a unicode text stream, whereas 0.4.0 returned a binary file-like object. If you have code that runs on 0.4.0, you will probably want to either modify your code to work with unicode or explicitly open files in binary mode. The later is as simple as changing the mode from "r" to "rb" (or "w" to "wb"), but if you were working with unicode, the new text streams will likely save you a few lines of code.
+
+The ``setcontents`` and ``getcontents`` methods have also grown a few parameters in order to work with text files. So you won't require an extra encode / decode step for text files.
+