Wrapper around pdb allowing remote debugging via netcat or telnet. This is especially useful in a Tomcat/Jython environment where little debugging tools are available.
On commit 9c9d4f487c81bd5c69a06d636a5121dcf00ba246 we added a wrapper to
provide missing parameters (ie: encoding) in the object returned by
makefile, unfortunately this didn't resolve all problems, as there are
some cases, like in method oslo_utils.encodeutils.safe_decode where when
accessing sys.stdin.encoding we would still get an error:
AttributeError: "'_fileobject' object has no attribute 'encoding'"
This patch fixes this issue and allows us to set the encoding when
instantiating the Rpdb object.
The way this has been fixed depends on the Python version:
For python 2 we extend _fileobject and add errors and encoding
variables as well as the isatty method.
For python 3 we pass encoding to the makefile call and then create
class attributes errors and isatty (since we cannot modify the
instance itself).
On commit 9c9d4f487c81bd5c69a06d636a5121dcf00ba246 we added a wrapper to provide missing parameters (ie:
encoding
) in the object returned bymakefile
, unfortunately this didn't resolve all problems, as there are some cases, like in method oslo_utils.encodeutils.safe_decode where when accessing sys.stdin.encoding we would still get an error:AttributeError: "'_fileobject' object has no attribute 'encoding'"
This patch fixes this issue and allows us to set the encoding when instantiating the Rpdb object.
The way this has been fixed depends on the Python version:
For python 2 we extend _fileobject and add
errors
andencoding
variables as well as theisatty
method.For python 3 we pass
encoding
to themakefile
call and then create class attributeserrors
andisatty
(since we cannot modify the instance itself).