[issue27932] platform.win32_ver() leaks in 2.7.12

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +898 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-21 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-17 Thread Steve Dower
Steve Dower added the comment: Phew. Doing that in a reasonable way for all the active versions was a pain, but I think I managed it. In short: * 2.7 gets the fix proposed by Eryk Sun * 3.5 gets a private sys.getwindowsversion()._platform_version member * 3.6+ gets a public/documented sys.getwi

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset db4b254f5df4 by Steve Dower in branch '3.5': Issue #27932: Prevent memory leak in win32_ver(). https://hg.python.org/cpython/rev/db4b254f5df4 New changeset 14fca2c8eb36 by Steve Dower in branch '3.6': Issue #27932: Prevent memory leak in win32_ver()

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9b0d661a16de by Steve Dower in branch '2.7': Issue #27932: Prevent memory leak in win32_ver(). https://hg.python.org/cpython/rev/9b0d661a16de -- ___ Python tracker ___

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-11 Thread Eryk Sun
Eryk Sun added the comment: Limiting the pointer-type cache could be a problem. It's expected that POINTER() returns a reference to an existing pointer type. ctypes uses Python types to ensure compatible C data types. For example: LP_c_int = ctypes.POINTER(ctypes.c_int) class LP_c_int

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-11 Thread STINNER Victor
STINNER Victor added the comment: > pointer-type cache grows without bound Maybe we should also fix ctypes to use an LRU cache like @functools.lru_cache? A cache without limit doesn't seem like a good idea. -- ___ Python tracker

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-10 Thread Eryk Sun
Eryk Sun added the comment: The leak is due the pointer-type cache that ctypes.POINTER uses. The type the pointer refers to is used as the key. In this case, VS_FIXEDFILEINFO is created each time win32_ver is called, so the pointer-type cache grows without bound. Example leak: >>> import

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset dbfcb3b9c3c1 by Steve Dower in branch '3.5': Issue #27932: Backs out change https://hg.python.org/cpython/rev/dbfcb3b9c3c1 -- ___ Python tracker __

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-10 Thread Steve Dower
Steve Dower added the comment: Backed out because of issue28059. I'll rewrite this to properly use native code. -- assignee: -> steve.dower ___ Python tracker ___ __

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-09 Thread Steve Dower
Steve Dower added the comment: I fixed in 3.5 and 3.6, but I'm not set up for 2.7 so someone will have to backport it. -- versions: +Python 3.5, Python 3.6 ___ Python tracker __

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 384c178cf823 by Steve Dower in branch '3.5': Issue #27932: Fixes memory leak in platform.win32_ver() https://hg.python.org/cpython/rev/384c178cf823 New changeset 31b7eaff5588 by Steve Dower in branch 'default': Issue #27932: Fixes memory leak in pla

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-01 Thread Okko Willeboordse
Okko Willeboordse added the comment: I did a gc.get_objects() before and after platform.win32_ver() and printed objects that were not present before calling platform.win32_ver(). If I run platform.win32_ver() in a loop I see the memory increasing. On 1 September 2016 at 17:35, STINNER Victor w

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-01 Thread STINNER Victor
STINNER Victor added the comment: Hum, can you please elaborate the issue? What is leaked_objects.txt? -- nosy: +haypo ___ Python tracker ___

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-01 Thread Okko Willeboordse
New submission from Okko Willeboordse: Running; Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32 platform.win32_ver() returns; ('10', '10.0.10586', '', u'Multiprocessor Free') -- components: Windows files: leaked_objects.txt messages: 274