Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-46933: Make pwd module optional (GH-31700)#31700

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

Already on GitHub?Sign in to your account

Merged
tiran merged 3 commits intopython:mainfromtiran:no-pwd
Mar 7, 2022
Merged

Conversation

@tiran
Copy link
Member

@tirantiran commentedMar 5, 2022
edited by bedevere-bot
Loading

@erlend-aasland
Copy link
Contributor

Hm, for some reason,configure now decidesnot to buildpwd on my Mac, thus breakingposixpath.expanduser for my username:

$ python3.11Python 3.11.0a5 (v3.11.0a5:c4e4b91557, Feb  3 2022, 14:54:01) [Clang 13.0.0 (clang-1300.0.29.30)] on darwinType"help","copyright","credits" or"license"for more information.>>> import posixpath>>> posixpath.expanduser("~erlendaasland")'/Users/erlendaasland'>>> ^D$ ./python.exe                 Python 3.11.0a5+ (heads/no-pwd-dirty:a6ca976941, Mar  6 2022, 00:31:10) [Clang 13.0.0 (clang-1300.0.29.30)] on darwinType"help","copyright","credits" or"license"for more information.>>> import posixpath>>> posixpath.expanduser("~erlendaasland")'~erlendaasland'>>> ^D

getpwuid andgetpwuid_r are both available, so I don't see why.

$ grep getpwuid config.cacheac_cv_func_getpwuid=${ac_cv_func_getpwuid=yes}ac_cv_func_getpwuid_r=${ac_cv_func_getpwuid_r=yes}

@erlend-aasland
Copy link
Contributor

Aaaah, I see it!

cpython/configure.ac

Lines 6465 to 6466 in6927632

AS_CASE([$py_stdlib_not_available],
[*$1*],[modstate=n/a],

[Darwin/*],[py_stdlib_not_available="ossaudiodev spwd"],

Copy link
Contributor

@erlend-aaslanderlend-aasland left a comment

Choose a reason for hiding this comment

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

We need to usem4_foreach_w (orm4_map_args_w) inPY_STDLIB_MOD andPY_STDLIB_MOD_SIMPLE when checkingpy_stdlib_not_available for unavailable modules. There may be a more elegant solution.

@tiran
Copy link
MemberAuthor

We need to usem4_foreach_w (orm4_map_args_w) inPY_STDLIB_MOD andPY_STDLIB_MOD_SIMPLE when checkingpy_stdlib_not_available for unavailable modules. There may be a more elegant solution.

I triedm4_set_add_all but it didn't work like I hoped. The m4 set functions seem to get evaluated during autoconf. We need to evaluate them whenconfigure is running.

erlend-aasland reacted with thumbs up emoji

@erlend-aasland
Copy link
Contributor

The m4 set functions seem to get evaluated during autoconf. We need to evaluate them when configure is running.

Yeah, I tried some experiments with the m4 wrappers yesterday, but they didn't work out.

@tiran
Copy link
MemberAuthor

Yeah, I tried some experiments with the m4 wrappers yesterday, but they didn't work out.

We may have to restructure the test. I have a working solution, will clean it up and push it later today.

erlend-aasland reacted with thumbs up emoji

Copy link
Contributor

@erlend-aaslanderlend-aasland left a comment

Choose a reason for hiding this comment

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

Yep, this approach works swell. Tested on my mac; all good. I left some comments nits; do with them as you please :)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
@tirantiran changed the titlebpo-46933: Make pwd module optionalbpo-46933: Make pwd module optional (GH-31700)Mar 7, 2022
@tirantiran merged commitca9689f intopython:mainMar 7, 2022
@tirantiran deleted the no-pwd branchMarch 7, 2022 12:36
erlend-aasland pushed a commit to erlend-aasland/cpython that referenced this pull requestMar 7, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@erlend-aaslanderlend-aaslanderlend-aasland approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@tiran@erlend-aasland@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp