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
Originally posted by Hos73 June 14, 2023
sh package version: 2.0.4
I was checking for Depreciations in my code and stumbled across depreciations in the mentioned _inits for Command. In particular line 665 and 2398 sh.py:665: DeprecationWarning: There is no current event loop asyncio.get_event_loop() sh.py:2398: DeprecationWarning: There is no current event loop loop = asyncio.get_event_loop()
Depreciation note from asyncio Note In Python versions 3.10.0–3.10.8 and 3.11.0 this function (and other functions which use it implicitly) emitted a [DeprecationWarning](https://docs.python.org/3/library/exceptions.html#DeprecationWarning) if there was no running event loop, even if the current loop was set on the policy. In Python versions 3.10.9, 3.11.1 and 3.12 they emit a [DeprecationWarning](https://docs.python.org/3/library/exceptions.html#DeprecationWarning) if there is no running event loop and no current loop is set. In some future Python release this will become an error
Am I using command incorrectly by not creating an asyncio event loop? Or is this just unintended depreciations? Any assistance would be great, trying to address this as it is showing up in my pytest code outputs, thank you!
The text was updated successfully, but these errors were encountered:
This event loop code should only run if the user is using a command's asyncio features
Discussed in #682
Originally posted by Hos73 June 14, 2023
sh package version: 2.0.4
I was checking for Depreciations in my code and stumbled across depreciations in the mentioned _inits for Command. In particular line 665 and 2398
sh.py:665: DeprecationWarning: There is no current event loop asyncio.get_event_loop()
sh.py:2398: DeprecationWarning: There is no current event loop loop = asyncio.get_event_loop()
Depreciation note from asyncio
Note In Python versions 3.10.0–3.10.8 and 3.11.0 this function (and other functions which use it implicitly) emitted a [DeprecationWarning](https://docs.python.org/3/library/exceptions.html#DeprecationWarning) if there was no running event loop, even if the current loop was set on the policy. In Python versions 3.10.9, 3.11.1 and 3.12 they emit a [DeprecationWarning](https://docs.python.org/3/library/exceptions.html#DeprecationWarning) if there is no running event loop and no current loop is set. In some future Python release this will become an error
Am I using command incorrectly by not creating an asyncio event loop? Or is this just unintended depreciations? Any assistance would be great, trying to address this as it is showing up in my pytest code outputs, thank you!
The text was updated successfully, but these errors were encountered: