[issue22831] Use "with" to avoid possible fd leaks

2020-01-27 Thread CRYSTAL
Change by CRYSTAL : -- components: +Build nosy: +Hinsonlcrystal -Arfrever, berker.peksag, dstufft, eric.araujo, ezio.melotti, martin.panter, python-dev, rhettinger, serhiy.storchaka, vstinner type: resource usage -> security versions: +Python 3.9

[issue22831] Use "with" to avoid possible fd leaks

2019-03-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue22831] Use "with" to avoid possible fd leaks

2019-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 172bb39452ae8b3ccdf5d1f23ead46f44200cd49 by Serhiy Storchaka in branch 'master': bpo-22831: Use "with" to avoid possible fd leaks in tools (part 2). (GH-10927) https://github.com/python/cpython/commit/172bb39452ae8b3ccdf5d1f23ead46f44200cd49

[issue22831] Use "with" to avoid possible fd leaks

2019-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset afbb7a371fb44edc731344eab5b474ad8f7b57d7 by Serhiy Storchaka in branch 'master': bpo-22831: Use "with" to avoid possible fd leaks in tools (part 1). (GH-10926) https://github.com/python/cpython/commit/afbb7a371fb44edc731344eab5b474ad8f7b57d7

[issue22831] Use "with" to avoid possible fd leaks

2019-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5b10b9824780b2181158902067912ee9e7b04657 by Serhiy Storchaka in branch 'master': bpo-22831: Use "with" to avoid possible fd leaks in tests (part 2). (GH-10929) https://github.com/python/cpython/commit/5b10b9824780b2181158902067912ee9e7b04657

[issue22831] Use "with" to avoid possible fd leaks

2019-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 9e4861f52349011cd5916eef8e8344575e8ac426 by Serhiy Storchaka in branch 'master': bpo-22831: Use "with" to avoid possible fd leaks in tests (part 1). (GH-10928) https://github.com/python/cpython/commit/9e4861f52349011cd5916eef8e8344575e8ac426

[issue22831] Use "with" to avoid possible fd leaks

2018-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c5d5dfdb223efb0e668e3f317d31b8b70ae96aa6 by Serhiy Storchaka in branch 'master': bpo-22831: Use "with" to avoid possible fd leaks in distutils. (GH-10921) https://github.com/python/cpython/commit/c5d5dfdb223efb0e668e3f317d31b8b70ae96aa6

[issue22831] Use "with" to avoid possible fd leaks

2018-12-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Éric, could you please take a look at PR 10921? -- ___ Python tracker ___ ___ Python-bugs-list

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: self.addCleanup(f.close) can not be used if the same file should be opened several times in the test. It can not be used also if the file is deleted in the test or in tearDown(). -- ___ Python tracker

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -10171, 10173, 10174, 10176, 10177, 10180 ___ Python tracker ___ ___

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -10171, 10173, 10174, 10176, 10177, 10179, 10180 ___ Python tracker ___ ___

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -10170, 10171, 10173, 10174 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -10171, 10173, 10174, 10176, 10180 ___ Python tracker ___ ___ Python-bugs-list

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -10171, 10173, 10174, 10180 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -10170, 10171, 10174 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -10170 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -10170, 10171 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 10926 is based on fd_leaks_tools1_2.patch. PR 10927 is based on fd_leaks_tools2_2.patch. PR 10928 is based on fd_leaks_tests1_2.patch. PR 10929 is based on fd_leaks_tests2_2.patch. Some of changes in these patches were already applied in other issues.

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10177, 10178, 10179, 10180 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -10160 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10177, 10178, 10179 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10175, 10176 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10177, 10178 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10171, 10172, 10173, 10174 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10171, 10172 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10173, 10175 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10169, 10170, 10171 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10175, 10176, 10177 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10172, 10174 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10169, 10170 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10169 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +dstufft, eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 10921 is based on fd_leaks_distutils.patch. -- versions: +Python 3.8 -Python 3.5 ___ Python tracker ___

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10159, 10160 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22831] Use "with" to avoid possible fd leaks

2018-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +10159 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22831] Use "with" to avoid possible fd leaks

2016-01-05 Thread Martin Panter
Martin Panter added the comment: I had another look at the five patches you mentioned. I made a couple review comments about expanding the scope of some “with” statements. There are a couple changes that add explicit file closing, where it was previously up to the garbage collector. I.e. code

[issue22831] Use "with" to avoid possible fd leaks

2016-01-02 Thread Ezio Melotti
Ezio Melotti added the comment: Serhiy, what's the status of this? -- ___ Python tracker ___ ___

[issue22831] Use "with" to avoid possible fd leaks

2016-01-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Only the most important patch for the stdlib was committed. Patches for distutils, tests and tools are not committed still. fd_leaks_distutils.patch fd_leaks_tools1_2.patch fd_leaks_tools2_2.patch fd_leaks_tests1_2.patch fd_leaks_tests2_2.patch --

[issue22831] Use with to avoid possible fd leaks

2015-04-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset ea94f6c87f5d by Serhiy Storchaka in branch 'default': Issue #22831: Use with to avoid possible fd leaks. https://hg.python.org/cpython/rev/ea94f6c87f5d -- nosy: +python-dev ___ Python tracker

[issue22831] Use with to avoid possible fd leaks

2015-03-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I forgot to publish my comments. I dropped the changes for treesync.py because treesync.py is not work with Python 3. I have written separate patch for it and will open separate issue after writing tests. --

[issue22831] Use with to avoid possible fd leaks

2015-03-22 Thread Martin Panter
Martin Panter added the comment: The new fd_leaks_tools1_2.patch seems to have dropped the changes for Tools/scripts/treesync.py, compared to the previous fd_leaks_tools1.patch. -- ___ Python tracker rep...@bugs.python.org

[issue22831] Use with to avoid possible fd leaks

2015-03-20 Thread STINNER Victor
STINNER Victor added the comment: fd_leaks.diff is impossible to review, even Rietveld gave up, it's too big :-p Could you please your patch into smaller patches? Split by directory for example. -- nosy: +haypo ___ Python tracker

[issue22831] Use with to avoid possible fd leaks

2015-03-20 Thread Martin Panter
Martin Panter added the comment: Posting a version of Serhiy’s patch made with “hg diff -p --ignore-all-space”. It is a bit shorter, and should not include all the re-indented lines, which may help reviewing. -- Added file:

[issue22831] Use with to avoid possible fd leaks

2015-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are updated patches with fixed mistakes found by Martin. While many of the changes look worthwhile, I do worry that some of them will never be tested (at least until say Python 3.14 or something). E.g. I just tried running Tools/scripts/dutree.py cos

[issue22831] Use with to avoid possible fd leaks

2015-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: п'ятниця, 20-бер-2015 12:36:25 ви написали: Martin Panter added the comment: There were a couple mistakes I found; see Reitveld. I was going to say to leave the open(mode=r) parameter as it is, since an explicit r is more readable, but since you already

[issue22831] Use with to avoid possible fd leaks

2015-03-20 Thread Martin Panter
Martin Panter added the comment: There were a couple mistakes I found; see Reitveld. I was going to say to leave the open(mode=r) parameter as it is, since an explicit r is more readable, but since you already took some out, I’m not going to complain. While many of the changes look

[issue22831] Use with to avoid possible fd leaks

2015-03-19 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22831 ___ ___ Python-bugs-list

[issue22831] Use with to avoid possible fd leaks

2015-03-19 Thread Berker Peksag
Berker Peksag added the comment: Looks good. A couple of comments: * Doc/includes/email-* changes have already been committed. * There is a commented-out line in Tools/scripts/nm2def.py: -f.close() +# f.close() * The patch is huge, I'd commit Tools/ and Lib/test/ parts

[issue22831] Use with to avoid possible fd leaks

2015-03-02 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22831 ___ ___

[issue22831] Use with to avoid possible fd leaks

2014-11-13 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22831 ___

[issue22831] Use with to avoid possible fd leaks

2014-11-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is large patch which convert a code which potentially can leak file descriptor to use the with statement so files are always closed. This can make effect mainly on alternative Python implementation without reference counting. But even on CPython this