Skip to content

Commit 0df153a

Browse files
committed
Add a version note about the global pathlib Path problem
- it happens only up to Python 3.10 - see #943
1 parent 90505c8 commit 0df153a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/troubleshooting.rst

+4
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ regardless of the path they point to:
273273
Generally, mixing objects in the real filesystem and the fake filesystem
274274
is problematic and better avoided.
275275

276+
.. note:: This problem only happens in Python versions up to 3.10. In Python 3.11,
277+
`pathlib` has been restructured so that a pathlib path no longer contains a reference
278+
to the original filesystem accessor, and it can safely be used in the fake filesystem.
279+
276280

277281
.. _`multiprocessing`: https://docs.python.org/3/library/multiprocessing.html
278282
.. _`subprocess`: https://docs.python.org/3/library/subprocess.html

0 commit comments

Comments
 (0)