[issue22272] sqlite3 memory leaks in cursor.execute
New submission from A. Libotean: There are significant memory leaks when multiple insert statements are executed with distinct values. sqlite3 version is 2.6.0 The attached file contains two variants: * one which uses string interpolation to build the query: this generates severe leakeage * the other one is using parametrized queries and the leakeage is not as bad I'm assuming that somehow the query string reference is not freed properly. -- components: Extension Modules files: leaking.py messages: 225878 nosy: alibotean, ghaering priority: normal severity: normal status: open title: sqlite3 memory leaks in cursor.execute type: resource usage versions: Python 2.7 Added file: http://bugs.python.org/file36470/leaking.py ___ Python tracker <http://bugs.python.org/issue22272> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22272] sqlite3 memory leaks in cursor.execute
A. Libotean added the comment: > I'm not sure that it's a leak because it doesn't depend on the number of > queries nor the number of run of the test. It's maybe an internal sqlite > cache. You're right, the "leak" does not increase past ~300 queries executed. -- ___ Python tracker <http://bugs.python.org/issue22272> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22272] sqlite3 memory leaks in cursor.execute
A. Libotean added the comment: > Can we close this issue then? Yes, please. Sorry for the false alarm. -- ___ Python tracker <http://bugs.python.org/issue22272> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20136] Logging: StreamHandler does not use OS line separator.
New submission from A. Libotean: The StreamHandler implementation uses hardcoded Unix/Linux line separators. This generates inconveniences when running on Windows as the file viewers expect DOS line terminators. I've attached a fix that will use os.linesep as the line terminator thus making the log files usable with Windows utilities. Please revise the fix and consider including it. -- components: Library (Lib) files: streamhandler.py messages: 207416 nosy: alibotean priority: normal severity: normal status: open title: Logging: StreamHandler does not use OS line separator. type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file33321/streamhandler.py ___ Python tracker <http://bugs.python.org/issue20136> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20137] Logging: RotatingFileHandler computes string length instead of byte representation length.
New submission from A. Libotean: Current implementation of RotatingFileHandler ignores the encoding when computing the entry byte length. I've attached a modified version that will compute the entry lenght in bytes. -- components: Library (Lib) files: rotatingfilehandler.py messages: 207417 nosy: alibotean priority: normal severity: normal status: open title: Logging: RotatingFileHandler computes string length instead of byte representation length. type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file33322/rotatingfilehandler.py ___ Python tracker <http://bugs.python.org/issue20137> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20137] Logging: RotatingFileHandler computes string length instead of byte representation length.
A. Libotean added the comment: Sure, will come back shortly with a patch. -- ___ Python tracker <http://bugs.python.org/issue20137> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20136] Logging: StreamHandler does not use OS line separator.
A. Libotean added the comment: Let me write also a test for this and come back with a reply. -- ___ Python tracker <http://bugs.python.org/issue20136> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20136] Logging: StreamHandler does not use OS line separator.
A. Libotean added the comment: You can go ahead and close this. I ran some tests and concluded that indeed the IO system will take care of the line separators. Sorry to have wasted your time. -- ___ Python tracker <http://bugs.python.org/issue20136> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20137] Logging: RotatingFileHandler computes string length instead of byte representation length.
A. Libotean added the comment: > Which encoding are you using, such that the difference in length between > encoded and decoded messages is significant? I agree right off the bat that the error in size is not significant. Only the length of the last appended line is computed erroneously. I'm uploading the patch in case you decide to apply it. Thanks. -- ___ Python tracker <http://bugs.python.org/issue20137> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com