Skip to content

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

@corona10corona10 commented Jun 13, 2020

Copy link
Copy Markdown
Member

@corona10

Copy link
Copy Markdown
MemberAuthor

@shihai1991 PTAL!

@corona10

corona10 commented Jun 13, 2020

Copy link
Copy Markdown
MemberAuthor

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

./python.exe -m test test_dbm -R 3:3
deftest_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 threadModules/_dbmmodule.c Outdated

@corona10corona10 left a comment

Copy link
Copy Markdown
MemberAuthor

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

@shihai1991shihai1991 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.

Thanks, LGTM.

Comment threadModules/_dbmmodule.c
Comment threadModules/_dbmmodule.c
Comment threadModules/_dbmmodule.c Outdated
@bedevere-bot

Copy link
Copy Markdown

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

@corona10corona10 left a comment

Copy link
Copy Markdown
MemberAuthor

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

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

@vstinnervstinner 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.

Thanks! It's now much better!

Comment threadModules/_dbmmodule.c Outdated
Comment threadModules/_dbmmodule.c Outdated
Comment threadModules/_dbmmodule.c
Comment threadModules/_dbmmodule.c
Comment threadModules/_dbmmodule.c Outdated
@corona10
corona10 requested a review from vstinnerJune 15, 2020 15:56

@vstinnervstinner 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.

LGTM, thanks!

@corona10
corona10 merged commit bf69a8f into python:masterJun 15, 2020
@corona10
corona10 deleted the bpo-1635741-dbm branch June 15, 2020 16:21
Sign up for freeto 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

@corona10@bedevere-bot@vstinner@shihai1991@the-knights-who-say-ni