Skip to content

gh-99138: Isolate _zoneinfo#99218

Merged
erlend-aasland merged 30 commits into
python:mainfrom
erlend-aasland:isolate-zoneinfo
Feb 15, 2023
Merged

gh-99138: Isolate _zoneinfo#99218
erlend-aasland merged 30 commits into
python:mainfrom
erlend-aasland:isolate-zoneinfo

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented Nov 7, 2022

Copy link
Copy Markdown
Contributor

@erlend-aasland erlend-aasland changed the title gh-99138: Isolate zoneinfo gh-99138: Isolate _zoneinfo Nov 7, 2022
@erlend-aasland

erlend-aasland commented Nov 7, 2022

Copy link
Copy Markdown
Contributor Author

@pganssle I can break this up in several PRs; let me know what works best for you.

Comment thread Modules/_zoneinfo.c Outdated
Comment thread Modules/_zoneinfo.c
}

/*[clinic input]
@classmethod

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do we need the defining_class converter for @classmethods?

@erlend-aasland erlend-aasland added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 7, 2022
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @erlend-aasland for commit 573aec1 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 7, 2022

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

You've beat me to it :)
Thanks!

Comment thread Modules/_zoneinfo.c
@erlend-aasland

Copy link
Copy Markdown
Contributor Author

You've beat me to it :)
Thanks!

Sorry, I was not aware that you were working on a PR; I should've asked first.

@erlend-aasland erlend-aasland added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 15, 2022
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @erlend-aasland for commit 6e69e93 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 15, 2022

@kumaraditya303 kumaraditya303 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@erlend-aasland

Copy link
Copy Markdown
Contributor Author

Thanks for the review, Kumar. I'll wait until Monday with landing this, to give @pganssle a chance to chime in.

@erlend-aasland erlend-aasland self-assigned this Feb 8, 2023

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

One minor suggestion here, and it's mostly a documentation thing, otherwise this looks good to me!

Thanks for doing this Erland, sorry for the long delay in reviewing.

Hopefully the tests I put in place for the cache stuff are robust 😅 That kind of thing is hard to test well, and this is the kind of change that really needs it 😛

Comment thread Modules/_zoneinfo.c
Comment thread Modules/_zoneinfo.c
@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.

@erlend-aasland

Copy link
Copy Markdown
Contributor Author

Hopefully the tests I put in place for the cache stuff are robust 😅 That kind of thing is hard to test well, and this is the kind of change that really needs it 😛

Yeah, I know, changes like this need really good test suites! I'll take a look at the coverage before and after the change, just to see that we've at least got all the branches covered.

Thanks for the review 🙂

Comment thread Doc/library/zoneinfo.rst
@erlend-aasland

Copy link
Copy Markdown
Contributor Author

Good to go, @pganssle?

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

Looks good to me! Thanks again for doing this @erlend-aasland and thanks for doing the heavy lifting in the review @kumaraditya303

@pganssle

Copy link
Copy Markdown
Member

I don't think it needs to block this particular PR, but is the subinterpreter work advanced enough that we can add an actual test that the module isolation worked yet?

I'm guessing the answer is no because we need to import datetime to get the timedeltas, and datetime is not isolated?

@erlend-aasland

Copy link
Copy Markdown
Contributor Author

I don't think it needs to block this particular PR, but is the subinterpreter work advanced enough that we can add an actual test that the module isolation worked yet?

Subinterpreter testing is not optimal yet. There's some machinery in test_embed / Programs/_testembed.c. See also #98627. Thanks for bringing that up.

I'm guessing the answer is no because we need to import datetime to get the timedeltas, and datetime is not isolated?

Correct, _datetime is not isolated yet; I've got a fairly up to date proof-of-concept patch for it, though.

@erlend-aasland

Copy link
Copy Markdown
Contributor Author

Thanks again for the reviews, Kumar and Paul; highly appreciated.

@erlend-aasland erlend-aasland merged commit c1ce0d1 into python:main Feb 15, 2023
@erlend-aasland erlend-aasland deleted the isolate-zoneinfo branch February 15, 2023 21:58
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