Skip to content

Fixed bug with a warning message incorrectly displayed#14640

Merged
Carreau merged 1 commit intoipython:mainfrom
alberti42:main
Jan 11, 2025
Merged

Fixed bug with a warning message incorrectly displayed#14640
Carreau merged 1 commit intoipython:mainfrom
alberti42:main

Conversation

@alberti42
Copy link
Copy Markdown
Contributor

Fixed an issue where the warning message:

Attempting to work in a virtualenv. If you encounter problems please install IPython inside the virtualenv.

was incorrectly triggered in systems involving symlinks.

When the path provided by $VIRTUAL_ENV and the corresponding environment path derived from the executable iPython pointed to the same physical directory, but their strings differed because of symlinks, the warning was incorrectly triggered. By using the resolve() function, we ensure that we compare fully resolved paths. The warning disappears when the two folders, once resolved, coincide.

`Attempting to work in a virtualenv. If you encounter problems please install IPython inside the virtualenv.`
was incorrectly triggered in systems involving symlinks. When the path of VIRTUAL_ENV and the corresponding environment path derived from the executable iPython pointed to the same physical directory, but differ because of symlinks, the warning was triggered. By using `resolve()` function, we ensure that the we compare the fully resolved paths.
@Carreau Carreau added this to the 8.32 milestone Jan 11, 2025
@Carreau
Copy link
Copy Markdown
Member

Carreau commented Jan 11, 2025

let's try. I might do a 8.32 with that. Not sure.

@Carreau Carreau merged commit 364e544 into ipython:main Jan 11, 2025
meeseeksmachine pushed a commit to meeseeksmachine/ipython that referenced this pull request Jan 11, 2025
Carreau added a commit that referenced this pull request Jan 14, 2025
…correctly displayed) (#14644)

Backport PR #14640: Fixed bug with a warning message incorrectly
displayed
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.

2 participants