Skip to content

Comments

tools: flash_writer.py fix Python 3.13 compatibility#18414

Open
Biancaa-R wants to merge 1 commit intoapache:masterfrom
Biancaa-R:fix/python3.13-telnetlib
Open

tools: flash_writer.py fix Python 3.13 compatibility#18414
Biancaa-R wants to merge 1 commit intoapache:masterfrom
Biancaa-R:fix/python3.13-telnetlib

Conversation

@Biancaa-R
Copy link

@Biancaa-R Biancaa-R commented Feb 19, 2026

Note: Please adhere to Contributing Guidelines.

Summary

Impact

  • Reduced an error of missing module.

Testing

image

Signed-off-by: Biancaa Ramesh <biancaa2210329@ssn.edu.in>
@simbit18
Copy link
Contributor

Hi @Biancaa-R How can we use the telnet protocol with versions higher than Python 3.12?

https://docs.python.org/3/library/telnetlib.html

It is necessary to use the following alternatives:

https://pypi.org/project/telnetlib3/

https://pypi.org/project/Exscript/

Copy link
Contributor

@linguini1 linguini1 left a comment

Choose a reason for hiding this comment

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

This does not fix the issue. The telnet module cannot just be removed.

Copy link
Contributor

@cederom cederom left a comment

Choose a reason for hiding this comment

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

Thank you @Biancaa-R :-)

  • I am afraid this functionality is required for application operations thus cannot be just removed without alternative as @simbit18 and @linguini1 noticed. We need a working alternative please :-)
  • Please take a look at https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md when proposing a fix log before and after change are required in order to provide initial proof the fix is working as expected :-)

@github-actions github-actions bot added Area: Tooling Size: XS The size of the change in this PR is very small labels Feb 19, 2026
@Biancaa-R
Copy link
Author

Thank you @Biancaa-R :-)

  • I am afraid this functionality is required for application operations thus cannot be just removed without alternative as @simbit18 and @linguini1 noticed. We need a working alternative please :-)
  • Please take a look at https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md when proposing a fix log before and after change are required in order to provide initial proof the fix is working as expected :-)

Sure @cederom Ill fix it and get back.

@Biancaa-R
Copy link
Author

Biancaa-R commented Feb 20, 2026

Thank you @Biancaa-R :-)

  • I am afraid this functionality is required for application operations thus cannot be just removed without alternative as @simbit18 and @linguini1 noticed. We need a working alternative please :-)
  • Please take a look at https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md when proposing a fix log before and after change are required in order to provide initial proof the fix is working as expected :-)

@cederom I need a small help , so the older version is fully synchronous , the newest version is predominantly asynchronous with the async library , but it can be made sync also ,so which one do I do ? asynchronous implementation is fine?

@cederom
Copy link
Contributor

cederom commented Feb 20, 2026

@Biancaa-R: @cederom I need a small help , so the older version is fully synchronous , the newest version is predominantly asynchronous with the async library , but it can be made sync also ,so which one do I do ? asynchronous implementation is fine?

The old implementation is synchronous, so we need to stick to synchronous. As you know in Python using async in one place will taint all other calls with async thus flips the whole solution upside down. So let's stick to the old design :-)

ps/2: I really liked Python some time ago until it became self-incompatible nightmare changing language syntax, standard library components and API, changing ecosystem syntax and functionalities (i.e. pip). This makes Python not much trustworthy solution when you think in long term maintenance terms. There could be completely alternative solution here just to avoid Python and rewrite this tool in C that will not change in time. Maybe tool like this already exist? Or maybe Python developers provided a quick-fix information when introducing this breaking change of telnet module removal what alternatives / solutions do they offer instead?

@fdcavalcanti
Copy link
Contributor

fdcavalcanti commented Feb 20, 2026

@Biancaa-R: @cederom I need a small help , so the older version is fully synchronous , the newest version is predominantly asynchronous with the async library , but it can be made sync also ,so which one do I do ? asynchronous implementation is fine?

The old implementation is synchronous, so we need to stick to synchronous. As you know in Python using async in one place will taint all other calls with async thus flips the whole solution upside down. So let's stick to the old design :-)

ps/2: I really liked Python some time ago until it became self-incompatible nightmare changing language syntax, standard library components and API, changing ecosystem syntax and functionalities (i.e. pip). This makes Python not much trustworthy solution when you think in long term maintenance terms. There could be completely alternative solution here just to avoid Python and rewrite this tool in C that will not change in time. Maybe tool like this already exist? Or maybe Python developers provided a quick-fix information when introducing this breaking change of telnet module removal what alternatives / solutions do they offer instead?

The deprecation was announced some time ago (2019!). The current telnetlib page gives us alternatives:
https://docs.python.org/3.13/library/telnetlib.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Tooling Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants