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

gh-127405: Remove dead code insysconfig._get_pybuilddir()#131935

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

Closed

Conversation

XuehaiPan
Copy link
Contributor

@XuehaiPanXuehaiPan commentedMar 31, 2025
edited by bedevere-appbot
Loading

The return value forget_config_var('Py_DEBUG') is one of0,1,None. It cannot be astr.

@XuehaiPan
Copy link
ContributorAuthor

How can I add the "skip news" label?

@brianschubert
Copy link
Contributor

Hmm, I think something might be outdated here. When I build with--with-pydebug, the build dir isbuild/lib.<platform>-<version>, notbuild/lib.<platform>-<version>-pydebug:

$ rm -r build$ make clean&& ./configure --with-pydebug --prefix=$(pwd)&& make -j$ ./python -c'import sysconfig; print(sysconfig.get_config_var("Py_DEBUG"))'1$ ls -l build total 16drwxrwxr-x 3 brian brian 12288 Mar 31 09:17 lib.linux-x86_64-3.14drwxrwxr-x 2 brian brian  4096 Mar 31 09:17 scripts-3.14

Maybe the right fix is to remove that branch altogether?

How can I add the "skip news" label?

If any user-facing behavior changes, there should be a news entry. Right now this PR changes where-m sysconfig --generate-posix-vars writes its output files, so that would require a news entry.

@XuehaiPan
Copy link
ContributorAuthor

Maybe the right fix is to remove that branch altogether?

Move to this approach.

@XuehaiPanXuehaiPan changed the titlegh-127405: Fixget_config_var('Py_DEBUG') usage insysconfig._get_pybuilddir()gh-127405: Remove dead code insysconfig._get_pybuilddir()Mar 31, 2025
@@ -161,10 +161,7 @@ def _print_config_dict(d, stream):


def _get_pybuilddir():
pybuilddir = f'build/lib.{get_platform()}-{get_python_version()}'
if get_config_var('Py_DEBUG') == '1':
pybuilddir += '-pydebug'
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any way for this to be called, but I note that this behavior is tied to

pydebug=lib_dir.endswith("-pydebug")

I think this aspect of the WASM build is broken, and if this code can be deleted then perhaps that trail can too.

@XuehaiPan
Copy link
ContributorAuthor

The complexity of fixing the WASM build with the correct path is beyond what I expected.

@FFY00
Copy link
Member

I think you are trying to fixGH-131769.GH-131761 should address it if it gets merged.

GH-131844 should fix the debug WASM builds, andGH-131855 proposes a more reliable way to set the stack size limit.

XuehaiPan reacted with thumbs up emoji

@XuehaiPanXuehaiPan deleted the fix-py-debug-sysconfig branchApril 2, 2025 12:47
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@davidlowrydudadavidlowrydudadavidlowryduda left review comments

@FFY00FFY00Awaiting requested review from FFY00FFY00 is a code owner

@brettcannonbrettcannonAwaiting requested review from brettcannonbrettcannon is a code owner

@freakboy3742freakboy3742Awaiting requested review from freakboy3742

@erlend-aaslanderlend-aaslandAwaiting requested review from erlend-aaslanderlend-aasland is a code owner

@corona10corona10Awaiting requested review from corona10corona10 is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@XuehaiPan@brianschubert@FFY00@davidlowryduda

[8]ページ先頭

©2009-2025 Movatter.jp