Open ghost opened 6 months ago
Hi @fakeNews-jpg. Unfortunately, fork
can never be implemented on GraalPy. GraalPy is implemented in Java, and Java wouldn't safely survive forking. It might be possible to patch ptyprocess
package to work around it, I'd need to spend some time on it.
I don't know when the CI build will be available, nobody gave me any estimate. If you're eager to try the current master, you can build it yourself. You need to:
https://github.com/graalvm/mx
and put it on your PATH
mx fetch-jdk labsjdk-ce-21
. Run the export
line that the command printedmx sforceimports
mx python-svm
Thanks a lot for your answer @msimacek Effectively, if a workaround is possible it will be a great improvement :) For example, https://github.com/ansible/ansible uses os.fork, and is thus not compatible, but marked as compatible on https://www.graalvm.org/python/compatibility/ :/
It's not marked as compatible, I see ansible-core
with 0% passing tests (which doesn't necessarily mean that the package doesn't work, but often the tests timed out or failed to start). The list contains all packages that we test, you have to look at the test percentages. That page is new, I guess it could use some improvement, probably marking the packages with colors in the list.
I grepped ansible sources, fork
is only used in async_wrapper
module and one cli script. So the rest could still work.
A few improvements are possible here:
- Fork should be implemented but throw an exception that points users to a documentation page, or at least an explanation
I'm afraid this could backfire. In general, for platform-specific APIs, libraries often check their presence with hasattr
and may have a fallback to something else when the API is not available. If we raise exceptions, we would break those. On CPython on Windows, fork
also doesn't exist at all.
I guess you could make it callable but hide it from hasattr, but yeah if Python devs are supposed to adapt to missing fork for portability to Windows anyway, then perhaps the stack trace in the first comment should be obvious enough.
Hello,
Very sorry for asking again a question, i have this error when running my script, as i saw in other issues, this seem to be an issue on graalpython (https://github.com/oracle/graalpython/issues/370):
And do you know when ci for dev will be available?
Again, thanks a lot for all your help,
F.N.