prevent machine ISA from overriding explicit env factors#3904
Merged
rahuldevikar merged 4 commits intotox-dev:mainfrom Mar 27, 2026
Merged
prevent machine ISA from overriding explicit env factors#3904rahuldevikar merged 4 commits intotox-dev:mainfrom
rahuldevikar merged 4 commits intotox-dev:mainfrom
Conversation
3a12d0a to
1bb561a
Compare
1bb561a to
ffbe462
Compare
gaborbernat
reviewed
Mar 26, 2026
src/tox/config/loader/ini/factor.py
Outdated
| LATEST_PYTHON_MINOR_MIN: int = 10 | ||
| LATEST_PYTHON_MINOR_MAX: int = 14 | ||
|
|
||
| _KNOWN_ARCHITECTURES: frozenset[str] = frozenset({ |
Member
There was a problem hiding this comment.
can we load this from py-discovery rather than duplicating here?
Collaborator
Author
There was a problem hiding this comment.
Ahh, good point. That's better. Let me fix
Collaborator
Author
There was a problem hiding this comment.
I added python-discovery to tox. Let me know if it's not okay.
gaborbernat
approved these changes
Mar 27, 2026
|
Thanks! |
gaborbernat
pushed a commit
to gaborbernat/tox
that referenced
this pull request
Mar 30, 2026
- Machine ISA (e.g., arm64 from sysconfig.get_platform()) is no longer unconditionally added as an implicit factor, preventing it from conflicting with explicit ISA factors in the env name - When the env name contains an explicit ISA (e.g., py39-x86_64), only that ISA's factor conditions match — the machine's ISA is excluded - When no env factor conflicts (e.g., env is just py39), the machine ISA still works as an implicit factor - Fix applied to both INI (filter_for_env) and TOML (_replace_if_toml) config paths <!-- Thank you for your contribution! Please, make sure you address all the checklists (for details on how see [development documentation](http://tox.readthedocs.org/en/latest/development.html#development))! --> - [ ] ran the linter to address style issues (`tox -e fix`) - [ ] wrote descriptive pull request text - [ ] ensured there are test(s) validating the fix - [ ] added news fragment in `docs/changelog` folder - [ ] updated/extended the documentation --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes: #3903
tox -e fix)docs/changelogfolder