[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-12-04 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-12-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0091f349cde179ea991f4ee4d095119cd1fc3802 by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-29564: warnings suggests to enable tracemalloc (GH-10486) (GH-10509)
https://github.com/python/cpython/commit/0091f349cde179ea991f4ee4d095119cd1fc3802


--

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-11-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ae8878176d6dc1878d1e792ac4308ca1920b103b by Victor Stinner in 
branch '3.6':
bpo-29564:_PyMem_DumpTraceback() suggests enabling tracemalloc (GH-10510) 
(GH-10518)
https://github.com/python/cpython/commit/ae8878176d6dc1878d1e792ac4308ca1920b103b


--

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-11-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d57a3e5d03efdda6247c27bd682872edf399d88b by Victor Stinner in 
branch '3.7':
bpo-29564:_PyMem_DumpTraceback() suggests enabling tracemalloc (GH-10510) 
(GH-10517)
https://github.com/python/cpython/commit/d57a3e5d03efdda6247c27bd682872edf399d88b


--

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-11-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9777

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-11-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9776

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-11-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9774

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-11-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9775

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-11-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f966e5397ed8f5c42c185223fc9b4d750a678d02 by Victor Stinner in 
branch 'master':
bpo-29564:_PyMem_DumpTraceback() suggests enabling tracemalloc (GH-10510)
https://github.com/python/cpython/commit/f966e5397ed8f5c42c185223fc9b4d750a678d02


--

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-11-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9770

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-11-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9769

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-11-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2c07c493d2eb45101312e3eb3a77f94d0c9cad1f by Victor Stinner in 
branch 'master':
bpo-29564: warnings suggests to enable tracemalloc (GH-10486)
https://github.com/python/cpython/commit/2c07c493d2eb45101312e3eb3a77f94d0c9cad1f


--

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-11-12 Thread STINNER Victor


STINNER Victor  added the comment:

Example:
---
import warnings
import tracemalloc

#tracemalloc.start(5)

# always log ResourceWarning messages
warnings.simplefilter("always", ResourceWarning)
def func():
f = open(__file__)
# emit ResourceWarning
f = None
func()
---

Output with Python 3.7:
---
$ python3 script.py
script.py:11: ResourceWarning: unclosed file <_io.TextIOWrapper 
name='script.py' mode='r' encoding='UTF-8'>
  f = None
---

Output with my attached PR 10486:
---
$ python3 script.py
script.py:11: ResourceWarning: unclosed file <_io.TextIOWrapper 
name='script.py' mode='r' encoding='UTF-8'>
  f = None
ResourceWarning: Enable tracemalloc to get the object allocation traceback
---

Finally, if tracemalloc is enabled:
---
$ ./python -X tracemalloc=5 script.py 
script.py:11: ResourceWarning: unclosed file <_io.TextIOWrapper 
name='script.py' mode='r' encoding='UTF-8'>
  f = None
Object allocated at (most recent call last):
  File "script.py", lineno 12
func()
  File "script.py", lineno 9
f = open(__file__)
---

--
resolution: not a bug -> 

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-11-12 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +9748
stage: test needed -> patch review

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-10-19 Thread STINNER Victor


STINNER Victor  added the comment:

> @stinner: https://haypo.github.io/contrib-cpython-2016q1.html is now showing 
> a 404 error.  Has the site moved?  Do you have a working URL?

Yes, it moved to:
https://vstinner.github.io/contrib-cpython-2016q1.html

--

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-10-19 Thread Marius Gedminas


Marius Gedminas  added the comment:

@stinner: https://haypo.github.io/contrib-cpython-2016q1.html is now showing a 
404 error.  Has the site moved?  Do you have a working URL?

(I did find https://docs.python.org/3/whatsnew/3.6.html#warnings, which was 
very helpful.)

--
nosy: +mgedmin

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-01-18 Thread Jesse Bakker

Change by Jesse Bakker :


--
nosy: +Jesse Bakker

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2018-01-18 Thread Me01100Nobody

Change by Me01100Nobody :


--
nosy: +Me01100Nobody

___
Python tracker 

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



[issue29564] ResourceWarning: suggest to enable tracemalloc in the message

2017-02-15 Thread STINNER Victor

STINNER Victor added the comment:

To be clear: warnings should only suggest to enable tracemalloc if 
tracemalloc.is_tracing() is False.

It is possible to tracemalloc is tracing, but failed (for different reasons) to 
track where the memory of the resource was allocated.

--
title: ResourceWarning tracking is attaching incorrect file:position to 
unclosed socket -> ResourceWarning: suggest to enable tracemalloc in the message

___
Python tracker 

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