[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-12-11 Thread STINNER Victor
STINNER Victor added the comment: The new test is unstable: see bpo-35458. -- nosy: +vstinner ___ Python tracker ___ ___ Python-bug

[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-09-25 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-09-25 Thread miss-islington
miss-islington added the comment: New changeset c8c0249c9e8f61ab7670119a5a5278354df27bbb by Miss Islington (bot) (Joe Pamer) in branch 'master': bpo-32557: allow shutil.disk_usage to take a file path on Windows also (GH-9372) https://github.com/python/cpython/commit/c8c0249c9e8f61ab7670119a5a

[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-09-20 Thread Joe Pamer
Joe Pamer added the comment: Awesome - thanks, Steve - this is all super helpful! If you're cool with it I'd like to stick to using _dirnameW for now, and then follow up with another set of PRs for the fixes you've recommended. -- ___ Python track

[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-09-19 Thread Steve Dower
Steve Dower added the comment: (Excuse the GitHub syntax - was about to post it there, but it got long enough to belong here) Regarding the `_dirnameW` discussion, fixing `_dirname` would be ideal, but that is bloating out your PR quite a bit :) The "right" function to use there is [PathCc

[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-09-19 Thread Joe Pamer
Joe Pamer added the comment: Just to loop back, I updated the PR to avoid MAX_PATH and only allocate in the "not a directory" case. Thanks for getting back to me so quickly! One question, though, is that it *does* seem like MAX_PATH is still referenced in several places in posixmodule.c. Is

[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-09-18 Thread Joe Pamer
Joe Pamer added the comment: Got it - thanks! That sounds good to me, so I'll take a look at how other functions are working around MAX_PATH and update the diff to also avoid the copy when possible. -- ___ Python tracker

[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-09-17 Thread Steve Dower
Steve Dower added the comment: I took a quick look at the patch and the main issue I see is the use of the MAX_PATH constant. We encourage people to disable this limit where possible, so using dynamic allocation where we need to reduce the path will be a better way to avoid this function bre

[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-09-17 Thread Joe Pamer
Joe Pamer added the comment: Hi! I decided to try fixing this one as a way to get acquainted with the code base. I went ahead and updated the backing NT C function, but please let me know if you'd prefer I update disk_usage as proposed. Thanks! -- nosy: +jopamer __

[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-09-17 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +8795 stage: needs patch -> patch review ___ Python tracker ___ ___ Pyt

[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-06-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: +1 -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-01-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Seems sensible to me. -- nosy: +terry.reedy title: allow shutil.disk_usage to take a file path -> allow shutil.disk_usage to take a file path on Windows also ___ Python tracker

[issue32557] allow shutil.disk_usage to take a file path

2018-01-15 Thread Eryk Sun
New submission from Eryk Sun : Issue 26330 was resolved by documenting that shutil.disk_usage requires a directory. However, the shutil module is in a position to harmonize cross-platform behavior in ways that aren't normally possible or recommended in the low-level os module. To that end, the