Juniper / py-junos-eznc

Python library for Junos automation
https://www.juniper.net/documentation/en_US/junos-pyez/information-products/pathway-pages/junos-pyez-developer-guide.html
Apache License 2.0
671 stars 344 forks source link

telnetlib deprecated in python 3.13 #1324

Open johanreinalda opened 1 month ago

johanreinalda commented 1 month ago

Just FYI: using junos-eznc with python3.11, I get this (when warnings enabled):

.../venv/lib/python3.11/site-packages/jnpr/junos/transport/tty_telnet.py:2: DeprecationWarning: 'telnetlib' is deprecated and slated for removal in Python 3.13

3.13 will be release on Oct 1, 2024...

dineshbaburam91 commented 1 month ago

@johanreinalda PyEZ supports Python 3.12 and will be validated using official Python 3.13. The module will be removed if it is deprecated in Python 3.13.

ktbyers commented 3 hours ago

I vendored telnetlib in Netmiko (should be there in Netmiko 4.4.0 and later):

from netmiko._telnetlib import telnetlib

I guess the other solutions are to drop telnet support or vendor it yourself (or find a different released version of telnetlib that you trust).

telnetlib is deprecated in the sense that it is no longer built into Python itself (as of PY3.13).