Skip to content

BUG: Fix multiple Python version usage#1444

Merged
mattip merged 7 commits intoairspeed-velocity:mainfrom
HaoZeke:fix_multi_python
Nov 24, 2024
Merged

BUG: Fix multiple Python version usage#1444
mattip merged 7 commits intoairspeed-velocity:mainfrom
HaoZeke:fix_multi_python

Conversation

@HaoZeke
Copy link
Member

@HaoZeke HaoZeke commented Nov 24, 2024

Closes #1294. Basically ensures that the asv.config defined python takes precedence over the one written into an environment.yml file. This may cause resolution issues if there are a lot of pinned packages in the file, but that's basically user error.

Also fixes a subtle bug within the mamba plugin which caused incorrect environments to be created for multiple python versions.

@HaoZeke HaoZeke requested a review from mattip November 24, 2024 17:39
@mattip mattip merged commit 4c31eda into airspeed-velocity:main Nov 24, 2024
@mattip
Copy link
Contributor

mattip commented Nov 24, 2024

Thanks @HaoZeke

@HaoZeke HaoZeke deleted the fix_multi_python branch November 24, 2024 21:38
# previously, the user provided environment was assumed to handle the python version
mamba_pkgs = [
util.replace_python_version(pkg, self._python) for pkg in mamba_pkgs
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HaoZeke @mattip sorry if I'm missing something, but it looks like if you do not have an environment file, the python version specified in asv.conf.json no longer gets passed to mamba after this change. (ie if there is no python= constraint before this line runs, we never add one) Perhaps we should restore the python={self._python} in the initialization of mamba_pkgs?

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.

BUG: Package requires a different Python

3 participants