Skip to content
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

telnetlib Module Removed in Python 3.13 - Compatibility Issue with Provided Code #61

Open
fretory opened this issue Jan 18, 2025 · 0 comments

Comments

@fretory
Copy link

fretory commented Jan 18, 2025

Environment Information:

  • Python Version: 3.13.1
  • Operating System: macOS
  • Command Run: sh run.sh

Observed Behavior:
When running the provided code, it attempts to import the telnetlib module, which results in the following error:

Traceback (most recent call last):
  File "/Users/wangtao/Developer/xmir-patcher/menu.py", line 9, in <module>
    import gateway
  File "/Users/wangtao/Developer/xmir-patcher/gateway.py", line 23, in <module>
    import telnetlib
ModuleNotFoundError: No module named 'telnetlib'

Reason for the Issue:
The telnetlib module was deprecated in Python 3.11 and has been removed entirely in Python 3.13, as per [PEP 594](https://www.python.org/dev/peps/pep-0594/). Reference: [Python 3.13 telnetlib documentation](https://docs.python.org/3.13/library/telnetlib.html).

Steps Taken to Address the Issue:

  1. Verified the Python version (Python 3.13.1).
  2. Reviewed the official documentation, which confirms the removal of telnetlib in Python 3.13.
  3. Attempted to use an alternative library, [telnetlib3](https://github.com/jquast/telnetlib3), as suggested by the Python documentation.

Suggested Fix:
The current implementation should be updated to replace the use of telnetlib with a third-party library such as:

  1. [telnetlib3](https://github.com/jquast/telnetlib3) - Asynchronous Telnet client.

Would you consider updating the code to accommodate the removal of telnetlib in Python 3.13? Alternatively, could you provide guidance or recommendations for adapting the provided script for compatibility with Python 3.13?

Thank you for your work and support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant