[issue38529] Python 3.8 improperly warns about closing properly closed streams

Ron Frederick report at bugs.python.org
Sun Oct 27 12:38:07 EDT 2019


Ron Frederick <ronf at timeheart.net> added the comment:

I think the following change might address this problem:

***************
*** 233,239 ****
  
      def _on_reader_gc(self, wr):
          transport = self._transport
!         if transport is not None:
              # connection_made was called
              context = {
                  'message': ('An open stream object is being garbage '
--- 233,239 ----
  
      def _on_reader_gc(self, wr):
          transport = self._transport
!         if transport is not None and not transport.is_closing():
              # connection_made was called
              context = {
                  'message': ('An open stream object is being garbage '

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38529>
_______________________________________


More information about the Python-bugs-list mailing list