This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jgarver
Recipients jgarver, r.david.murray
Date 2015-08-21.12:58:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1440161922.34.0.278764789275.issue24903@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2015-08-21 12:58:42jgarversetrecipients: + jgarver, r.david.murray
2015-08-21 12:58:42jgarversetmessageid: <1440161922.34.0.278764789275.issue24903@psf.upfronthosting.co.za>
2015-08-21 12:58:42jgarverlinkissue24903 messages
2015-08-21 12:58:41jgarvercreate