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

Special case os.devnull for PIP_CONFIG_FILE to mean 'no config file' #1544

Merged
merged 1 commit into from Feb 7, 2014

Conversation

Projects
None yet
3 participants
@pfmoore
Member

pfmoore commented Feb 7, 2014

Workaround for Python bug http://bugs.python.org/issue20053 (issue with ensurepip not being able to isolate itself from a user config file)

Longer term, a proper pip "isolated mode" is the better approach.

@pfmoore

This comment has been minimized.

Show comment
Hide comment
@pfmoore

pfmoore Feb 7, 2014

Member

BTW, what do I need to do to make sure this is merged into develop (if anything)?

Member

pfmoore commented Feb 7, 2014

BTW, what do I need to do to make sure this is merged into develop (if anything)?

@dstufft

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft Feb 7, 2014

Member

Nothing in particular, we periodically merge 1.5.X into develop (or you can once it lands too). It depends on if you feel like doing it or not.

Member

dstufft commented Feb 7, 2014

Nothing in particular, we periodically merge 1.5.X into develop (or you can once it lands too). It depends on if you feel like doing it or not.

@pfmoore

This comment has been minimized.

Show comment
Hide comment
@pfmoore

pfmoore Feb 7, 2014

Member

If you don't mind, I'll leave it to someone else. I'm still a bit scared of merges :-) (And this one does have a minor conflict, easy to fix up but it scared me :-)

Unless you have concerns, I'll merge this into 1.5.X once Travis reports it's OK.

Member

pfmoore commented Feb 7, 2014

If you don't mind, I'll leave it to someone else. I'm still a bit scared of merges :-) (And this one does have a minor conflict, easy to fix up but it scared me :-)

Unless you have concerns, I'll merge this into 1.5.X once Travis reports it's OK.

@dstufft

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft Feb 7, 2014

Member

The only thing I see is it'd be nice to test that devnull does it, but since it's temporary I'm not super concerned about it either.

Member

dstufft commented Feb 7, 2014

The only thing I see is it'd be nice to test that devnull does it, but since it's temporary I'm not super concerned about it either.

@pfmoore

This comment has been minimized.

Show comment
Hide comment
@pfmoore

pfmoore Feb 7, 2014

Member

Fair comment. I did test manually on Windows, but I actually can't think of a way to test this without deliberately writing a config into the default config file location, which is clearly not a good ideal.

As you say, it's only a temporary hack after all.

Member

pfmoore commented Feb 7, 2014

Fair comment. I did test manually on Windows, but I actually can't think of a way to test this without deliberately writing a config into the default config file location, which is clearly not a good ideal.

As you say, it's only a temporary hack after all.

@dstufft

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft Feb 7, 2014

Member

Yea that's reasonable to me.

Member

dstufft commented Feb 7, 2014

Yea that's reasonable to me.

pfmoore added a commit that referenced this pull request Feb 7, 2014

Merge pull request #1544 from pfmoore/devnull
Special case os.devnull for PIP_CONFIG_FILE to mean 'no config file'

@pfmoore pfmoore merged commit 553a6b8 into pypa:1.5.X Feb 7, 2014

1 check passed

default The Travis CI build passed
Details

@pfmoore pfmoore deleted the pfmoore:devnull branch Feb 7, 2014

@ncoghlan

This comment has been minimized.

Show comment
Hide comment
@ncoghlan

ncoghlan Feb 9, 2014

Member

Also, the CPython test suite will cover this once we upgrade to bundling 0.15.3 - that's how I figured out it didn't work on Windows in the first place :)
(Oh, and as for how to test it without breaking the user's system: set HOME to point to a temporary directory and write a broken config file there)

Member

ncoghlan commented Feb 9, 2014

Also, the CPython test suite will cover this once we upgrade to bundling 0.15.3 - that's how I figured out it didn't work on Windows in the first place :)
(Oh, and as for how to test it without breaking the user's system: set HOME to point to a temporary directory and write a broken config file there)

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