Skip to content

Commit

Permalink
Fix documentation issues for release v2.4.12 (#434)
Browse files Browse the repository at this point in the history
* Fix missing `unittest` import in documentation example
* Fix description in docstring of `Mode.to_platform_bin`
* Update `CHANGELOG.md` with fixes and typo correction
  • Loading branch information
althonos committed Oct 13, 2020
1 parent a2aa9f1 commit 9a8f94a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Start testing on PyPy. Due to [#342](https://github.com/PyFilesystem/pyfilesystem2/issues/342)
we have to treat PyPy builds specially and allow them to fail, but at least we'll
be able to see if we break something aside from known issues with FTP tests.
- Include docs in source distributions as well the whole tests folder,
- Include docs in source distributions as well as the whole tests folder,
ensuring `conftest.py` is present, fixes [#364](https://github.com/PyFilesystem/pyfilesystem2/issues/364).
- Stop patching copy with Python 3.8+ because it already uses sendfile.
- Stop patching copy with Python 3.8+ because it already uses `sendfile`.

### Fixed

- Fixed crash when CPython's -OO flag is used
- Fixed error when parsing timestamps from a FTP directory served from a WindowsNT FTP Server, fixes [#395](https://github.com/PyFilesystem/pyfilesystem2/issues/395).
- Fixed documentation of `Mode.to_platform_bin`. Closes [#382](https://github.com/PyFilesystem/pyfilesystem2/issues/382).
- Fixed the code example in the "Testing Filesystems" section of the
"Implementing Filesystems" guide. Closes [#407](https://github.com/PyFilesystem/pyfilesystem2/issues/407).

## [2.4.11] - 2019-09-07

Expand Down
3 changes: 2 additions & 1 deletion docs/source/implementers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ To test your implementation, you can borrow the test suite used to test the buil

Here's the simplest possible example to test a filesystem class called ``MyFS``::

import unittest
from fs.test import FSTestCases

class TestMyFS(FSTestCases):
class TestMyFS(FSTestCases, unittest.TestCase):

def make_fs(self):
# Return an instance of your FS object here
Expand Down
3 changes: 1 addition & 2 deletions fs/mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ def to_platform_bin(self):
# type: () -> Text
"""Get a *binary* mode string for the current platform.
Currently, this just removes the 'x' on PY2 because PY2 doesn't
support exclusive mode.
This removes the 't' and adds a 'b' if needed.
"""
_mode = self.to_platform().replace("t", "")
Expand Down

0 comments on commit 9a8f94a

Please sign in to comment.