Skip to content

bpo-36236: Handle removed cwd at Python init#12424

Merged
vstinner merged 1 commit into
python:masterfrom
vstinner:sys_path_argv0
Mar 19, 2019
Merged

bpo-36236: Handle removed cwd at Python init#12424
vstinner merged 1 commit into
python:masterfrom
vstinner:sys_path_argv0

Conversation

@vstinner

@vstinner vstinner commented Mar 19, 2019

Copy link
Copy Markdown
Member

At Python initialization, the current directory is no longer
prepended to sys.path if it has been removed.

Rename _PyPathConfig_ComputeArgv0() to
_PyPathConfig_ComputeSysPath0() to avoid confusion between argv[0]
and sys.path[0].

https://bugs.python.org/issue36236

Comment thread Python/pathconfig.c Outdated
Comment thread Python/pathconfig.c Outdated
At Python initialization, the current directory is no longer
prepended to sys.path if it has been removed.

Rename _PyPathConfig_ComputeArgv0() to
_PyPathConfig_ComputeSysPath0() to avoid confusion between argv[0]
and sys.path[0].
@vstinner

Copy link
Copy Markdown
Member Author

@pablogsal: You're right. Python initialization is complex and it deserves a better documentation: done.

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

LGTM :)

@vstinner
vstinner merged commit dcf6171 into python:master Mar 19, 2019
@vstinner
vstinner deleted the sys_path_argv0 branch March 19, 2019 15:09
@ncoghlan

Copy link
Copy Markdown
Contributor

Thanks for handling this @vstinner :)

@vstinner

Copy link
Copy Markdown
Member Author

Thanks for handling this @vstinner :)

You're welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants