>>> import portage.util._xattr >>> portage.util._xattr._XattrSystemCommands.list("/bin/ping") __main__:1: ResourceWarning: unclosed file <_io.BufferedReader name=5> [b'security.capability'] >>> portage.util._xattr._XattrSystemCommands.get("/bin/ping", "security.capability") __main__:1: ResourceWarning: unclosed file <_io.BufferedReader name=5> b'0sAQAAAgAgAAAAAAAAAAAAAAAAAAA=' This is due to passing stderr=subprocess.PIPE to subprocess.Popen(), but later stderr is not used at all.
Created attachment 585960 [details, diff] Patch
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=90ffe62d5b7b224753927f2fa61daf19488e14f9 commit 90ffe62d5b7b224753927f2fa61daf19488e14f9 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2019-08-07 02:41:51 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-08-08 22:57:28 +0000 _xattr._XattrSystemCommands.{get,list}: Do not hide stderr and fix ResourceWarning. Bug: https://bugs.gentoo.org/691638 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/util/_xattr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Thanks!
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08557524dc6c8eec3a366e43ab2587d2cdd8f133 commit 08557524dc6c8eec3a366e43ab2587d2cdd8f133 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-08-19 04:24:07 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-08-19 05:06:15 +0000 sys-apps/portage: Bump to version 2.3.72 #463952 glsa-check: install in /usr/bin #646090 preserve-libs: get dep graph from EROOT #690484 detect internal collisions for /usr merge #690786 repoman: support metadata/layout.conf restrict-allowed #691776 unpack: Unconditionally die if an unpacker returns an error #691638 Show get/setfattr stderr #692024 econf: Unconditionally die on error in EAPIs 0 to 3 #692262 QA Notice: EXPORT_FUNCTIONS is called before inherit in kernel-2.eclass #692412 emerge IndexError for ambiguous package atom with pypy Bug: https://bugs.gentoo.org/691278 Bug: https://bugs.gentoo.org/463952 Bug: https://bugs.gentoo.org/646090 Bug: https://bugs.gentoo.org/690484 Bug: https://bugs.gentoo.org/690786 Bug: https://bugs.gentoo.org/691776 Bug: https://bugs.gentoo.org/691638 Bug: https://bugs.gentoo.org/692024 Bug: https://bugs.gentoo.org/692262 Bug: https://bugs.gentoo.org/692412 Package-Manager: Portage-2.3.71, Repoman-2.3.17 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-2.3.72.ebuild | 264 +++++++++++++++++++++++++++++++++ 2 files changed, 265 insertions(+)