Uh oh!
There was an error while loading. Please reload this page.
bpo-1635741: Port _gdbm module to multiphase initialization - #20920
Conversation
I' ve checked the memory leak with these scripts and no leaks found deftest_gdbm(self):
code=textwrap.dedent(r""" import glob import test.support dbm = test.support.import_module('_gdbm') # or dbm = test.support.import_module('dbm') _fname = test.support.TESTFN def delete_files(): for f in glob.glob(_fname + "*"): test.support.unlink(f) f = dbm.open(_fname, 'n') f[b'g'] = b"indented" f.close() delete_files() """)
ret=test.support.run_in_subinterp(code)
self.assertEqual(ret, 0) |
corona10
commented
Jun 16, 2020
Note that |
vstinner
left a comment
There was a problem hiding this comment.
LGTM.
Minor remarks:
- I'm not sure why only a few methods uses the defining class, whereas some others use Py_TYPE(self).
- nitpick: some "clinic input" uses an empty line betwen the function name and its parameters, sometimes there is none.
But I don't think that it's worth it to address these minor things. If you care, you may also update _dbmmodule.c. Maybe in a follow-up PRs.
Uh oh!
There was an error while loading. Please reload this page.
vstinner
commented
Jun 16, 2020
Maybe open an issue to track this bug. |
vstinner
commented
Jun 16, 2020
Well, I added a comment to: https://bugs.python.org/issue40987#msg371679 |
corona10
commented
Jun 16, 2020
Oh I mean the subinterpreter test with |
corona10
commented
Jun 16, 2020
@vstinner Thanks for the review! |
vstinner
commented
Jun 16, 2020
Oh ok, that's great! Sorry, I misunderstood your comment. |
https://bugs.python.org/issue1635741