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.
Created on 2011年06月29日 16:55 by giampaolo.rodola, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| diskusage.patch | giampaolo.rodola, 2011年06月29日 16:55 | review | ||
| diskusage2.patch | giampaolo.rodola, 2011年06月30日 09:31 | review | ||
| diskusage3.patch | giampaolo.rodola, 2011年07月01日 08:24 | review | ||
| Messages (13) | |||
|---|---|---|---|
| msg139439 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) | Date: 2011年06月29日 16:55 | |
Patch in attachment adds a new disk_usage() function to shutil module which retrieves total, used and free disk space given a certain path plus the percentage usage. See original discussion on python-ideas ml: http://mail.python.org/pipermail/python-ideas/2011-June/010480.htm |
|||
| msg139440 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) | Date: 2011年06月29日 17:02 | |
Typo. It's: http://mail.python.org/pipermail/python-ideas/2011-June/010480.html |
|||
| msg139468 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) | Date: 2011年06月30日 09:31 | |
New patch includes: - Py_BEGIN/END_ALLOW_THREADS around GetDiskFreeSpaceEx() call - use of assertGreaterEqual / assertLessEqual when testing the percentage usage - use of hasattr(shutil, 'disk_usage') for skipping the test - extended url reference in the comments |
|||
| msg139475 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2011年06月30日 13:10 | |
Why do you return a percentage? People can compute that themselves if they want to. |
|||
| msg139476 - (view) | Author: Brian Curtin (brian.curtin) * (Python committer) | Date: 2011年06月30日 13:15 | |
Agreed. I think we should pass on the raw data - how the user wants to format and present that is up to them. |
|||
| msg139553 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) | Date: 2011年07月01日 08:24 | |
Agreed. New patch removes the percentage and fixes computations on posix as recommended by Charles-François: free = st.f_bavail * st.f_bsize total = st.f_blocks * st.f_frsize used = (total - st.f_bfree * st.f_bsize) |
|||
| msg139569 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年07月01日 11:55 | |
New changeset 2fc102ebaf73 by Giampaolo Rodola' in branch 'default': Issue #12442: add shutil.disk_usage() http://hg.python.org/cpython/rev/2fc102ebaf73 |
|||
| msg139645 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年07月02日 13:21 | |
Looks like my message on Rietveld was not received or not read: http://bugs.python.org/review/12442/diff/2951/7664#newcode776 |
|||
| msg139651 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) | Date: 2011年07月02日 13:57 | |
I removed the percent usage from the returned namedtuple hence that comment is no longer necessary. |
|||
| msg139655 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年07月02日 14:30 | |
Ah, excellent! Thanks for the new function. About using assertGreater and friends in tests, as Ezio and I suggested, I have done the change in my working copy and will commit it later. |
|||
| msg139659 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年07月02日 14:47 | |
New changeset 479973c6aa03 by Éric Araujo in branch 'default': Clean up NEWS entry and tests for shutil.disk_usage (#12442) http://hg.python.org/cpython/rev/479973c6aa03 |
|||
| msg139660 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) | Date: 2011年07月02日 14:53 | |
Thanks for the further fixes. |
|||
| msg147374 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年11月09日 21:12 | |
New changeset bdb3f0e7e268 by Victor Stinner in branch 'default': Issue #12442: nt._getdiskusage() is now using the Windows Unicode API http://hg.python.org/cpython/rev/bdb3f0e7e268 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:19 | admin | set | github: 56651 |
| 2011年11月09日 21:12:40 | python-dev | set | messages: + msg147374 |
| 2011年07月03日 00:38:10 | r.david.murray | set | stage: commit review -> resolved |
| 2011年07月02日 14:53:53 | giampaolo.rodola | set | messages: + msg139660 |
| 2011年07月02日 14:47:40 | python-dev | set | messages: + msg139659 |
| 2011年07月02日 14:30:42 | eric.araujo | set | messages: + msg139655 |
| 2011年07月02日 13:57:43 | giampaolo.rodola | set | messages: + msg139651 |
| 2011年07月02日 13:21:33 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg139645 |
| 2011年07月01日 11:59:42 | giampaolo.rodola | set | status: open -> closed resolution: fixed stage: patch review -> commit review |
| 2011年07月01日 11:55:42 | python-dev | set | nosy:
+ python-dev messages: + msg139569 |
| 2011年07月01日 08:24:28 | giampaolo.rodola | set | files:
+ diskusage3.patch messages: + msg139553 |
| 2011年06月30日 13:15:13 | brian.curtin | set | messages: + msg139476 |
| 2011年06月30日 13:10:57 | pitrou | set | messages: + msg139475 |
| 2011年06月30日 09:31:48 | giampaolo.rodola | set | files:
+ diskusage2.patch messages: + msg139468 |
| 2011年06月29日 17:58:54 | ezio.melotti | set | nosy:
+ ezio.melotti |
| 2011年06月29日 17:02:52 | giampaolo.rodola | set | messages: + msg139440 |
| 2011年06月29日 17:02:00 | brian.curtin | set | nosy:
+ brian.curtin |
| 2011年06月29日 16:55:38 | giampaolo.rodola | create | |