Skip to content

Fix PYTHONPATH man page in empty-value case #14946

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wchargin
Copy link
Contributor

Follow-up to issue 16309: https://bugs.python.org/issue16309

(Note that the first message in that issue is slightly mistaken, as
described in msg186700.)

Test Plan:
In a temporary directory, run:

mkdir x &&
echo 'import z' >x/x.py &&
echo 'print("z")' >z.py &&
printf '%s\n' '#!/bin/sh' 'z' >x/x &&
printf '%s\n' '#!/bin/sh' 'echo "in z"' >z &&
chmod +x x/x &&
chmod +x z &&
:

Then observe that PYTHONPATH= python3.7 x/x.py fails with a
ModuleNotFoundError, but PATH= x/x successfully prints “in z”. Thus,
the PATH and PYTHONPATH semantics are different.

wchargin-branch: pythonpath-man-posix-divergence

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for your contribution, we look forward to reviewing it!

@wchargin
Copy link
Contributor Author

Account created; CLA signed. Will check back after one business day.

@wchargin
Copy link
Contributor Author

I signed it!

@python-cla-bot
Copy link

python-cla-bot bot commented Apr 18, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@skirpichev
Copy link
Member

Could you please fix the merge conflict?

Follow-up to issue 16309: <https://bugs.python.org/issue16309>

(Note that the first message in that issue is slightly mistaken, as
described in msg186700.)

Test Plan:
In a temporary directory, run:

    mkdir x &&
    echo 'import z' >x/x.py &&
    echo 'print("z")' >z.py &&
    printf '%s\n' '#!/bin/sh' 'z' >x/x &&
    printf '%s\n' '#!/bin/sh' 'echo "in z"' >z &&
    chmod +x x/x &&
    chmod +x z &&
    :

Then observe that `PYTHONPATH= python3.7 x/x.py` fails with a
`ModuleNotFoundError`, but `PATH= x/x` successfully prints “in z”. Thus,
the `PATH` and `PYTHONPATH` semantics are different.

wchargin-branch: pythonpath-man-posix-divergence
@wchargin wchargin force-pushed the wchargin-pythonpath-man-posix-divergence branch from 15de8f2 to dcaad1b Compare April 19, 2025 02:15
@wchargin
Copy link
Contributor Author

$ git log --oneline 827782665fb..15de8f27327 | wc -l
10493

I don't think I've merged past more than ten thousand commits before. Happy to. :-)

I pushed a clean merge, but then also force-pushed a commit directly on
top of main. Usually I'd avoid this, but I have changed my name in the
six years since I opened this pull request, and I want to make sure that
the patch is attributed properly.

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.

6 participants