-
Notifications
You must be signed in to change notification settings - Fork 176
replace async_service with anyio_service #597
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
base: main
Are you sure you want to change the base?
Conversation
docs/release_notes.rst
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to edit the release notes directly. Create a newsfragment for each section you want to update with the original issue, e.g. 524.feature.rst
, 524.docs.rst
, etc. Newsfragments are then compiled into release notes with each release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was facing the same issue as mentioned in #595 , while tinkering to solve it I accidentally committed the unnecessary changes, will revert them back, sorry for the confusion caused due to this
…eplace-async-with-anyio
4c00ca7
to
57e803d
Compare
hey @seetadev |
Thanks for jumping in, @mystical-prog - really appreciate your support on this! Since the PR touches quite a bit on Gossipsub, it’s great to have your expertise here. I’ll continue driving this forward and loop you in wherever needed for the protocol-specific bits. Looking forward to refining this together! 🚀 |
@mystical-prog : Awesome :) great to hear. Thank you so much for the initiative. This is indeed a major PR. Please open a discussion page and add developer documentation side by side, if convenient. |
I will add all the necessary documentation and references so that everyone remains in loop, looking to close this ASAP |
Hi @mystical-prog, How is the progress going? I will be fixing the failing tests in this PR from today and will keep you posted |
…eplace-async-with-anyio
hey @paschal533 |
@paschal533 : Completely agree with @mystical-prog. Wish to share that the key code commits are almost complete. Vraj and Khwahish have arrived at a good conclusion on the feature enhancement. Wish to recommend you to bootstrap interop tests with JS-libp2p with focus on ping protocol. I'll be opening the issue and assigning it to you and Luca. On the same note, @mystical-prog authored ping protocol in cohort-1 and will be able to help arrive at a good conclusion on the issue. @mystical-prog : Thank you for the update. Appreciate the initiative and efforts by you and @Khwahish29. I'll add you to the thread on interop tests between py-libp2p and js-libp2p with focus on ping protocol. |
hey @seetadev we have identified an issue with anyio integration, due to a peer p2pclient's dependency of anyio being strictly less than 2.0.0, we are stuck with outdated anyio version, can you please guide on how to arrive at a solution which uses the latest anyio version and resolve p2pclient's dependency, we are currently blocked on this. |
@Khwahish29 : Hi Khwahish. Thank you for sharing the issue. We are facing similar kind of issues in pymultiaddrs too. Did share pointers and feedback with you. I'll investigate possible resolutions and discuss with you and @mystical-prog soon. Please check if a newer version of p2pclient exists that has relaxed or updated its anyio dependency (i.e., supports anyio>=2.0.0 or higher). If such a version exists, upgrading p2pclient directly should resolve the conflict. If no such version exists, we may want to reach out to the maintainers or check open issues/PRs to see if there is any ongoing work in this direction. We might want to update the package locally (we just did that for multiformats/pymultiaddrs) in case we are not getting the requisite support. In case of pymultiaddrs, the multiformats have agreed to let Py-libp2p dev team be the external maintainers of the repo. @pacrob : Wish to have your thoughts, feedback and pointers on the above approach. |
It looks like a similar issue to In order to move forward quickly, we can fork the repository and make changes to it, then update the dependency in We can then either:
It may also be worth investigating importing the code directly in to the |
@pacrob : Thank you so much for your feedback, guidance and pointers. Appreciate your great support. Absolutely agree with your assessment—this does feel similar to the situation with Forking the original repository to unblock our current development sounds like a great immediate step. I’d be happy to collaborate with @mystical-prog , @Khwahish29 and @acul71 to help set that up and update the dependency in I also like that you've laid out longer-term options—particularly contacting @mhchia for PyPI publishing rights. That would keep things clean and centralized, but having a backup plan like publishing under a new name (with attribution) ensures we’re not blocked either way. I’ll look into the repository size and dependency usage to see if inlining the relevant code into Thank you once again. We will go ahead with the fork + temporary dependency patch for now, and we can parallel-track the PyPI ownership or consolidation discussion. I can draft a short summary and ping @mhchia to check if they’re open to transferring ownership or collaborating on a shared solution. Thanks again for helping move this forward efficiently—really appreciate your clear direction. |
@seetadev has there been any progress on the fork of https://github.com/mhchia/py-libp2p-daemon-bindings any way to help unblock this issue. |
@manny-uncharted : Thank you for your kind feedback. Yes, please point to this repo at this juncture: please visit https://github.com/seetadev/py-libp2p-daemon-bindings . We have included all the changes as needed. Please proceed with resolving the merge conflicts and arrive at a good conclusion on this important PR. Kindly discuss with @mystical-prog and @Khwahish29 once before moving ahead. You can collaborate with them on this PR. |
Thanks I'd do just that @seetadev |
Hey @mhchia 👋 Great to hear from you—and absolutely no worries at all about the delay. You've been an incredible part of the py-libp2p journey, and we're grateful for the strong foundation you helped build, especially with your work on py-libp2p-daemon-bindings. Here's a quick TL;DR of where we’re at and how you might be able to help:
If you have some time, it would be amazing if you could:
Really appreciate you checking in—your past work continues to be a pillar for the project, and we’d love your feedback and thoughts as we take the next steps forward. Thanks again and excited to sync more. |
@mhchia : Wish if you could share the best way to reach out to you. Wish to share some progress on py-multiaddr and also send a request memo for including me (@seetadev ), @pacrob, @acul71, @dhuseby & @arcinston as contributors to PyPI package of py-multiaddr at https://pypi.org/project/multiaddr/ Over the past three months, we’ve taken up active maintenance of py-multiaddr, and have been updating the repository here: https://github.com/multiformats/py-multiaddr. py-multiaddr is now central to multiple ongoing improvements in py-libp2p: It's key to our upcoming QUIC support, which you can check out here: QUIC PR #763 and the related discussion #578. It’s also being used in our revamped Bootstrap module, detailed in Bootstrap PR #711 and discussion #751. And currently, py-multiaddr is referenced via github in PR #766 as we align dependencies and streamline peer discovery flows. Wish if we could update and use https://pypi.org/project/multiaddr/. Also, update the package to include our latest PRs which have been merged in py-multiaddr (please visit https://github.com/multiformats/py-multiaddr/pulls?q=is%3Apr+is%3Aclosed ). Thanks again for your contributions in py-libp2p. Your work has enabled a lot of what we’re building now—and we're excited to carry it forward with care and momentum. Appreciate your support and looking forward to hearing from you. |
What was wrong?
The codebase previously relied on a custom
async_service
implementation, which was no longer actively maintained and introduced unnecessary complexity. It made lifecycle management fragile and lacked support for modern async patterns and structured concurrency.Issue #524
How was it fixed?
The legacy
async_service
implementation was fully replaced with a new design built usinganyio
, a well-supported, high-level async framework. This transition modernizes the service infrastructure and significantly improves reliability, maintainability, and task supervision.Cute Animal Picture