Skip to content

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

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

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

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Mar 19, 2019

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

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.

Copy link
Copy Markdown
Member

@pablogsal pablogsal left a comment

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