Skip to content

Commit 9a8f94a

Browse files
authored
Fix documentation issues for release v2.4.12 (#434)
* Fix missing `unittest` import in documentation example * Fix description in docstring of `Mode.to_platform_bin` * Update `CHANGELOG.md` with fixes and typo correction
1 parent a2aa9f1 commit 9a8f94a

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1212
- Start testing on PyPy. Due to [#342](https://github.com/PyFilesystem/pyfilesystem2/issues/342)
1313
we have to treat PyPy builds specially and allow them to fail, but at least we'll
1414
be able to see if we break something aside from known issues with FTP tests.
15-
- Include docs in source distributions as well the whole tests folder,
15+
- Include docs in source distributions as well as the whole tests folder,
1616
ensuring `conftest.py` is present, fixes [#364](https://github.com/PyFilesystem/pyfilesystem2/issues/364).
17-
- Stop patching copy with Python 3.8+ because it already uses sendfile.
17+
- Stop patching copy with Python 3.8+ because it already uses `sendfile`.
18+
19+
### Fixed
20+
1821
- Fixed crash when CPython's -OO flag is used
1922
- Fixed error when parsing timestamps from a FTP directory served from a WindowsNT FTP Server, fixes [#395](https://github.com/PyFilesystem/pyfilesystem2/issues/395).
23+
- Fixed documentation of `Mode.to_platform_bin`. Closes [#382](https://github.com/PyFilesystem/pyfilesystem2/issues/382).
24+
- Fixed the code example in the "Testing Filesystems" section of the
25+
"Implementing Filesystems" guide. Closes [#407](https://github.com/PyFilesystem/pyfilesystem2/issues/407).
2026

2127
## [2.4.11] - 2019-09-07
2228

docs/source/implementers.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ To test your implementation, you can borrow the test suite used to test the buil
4040

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

43+
import unittest
4344
from fs.test import FSTestCases
4445

45-
class TestMyFS(FSTestCases):
46+
class TestMyFS(FSTestCases, unittest.TestCase):
4647

4748
def make_fs(self):
4849
# Return an instance of your FS object here

fs/mode.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ def to_platform_bin(self):
8484
# type: () -> Text
8585
"""Get a *binary* mode string for the current platform.
8686
87-
Currently, this just removes the 'x' on PY2 because PY2 doesn't
88-
support exclusive mode.
87+
This removes the 't' and adds a 'b' if needed.
8988
9089
"""
9190
_mode = self.to_platform().replace("t", "")

0 commit comments

Comments
 (0)