[New-bugs-announce] [issue42796] tempfile doesn't seem to play nicely with os.chdir on Windows

Gabriele Tornetta report at bugs.python.org
Thu Dec 31 10:44:22 EST 2020


New submission from Gabriele Tornetta <phoenix1987 at gmail.com>:

The following script causes havoc on Windows while it works as expected on  Linux

~~~ python
import os
import tempfile


def test_chdir():
    with tempfile.TemporaryDirectory() as tempdir:
        os.chdir(tempdir)
~~~

Running the above on Windows results in RecursionError: maximum recursion depth exceeded while calling a Python object (see attachment for the full stacktrace).

----------
components: Library (Lib)
files: tempfile_st.txt
messages: 384125
nosy: Gabriele Tornetta
priority: normal
severity: normal
status: open
title: tempfile doesn't seem to play nicely with os.chdir on Windows
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file49712/tempfile_st.txt

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42796>
_______________________________________


More information about the New-bugs-announce mailing list