Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Replace use of asyncore with asyncio due to deprecation #3810

Open
nicknezis opened this issue Apr 3, 2022 · 1 comment
Open

Replace use of asyncore with asyncio due to deprecation #3810

nicknezis opened this issue Apr 3, 2022 · 1 comment

Comments

@nicknezis
Copy link
Contributor

According to updated Python lint tools, the asyncore module is deprecated as of Python 3.6. It will be removed in Python 3.12. This ticket is to track the migration.

Some information about the removal can be found here:
https://peps.python.org/pep-0594/
https://docs.python.org/3/library/asyncore.html

@surahman
Copy link
Member

surahman commented Apr 4, 2022

Target files are all within the heron/instance/src/python/network/. Documentation for asyncio. Based on a very quick look at the code removing the asyncore will require a complete rewrite of most of the following classes. We will need to get familiar with both libraries before attempting to work on them. It would be best to have someone familiar with both libraries onboard with this change.

  1. Heron Client
    This class inherits from asyncore.dispatcher and overrides a lot of the routines provided in the parent class. The bulk of the work here will be replacing the channel reading methods.

  2. Gateway Looper
    This class appears to be wrapping the asyncore.dispatcher. It reads off a channel and then dispatches calls appropriately. This will require a comprehensive rewrite.

  3. Protocol
    This is the main class through which the asyncore.dispatcher is interfaced with. There should not be too many changes here.

  4. Tests
    A comprehensive rewrite of this will be required.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants