-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use config_opts[f"{config_opts.package_manager}.conf"] #1357
Comments
As a workaround, I can use |
This is because of https://github.com/xsuchy/templated-dictionary?tab=readme-ov-file#enabling-expansion which has other reason that is stored somewhere in git-log. I can dig it up if you are really curious. This is normally not needed for values, but required for keys. I should probably document it. |
|
>>> from templated_dictionary import TemplatedDictionary
>>> td = TemplatedDictionary()
>>> td['package_manager'] = 'dnf'
>>> td.package_manager
'dnf' |
TemplatedDictionary stores the value:key pairs in |
As a side issue I've opened xsuchy/templated-dictionary#4 |
@xsuchy wrote:
Actually you can not, jinja is only supported in values, not in keys. |
Wrong -> that's a f-string, not jinja. Sorry, you can use that. But ... it is unnecessary, you can simply use |
(This issue is not blocking me in any way. But it is a regression nevertheless. If you decide to wontfix it, I'm OK with that.) |
I'm careful to call this a regression because a) Jinja in the So such a problem happens when we use config_opts values for specifying This admittedly was/is a serious problem, though. The I decided to WONTFIX this particular instance of Jinja-in-key problem before |
Short description of the problem
As a result of #1332 I can no longer use:
In configs that include Fedora branched.
I get:
Output of
rpm -q mock
mock-5.5-1.fc39.noarch
mock-core-configs-40.3-1.fc39.noarch
python3-templated-dictionary-1.4-1.fc39.noarch
Steps to reproduce issue
Full config (in
/tmp/fedora-39-x86_64-ci.cfg
):command line:
The text was updated successfully, but these errors were encountered: