Replace the obsolete library telnetlib#1228
Merged
bcoconni merged 1 commit intoJSBSim-Team:masterfrom Mar 21, 2025
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1228 +/- ##
=======================================
Coverage 24.77% 24.77%
=======================================
Files 169 169
Lines 19421 19421
=======================================
Hits 4812 4812
Misses 14609 14609 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bcoconni
added a commit
to bcoconni/jsbsim
that referenced
this pull request
Mar 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We are using the library
telnetlibin our test tests/TestInputSocket.py. However, according to the PEP 594, starting from Python 3.13, the library is no longer part of the Python standard library.I guess this is in reaction to community complaints such as Amber Brown's talk: Batteries Included, But They're Leaking which apparently drove Guido van Rossum mad (he left the room). So the Python foundation elected to solve the problem by pushing the red button and nuking a number of poorly maintained standard libraries such as
telnetlib(check PEP 594 for details).We are quite fortunate that
telnetlibis among the few libraries for which PEP 594 suggests alternatives: telnetlib3 and Exscript. The latter is obviously over-engineered for our need so I've chosentelnetlib3.Pros:
TestInputsocket.pyto be executed by Python 3.13+telnetlib3relies onasynciowhich should resolve a number of synchronization problems we are having and that are leading to CI jobs random failure.Cons:
TestInputSocketworks well for the CI workflow, I've had a couple of instances where the test was hanging (mostly on Windows). This means that we might be unable to run the test locally.