New submission from Valery Lesin <valery.le...@gmail.com>:

Interpreter: Python 3.1.2

Sample:

===== first.py =====
import sys
import second 

if 'second' in sys.modules:
  print ('in sys modules')
  del sys.modules['second']

del second

===== second.py =====
class A:
 def __init__(self):
   print('created')

 def __del__(self):
   print('destroyed')

a = A()
---------------------------------------------

Result: 'destroyed' isn't printed
With Python 2.6.5 it worked fine

----------
components: Interpreter Core
messages: 118408
nosy: Valery.Lesin
priority: normal
severity: normal
status: open
title: global objects created in some module are not destroyed when last 
reference to that module is released
type: behavior
versions: Python 3.1, Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10068>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to