[issue1514420] Traceback display code can attempt to open a file named stdin

2014-04-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: The problem is not in the import, but when displaying the traceback of the exception. In other words, if you catch the exception, no attempt to open stdin happens: $ strace -e open ./python [...] Python 3.5.0a0 (default:3417a95df7e2, Apr 16 2014, 17:57:12)

[issue1514420] Traceback display code can attempt to open a file named stdin

2014-04-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Also, by construction it will only happen if the import happens under the interpreter prompt (hence the stdin filename). I honestly don't think this deserves introducing some complication, only to avoid a couple filesystem accesses. --