-
-
Notifications
You must be signed in to change notification settings - Fork 350
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
[Heads up] Test failures with Python 3.13.0a3 #2944
Comments
Thanks! I know |
Oh I guess even the |
I think this is easily fixed with: https://github.com/etianen/trio/tree/dh/python-3.13 I've no idea how to test this against an unreleased Python, however. |
GitHub actions does have |
Seems to just be a |
Would the thing to do now be to remove the failing test matrix item and mark my PR as ready for review? |
The fix in #2955 has been merged. Can this issue be closed now, given the remaining problems are with a 3rd-party lib? |
I took the fix and built trio again for Fedora, the same 8 tests failed. See logs: https://download.copr.fedorainfracloud.org/results/@python/python3.13/fedora-rawhide-x86_64/07022101-python-trio/builder-live.log.gz |
Tbh I think we should wait for 3.13 betas -> cffi release -> cryptography, for both the faster feedback cycle from CI and more guarantee that nothing will change |
I'll take a look at those logs later. I'm confused about why the GHA CI only had cryptography errors. |
How thoroughly embarrassing... the crypto errors were masking the |
I think I know what the issue is. The current In Python 3.12: >>> Path.__dict__["is_dir"]
<function Path.is_dir at 0x103415da0> In Python 3.13: >>> Path.__dict__["is_dir"]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Path.__dict__["is_dir"]
~~~~~~~~~~~~~^^^^^^^^^^ I think this approach made too many assumptions about class hierarchy, and will likely break again even if fixed. I'd like to propose a dumber approach that will always work: Let's lose the metaclass and automatic wrapping, and manually define and wrap the methods in
This new approach would be less brittle, more explicit and run (slightly) faster. It would probably be a simpler implementation. I get your point about waiting until Python 3.13 beta... but I think this is a good change in of itself, and it should be resilient to any other |
I do think that might be a better approach, though we would want to have lots of helper methods, and for most perhaps define them like |
Yes, I was anticipating having a small handful of wrapper helpers to make this as un-boiler-platy as possible. The things to handle are likely:
I wonder how that would work with path subclasses though? Like, in this case we're explicitly wrapping I'm tempted to say that we ignore path subclasses and get this working with the simpler implementation. After all, Path subclasses are a bit niche. Alternatively, we'd define class Path:
wrapped_cls: ClassVar[type[Path]] = Path
wrapped: Path This would allow a subclass of |
Well |
Yeah, I changed my mind almost immediately after saying it would be a hassle. So I'm happy to work on this, providing people are cool with it being a thing. Let me know. |
Current implementation is mostly @TeamSpen210's brainchild, so I think you can go ahead~ |
This is ready for review, I think. I'm pretty happy with the new implementation, which is smaller and adds a nice new extra capability. #2959 But there's a problem with |
Closing as the PR got merged and tests seem to pass on 3.13.0a6 (at least on my machine). |
For some reason just adding 3.13 to CI fails -- I tried yesterday. But yeah that's tracked in a separate issue (the general CI improvements one) |
I used the fix from #2918 to attempt to build trio in Fedora with python 3.13.0a3. This is an ongoing effort to integrate new Python as soon as possible and provide feedback to all interested parties.
The result of the attempted build is that 8 tests fail:
The text was updated successfully, but these errors were encountered: