Jake Garver added the comment:

I agree.  I couldn't find a use for the check, so I removed it entirely in the 
provided patch.  I'm running that way now with success, but of course I'm 
covering just one use case.

Digging back a bit further, the isdir() check came in here:
https://github.com/python/cpython/commit/dc6a4c158f8a6175c7d0d5d1a61c24c06767ef22

And even further, near the beginning of time, we find the original check:
https://github.com/python/cpython/commit/995d45ede2432306a2a0306ce29cea4013bc2850

Speculation: In the context of the original code, "directory" in the error 
message makes more sense and that word should have been dropped when single 
file support was added.  However, given that we loop over the args, I don't see 
how -d was limited to a single arg.

With my patch in place, I tested compileall.py with multiple args and the -d.  
It works as expected and contains the -d path.
python -m compileall -d /runtime/path foo.py bar.py foobar.py

I'm happy to craft a new patch.  How would you like it?

----------
versions:  -Python 3.5, Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24903>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to