summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2021-11-10 23:44:53 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-11 17:09:39 +0000
commitc277bbaa8bc65645a030e1ff9ecf811d0ca8c20c (patch)
tree8fef8c6d22a7e5207889325b82affb23f531b264 /bitbake
parent657f71e1f5cf8a9f385b1748d99cb6d531511626 (diff)
downloadpoky-c277bbaa8bc65645a030e1ff9ecf811d0ca8c20c.tar.gz
bitbake: lib/pyinotify.py: Remove deprecated module asyncore
When build with nativesdk-python3 (3.10) from buildtools: /path/to/bitbake/lib/pyinotify.py:55: DeprecationWarning: The asyncore module is deprecated. The recommended replacement is asyncio The pyinotify.py's upstream didn't have any update in recent 7 years: https://github.com/seb-m/pyinotify And bitbake doesn't use the asyncore module, so remove the related code. (Bitbake rev: 58fbb01c3e2111bef4f79f88e1aac1827350c82a) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/pyinotify.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/bitbake/lib/pyinotify.py b/bitbake/lib/pyinotify.py
index 6ae40a2d76..8c94b3e334 100644
--- a/bitbake/lib/pyinotify.py
+++ b/bitbake/lib/pyinotify.py
@@ -52,7 +52,6 @@ from collections import deque
52from datetime import datetime, timedelta 52from datetime import datetime, timedelta
53import time 53import time
54import re 54import re
55import asyncore
56import glob 55import glob
57import locale 56import locale
58import subprocess 57import subprocess
@@ -1475,35 +1474,6 @@ class ThreadedNotifier(threading.Thread, Notifier):
1475 self.loop() 1474 self.loop()
1476 1475
1477 1476
1478class AsyncNotifier(asyncore.file_dispatcher, Notifier):
1479 """
1480 This notifier inherits from asyncore.file_dispatcher in order to be able to
1481 use pyinotify along with the asyncore framework.
1482
1483 """
1484 def __init__(self, watch_manager, default_proc_fun=None, read_freq=0,
1485 threshold=0, timeout=None, channel_map=None):
1486 """
1487 Initializes the async notifier. The only additional parameter is
1488 'channel_map' which is the optional asyncore private map. See
1489 Notifier class for the meaning of the others parameters.
1490
1491 """
1492 Notifier.__init__(self, watch_manager, default_proc_fun, read_freq,
1493 threshold, timeout)
1494 asyncore.file_dispatcher.__init__(self, self._fd, channel_map)
1495
1496 def handle_read(self):
1497 """
1498 When asyncore tells us we can read from the fd, we proceed processing
1499 events. This method can be overridden for handling a notification
1500 differently.
1501
1502 """
1503 self.read_events()
1504 self.process_events()
1505
1506
1507class TornadoAsyncNotifier(Notifier): 1477class TornadoAsyncNotifier(Notifier):
1508 """ 1478 """
1509 Tornado ioloop adapter. 1479 Tornado ioloop adapter.