jquast / telnetlib3

Python Telnet server and client Protocol library using asyncio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

telnetlib3 with debian

id027102 opened this issue · comments

I don't know where to go with the following :

import telnetlib give warning message :
DeprecationWarning: 'telnetlib' is deprecated and slated for removal in Python 3.13
import telnetlib

After installing telnetlib3 with pipx and modify telnetlib to telnetlib3 in script then I get error :
import telnetlib3
ModuleNotFoundError: No module named 'telnetlib3'

How can I then install module telnetlib3 ?

Lib not on the good place with pipx ????
But now , next problem :
module 'telnetlib3' has no attribute 'open_connection'
but in example at https://telnetlib3.readthedocs.io/en/latest/intro.html it has ???
coro = telnetlib3.open_connection('localhost', 6023, shell=shell)
I am a newbie , how can I replace telnetlib with telnetlib3 if I cannot find reliable samples ???

On DeprecationWarning,

import telnetlib give warning message :
DeprecationWarning: 'telnetlib' is deprecated and slated for removal in Python 3.13

It is only a warning, and it can be ignored!

You may use python 3.12 and telnetlib module until the last years of your life!

Second issue,

But now , next problem :
module 'telnetlib3' has no attribute 'open_connection'

I cannot reproduce, Please provide more details!

I am a newbie , how can I replace telnetlib with telnetlib3 if I cannot find reliable samples ???

I suggest to use use the standard library telnetlib.py. Ignore the DeprecationWarning. When python 3.13 is released and you wish to use python 3.13, you can copy the file to your project.


I was surprised to find in PEP-594, telnetlib3 suggested as a replacement for the standard telnetlib library. https://peps.python.org/pep-0594/#deprecated-modules so there will be more "newbies" approaching this library as a replacement.

I will try to improve the documentation and examples.

I also have a stretch goal to make a non-asyncio version of telnetlib3. I understand that asyncio can be difficult for a beginner, and that most use cases do not require asyncio.