Skip to content

bpo-23878: Remove the key parameter of _Py_FindEnvConfigValue() #15555

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

Already on GitHub? Sign in to your account

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Aug 27, 2019

@@ -734,8 +734,7 @@ _PyPathConfig_ComputeSysPath0(const PyWideStringList *argv, PyObject **path0_p)
/* Search for a prefix value in an environment file (pyvenv.cfg).
Copy link
Member

Choose a reason for hiding this comment

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

It doesn't search "for a prefix". It searchs for the the line "home=" and return <path>. It tolerates whitespaces around "=".

@vstinner vstinner changed the title Remove the key parameter of _Py_FindEnvConfigValue() bpo-23878: Remove the key parameter of _Py_FindEnvConfigValue() Aug 28, 2019
@vstinner
Copy link
Member

IMO it's fine to reuse https://bugs.python.org/issue23878 for this cleanup change. It gives more context about this change, than no bpo number.

Copy link
Member

@zooba zooba left a comment

Choose a reason for hiding this comment

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

If we're going to remove the key argument, we should also rename the function to reflect that it only finds home somehow.

Personally, I see no benefit here, and we may as well leave it alone. But if others think it's cleaner to have _Py_FindEnvConfigHomeValue instead of specifying L"home" in the call, I'm not going to fight it.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

And if you don't make the requested changes, you will be poked with soft cushions!

@csabella
Copy link
Contributor

csabella commented Feb 4, 2020

@ZackerySpytz, please resolve the merge conflicts and address the code review. If this change is no longer relevant, please close the PR. Thanks!

@csabella
Copy link
Contributor

@ZackerySpytz ping

@iritkatriel
Copy link
Member

https://bugs.python.org/issue23878 is closed. What is that status of this PR?

@vstinner
Copy link
Member

vstinner commented Aug 4, 2021

This PR is still relevant, but it's outdated. @ZackerySpytz: can you please rebase it on the main branch? Or create a new PR.

@kumaraditya303
Copy link
Contributor

kumaraditya303 commented Apr 14, 2022

Closing as it is has merge conflicts and bpo is closed, if required a new PR can be opened or this can reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants