-
-
Notifications
You must be signed in to change notification settings - Fork 536
Undocumented syntax {} = {:} since v2.5.0 #1711
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
Comments
@gaborbernat @asottile @obestwalter , could you comment on whether this is acceptable in v3. It is likely there are a few users which have used this undocumented Rejecting |
👍 |
There is also a related parsing problem, that I'll fix at the same time.
ftr, the try/except block dates back to 2f98ebb (pre v1.0), but it appears to have taken a turn for the worse at 0068c4d (v1.2), likely resulting varying outcomes as other parts of the logic changed over time. The fact this hasnt been reported as a bug suggests the syntax has generally been intuitive enough, and/or users are not bothered by odd results and fix their syntax rather than rasing a bug. |
Prior to v2.5,
{}
was invalid. Since v2.5, it has become{:}
to resolve toos.pathsep
, because 9463f8f placed the logic before the following check for "no substitution type", rendering it dead codeGiven how long
{}
has been valid, perhaps it should be documented as-is, and tests added for{}
beingos.pathsep
. Maybe noted as deprecated and will become invalid in v4.However even if
{}
is kept as-is, the aboveConfigError
is unreachable code, so it should be removed.I would prefer that we reject
{}
in v3 with a specific error message that{:}
should be used instead. Rejecting{}
simplifies/tighens the parsing logic, especially when approaching escaping{
and}
for #1708 .The text was updated successfully, but these errors were encountered: