Skip to content

Commit

Permalink
🔧 fix py 3.14 failure due to tornado_loop close procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
Ousret committed Jan 20, 2025
1 parent 519793d commit 78fa125
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dummyserver/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,11 @@ async def inner_fn() -> R:
try:
return asyncio.run(inner_fn())
finally:
# AttributeError -> Python 3.14!
# todo: investigate...
try:
tornado_loop.close(all_fds=True) # type: ignore[union-attr]
except (ValueError, OSError):
except (ValueError, OSError, AttributeError):
pass # can fail needlessly with "Invalid file descriptor". Ignore!


Expand Down

0 comments on commit 78fa125

Please sign in to comment.