-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in RustNotify causing RuntimeError: Already borrowed on exit/signal #200
Comments
Looks like a duplicate of PyO3/pyo3#2525, best to post there and they might be able to help. I haven't been able to reproduce this error. |
Which version of 3.10 were you using? |
[Python 3.10.8] probably but definitely 3.11.0 |
FWIW, I can reproduce this with Python 3.10.9 on macOS 10.15, with watchfiles 0.18.1, with the following script: import asyncio
import watchfiles
async def watcher():
async for changes in watchfiles.awatch("."):
print(changes)
break
async def cancel(task):
await asyncio.sleep(0.5)
print("cancelling")
task.cancel()
async def main():
watcherTask = asyncio.create_task(watcher())
cancelTask = asyncio.create_task(cancel(watcherTask))
await watcherTask
await cancelTask
asyncio.run(main()) The output is this:
|
Yup, this has been demonstrated, see PyO3/pyo3#2525 (comment). Fix welcome. |
…signal (#221) Done as suggested in PyO3/pyo3#2525 (comment) Fixes #200
Description
i see this tracebacks/exception when terminating my aplication in docker or windows/ python 3.10 and 3.11
(can be trigered from cli (ctrl+c) or pycharm (stoping)
i tried to set my stopevent in signal hander but without any progress
traceback in output section
Example Code
Watchfiles Output
Operating System & Architecture
Windows-10-10.0.19045-SP0
10.0.19045
and docker FROM python:3.10-slim
Environment
windows (native and docker) , an docker on raspberi pi 4 (usual install via pip)
Python & Watchfiles Version
python: 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)], watchfiles: 0.18.0
Rust & Cargo Version
cargo 1.64.0 (387270bc7 2022-09-16); rustc 1.64.0 (a55dd71d5 2022-09-19)
The text was updated successfully, but these errors were encountered: