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 2010年10月30日 14:22 by bbrazil, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| distutils_fd_leak.patch | bbrazil, 2010年10月30日 14:22 | review | ||
| distutils_fd_leak_v2.patch | bbrazil, 2010年11月02日 19:29 | review | ||
| fix-popen.diff | eric.araujo, 2010年11月06日 14:10 | review | ||
| fix_pipe_close.diff | brian.curtin, 2010年11月06日 17:56 | |||
| Messages (16) | |||
|---|---|---|---|
| msg119988 - (view) | Author: Brian Brazil (bbrazil) * | Date: 2010年10月30日 14:22 | |
Please see attached. |
|||
| msg120155 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月01日 19:39 | |
Thanks for the patch, I’ll review it and commit it soon. |
|||
| msg120198 - (view) | Author: Brian Curtin (brian.curtin) * (Python committer) | Date: 2010年11月02日 01:01 | |
The patch shouldn't use context managers, as distutils claims to support 2.3. #10290 contains a similar patch which doesn't use 'with'. (Sorry to duplicate efforts here, forgot to search...) |
|||
| msg120249 - (view) | Author: Brian Brazil (bbrazil) * | Date: 2010年11月02日 19:29 | |
I don't see your patch on the other bug, so I've updated mine not to use with. |
|||
| msg120561 - (view) | Author: Eric V. Smith (eric.smith) * (Python committer) | Date: 2010年11月05日 23:59 | |
Is it really true that 3.x's distutils is source compatible with 2.3? For 3.x I'd like to see the with statement used. |
|||
| msg120567 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月06日 01:11 | |
Fixed in the py3k branch in r86223, r86224 and r86226. Thanks for the report and starting patch. Eric: This compatibility policy was instated because a newer version of distutils may be used/is often used to install distributions for older Pythons. In the 2.x line, this was enforced. I checked the current py3k code with the oldest version I have, 2.4, and it’s not entirely compatible. Python 3.x is developed as a clean break from 2.x (no versionchanged directives in docs, etc.), so what’s the status of the distutils compatibility policy? I think that the reasons are still valid, so keeping 2.x source compat in py3k is a nice thing to do for our users. Even if we’re working on distutils2 (which will have releases for 2.4-3.2), distutils is still widely used and we expect a long transition period. I can bring this up on python-dev if you think it’s needed. |
|||
| msg120569 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月06日 01:39 | |
(Not closing yet: Some calls of os.popen and subprocess.Popen are still to be fixed, and then there’s the backport.) |
|||
| msg120578 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月06日 04:07 | |
[Pp]open objects closed in r86234. All fixes ported to 3.1 in r86237, 2.7 in r86238. Cheers! |
|||
| msg120614 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月06日 14:10 | |
The tests don’t pass on a Windows buildbot (thanks Antoine): I was mistaken about subprocess.Popen, it has no close method like os.popen objects. Attached patch should fix it, can someone kindly review and/or test it? |
|||
| msg120631 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月06日 15:59 | |
Committed to py3k in r86274, after "LGTM" from Brian on IRC. Will backport if buildbots don’t scream at me. |
|||
| msg120644 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月06日 18:04 | |
Thanks for the patch. r86276 |
|||
| msg121072 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月12日 20:35 | |
Ported to 3.1 and 2.7 in r86433 and r86434. |
|||
| msg121085 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月12日 22:39 | |
No file object was created for stdin, so my patch was buggy. Fixed in r86438, r86439, r86440. Thanks to Antoine and Brian. |
|||
| msg121546 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2010年11月19日 16:13 | |
These constructs don’t generate warnings at present but should IMO use the with statement too:
./distutils/command/upload.py:128: open(filename+".asc").read())
./distutils/command/bdist_rpm.py:514: spec_file.extend(open(val, 'r').read().split('\n'))
./distutils/command/bdist_wininst.py:248: bitmapdata = open(bitmap, "rb").read()
./distutils/command/bdist_wininst.py:288: file.write(open(arcname, "rb").read())
./distutils/command/bdist_msi.py:399: f.write(open(self.pre_install_script).read())
|
|||
| msg134567 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年04月27日 14:37 | |
New changeset 85fefd41ef5d by Éric Araujo in branch '3.2': Fix double use of f.close(). http://hg.python.org/cpython/rev/85fefd41ef5d |
|||
| msg134961 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年05月02日 11:39 | |
New changeset c02c78d93a2e by Éric Araujo in branch '2.7': Fix double use of f.close(). http://hg.python.org/cpython/rev/c02c78d93a2e |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:08 | admin | set | github: 54461 |
| 2011年05月02日 11:39:07 | python-dev | set | messages: + msg134961 |
| 2011年04月27日 14:37:35 | python-dev | set | nosy:
+ python-dev messages: + msg134567 |
| 2010年11月19日 16:13:06 | eric.araujo | set | messages: + msg121546 |
| 2010年11月12日 22:39:13 | eric.araujo | set | messages: + msg121085 |
| 2010年11月12日 20:35:42 | eric.araujo | set | status: open -> closed resolution: fixed messages: + msg121072 stage: patch review -> resolved |
| 2010年11月06日 18:04:18 | eric.araujo | set | messages: + msg120644 |
| 2010年11月06日 17:56:22 | brian.curtin | set | files: + fix_pipe_close.diff |
| 2010年11月06日 15:59:54 | eric.araujo | set | messages: + msg120631 |
| 2010年11月06日 14:10:51 | eric.araujo | set | status: closed -> open resolution: fixed -> (no value) stage: resolved -> patch review |
| 2010年11月06日 14:10:27 | eric.araujo | set | files:
+ fix-popen.diff nosy: + pitrou messages: + msg120614 |
| 2010年11月06日 04:07:40 | eric.araujo | set | status: open -> closed versions: + Python 3.1, Python 2.7 messages: + msg120578 resolution: fixed stage: patch review -> resolved |
| 2010年11月06日 01:39:21 | eric.araujo | set | messages: + msg120569 |
| 2010年11月06日 01:11:11 | eric.araujo | set | nosy:
+ loewis messages: + msg120567 |
| 2010年11月05日 23:59:05 | eric.smith | set | nosy:
+ eric.smith messages: + msg120561 |
| 2010年11月02日 19:29:38 | bbrazil | set | files:
+ distutils_fd_leak_v2.patch messages: + msg120249 |
| 2010年11月02日 01:01:11 | brian.curtin | set | status: pending -> open nosy: + brian.curtin messages: + msg120198 |
| 2010年11月01日 19:39:46 | eric.araujo | set | status: open -> pending assignee: tarek -> eric.araujo messages: + msg120155 title: Fix resource warnings in distutil tests -> Fix resource warnings in distutils |
| 2010年10月30日 14:25:40 | pitrou | set | stage: patch review type: resource usage versions: + Python 3.2, - Python 3.3 |
| 2010年10月30日 14:22:52 | bbrazil | create | |