[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
Fabien Dubosson added the comment: > I'm going to close this issue. I was doing to do so, here was my message: > See shells sources. According to the manpage `pwd -L` just uses PWD from > environment. I looked directly at `pwd

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
Fabien Dubosson added the comment: > Most os functions are thin wrappers around system calls. There is no system > call that works as 'cd' without '-P'. I would like to believe in this, but then if `cd` is some bash internal, how does `/usr/bin/pwd -L` find it back? > Since yours is

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
Fabien Dubosson added the comment: Thanks for the additional information! > The 'cd' man page says that 'cd -P' should "perform actions equivalent to the > chdir() function". Just wondering, do you know what is the function called by `cd`/`cd -L` then? It doesn't seems to be

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
Fabien Dubosson added the comment: The previous example (sorry, first time using this platform, I'm a little bit messy here), shows that `os.chdir` resolves symlinks by default, as opposed to what `cd` does in bash. This means it is not possible to change the directory to a symlink folder

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
New submission from Fabien Dubosson: When using bash, the `cd` function does not follow symlinks by default, but `cd -P` does. The `os.chdir` function behaves like `cd -P` preventing to be able to change directory to a symlink folder. Initial setup (make a `/tmp/to/dst` symlink pointing

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
Changes by Fabien Dubosson <fabien.dubos...@gmail.com>: -- components: Interpreter Core nosy: StreakyCobra priority: normal severity: normal status: open title: os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks type: behavior versions: Pyth