-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
URGENT: Fix broken gtkmm entry #41059
Conversation
I'm actually not convinced that this is true. Keys maybe, but this is a value. That rule works fine on my machine:
Also, yamllint and our CI both process the rule correctly. Under what circumstances are you seeing this error? Separately, please use single quotes as is the convention in this file. |
The oldest configuration I have handy is Python 3.6 with PyYAML 3.13, and it works there: Python 3.6.8 (default, Nov 14 2023, 16:29:52)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml; yaml.__version__
'3.13'
>>> yaml.safe_load('foo: bar:baz')
{'foo': 'bar:baz'} The latest version of Python 3 and PyYAML appears to work as well: Python 3.12.2 (main, Feb 21 2024, 00:00:00) [GCC 13.2.1 20231205 (Red Hat 13.2.1-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml; yaml.__version__
'6.0.1'
>>> yaml.safe_load('foo: bar:baz')
{'foo': 'bar:baz'} |
Oh, interesting, I got the older configuration to break when the value is placed in a list. Python 3.6.8 (default, Nov 14 2023, 16:29:52)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml; yaml.__version__
'3.13'
>>> yaml.safe_load('foo: [bar:baz]')
...
yaml.scanner.ScannerError: while scanning a plain scalar
in "<unicode string>", line 1, column 7:
foo: [bar:baz]
^
found unexpected ':'
in "<unicode string>", line 1, column 10:
foo: [bar:baz]
^
Please check http://pyyaml.org/wiki/YAMLColonInFlowContext for details. So maybe somewhere between 3.13 and 5.3.1 PyYAML started supporting this syntax. Seems reasonably low-cost to just support the older PyYAML versions, let's fix the quotes though. |
Closes: #41057 |
Follow-up: #41060 |
#40772, merged yesterday, breaks rosdep with the following error:
Obviously, names containing a colon should be quoted, such that they are not interpreted as a map.