bpo-25625: add contextlib.chdir by FFY00 · Pull Request #28271 · python/cpython
This is probably the single snippet of code I find myself re-implementing the most in projects. Not being thread safe is not optimal, but there isn't really any good way to do so, and that does not negate the huge usefulness of this function. Signed-off-by: Filipe Laíns <lains@riseup.net>
tiran
mentioned this pull request
jcfr added a commit to jcfr/Slicer that referenced this pull request
This commit implements a non thread-safe context manager to change the current working directory. Available in Python 3.11 as ``contextlib.chdir`` and adapted from python/cpython#28271.
jcfr
mentioned this pull request
jcfr added a commit to Slicer/Slicer that referenced this pull request
This commit implements a non thread-safe context manager to change the current working directory. Available in Python 3.11 as ``contextlib.chdir`` and adapted from python/cpython#28271.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters