libp2p/py-libp2p

TrioDeprecationWarning: trio.hazmat is deprecated since Trio 0.15.0; use trio.lowlevel instead

Opened this issue · 3 comments

What was wrong?

I'm having some trouble setting up py-libp2p with pip3 install git+https://github.com/libp2p/py-libp2p
there are any other dependencies that are needed?

Code that produced the error

>>> import libp2p

Full error output

  _trio_task: Optional[trio.hazmat.Task] = None
/home/crzy/Desktop/programs/go-ipfs/crzy.xyz/venv/lib/python3.7/site-packages/async_service/trio.py:57: TrioDeprecationWarning: trio.hazmat is deprecated since Trio 0.15.0; use trio.lowlevel instead (https://github.com/python-trio/trio/issues/476)
  def trio_task(self) -> trio.hazmat.Task:
/home/crzy/Desktop/programs/go-ipfs/crzy.xyz/venv/lib/python3.7/site-packages/async_service/trio.py:63: TrioDeprecationWarning: trio.hazmat is deprecated since Trio 0.15.0; use trio.lowlevel instead (https://github.com/python-trio/trio/issues/476)
  def trio_task(self, value: trio.hazmat.Task) -> None:
/home/crzy/Desktop/programs/go-ipfs/crzy.xyz/venv/lib/python3.7/site-packages/async_service/trio.py:248: TrioDeprecationWarning: trio.hazmat is deprecated since Trio 0.15.0; use trio.lowlevel instead (https://github.com/python-trio/trio/issues/476)
  self, trio_task: trio.hazmat.Task

Environment

python3 --version
Python 3.7.8

I've managed to load the libp2p library. I've followed the installation instructions from the README.md, then, with VS, Ctrl+Shift+H, and replaced all occurrences of trio.hazmat -> trio.lowlevel, as instructed in the error. I believe that one should update the repo from this matter, as a developer you should also change it's occurrences within venv folder, as it's.

Thanks for raising this issue!

We will want to update to the newer trio.lowlevel package at some point but as I understand it the warning by itself should not stop you from using the library.

Thanks for raising this issue!

We will want to update to the newer trio.lowlevel package at some point but as I understand it the warning by itself should not stop you from using the library.

Indeed, my mistake.