-
-
Notifications
You must be signed in to change notification settings - Fork 526
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
Forward HOME
by default
#2907
Forward HOME
by default
#2907
Conversation
This ensures that os.path.expanduser works by default inside a tox environment on non-Windows systems, including those without /etc/passwd.
the |
src/tox/tox_env/api.py
Outdated
env.extend( | ||
[ | ||
"TMPDIR", # temporary file location | ||
"HOME", # needed for `os.path.expanduser()` | ||
], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather pass this on all platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if https://superuser.com/a/607110 and https://stackoverflow.com/a/36392591 are correct, HOME
isn't relevant on windows and USERPROFILE
is the windows equivalent of it. USERPROFILE
is already forwarded on windows:
Lines 224 to 233 in 4408cff
if sys.platform == "win32": # pragma: win32 cover | |
env.extend( | |
[ | |
"TEMP", # temporary file location | |
"TMP", # temporary file location | |
"USERPROFILE", # needed for `os.path.expanduser()` | |
"PATHEXT", # needed for discovering executables | |
"MSYSTEM", # controls paths printed format | |
], | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but for consistency what's the harm passing the HOME universally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
none that i know of :)
do you want me to update this patch so it changes TMPDIR
to be forwarded on windows too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that one.
HOME
by default on non-Windows systemsHOME
by default
This PR contains the following updates: | Package | Type | Update | Change | Pending | |---|---|---|---|---| | [tox](https://togithub.com/tox-dev/tox) ([changelog](https://tox.wiki/en/latest/changelog.html)) | dev | patch | `4.4.3` -> `4.4.4` | `4.4.5` | --- ### Release Notes <details> <summary>tox-dev/tox</summary> ### [`v4.4.4`](https://togithub.com/tox-dev/tox/releases/tag/4.4.4) [Compare Source](https://togithub.com/tox-dev/tox/compare/4.4.3...4.4.4) #### What's Changed - Forward `HOME` by default by [@​gschaffner](https://togithub.com/gschaffner) in [https://github.com/tox-dev/tox/pull/2907](https://togithub.com/tox-dev/tox/pull/2907) **Full Changelog**: tox-dev/tox@4.4.3...4.4.4 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMDEuMCIsInVwZGF0ZWRJblZlciI6IjM0LjEwMS4wIn0=--> Co-authored-by: descope[bot] <descope[bot]@users.noreply.github.com>
this ensures that
os.path.expanduser
andpathlib.Path.expanduser
work by default inside a tox environment on non-Windows systems, including those without/etc/passwd
.fixes #2702.
this patch is analogous to #519.
Thanks for contribution
Please, make sure you address all the checklists (for details on how see
development documentation)!
tox -e fix
)/etc/passwd
. the easiest way to get such a system is an OCI container, e.g.docs/changelog
folderpass_env
on various platforms is not documented:tox/docs/config.rst
Lines 279 to 281 in 079f839