[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-23 Thread Hans Lawrenz
New submission from Hans Lawrenz: Inside a virtualbox vm, calling tempfile.TemporaryFile(dir=foo) where foo is a directory which resides on a volume mounted from the host OS, a FileNotFoundError exception is thrown. In the following code sample, the second block will print "Path 2: ERRO

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-23 Thread Hans Lawrenz
Hans Lawrenz added the comment: Host OS: Mac OS 10.11.1 Guest OS: Ubuntu Trusty 64 Virtualbox: 4.3.30 Vagrant: 1.7.4 Example with trace thrown: vagrant@vagrant-ubuntu-trusty-64:/vagrant$ cat tt.py import tempfile with tempfile.TemporaryFile(dir="/vagrant") as tf: tf.writ

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-24 Thread Hans Lawrenz
Hans Lawrenz added the comment: Unfortunately changing the tempfile call isn't an easy option for me. The situation in which I'm encountering the error is running tox on our project which is mounted in the /vagrant directory in the VM (this is standard for vagrant). Tox makes it

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-24 Thread Hans Lawrenz
Hans Lawrenz added the comment: Serhiy and Emanuel, I'll paste below the surrounding code and attach the exact tempfile.py. It is the version distributed with the 3.5.0 release. If you take a look at the github repo I linked in the first comment you can also try it out for yourself if y

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-24 Thread Hans Lawrenz
Hans Lawrenz added the comment: The file system causing the problem is of type vboxsf which is the Virtualbox shared folder file system type. -- ___ Python tracker <http://bugs.python.org/issue25

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-24 Thread Hans Lawrenz
Hans Lawrenz added the comment: Emanuel, sorry, I missed the request for sys.version earlier. The tempfile.py I attached earlier is from the python 3.5 pulled from a ppa. I wouldn't be surprised if it has some patches applied by debian/ubuntu. To be clear though the problem also pre

[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-25 Thread Hans Lawrenz
Hans Lawrenz added the comment: Martin, I applied your patch and it proved your hypothesis. See below for how I tested. I also updated the github repo for others to reproduce if they wish. cd wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz mkdir ~/dist cd ~/dist tar xJf

[issue26796] BaseEventLoop.run_in_executor shouldn't specify max_workers for default Executor

2016-04-18 Thread Hans Lawrenz
New submission from Hans Lawrenz: In issue 21527 <http://bugs.python.org/issue21527> the concurrent.futures.ThreadPoolExecutor was changed to have a default value for max_workers. When asyncio.base_events.BaseEventLoop.run_in_executor creates a default ThreadPoolExecutor it specifies a

[issue26796] BaseEventLoop.run_in_executor shouldn't specify max_workers for default Executor

2016-04-18 Thread Hans Lawrenz
Hans Lawrenz added the comment: Thanks, that makes sense. I've attached a patch with a version check. -- Added file: http://bugs.python.org/file42507/run_in_executor_max_workers_vcheck.patch ___ Python tracker <http://bugs.python.org/is

[issue26796] BaseEventLoop.run_in_executor shouldn't specify max_workers for default Executor

2016-04-18 Thread Hans Lawrenz
Hans Lawrenz added the comment: New patch attached. Includes comments and a note in the documentation. The documentation note is inside a versionchanged:: 3.5 block. Should this be more specific about the version it changed in? It could be confusing for someone using a version of 3.5 that