-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Trio fails under gevent with NotImplementedError: unsupported platform #3013
Comments
Hi, what trio version are you using? (Just to double check, though I haven't tried to reproduce yet) |
Hi .. it was the latest 0.25.1. |
While I'm not sure this will fix it, maybe try |
Hi .. it doesn't appear to fix it in the example code above. Still getting the same error. |
I tried the same commands as the top of #2928 and got the error as well. I am using Python 3.11. |
What operating system are you using? python3.11 -m platform that would be helpful. |
We should probably include that in the assert message tbh. I'm also curious about your platform because after >>> from gevent.monkey import patch_all; patch_all()
True
>>> import gevent
>>> import httpx
>>>
>>> def worker(n):
... print(n)
...
>>> if __name__ == '__main__':
... jobs = [gevent.spawn(worker, job_no) for job_no in range(10)]
... gevent.joinall(jobs)
...
0
1
2
3
4
5
6
7
8
9
[<Greenlet at 0x16460a8bce0: _run>, <Greenlet at 0x16460acbe20: _run>, <Greenlet at 0x16460acbec0: _run>, <Greenlet at 0x16460acbba0: _run>, <Greenlet at 0x16460acbf60: _run>, <Greenlet at 0x16460adc040: _run>, <Greenlet at 0x16460adc0e0: _run>, <Greenlet at 0x16460adc180: _run>, <Greenlet at 0x16460adc220: _run>, <Greenlet at 0x16460adc2c0: _run>] ... I assume some sort of Linux? Looking at the code, windows uses a set of primitives always, rather than trying to find something that works. I think your error totally makes sense and we can probably figure something out (detecting gevent monkey patching?), I'm just surprised this hasn't happened before as far as I know. As a short term fix, when I |
Because of the way the logic works, the system this is failing on is not windows, not linux, not epoll-based, and not kqueue-based. Given the what the select docs say, I predict the target system is Solaris or a Solaris derivative, which uses |
Might not actually go anywhere because of issues with getting a solaris runner in CI, but created #3014 for attempting to add solaris support |
gevent monkey patches like, every io routine in the standard library. Idk
what exactly the interaction is that's breaking trio but it's super
unsurprising that something is breaking, because you're not really running
on any of those platforms, or even the regular Python interpreter; you're
running on the platform "gevent" and the language "gevent-flavored Python",
with its own thread API and all kinds of things.
…On Mon, Jun 10, 2024, 01:45 CoolCat467 ***@***.***> wrote:
Might not actually go anywhere because of issues with getting a solaris
runner in CI, but created #3014
<#3014> for attempting to add
solaris support
—
Reply to this email directly, view it on GitHub
<#3013 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEU42AEX5TMV5OIS6TEE3DZGVRSLAVCNFSM6AAAAABJBIZSVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJXG4ZTCOJXGE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi, the platform is ubuntu 22.04. Here is the output from python3.11 -m platform: Linux-6.5.0-1018-aws-x86_64-with-glibc2.35 |
Same issue here on
|
@danpe Could you share the list of all packages installed with python -m pip freeze ? |
|
If you update Essentially the only thing that we could do is delay that error with monkeypatching, but we have tried PRs in that direction and it's a game of whack-a-mole. Since Please reopen this issue if |
Cause this isn't exactly using |
Trio is installed as a dependancy of httpx.
If I run the code:
I get:
The text was updated successfully, but these errors were encountered: