Skip to content
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

py.exe does not pass environment variable __COMPAT_LAYER to python.exe #118254

Open
birdy-spb opened this issue Apr 24, 2024 · 0 comments
Open

py.exe does not pass environment variable __COMPAT_LAYER to python.exe #118254

birdy-spb opened this issue Apr 24, 2024 · 0 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@birdy-spb
Copy link

birdy-spb commented Apr 24, 2024

Bug report

Bug description:

C:\>set CustomVariable=CustomValue

C:\>py -3  -c "import os; print(os.environ.get('CustomVariable', 'not found'))"
CustomValue

C:\>python -c "import os; print(os.environ.get('CustomVariable', 'not found'))"
CustomValue

C:\>set __COMPAT_LAYER=Installer

C:\>python -c "import os; print(os.environ.get('__COMPAT_LAYER', 'not found'))"
Installer

C:\>py -3  -c "import os; print(os.environ.get('__COMPAT_LAYER', 'not found'))"
not found

Expected behavior:
Output for C:\>py -3 -c "import os; print(os.environ.get('__COMPAT_LAYER', 'not found'))" is Installer

Actual behavior:
Output for C:\>py -3 -c "import os; print(os.environ.get('__COMPAT_LAYER', 'not found'))" is not found

CPython versions tested on:

3.12

Operating systems tested on:

Windows

@birdy-spb birdy-spb added the type-bug An unexpected behavior, bug, or error label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant