[Bug 1963794] Re: apt-avahi-discover script uses deprecated asyncore module
Rolf Leggewie
1963794 at bugs.launchpad.net
Wed Jan 11 17:57:20 UTC 2023
I run this updated package recompiled in jammy. I believe the fix might
introduce a regression from upstream. Reopening for verification in
lunar.
I run an instance of apt-cacher-ng on my local machine. When the
instance is active, things are great. When I turn it off with "sudo
service apt-cacher-ng stop" and then run the /usr/share/squid-deb-proxy-
client/apt-avahi-discover script, I get the following error. This does
not happen with the package still using asyncore. Can somebody please
verify?
$ /usr/share/squid-deb-proxy-client/apt-avahi-discover
Traceback (most recent call last):
File "/usr/share/squid-deb-proxy-client/apt-avahi-discover", line 148, in <module>
address = get_proxy_host_port_from_avahi()
File "/usr/share/squid-deb-proxy-client/apt-avahi-discover", line 131, in get_proxy_host_port_from_avahi
asyncio.run(asyncio.wait_for(gather_hosts(), timeout=timeout))
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/usr/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
return fut.result()
File "/usr/share/squid-deb-proxy-client/apt-avahi-discover", line 128, in gather_hosts
await asyncio.gather(*[h.time_connect() for h in hosts])
File "/usr/share/squid-deb-proxy-client/apt-avahi-discover", line 51, in time_connect
reader, writer = await asyncio.open_connection(
File "/usr/lib/python3.10/asyncio/streams.py", line 47, in open_connection
transport, _ = await loop.create_connection(
File "/usr/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
raise exceptions[0]
File "/usr/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
sock = await self._connect_sock(
File "/usr/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
return await fut
File "/usr/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('172.17.0.1', 3142)
** Changed in: squid-deb-proxy (Ubuntu)
Status: Fix Released => Confirmed
** Tags added: lunar regression-release
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1963794
Title:
apt-avahi-discover script uses deprecated asyncore module
Status in squid-deb-proxy package in Ubuntu:
Confirmed
Status in squid-deb-proxy package in Debian:
Confirmed
Bug description:
On Jammy, I'm getting the following warning on the console:
$ /usr/share/squid-deb-proxy-client/apt-avahi-discover
/usr/share/squid-deb-proxy-client/apt-avahi-discover:6: DeprecationWarning: The asyncore module is deprecated. The recommended replacement is asyncio
import asyncore
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1963794/+subscriptions
More information about the Ubuntu-sponsors
mailing list