Bug 293438

Summary: net-mgmt/py-napalm: update to 5.1.0
Product: Ports & Packages Reporter: Nick Hilliard <nick>
Component: Individual Port(s)Assignee: Kai Knoblich <kai>
Status: Closed FIXED    
Severity: Affects Some People Flags: kai: maintainer-feedback+
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://github.com/napalm-automation/napalm/releases/tag/5.1.0
Bug Depends on: 293458    
Bug Blocks:    
Attachments:
Description Flags
Update net-mgmt/py-napalm from 5.0.0 to 5.1.0 none

Description Nick Hilliard 2026-02-25 10:22:52 UTC
Created attachment 268344 [details]
Update net-mgmt/py-napalm from 5.0.0 to 5.1.0

Also adds a new dependency on py-setuptools.
Comment 1 Kai Knoblich freebsd_committer freebsd_triage 2026-02-26 08:57:52 UTC
(In reply to Nick Hilliard from comment #0)

Hi Nick,

thank you for the patch, which LGTM.

I have one question: Is there a specific reason why py-junos-eznc was omitted?  

In the requirements.txt, the version requirement for py-junos-eznc is ">=2.7.4" and the net-mgmt/py-junos-eznc port needs to be updated as well.

I took a closer look at your patch and have already checked a few things.

As far as I can see, py-junos-eznc >= 2.7.4 is needed for Python 3.13+, where "telnetlib" is no longer available, and py-junos-eznc >= 2.7.4 ships "telnetlib" as vendored module. (Whether the use of telnet still makes sense today is another story...)

- Results of test suite of py-napalm with current junos-eznc 2.7.0 in the ports tree:

> [...]
>../../../../../../../usr/local/lib/python3.11/site-packages/jnpr/junos/transport/tty_telnet.py:2
>  /usr/local/lib/python3.11/site-packages/jnpr/junos/transport/tty_telnet.py:2: DeprecationWarning: 'telnetlib' is deprecated and slated for removal in Python 3.13
>    import telnetlib
> [...]
> === 524 passed, 80 skipped, 4 warnings in 2.83s ===


- Results of test suite of py-napalm with latest junos-eznc 2.7.6:

> === 524 passed, 80 skipped, 3 warnings in 2.85s ===


Regardless of these facts, I'd like to take this opportunity to update py-junos-eznc and py-ncclient together with py-napalm in order to obtain a up-to-date status of all components.

I'll create the corresponding bugs in a few minutes and link them to this bug.
Comment 2 Nick Hilliard 2026-02-26 09:15:37 UTC
> I have one question: Is there a specific reason why py-junos-eznc was omitted?  

yeah, once you start updating py package dependencies, things rapidly spiral out of control. There were a lot of other py dependencies which I skipped over due to lack of time.

The root problem I ran into was that the napalm integration in py-salt was stack-dumping unless py-setuptools was installed. The patch I uploaded to this PR passed the "wfm" test, including logging into some junos boxes.
Comment 3 Kai Knoblich freebsd_committer freebsd_triage 2026-02-26 09:36:37 UTC
(In reply to Nick Hilliard from comment #2)

All right, thanks for the additional info. No problem with regard to the Python dependencies - it's indeed like going down a rabbit hole.

The bugs for updating py-ncclient and py-junos-eznc are now available and the latter one is linked with this bug.

As soon as I receive feedback from the maintainer or the timeout is reached, I'll commit everything in one go.
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-03-12 11:54:29 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=581221552fdb53637c87105d94df348643e4f2ba

commit 581221552fdb53637c87105d94df348643e4f2ba
Author:     Nick Hilliard <nick@foobar.org>
AuthorDate: 2026-03-12 11:52:50 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2026-03-12 11:52:50 +0000

    net-mgmt/py-napalm: Update to 5.1.0

    * Switch to the PEP517 build framework to make it future-proof
      while I'm here.

    Changelog:

    https://github.com/napalm-automation/napalm/releases/tag/5.1.0

    PR:             293438
    Co-Authored-by: Kai Knoblich <kai@FreeBSD.org>

 net-mgmt/py-napalm/Makefile | 14 ++++++++------
 net-mgmt/py-napalm/distinfo |  6 +++---
 2 files changed, 11 insertions(+), 9 deletions(-)
Comment 5 Kai Knoblich freebsd_committer freebsd_triage 2026-03-12 12:05:33 UTC
(In reply to Nick Hilliard from comment #0)

Committed, thank for the patch and report!

I added two small additions (= PEP517 and exact version requirement for py-junos-eznc) to your patch.