[issue19321] memoryview should be a context manager

2013-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Well, it was not only proposed, but it was also implemented (by Antoine). Oh, sorry for the noise. -- resolution: -> out of date stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue19321] memoryview should be a context manager

2013-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And thank you Antoine for this. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue19321] memoryview should be a context manager

2013-10-20 Thread STINNER Victor
STINNER Victor added the comment: > Already proposed in issue9757. Well, it was not only proposed, but it was also implemented (by Antoine). Python 3.4.0a3+ (default:84a8b797c5c5+, Oct 20 2013, 16:02:32) [GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux Type "help", "copyright", "credits" or "li

[issue19321] memoryview should be a context manager

2013-10-20 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue19321] memoryview should be a context manager

2013-10-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Already proposed in issue9757. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue19321] memoryview should be a context manager

2013-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +pitrou, skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue19321] memoryview should be a context manager

2013-10-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: memoryview() acquires resource but it rarely released explicitly. I propose to made memoryview a context manager which calls the release() method in the __exit__() method. Perhaps it worth also add resource warning in the __del__() method if a memoryview w