You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running watchdog under Python 3.13t (with the GIL disabled), Python re-enables the GIL and prints the following warning
<frozen importlib._bootstrap>:488: RuntimeWarning: The global interpreter
lock (GIL) has been enabled to load module '_watchdog_fsevents', which has
not declared that it can run safely without the GIL. To override this behavior and
keep the GIL disabled (at your own risk), run with PYTHON_GIL=0 or -Xgil=0.
At a glance, some basic watchdog applications seem to run properly with the GIL disabled. I also ran the test suite on macOS, which passed (at least no additional XPASS or warnings)
P.S. - After a quick search, it looks as though GitHub Actions is actively working on exposing a new Python version 3.13t that will allow developers to run tests with free-threading enabled. I'm not sure if this is available quite yet, but should be close.
The text was updated successfully, but these errors were encountered:
tokeefe
changed the title
Declare watchdog safe to run without GIL
Is watchdog safe to run without GIL?
Dec 2, 2024
When running watchdog under Python 3.13t (with the GIL disabled), Python re-enables the GIL and prints the following warning
At a glance, some basic watchdog applications seem to run properly with the GIL disabled. I also ran the test suite on macOS, which passed (at least no additional
XPASS
or warnings)python3.13t -Xgil=0 -m tox -q -e py ... 163 passed, 10 skipped, 2 xpassed, 1 warning in 92.15s (0:01:32) py: OK (94.21 seconds) congratulations :) (94.33 seconds)
P.S. - After a quick search, it looks as though GitHub Actions is actively working on exposing a new Python version
3.13t
that will allow developers to run tests with free-threading enabled. I'm not sure if this is available quite yet, but should be close.The text was updated successfully, but these errors were encountered: