Bug 7636 - asyncore is deprecated
Summary: asyncore is deprecated
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Other (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: MediumPrio
Assignee: Bugzilla mail exporter
Depends on:
Reported: 2021-02-03 12:55 CET by Pierre Ossman
Modified: 2023-05-31 13:40 CEST (History)
2 users (show)

See Also:
Acceptance Criteria:


Description Pierre Ossman cendio 2021-02-03 12:55:47 CET
Python has decided that asyncore is deprecated in favour of asyncio. This is a major problem for us as asyncore is the foundation for vsmserver and vsmagent. We need to change those to get away from the asyncore dependency.

The recommended replacement, asyncio, is only available from Python 3.6. We are currently targeting 3.4 so we cannot use that until we've raised our system requirements. That likely means when SLE 12 and Ubuntu 16.04 are EOL in 2024.

Note that Python developers originally planned on removing asyncore in Python 3.8, but seemed to have come to their senses and are now keeping it around until they feel that everyone no longer has to support old versions of Python. We'll see what that means in practice.
Comment 1 William Sjöblom cendio 2022-01-26 11:34:39 CET
Here is the upstream issue discussing the matter: https://bugs.python.org/issue28533

It seems like the planned removal of asyncore is for Python 3.11. Since we are already at Python 3.10 in the current Fedora 35, this issue becomes somewhat more pressing.

Worth noting is that the Python documentation states that asyncio has been shipped with Python since version 3.4 on a provisional basis (see the first couple of sentences in https://docs.python.org/3.5/library/asyncio.html) which might be of value regarding a decision for this matter.
Comment 2 Samuel Mannehed cendio 2022-01-26 12:10:49 CET
I'm getting a deprecation warning now on Fedora 35 (Python 3.10.1):

> $ /opt/thinlinc/sbin/tl-show-licenses 
> /opt/thinlinc/modules/thinlinc/vsm/asyncbase.py:21: DeprecationWarning: The asyncore module is deprecated. The recommended replacement is asyncio
>   import asyncore
Comment 3 Pierre Ossman cendio 2022-01-26 12:48:53 CET
So upstream tried dropping this in 3.11:


But it got reverted again:


The reasoning is found here:


Basically their rules say that they should have a deprecation notice for two releases before anything is allowed to be removed. That notice was added to 3.11, and also backported to 3.10.1.

That probably means that 3.12 is the earliest it will be removed. It could be delayed further, but I would say that is unlikely as they've already had a commit applied to remove it before.
Comment 4 Pierre Ossman cendio 2022-01-26 12:52:07 CET
Ubuntu 16.04 is now out of normal support (since April 2021), so the limiting factor here is SLES 12. I'll poke SUSE and see if I can get an update on getting a newer Python on that platform.
Comment 5 Samuel Mannehed cendio 2022-01-26 13:17:41 CET
(In reply to Samuel Mannehed from comment #2)
> I'm getting a deprecation warning now on Fedora 35 (Python 3.10.1):
> > $ /opt/thinlinc/sbin/tl-show-licenses 
> > /opt/thinlinc/modules/thinlinc/vsm/asyncbase.py:21: DeprecationWarning: The asyncore module is deprecated. The recommended replacement is asyncio
> >   import asyncore

This only shows up on manual builds, won't show up for customers.
Comment 6 Pierre Ossman cendio 2022-07-05 13:11:20 CEST
That warning also shows up when tl-collect-licensestats is run, which results in a mail from cron every time.

Note You need to log in before you can comment on or make changes to this bug.