Skip to content

Errors on PyPy3 #33

@elonen

Description

@elonen

Should the library run on PyPy? Trying pyfuse3 v3.1.1 on PyPy 7.3.2, pyfuse3 compiles, but when I tried to run/mount the hello.py example:

# python hello.py /mnt/fuse
Traceback (most recent call last):
  File "hello.py", line 157, in <module>
    main()
  File "hello.py", line 148, in main
    trio.run(pyfuse3.main)
  File "/root/test/pypyvenv/site-packages/trio/_core/_run.py", line 1928, in run
    raise runner.main_task_outcome.error
  File "/root/test/pypyvenv/site-packages/_pyfuse3.py", line 30, in wrapper
    await fn(*args, **kwargs)
  File "src/pyfuse3.pyx", line 767, in main
  File "src/pyfuse3.pyx", line 770, in pyfuse3.main
AttributeError: 'NoneType' object has no attribute 'start_soon'

Same thing with hello_async.py:

# python hello_asyncio.py /mnt/fuse
Traceback (most recent call last):
  File "hello_asyncio.py", line 162, in <module>
    main()
  File "hello_asyncio.py", line 151, in main
    loop.run_until_complete(pyfuse3.main())
  File "/usr/lib/pypy3/lib-python/3/asyncio/base_events.py", line 488, in run_until_complete
    return future.result()
  File "/usr/lib/pypy3/lib-python/3/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/lib/pypy3/lib-python/3/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/root/test/pypyvenv/site-packages/_pyfuse3.py", line 30, in wrapper
    await fn(*args, **kwargs)
  File "src/pyfuse3.pyx", line 767, in main
  File "src/pyfuse3.pyx", line 770, in pyfuse3.main
AttributeError: 'NoneType' object has no attribute 'start_soon'

Package versions:

# pip freeze
async-generator==1.10
attrs==20.3.0
cffi==1.14.2
contextvars==2.4
greenlet==0.4.13
idna==2.10
immutables==0.14
outcome==1.1.0
Pillow==8.0.1
pyfuse3==3.1.1
readline==6.2.4.1
sniffio==1.2.0
sortedcontainers==2.3.0
trio==0.17.0

Trio claims to work on PyPy, so I'm wondering what's going on here. It also seems that even the asyncio example (hello_async.py) initializes through Trio somehow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions