bpo-1635741: Port _lzma module to multiphase initialization by corona10 · Pull Request #19382 · python/cpython (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation13 Commits5 Checks0 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

corona10

@corona10

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

class SubinterpThreadingTests(unittest.TestCase): def test_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

shihai1991

shihai1991

Choose a reason for hiding this comment

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

thanks, LGTM.

@corona10

@corona10

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

@corona10

@corona10

@corona10

@corona10

vstinner

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.

@corona10

fasih pushed a commit to fasih/cpython that referenced this pull request

Jun 29, 2020

@corona10 @fasihahmad

arun-mani-j pushed a commit to arun-mani-j/cpython that referenced this pull request

Jul 21, 2020

@corona10 @arun-mani-j

@kylotan kylotan mannequin mentioned this pull request

Sep 19, 2022