Visitar URL original
bpo-23878: Remove the key parameter of _Py_FindEnvConfigValue() by ZackerySpytz · Pull Request #15555 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20261010105631/https://github.com/python/cpython/pull/15555
Skip to content

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

Closed
ZackerySpytz wants to merge 1 commit into
python:mainfrom
ZackerySpytz:_Py_FindEnvConfigValue-key-param
Closed

ZackerySpytz wants to merge 1 commit into
python:mainfrom
ZackerySpytz:_Py_FindEnvConfigValue-key-param

Conversation

@ZackerySpytz

@ZackerySpytz ZackerySpytz commented Aug 27, 2019 •

Copy link
Copy Markdown
Contributor

Comment thread Python/pathconfig.c
@@ -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
Copy Markdown
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
Copy Markdown
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.

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

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
Copy Markdown

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

csabella commented Feb 4, 2020

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

@ZackerySpytz ping

@iritkatriel

Copy link
Copy Markdown
Member

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

@vstinner

vstinner commented Aug 4, 2021

Copy link
Copy Markdown
Member

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

kumaraditya303 commented Apr 14, 2022 •

Copy link
Copy Markdown
Contributor

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