Skip to content

Switch to pynng instead of nnpy. #1361

Merged
fruffy merged 3 commits intomainfrom
fruffy/nnpy_deprecation
Apr 5, 2026
Merged

Switch to pynng instead of nnpy. #1361
fruffy merged 3 commits intomainfrom
fruffy/nnpy_deprecation

Conversation

@fruffy
Copy link
Copy Markdown
Contributor

@fruffy fruffy commented Mar 29, 2026

nnpy has been deprecated four years ago and shows signs of bit-rotting. Installing it on newer distributions seems to cause issues. This is a draft to replace nnpy with pynng.

The reason nanomsg is very useful is because it allows us to model network switch behavior without requiring veths. And without veths we do not need sudo. When working with agents, a tight feedback loop can be useful, which includes running packet tests. sudo requirements can get in the way of that.

Related PRs: #p4lang/ptf#234 p4lang/p4c#5576

Copy link
Copy Markdown
Contributor

@jafingerhut jafingerhut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jafingerhut
Copy link
Copy Markdown
Contributor

Should we be installing nng [1] instead of the current nanomsg, too?

[1] https://github.com/nanomsg/nng

@fruffy fruffy added the breaking-change This change may break assumptions of downstream dependencies. label Apr 2, 2026
fruffy added 2 commits April 5, 2026 15:06
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
@fruffy fruffy force-pushed the fruffy/nnpy_deprecation branch from f6125eb to 9acc6a1 Compare April 5, 2026 19:06
@fruffy fruffy marked this pull request as ready for review April 5, 2026 19:07
Signed-off-by: fruffy <fruffy@nyu.edu>
@fruffy
Copy link
Copy Markdown
Contributor Author

fruffy commented Apr 5, 2026

Should we be installing nng [1] instead of the current nanomsg, too?

[1] https://github.com/nanomsg/nng

It's a pretty large change and the Python dep is meant to be backwards compatible. Can do it in a separate PR.

@fruffy fruffy merged commit faf7bfe into main Apr 5, 2026
10 checks passed
@fruffy fruffy deleted the fruffy/nnpy_deprecation branch April 5, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change This change may break assumptions of downstream dependencies.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants