Skip to content

Commit 55e5c68

Browse files
authored
bpo-43989: Add signal format specifier for unix_events (GH-25769)
Add format specifier for IntEnum references to avoid 3.12 deprecation warning.
1 parent a5669b3 commit 55e5c68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/asyncio/unix_events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def add_signal_handler(self, sig, callback, *args):
126126
logger.info('set_wakeup_fd(-1) failed: %s', nexc)
127127

128128
if exc.errno == errno.EINVAL:
129-
raise RuntimeError(f'sig {sig} cannot be caught')
129+
raise RuntimeError(f'sig {sig:d} cannot be caught')
130130
else:
131131
raise
132132

@@ -160,7 +160,7 @@ def remove_signal_handler(self, sig):
160160
signal.signal(sig, handler)
161161
except OSError as exc:
162162
if exc.errno == errno.EINVAL:
163-
raise RuntimeError(f'sig {sig} cannot be caught')
163+
raise RuntimeError(f'sig {sig:d} cannot be caught')
164164
else:
165165
raise
166166

0 commit comments

Comments
 (0)