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.
This commit adds a new cache to the main config object, specifically for env config. When env config is retrieved via Config.get_env(), it is not in general possible to determine whether the env is a packaging environment or not. Because retrieving standard section config needs to know which "base" section to inherit from, and this is different for test envs and packaging envs, we require a separate way to retrieve previously created env config. At creation time we do reliably know whether this is a packaging or run env, and we want that to persist (if it changes, we call clear_env() and recreate it with the new type).
At the moment, there are no tests for this change, I would appreciate a) approval of this approach to fixing the problem and b) some guidance about where to put a test (or possibly just add some additional checks to an existing test, to demonstrate e.g. that
{envtmpdir}
is being expanded). I have verified that my project that got me interested in this issue now builds correctly with this fix.I don't think any change to the documentation is required for this. I will add a changelog entry along with the tests.
Fixes #3238.
tox -e fix
)docs/changelog
folder