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

2019-12-07 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-12-07 Thread miss-islington


miss-islington  added the comment:


New changeset 7fde4f446a3dcfed780a38fbfcd7c0b4d9d73b93 by Miss Islington (bot) 
in branch '3.8':
bpo-38529: Fix asyncio stream warning (GH-17474)
https://github.com/python/cpython/commit/7fde4f446a3dcfed780a38fbfcd7c0b4d9d73b93


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-12-07 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 7ddcd0caa4c2e6b43265df144f59c5aa508a94f2 by Andrew Svetlov in 
branch 'master':
bpo-38529: Fix asyncio stream warning (GH-17474)
https://github.com/python/cpython/commit/7ddcd0caa4c2e6b43265df144f59c5aa508a94f2


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-12-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16970
pull_request: https://github.com/python/cpython/pull/17492

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-12-05 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
versions: +Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-12-05 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
keywords: +patch
pull_requests: +16956
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17474

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-11-13 Thread Alexander Mohr


Change by Alexander Mohr :


--
nosy: +thehesiod

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-10-27 Thread Yury Selivanov


Yury Selivanov  added the comment:

Yes, I've experienced this bug. We need to fix this in 3.8.1.

--
nosy: +lukasz.langa
priority: normal -> release blocker

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-10-27 Thread Ron Frederick


Ron Frederick  added the comment:

Sorry, I should have said that the change below was in the file 
asyncio/streams.py.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-10-27 Thread Ron Frederick


Ron Frederick  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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-10-25 Thread Jeong-Min Lee


Change by Jeong-Min Lee :


--
nosy: +falsetru

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-10-19 Thread Caleb Hattingh


Change by Caleb Hattingh :


--
nosy: +cjrh

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-10-19 Thread Ron Frederick


New submission from Ron Frederick :

In testing AsyncSSH against Python 3.8, I noticed a large number of the 
following errors, even though I was properly closing streams before the objects 
holding them were garbage-collected.

An open stream object is being garbage collected; call "stream.close()" 
explicitly.

After some investigation, the problem appears to be that closing a stream is 
not good enough to prevent the error. The check in asyncio doesn't properly 
handle the case where the stream is closing, but has not fully closed. Here's a 
simple test program that demonstrates this:

import asyncio

async def tcp_client():
reader, writer = await asyncio.open_connection('127.0.0.1', 22)

writer.close()

asyncio.run(tcp_client())

It's possible to avoid this message by awaiting on writer.wait_closed(), but 
wait_closed() doesn't exist until Python 3.7, making it very difficult to write 
portable code and still avoid this message.

--
components: asyncio
messages: 354953
nosy: Ron Frederick, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Python 3.8 improperly warns about closing properly closed streams
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com