[issue6483] Modules are not deallocated correctly if m_size = -1

2010-04-20 Thread Julian Andres Klode

Julian Andres Klode  added the comment:

This bug still exists in Python 3.1.2.

--

___
Python tracker 

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



[issue6483] Modules are not deallocated correctly if m_size = -1

2010-04-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Well, in 2.x you didn't even have the choice. The dict of an extension module 
was always copied, becoming essentially immortal. In 3.x you can use an 
m_size>=0 so as to disable this behaviour.

--
nosy: +pitrou
versions: +Python 3.2

___
Python tracker 

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



[issue6483] Modules are not deallocated correctly if m_size = -1

2009-07-14 Thread Julian Andres Klode

New submission from Julian Andres Klode :

The documentation states that m_size should be -1 if no additional
memory is needed. But this causes the objects inside the module to not
be deallocated at all.

The attached module (test) stores an object of a type 'Test', which
prints "Deallocation is happening" in it's tp_dealloc. If m_size in the
TestModule is set to -1, this is never reached. If it is 0, it is reached.

--
components: Interpreter Core
files: test.c
messages: 90514
nosy: jak
severity: normal
status: open
title: Modules are not deallocated correctly if m_size = -1
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file14500/test.c

___
Python tracker 

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



[issue6483] Modules are not deallocated correctly if m_size = -1

2009-07-14 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee:  -> loewis
nosy: +loewis

___
Python tracker 

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



[issue6483] Modules are not deallocated correctly if m_size = -1

2009-07-15 Thread Julian Andres Klode

Julian Andres Klode  added the comment:

I believe this may be related to Python/import.c (l. 592):

   def->m_base.m_copy = PyDict_Copy(dict);

It creates a copy of the module dictionary, but the reference count of
this copy is not decreased when the module object is deallocated, thus
causing the objects contained therein to be not allocated as well.

--

___
Python tracker 

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



[issue6483] Modules are not deallocated correctly if m_size = -1

2013-05-26 Thread Mark Lawrence

Mark Lawrence added the comment:

Please correct me if I'm wrong but I believe this applies to all Python 3 
versions.

--
nosy: +BreamoreBoy
versions: +Python 3.3, Python 3.4

___
Python tracker 

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