New submission from Y Ono <ono.ki...@gmail.com>:
``` import os from pathlib import Path os.chdir(Path(__file__).parent) print(Path(__file__).absolute()) ``` I put the code into a file in `/tmp/test.py`, and execute it from `/tmp/` directory like below. Then the output showed `/tmp/scripts/scripts/test.py`. ``` $ python scripts/test.py /tmp/scripts/scripts/test.py ``` After executing `os.chdir`, pathlib's path handling is completely broken. ---------- components: C API messages: 369410 nosy: Y Ono priority: normal severity: normal status: open title: pathlib.Path will be broken with os.chdir command. versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40693> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com