Skip to content

Conversation

@picnixz
Copy link

@picnixz picnixz commented Dec 7, 2025

No description provided.

@picnixz picnixz closed this Dec 7, 2025
@picnixz
Copy link
Author

picnixz commented Dec 7, 2025

The base branch went wrong !

@picnixz picnixz reopened this Dec 7, 2025
@picnixz picnixz changed the base branch from main to lazy December 7, 2025 10:18
Copy link

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

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

LGTM

@picnixz
Copy link
Author

picnixz commented Dec 7, 2025

I think this one should be applied at the end of my chain of PR. All other PRs can be merged sequentially but this one causes a conflict, so it's better to make it last.

@picnixz picnixz marked this pull request as draft December 7, 2025 14:45
@picnixz picnixz marked this pull request as ready for review December 8, 2025 00:12
@picnixz
Copy link
Author

picnixz commented Dec 8, 2025

FTR, I need to update the tests: Empty module name -> empty module name

@picnixz picnixz marked this pull request as draft December 8, 2025 00:27
Copy link

@DinoV DinoV left a comment

Choose a reason for hiding this comment

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

Just a couple of small nits but otherwise LGTM


PyObject *globals = PyEval_GetGlobals();

if (PyMapping_GetOptionalItem(lz->lz_builtins, &_Py_ID(__import__), &import_func) < 0) {
Copy link

Choose a reason for hiding this comment

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

This open bracket should be on the same line?

Copy link
Author

@picnixz picnixz Dec 13, 2025

Choose a reason for hiding this comment

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

Well... strictly speaking, the entire call should be wrapped weirdly according to PEP-7 but we're not exceeding the line for too much so I'm applying the principle of "let's not be nitpick" here. I'm just making sure that the code doesn't exceed too much the 80 chars width (otherwise I really need to scroll and it's a bit annoying I think for readers)

@picnixz
Copy link
Author

picnixz commented Dec 13, 2025

After checking a bit why the test actually failed, it's because the message was like this since 2010. So I won't change "Empty module" to "empty module" (I thought it was a new message).

@picnixz picnixz marked this pull request as ready for review December 13, 2025 17:15
@picnixz picnixz requested a review from DinoV December 13, 2025 17:26
@picnixz
Copy link
Author

picnixz commented Dec 13, 2025

@DinoV Actually, maybe you prefer to hold that PR in case something else changes in the main branch? I can definitely update it when nothing more needs to be added so that I only need to reformat the code once. WDYT?

@Yhg1s
Copy link

Yhg1s commented Dec 16, 2025

Let's get this in now. If we have merge conflicts with these changes we'd have them without these changes as well, and if we leave this pending we'd have two chances of getting merge conflicts :)

@Yhg1s Yhg1s merged commit 3a535de into LazyImportsCabal:lazy Dec 16, 2025
@picnixz picnixz deleted the pablo/lazy/imports-c-pep-7 branch December 16, 2025 22:42
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.

4 participants