-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
sage.env: _add_variable_or_fallback depends on the order of a dict #23758
Comments
New commits:
|
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:4
I don't know, maybe we can just get rid of this whole variable substitution business, by using the Python variable |
comment:5
(Could be a follow-up ticket.) |
comment:6
Perhaps add a doctest? |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:8
Here is a doctest. The same test fails for me in the develop branch, but I suppose that failure may not be repeatable on all platforms, since dictionaries are not ordered. |
comment:9
Replying to @mkoeppe:
I agree, a followup ticket if we want to address this. I'm not sure what the point of the substitution is, compared to using shell variables or some shortcut for accessing |
Author: John H. Palmieri |
Reviewer: Matthias Koeppe |
comment:11
Follow up ticket is #23762. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits: |
comment:14
Sorry, I accidentally pushed a branch here instead of to the appropriate ticket. The positively reviewed branch has been restored. |
Changed branch from u/jhpalmieri/variable_replacement to |
Changed commit from |
Changed author from John H. Palmieri to John Palmieri |
In
sage/env.py
, the function_add_variable_or_fallback
does some variable substitution: if a string contains$VAR
, it substitutes the value ofVAR
in the dictionarySAGE_ENV
. It does this by iterating through the items ofSAGE_ENV
, which means that if bothVAR
andVAR_OTHER
are inSAGE_ENV
, it's sort of a coin toss as to what happens when it comes across$VAR_OTHER
.(This arose when I was working on #21469: the string
$SAGE_SRC_ROOT
was being replaced by the value ofSAGE_SRC
, followed by the string_ROOT
.)CC: @mkoeppe
Component: build
Author: John Palmieri
Branch:
343d685
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/23758
The text was updated successfully, but these errors were encountered: