Skip to content

bpo-1635741: Port _lzma module to multiphase initialization - #19382

Merged
corona10 merged 5 commits into
python:masterfrom
corona10:bpo-1635741-lzma
Jun 22, 2020
Merged

bpo-1635741: Port _lzma module to multiphase initialization #19382
corona10 merged 5 commits into
python:masterfrom
corona10:bpo-1635741-lzma

Conversation

@corona10

@corona10corona10 commented Apr 5, 2020

Copy link
Copy Markdown
Member

@corona10

Copy link
Copy Markdown
MemberAuthor

I ran the several leak test also for subinterp.
No leak was found on this change.

classSubinterpThreadingTests(unittest.TestCase):
deftest_lzma_subinterp(self):
code=textwrap.dedent(r""" import os from lzma import LZMACompressor, LZMADecompressor, LZMAError lzc = LZMACompressor() lzd = LZMADecompressor() def noop(*args): pass os.register_at_fork(after_in_child=noop) """)
ret=support.run_in_subinterp(code)

@corona10

Copy link
Copy Markdown
MemberAuthor

@shihai1991 Can you please take a look?

@corona10
corona10 requested a review from vstinnerApril 5, 2020 04:44
Comment threadModules/_lzmamodule.c Outdated
Comment threadModules/_lzmamodule.c Outdated
@corona10
corona10force-pushed the bpo-1635741-lzma branch 3 times, most recently from 7558ffb to 525190cCompareApril 5, 2020 13:03

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

@corona10

Copy link
Copy Markdown
MemberAuthor

@vstinner Please take a look :)

@corona10

Copy link
Copy Markdown
MemberAuthor
./python.exe -m test test_capi -R 3:3
0:00:00 load avg: 1.34 Run tests sequentially
0:00:00 load avg: 1.34 [1/1] test_capi
beginning 6 repetitions
123456
......
test_capi passed in 34.3 sec
== Tests result: SUCCESS ==
1 test OK.
Total duration: 34.3 sec
Tests result: SUCCESS

with patch (https://bugs.python.org/issue40149#msg365560)

./python.exe -m test test_threading -R 3:3
0:00:00 load avg: 1.84 Run tests sequentially
0:00:00 load avg: 1.84 [1/1] test_threading
beginning 6 repetitions
123456
......
test_threading passed in 1 min 11 sec
== Tests result: SUCCESS ==
1 test OK.
Total duration: 1 min 11 sec
Tests result: SUCCESS

@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. Just two minor coding style remarks.

Comment threadModules/_lzmamodule.c Outdated
Comment threadModules/_lzmamodule.c
Comment threadModules/_lzmamodule.c Outdated
@corona10
corona10 merged commit 1937edd into python:masterJun 22, 2020
@corona10
corona10 deleted the bpo-1635741-lzma branch June 22, 2020 15:53
fasih pushed a commit to fasih/cpython that referenced this pull request Jun 29, 2020
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@vstinner@shihai1991@the-knights-who-say-ni@bedevere-bot