Issue 27903: Avoid ResourceWarnings from platform._dist_try_harder (original) (raw)

Created on 2016-08-30 21:19 by nnnnnn, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
platform-resourcewarning.patch nnnnnn,2016-08-30 21:19 review
Pull Requests
URL Status Linked Edit
PR 10792 merged vstinner,2018-11-29 11:15
PR 10793 merged miss-islington,2018-11-29 11:31
Messages (9)
msg273969 - (view) Author: (nnnnnn) * Date: 2016-08-30 21:19
Use opened files as context managers.
msg326338 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-09-25 10:06
Thanks for the report and patch Ville. CPython development now uses GitHub PR instead of patches. It seems usages of this function was removed in 8b94b41ab7b12f745dea744e8940631318816935 during removal of platform.linux_distribution. This essentially seems to be unused code on master which I hope can be removed. So this patch is effective only for 3.7 and 3.6. Would you like to make a PR to take this forward? No usages on master except definition. ➜ cpython git:(master) rg _dist_try_harder Lib/platform.py 230:def _dist_try_harder(distname, version, id): Thanks
msg330662 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-11-29 05:50
I guess this can be closed as out of date since the function was removed with https://github.com/python/cpython/pull/10787/. cc: Victor
msg330680 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-29 11:16
Python 3.6 and 3.7 are still supported. The patch LGTM, I converted it to a PR.
msg330681 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-29 11:31
New changeset 7eeab87263b831adbe617a4af7ec5b5d9296962a by Victor Stinner in branch '3.7': bpo-27903: Fix ResourceWarning in platform.dist() (GH-10792) https://github.com/python/cpython/commit/7eeab87263b831adbe617a4af7ec5b5d9296962a
msg330682 - (view) Author: miss-islington (miss-islington) Date: 2018-11-29 11:53
New changeset cbf57674e257617977b35c016e861a52b5f65359 by Miss Islington (bot) in branch '3.6': bpo-27903: Fix ResourceWarning in platform.dist() (GH-10792) https://github.com/python/cpython/commit/cbf57674e257617977b35c016e861a52b5f65359
msg330683 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-29 12:04
Thanks Ville Skyttä for your bugfix! I applied it in 3.6 and 3.7 branches. FYI as Karthikeyan Singaravelan wrote, the function is gone (I removed it) from the master branch ;-)
msg330684 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-11-29 12:08
Ah sorry I forgot the previous versions that had this code. Thanks for the catch and PR victor :)
msg330685 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-29 12:08
No problem, thanks for "cc-ing" me ;-)
History
Date User Action Args
2022-04-11 14:58:35 admin set github: 72090
2018-11-29 12:08:48 vstinner set messages: +
2018-11-29 12:08:04 xtreak set messages: +
2018-11-29 12:04:41 vstinner set status: open -> closedresolution: fixedstage: patch review -> resolved
2018-11-29 12:04:32 vstinner set messages: +
2018-11-29 11:53:21 miss-islington set nosy: + miss-islingtonmessages: +
2018-11-29 11:31:23 miss-islington set stage: resolved -> patch reviewpull_requests: + <pull%5Frequest10040>
2018-11-29 11:31:10 vstinner set messages: +
2018-11-29 11:16:14 vstinner set status: closed -> openresolution: out of date -> (no value)messages: + versions: + Python 3.6, Python 3.7
2018-11-29 11:15:41 vstinner set pull_requests: + <pull%5Frequest10039>
2018-11-29 05:50:57 xtreak set status: open -> closednosy: + vstinnermessages: + resolution: out of datestage: resolved
2018-09-25 10:06:20 xtreak set messages: +
2018-09-21 11:46:12 xtreak set nosy: + xtreak
2016-08-31 02:14:42 ned.deily set nosy: + lemburg
2016-08-30 21:19:38 nnnnnn create