[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called
Erlend E. Aasland
report at bugs.python.org
Wed May 12 10:50:55 EDT 2021
Erlend E. Aasland <erlend.aasland at innova.no> added the comment:
Adding GC to _csv types:
$ cat
import sys
import gc
for i in range(10):
import csv
del sys.modules['_csv']
del sys.modules['csv']
del csv
gc.collect()
print(sys.gettotalrefcount())
$ ./python.exe bug.py
73164
73164
73166
73166
73166
73166
73166
73166
73166
73166
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44116>
_______________________________________
More information about the Python-bugs-list
mailing list