The release versions are PyPi releases.
- added support for path-like objects as arguments in
create_file()
,create_dir()
,create_symlink()
,add_real_file()
andadd_real_directory()
(Python >= 3.6, see #409)
- moved tests into package
- use README.md in pypi (#358)
pathlib.Path.resolve()
behaved incorrectly if the path does not exist (#401)closed
attribute was not implemented in fake file (#380)add_real_directory
did not behave correctly for nested paths- the following functions did not behave correctly for paths ending with a
path separator (found by @agroce using tstl):
os.rename
(#400)os.link
(#399, #407)os.rmdir
(#398)os.mkdir
,os.makedirs
(#396)os.rename
(#391, #395, #396, #389, #406)os.symlink
(#371, #390)os.path.isdir
(#387)open
(#362, #369, #397)os.path.lexists
,os.path.islink
(#365, #373, #396)os.remove
(#360, #377, #396)os.stat
(#376)os.path.isfile
(#374)os.path.getsize
(#368)os.lstat
(#366)os.path.exists
(#364)os.readlink
(#359, #372, #392)
This is a bug fix only release.
- Missing cleanup after using dynamic patcher let to incorrect behavior of
tempfile
after test execution (regression, see #356) add_real_directory
does not work afterchdir
(see #355)
This version of pyfakefs does not support Python 2.6. Python 2.6 users must use pyfakefs 3.3 or earlier.
- Added possibility to map real files or directories to another path in the fake file system (see #347)
- Configuration of
Patcher
andTestCase
: - Added support for file descriptor path parameter in
os.scandir
(Python >= 3.7, Posix only) (see #346) - Added support to fake out backported
scandir
module (#332) IOError
/OSError
exception messages in the fake file system now always start with the message issued in the real file system in Unix systems (see #202)
- Changed API to be PEP-8 conform (#186). Note: The old API is still available.
- Removed Python 2.6 support (#293)
- Added usage documentation to GitHub Pages
- Added contributing guide
- Added flake8 tests to Travis CI
- Links in base path in
os.scandir
shall not be resolved (#350) - Fixed unit tests when run on a computer not having umask set to 0022
- Correctly handle newline parameter in
open()
for Python 3, added support for universal newline mode in Python 2 (#339) - Fixed handling of case-changing rename with symlink under MacOS (#322)
- Creating a file with a path ending with path separator did not raise (#320)
- Fixed more problems related to
flush
(#302, #300) - Correctly handle opening files more than once (#343)
- Fake
os.lstat()
crashed with several trailing path separators (#342) - Fixed handling of path components starting with a drive letter(#337)
- Symlinks to absolute paths were incorrectly resolved under Windows (#341)
- Unittest mock didn't work after setUpPyfakefs (#334)
os.path.split()
andos.path.dirname()
gave incorrect results under Windows (#335)
This is the last release that supports Python 2.6.
- The OS specific temp directory is now automatically created in
setUp()
(related to #191). Note that this may break test code that assumes that the fake file system is completely empty at test start. - Added possibility to reload modules and switch on dynamic loading of modules after setup (experimental, see #248)
- Added possibility to patch modules that import file system modules under
another name, for example
import os as '_os
(#231) - Added support for
dir_fd
argument in severalos
functions (#206) - Added support for open file descriptor as path argument in
os.utime
,os.chmod
,os.chdir
,os.chown
,os.listdir
,os.stat
andos.lstat
(Python >= 3.3) (#205) - Added support for basic modes in fake
os.open()
(#204) - Added fake
os.path.samefile
implementation (#193) - Added support for
ns
argument inos.utime()
(Python >= 3.3) (#192) - Added nanosecond time members in
os.stat_result
(Python >= 3.3) (#196)
- Added Travis CI tests for MacOSX (Python 2.7 and 3.6)
- Added Appveyor CI tests for Windows (Python 2.7, 3.3 and 3.6)
- Added auto-generated documentation for development version on GitHub Pages
- Removed most of
fake_filesystem_shutil
implementation, relying on the patchedos
module instead (#194) - Removed
fake_tempfile
andfake_filesystem_glob
, relying on the patchedos
module instead (#189, #191)
- Multiple fixes of bugs found using TSTL by @agroce (see about 100 issues
with the
TSTL
label)- several problems with buffer handling in high-level IO functions
- several problems with multiple handles on the same file
- several problems with low-level IO functions
- incorrect exception (
IOError
vsOSError
) raised in several cases - Fake
rename
did not behave likeos.rename
in many cases - Symlinks have not been considered or incorrectly handled in several functions
- A nonexistent file that has the same name as the content of the parent object was seen as existing
- Incorrect error handling during directory creation
- many fixes for OS-specific behavior
- Also patch modules that are loaded between
__init__()
andsetUp()
(#199) - Creating files in read-only directory was possible (#203)
- The
errors
argument is supported forio.open()
andos.open()
- New methods
add_real_file()
,add_real_directory()
andadd_real_paths()
make real files and directories appear within the fake file system. File contents are read from the real file system only as needed (#170). Seeexample_test.py
for a usage example. - Deprecated
TestCase.copyRealFile()
in favor ofadd_real_file()
.copyRealFile()
remains only for backward compatability. Also, some less-popular argument combinations have been disallowed. - Added this file you are reading,
CHANGES.md
, to the release manifest
- The
mox3
package is no longer a prerequisite--the portion required by pyfakefs has been integrated into pyfakefs (#182)
- Corrected the handling of byte/unicode paths in several functions (#187)
FakeShutilModule.rmtree()
failed for directories ending with path separator (#177)- Case was incorrectly handled for added Windows drives
pathlib.glob()
incorrectly handled case under MacOS (#167)- tox support was broken (#163)
- On Windows it was not possible to rename a file when only the case of the file name changed (#160)
- Added helper method
TestCase.copyRealFile()
to copy a file from the real file system to the fake file system. This makes it easy to use template, data and configuration files in your tests. - A pytest plugin is now installed with pyfakefs that exports the
fake filesystem as pytest fixture
fs
.
- Incorrect disk usage calculation if too large file created (#155)
- Support for path-like objects as arguments in fake
os
andos.path
modules (Python >= 3.6) - Some changes to make pyfakefs work with Python 3.6
- Added fake
pathlib
module (Python >= 3.4) (#29) - Support for
os.replace
(Python >= 3.3) os.access
,os.chmod
,os.chown
,os.stat
,os.utime
: support forfollow_symlinks
argument (Python >= 3.3)- Support for
os.scandir
(Python >= 3.5) (#119) - Option to not fake modules named
path
(#53) glob.glob
,glob.iglob
: support forrecursive
argument (Python >= 3.5) (#116)- Support for
glob.iglob
(#59)
shutil.move
incorrectly moves directories (#145)- Missing support for 'x' mode in
open
(Python >= 3.3) (#147) - Incorrect exception type in Posix if path ancestor is a file (#139)
- Exception handling when using
Patcher
with py.test (#135) - Fake
os.listdir
returned sorted instead of unsorted entries
io.open
,os.open
: support forencoding
argument (#120)os.makedirs
: support forexist_ok
argument (Python >= 3.2) (#98)- Support for fake
io.open()
(#70) - Support for mount points (#25)
- Support for hard links (#75)
- Support for float times (mtime, ctime)
- Windows support:
- support for alternative path separator
- support for case-insensitive filesystems (#69)
- support for drive letters and UNC paths
- Support for filesystem size (#86)
shutil.rmtree
: support forignore_errors
andonerror
arguments (#72)- Support for
os.fsync()
andos.fdatasync()
(#73) os.walk
: Support forfollowlinks
argument
shutil
functions likemake_archive
do not work with pyfakefs (#104)- File permissions on deletion not correctly handled (#27)
shutil.copy
error with bytes contents (#105)- mtime and ctime not updated on content changes
- Moved repository from GoogleCode to GitHub, merging 3 projects
- Added continuous integration testing with Travis CI
- Added usage documentation in project wiki
- Better support for pypi releases
- Added direct unit test support in
fake_filesystem_unittest
(transparently patches all calls to faked implementations) - Added support for doctests
- Added support for cygwin
- Better support for Python 3
os.utime
fails to traverse symlinks (#49)chown
incorrectly accepts non-integer uid/gid arguments (#30)- Reading from fake block devices doesn't work (#24)
fake_tempfile
is usingAddOpenFile
incorrectly (#23)- Incorrect behavior of
relpath
,abspath
andnormpath
on Windows. - Cygwin wasn't treated as Windows (#37)
- Python 3
open
in binary mode not working (#32) os.remove
doesn't work with relative paths (#31)mkstemp
returns no valid file descriptor (#19)open
methods lackIOError
for prohibited operations (#18)- Incorrectly resolved relative path (#3)
FakeFileOpen
keyword args do not match the__builtin__
equivalents (#5)- Relative paths not supported (#16, #17))
There are no release notes for releases 2.6 and below. The following versions are still available on PyPi: