GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Detect pipenv by looking for Pipfile, not pipfile by wjt · Pull Request #994 · microsoft/vscode-python

Conversation

@wjt

@wjt Will Thompson (wjt) commented Mar 9, 2018

Copy link
Copy Markdown

On platforms with case-sensitive filesystems, like Linux, these are not equivalent. pipenv documents that the file should be called Pipfile and Pipfile.find() only finds files matching this exact case.

As a result, even if pipenv --venv in cwd would return success, it will never be run on Linux, and Code never detects the pipenv. (You can work around this with touch pipfile.) With this change, it's detected successfully. I believe there's no need to add a backwards-compatibility check for the old case, because on platforms where the old, incorrect check worked, so will the new, correct one.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@wjt
Detect pipenv by looking for Pipfile, not pipfile
e9b3f0e
On platforms with case-sensitive filesystems, like Linux, these are not
equivalent. pipenv documents that the file should be called Pipfile[0]
and `Pipfile.find()` only finds files matching this exact case[1].

As a result, even if `pipenv --venv` in `cwd` would return success, it
will never be run on Linux, and Code never detects the pipenv. (You can
work around this with `touch pipfile`.) With this change, it's detected
successfully. I believe there's no need to add a backwards-compatibility
check for the old case, because on platforms where the old, incorrect
check worked, so will the new, correct one.

[0] https://docs.pipenv.org/basics/#example-pipfile-pipfile-lock
[1] https://github.com/pypa/pipfile/blob/5acb9ac7/pipfile/api.py#L76-L85
@codecov

codecov Bot commented Mar 9, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #994 into master will increase coverage by 0.26%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #994      +/-   ##
==========================================
+ Coverage   64.08%   64.34%   +0.26%     
==========================================
  Files         260      260              
  Lines       12013    12013              
  Branches     2134     2134              
==========================================
+ Hits         7698     7730      +32     
+ Misses       4306     4274      -32     
  Partials        9        9
Impacted Files Coverage Δ
...ent/interpreter/locators/services/pipEnvService.ts 68.08% <100%> (ø) ⬆️
src/client/linters/lintingEngine.ts 90.35% <0%> (-0.88%) ⬇️
...reter/locators/services/cacheableLocatorService.ts 93.87% <0%> (+2.04%) ⬆️
src/client/common/installer/productInstaller.ts 65.95% <0%> (+4.25%) ⬆️
src/client/linters/baseLinter.ts 91.66% <0%> (+6.25%) ⬆️
src/client/common/application/applicationShell.ts 30.76% <0%> (+7.69%) ⬆️
src/client/common/logger.ts 53.33% <0%> (+20%) ⬆️
src/client/linters/errorHandlers/errorHandler.ts 100% <0%> (+22.22%) ⬆️
src/client/linters/errorHandlers/notInstalled.ts 94.44% <0%> (+61.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ece0479...e9b3f0e. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brettcannon
Brett Cannon (brettcannon) requested a review from Mikhail Arkhipov (MikhailArkhipov) March 9, 2018 17:25
brettcannon
Brett Cannon (brettcannon) approved these changes Mar 9, 2018
View reviewed changes
@brettcannon
Brett Cannon (brettcannon) merged commit 6323a32 into microsoft:master Mar 9, 2018
@brettcannon

Brett Cannon (brettcannon) commented Mar 9, 2018

Copy link
Copy Markdown
Member

Thanks for the quick fix Will Thompson (@wjt) ! As you can tell our Linux testing missed this. We will get a 2018.2.1 release out shortly with this in it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Brett Cannon (brettcannon) pushed a commit to brettcannon/vscode-python that referenced this pull request Mar 9, 2018
@wjt @brettcannon
Detect pipenv by looking for Pipfile, not pipfile (microsoft#994)
06470be
On platforms with case-sensitive filesystems, like Linux, these are not
equivalent. pipenv documents that the file should be called Pipfile[0]
and `Pipfile.find()` only finds files matching this exact case[1].

As a result, even if `pipenv --venv` in `cwd` would return success, it
will never be run on Linux, and Code never detects the pipenv. (You can
work around this with `touch pipfile`.) With this change, it's detected
successfully. I believe there's no need to add a backwards-compatibility
check for the old case, because on platforms where the old, incorrect
check worked, so will the new, correct one.

[0] https://docs.pipenv.org/basics/#example-pipfile-pipfile-lock
[1] https://github.com/pypa/pipfile/blob/5acb9ac7/pipfile/api.py#L76-L85
Don Jayamanne (DonJayamanne) pushed a commit that referenced this pull request Mar 9, 2018
@brettcannon @DonJayamanne
Cherry-pick Pipfile detection fix for 2018.2.1 (#1002)
3008532
* Detect pipenv by looking for Pipfile, not pipfile (#994)

On platforms with case-sensitive filesystems, like Linux, these are not
equivalent. pipenv documents that the file should be called Pipfile[0]
and `Pipfile.find()` only finds files matching this exact case[1].

As a result, even if `pipenv --venv` in `cwd` would return success, it
will never be run on Linux, and Code never detects the pipenv. (You can
work around this with `touch pipfile`.) With this change, it's detected
successfully. I believe there's no need to add a backwards-compatibility
check for the old case, because on platforms where the old, incorrect
check worked, so will the new, correct one.

[0] https://docs.pipenv.org/basics/#example-pipfile-pipfile-lock
[1] https://github.com/pypa/pipfile/blob/5acb9ac7/pipfile/api.py#L76-L85

* Prep for 2018.2.1
@wjt
Will Thompson (wjt) deleted the fix-Pipfile-case branch March 10, 2018 15:43
@lock lock Bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@brettcannon Brett Cannon (brettcannon) brettcannon approved these changes
@MikhailArkhipov Mikhail Arkhipov (MikhailArkhipov) Awaiting requested review from MikhailArkhipov

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@wjt @brettcannon
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.