Message104337
This issue is specific to Python 2.6. It can be reproduced with:
./python -E -tt ./Lib/test/regrtest.py -l -w test_pep263 test_operator test_asynchat test_zipimport_support test_pydoc test_code test_dis test_quopri test_doctest test_class test_sax test_fileio test_asyncore test_mailbox test_abstract_numbers test_uuid test_io test_enumerate test_property test_codecs
Or with this little test case:
----
import codecs, _codecs, sys, encodings
encoding = "cp1252"
codec = _codecs.lookup(encoding)
modname = 'encodings.%s' % encoding
__import__(modname)
del sys.modules[modname]
delattr(encodings, encoding)
encoder = codecs.getincrementalencoder(encoding)()
encoder.encode("", True)
----
module_dealloc() was modified in python trunk: the dictionary is only cleared if the reference counter is equal to 1.
/* If we are the only ones holding a reference, we can clear the dictionary. */
if (Py_REFCNT(m->md_dict) == 1) _PyModule_Clear((PyObject *)m); |
|
Date |
User |
Action |
Args |
2010-04-27 17:19:32 | vstinner | set | recipients:
+ vstinner, pitrou, benjamin.peterson, srid |
2010-04-27 17:19:31 | vstinner | set | messageid: <1272388771.71.0.52121639704.issue7027@psf.upfronthosting.co.za> |
2010-04-27 17:19:29 | vstinner | link | issue7027 messages |
2010-04-27 17:19:28 | vstinner | create | |
|