← 返回首页
bpo-1635741: Port _dbm module to multiphase initialization by corona10 · Pull Request #20848 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

bpo-1635741: Port _dbm module to multiphase initialization#20848

Merged
corona10 merged 9 commits into
python:masterfrom
corona10:bpo-1635741-dbm
Jun 15, 2020
Merged

bpo-1635741: Port _dbm module to multiphase initialization#20848
corona10 merged 9 commits into
python:masterfrom
corona10:bpo-1635741-dbm

Conversation

corona10 commented Jun 13, 2020
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member Author

@shihai1991 PTAL!

corona10 commented Jun 13, 2020
edited
Loading

Copy link
Copy Markdown
Member Author

I' ve checked the memory leak with these scripts and no leaks found

./python.exe -m test test_dbm -R 3:3
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)

Comment thread Modules/_dbmmodule.c Outdated Show resolved Hide resolved

corona10 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

@shihai1991 Thanks shihai! I've updated it

shihai1991 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Thanks, LGTM.

Comment thread Modules/_dbmmodule.c Show resolved Hide resolved
Comment thread Modules/_dbmmodule.c Show resolved Hide resolved
Comment thread Modules/_dbmmodule.c Outdated Show resolved Hide resolved

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

corona10 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

I have made the requested changes; please review again

corona10 requested a review from vstinner June 15, 2020 15:05
Comment thread Modules/_dbmmodule.c Outdated Show resolved Hide resolved
Comment thread Modules/_dbmmodule.c Outdated Show resolved Hide resolved
Comment thread Modules/_dbmmodule.c Outdated Show resolved Hide resolved
corona10 and others added 2 commits June 16, 2020 00:20
Co-authored-by: Victor Stinner <vstinner@python.org>
corona10 requested a review from vstinner June 15, 2020 15:24

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Thanks! It's now much better!

Comment thread Modules/_dbmmodule.c Outdated Show resolved Hide resolved
Comment thread Modules/_dbmmodule.c Outdated Show resolved Hide resolved
Comment thread Modules/_dbmmodule.c Show resolved Hide resolved
Comment thread Modules/_dbmmodule.c Show resolved Hide resolved
Comment thread Modules/_dbmmodule.c Outdated Show resolved Hide resolved
corona10 requested a review from vstinner June 15, 2020 15:56

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

LGTM, thanks!

corona10 merged commit bf69a8f into python:master Jun 15, 2020
corona10 deleted the bpo-1635741-dbm branch June 15, 2020 16:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Footer

© 2026 GitHub, Inc.