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
uvloop fails to import on SPARC64: OverflowError: Python int too large to convert to C long #427
Comments
I don't think we have resources to debug SPARC64 compatibility. But you're welcome to submit PRs to fix it! |
Well, removing |
@mgorny after all why do we need int64_t cast? I have no access to my sparc now :( but it should work very close to AMD64 if it's Linux (on Solaris much more different). |
We shouldn't need it. Gentoo's running with my patch since then, and all arch teams have confirmed no regressions (at least as far as the test suite is concerned). |
I think this was because Python < 3.7 still return Cython will check if integer overflows when converting a Python int to a C integer type, and because the thread ident can be a negative number in Python 3.6, that's why we needed the |
PYTHONASYNCIODEBUG
in env?: yesWhen built on SPARC64, the uvloop module fails to load:
From my short testing, it seems that the Python thread identifiers on sparc are simply bigger than they are on my amd64 machine, and don't fit into
int64_t
(though I wouldn't be surprised if amd64 didn't have the same problem, just we're lucky not to experience large enough thread IDs). If I remove the intermediateint64_t
cast, thing seems to work just fine. The cast seems to have been introduced in b5b4abb.The text was updated successfully, but these errors were encountered: