Here's a pull request designed to fix the issue reported in #368.
This commit re-orders the initialization code in the _UnixReadPipeTransport
and _UnixWritePipeTransport constructors to make sure all members are
assigned a value, even in the case where ValueError is raised due to
an incompatible type of pipe. This avoids exceptions being raised in
repr() due to the missing members.
In the case where ValueError is raised, this commit also clears the values
of _pipe, _fileno, and _protocol since this transport isn't returned,
avoiding a spurious "unclosed transport" warning when the object is
garbage-collected.
Here's a pull request designed to fix the issue reported in #368.
This commit re-orders the initialization code in the _UnixReadPipeTransport and _UnixWritePipeTransport constructors to make sure all members are assigned a value, even in the case where ValueError is raised due to an incompatible type of pipe. This avoids exceptions being raised in repr() due to the missing members.
In the case where ValueError is raised, this commit also clears the values of _pipe, _fileno, and _protocol since this transport isn't returned, avoiding a spurious "unclosed transport" warning when the object is garbage-collected.