@@ -359,14 +359,14 @@ want to set this to ``False``.
359
359
360
360
use_known_patches
361
361
~~~~~~~~~~~~~~~~~
362
- If this is set to `` True `` (the default), `` pyfakefs `` patches some
363
- libraries that are known to not work out of the box, to be able to work with
364
- the fake filesystem. Currently, this includes patches for some `` pandas ``
365
- read methods like ``read_csv `` and `` read_excel `` - more may follow. This
366
- flag is there to allow to disable this functionality in case it causes any
367
- problems. It may be removed or replaced by a more fine-grained argument in
368
- future releases.
369
-
362
+ Some libraries are known to require patching in order to work with pyfakefs.
363
+ If `` use_known_patches `` is set to `` True `` ( the default), pyfakefs patches
364
+ these libraries so that they will work with the fake filesystem. Currently, this
365
+ includes patches for ``pandas `` read methods like `` read_csv `` and
366
+ `` read_excel ``--more may follow. Ordinarily, the default value of
367
+ `` use_known_patches `` should be used, but it is present to allow users to
368
+ disable this patching in case it causes any problems. It may be removed or
369
+ replaced by more fine-grained arguments in future releases.
370
370
371
371
Using convenience methods
372
372
-------------------------
@@ -604,9 +604,9 @@ reasons:
604
604
are more examples for patches that may be useful, we may add them in the
605
605
documentation.
606
606
- It uses C libraries to access the file system. There is no way no make
607
- such a module work with `` pyfakefs`` - if you want to use it, you have to
608
- patch the whole module. In some cases, a library implemented in Python with
609
- a similar interface already exists. An example is `` lxml`` ,
607
+ such a module work with `` pyfakefs`` -- if you want to use it, you
608
+ have to patch the whole module. In some cases, a library implemented in
609
+ Python with a similar interface already exists. An example is `` lxml`` ,
610
610
which can be substituted with `` ElementTree`` in most cases for testing.
611
611
612
612
A list of Python modules that are known to not work correctly with
@@ -618,10 +618,11 @@ A list of Python modules that are known to not work correctly with
618
618
- the `` Pillow`` image library does not work with pyfakefs at least if writing
619
619
JPEG files (see `this issue < https:// github.com/ jmcgeheeiv/ pyfakefs/ issues/ 529 > ` __)
620
620
- `` pandas`` (the Python data analysis library) uses its own internal file
621
- system access, written in C, and does therefore not work with pyfakefs out
622
- of the box. `` pyfakefs`` adds some patches so that many of the
623
- `` read_xxx`` functions will work with the fake system (including
624
- `` read_csv`` and `` read_excel`` ).
621
+ system access written in C. Thus much of `` pandas`` will not work with
622
+ `` pyfakefs`` . Having said that, `` pyfakefs`` patches `` pandas`` so that many
623
+ of the `` read_xxx`` functions, including `` read_csv`` and `` read_excel`` ,
624
+ as well as some writer functions, do work with the fake file system. If
625
+ you use only these functions, `` pyfakefs`` will work with `` pandas`` .
625
626
626
627
If you are not sure if a module can be handled, or how to do it, you can
627
628
always write a new issue, of course!
0 commit comments