-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-1635741: Port _dbm module to multiphase initialization #20848
Conversation
@shihai1991 PTAL! |
I' ve checked the memory leak with these scripts and no leaks found
def test_dbm(self):
code = textwrap.dedent(r"""
import glob
import test.support
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shihai1991 Thanks shihai! I've updated it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM.
When you're done making the requested changes, leave the comment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made the requested changes; please review again
Co-authored-by: Victor Stinner <vstinner@python.org>
26030f1
to
b325856
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It's now much better!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
https://bugs.python.org/issue1635741