Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 794115 - py3.10 deprecation warnings: There is no current event loop
Summary: py3.10 deprecation warnings: There is no current event loop
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 837899
Blocks:
  Show dependency tree
 
Reported: 2021-06-04 06:54 UTC by Michał Górny
Modified: 2022-07-11 18:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-06-04 06:54:03 UTC
These repeat a lot during tests:

/tmp/portage/sys-apps/portage-3.0.19/work/portage-3.0.19-python3_10/lib/portage/util/_eventloop/asyncio_event_loop.py:21: DeprecationWarning: There is no current event loop
  loop = loop or _real_asyncio.get_event_loop()
/tmp/portage/sys-apps/portage-3.0.19/work/portage-3.0.19-python3_10/lib/portage/util/futures/_asyncio/__init__.py:273: DeprecationWarning: There is no current event loop
  _real_asyncio.get_event_loop()
/tmp/portage/sys-apps/portage-3.0.19/work/portage-3.0.19-python3_10/lib/portage/util/_eventloop/asyncio_event_loop.py:21: DeprecationWarning: There is no current event loop
  loop = loop or _real_asyncio.get_event_loop()
Comment 1 Kim B. Sindalsen 2022-06-21 17:36:47 UTC
This happens in /usr/lib/portage/python3.10/socks5-server.py, too (encountered when installing binary packages)

* jitterentropy-rngd-1.2.7.tbz2 MD5 SHA1 size ;-) ...                   [ ok ]
/usr/lib/portage/python3.10/socks5-server.py:226: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
>>> Extracting info
Comment 2 Zac Medico gentoo-dev 2022-06-21 22:00:50 UTC
We should migrate to asyncio.run which is available since python3.7.
Comment 3 Zac Medico gentoo-dev 2022-06-24 01:38:15 UTC
The bug has been referenced in the following commit(s):

commit 631bedffe29124d693de3b539fc908d9feec1420
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2021-09-19 22:05:38 -0700
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2021-09-19 22:08:47 -0700

    _safe_loop: fix python3.10 DeprecationWarning
    
    DeprecationWarning: There is no current event loop
    
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/util/futures/_asyncio/__init__.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2022-06-24 02:20:25 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=8c0bcea15410ae81f2f157ba1b52d5c11cbf3966

commit 8c0bcea15410ae81f2f157ba1b52d5c11cbf3966
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2022-06-24 02:16:31 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2022-06-24 02:18:59 +0000

    bin/socks5-server.py: fix python3.10 DeprecationWarning
    
    DeprecationWarning: There is no current event loop
    
    Bug: https://bugs.gentoo.org/794115
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 bin/socks5-server.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)