-
Couldn't load subscription status.
- Fork 20
Add support for Python 3.13 #1219
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
Conversation
|
Sadly the new
|
9e74107 to
18f6a68
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for Python 3.13 across the project by updating documentation and CI configuration.
- Updated RELEASE_NOTES.md to announce Python 3.13 support
- Updated README.md to list Python 3.13 as a supported version
- Updated CI workflows to include Python 3.13 in the testing matrix
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| RELEASE_NOTES.md | Updated text announcing Python 3.13 support |
| README.md | Updated supported Python versions list |
| .github/workflows/ci.yaml | Added Python 3.13 to the CI testing configuration |
|
@shsms the CI says no (in the queue) |
|
OK, this is a new one... It is failing for all 3.13 runs except
And it seems that after the tests are done, it gets stuck in some infinite loop. I'm attaching an extract of the logs because the logs are so big, it would be easier for other people to look at the extract. The repeated log is: I wonder if maybe we are trying to do some cleanup in some |
|
Interesting, I'm able to reproduce it locally, but only with pytest_max. I'll see if I can figure it out. |
|
I wonder if this is a new python bug. It is running the async Longterm solution is to implement reference counting for shared actor lifetimes. But for now, we could do one of:
diff --git a/src/frequenz/sdk/actor/_actor.py b/src/frequenz/sdk/actor/_actor.py
index e62c2b63..26b994ea 100644
--- a/src/frequenz/sdk/actor/_actor.py
+++ b/src/frequenz/sdk/actor/_actor.py
@@ -94,6 +94,9 @@ class Actor(BackgroundService, abc.ABC):
_logger.info("Actor %s: Cancelled.", self)
raise
except Exception: # pylint: disable=broad-except
+ if not asyncio.get_running_loop().is_running():
+ _logger.info("Actor %s: Loop is closed, stopping...", self)
+ raise
_logger.exception("Actor %s: Raised an unhandled exception.", self)
limit_str = "∞" if self._restart_limit is None else self._restart_limit
limit_str = f"({n_restarts}/{limit_str})"
|
|
If the dependency versions affect the results, I guess it is not purely a Python bug, or is a bug that only manifests in some dependency. Have you tried to pin-point which dependency upgrade triggers the bug? It might be useful to understand better what's going on and/or to pick one of the solutions. My bets go to |
|
In particular if this is a regression on some test library, it might be more likely that it gets fixed soon. |
No
Those are all pinned to a single version, under
There is a function
I can 🤯 they have a 🐞 |
|
Actually you might be right, I'm thinking it must be a 🪲 in solipsism's event loop, because it is failing only with the But we use the same version of I'll try some different versions. |
|
Maybe it is an interaction between solipsism and py3.13, maybe solipsism is assuming some python internals that changed... |
|
Actually it was just some missing cleanup. Fixed here: #1222 |
|
Awesome, but do you know how that explain async code being running outside the loop? |
No, and I don't think it was solipsism. I disabled the solipsism event loop and it was still getting stuck. Maybe something to do with the MockMicrogrid, don't know. But I still feel it is Python. |
Signed-off-by: Leandro Lucarella <[email protected]>
|
Rebased, we can try again with the queue, but it needs a new approval @shsms |
|
Awesome, thanks @shsms ! |

No description provided.