Closed wshanks closed 8 months ago
Thanks for looking into relevant deprecation warnings! #623 should take care of the co_lines
thing (that was refreshingly straightforward, compared to the half-documented old scheme). As for the constants from telnetlib
, I agree with you that we should simply copy them over and call it a day.
Forgot to ask: would you mind creating a PR for the telnetlib changes?
Sure, I will give it a shot!
Thanks for getting fixes for these warnings merged in quickly @inducer! Some projects I work on convert all DeprecationWarning
s to exceptions in their test configurations, so it was a little inconvenient that pudb.remote.set_trace
would crash when trying to debug tests (though it is not that hard to edit the test configuration to work around it).
Describe the bug Python 3.12 has deprecated telnetlib. It is going to be removed in 3.13.
To Reproduce Use
pudb.remote.set_trace()
in code and then connect to the telnet session.Expected behavior No deprecation warning
Screenshots This is the terminal output:
Additional context It looks like the code only uses
telnetlib
for the constants, not for any functions, so it should be easy to vendor them in. At first, I thought it would be necessary to migrate to something like telnetlib3.There is an additional deprecation warnging after the telnet one:
It looks like
co_lines
was added in 3.10, so to support older versions of Python some conditional would need to be used: https://docs.python.org/3/whatsnew/3.10.html#pep-626-precise-line-numbers-for-debugging-and-other-toolsVersions Python 3.12, pudb 2023.1