-
Notifications
You must be signed in to change notification settings - Fork 520
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
Fix resolving scientific notation #174
Conversation
Hi, FYI I have fixed the failing test. The py33 test seem to be erroring due to a technical issue in the test environment. |
Great fix, would be happy to see it merged to next release ! |
I was pointed out this PR through a comment on the stackexchange issue, and my 2 cents are that there are multiple problems with this PR. First of all PyYAML is documented to be a YAML 1.1 parser, so it should do so for explicit I would also expect some extra tests to be part of the commit. Tests that show failure of the format on default (1.1) mode and appropriate processing on partial 1.2 mode. |
Allow exponents without sign, mantissa without dot. Resolves #173
good point. I didn't even notice and somehow assumed it would do YAML 1.2 since that's been out for long enough.
Another, perhaps simpler, possibility could be to just make PyYAML 4.0 officially a YAML 1.2 parser and merge this PR into there? BTW: As pointed out by @perlpunk in #173, the dot is optional in YAML 1.2 as well, so I squashed both commits into one. |
- Due to error in pyyaml scientific notation floating point numbers without a decimal point are parsed as strings: e.g. "1e+09". - Fix is based on PR: <yaml/pyyaml#174> to the pyyaml project. Change-Id: I5cc4afc0d6eecf204b92ba111185d8cc30dc6c5d Signed-off-by: Christopher M. Cantalupo <[email protected]>
- Due to error in pyyaml scientific notation floating point numbers without a decimal point are parsed as strings: e.g. "1e+09". - Fix is based on PR: <yaml/pyyaml#174> to the pyyaml project. Change-Id: I5cc4afc0d6eecf204b92ba111185d8cc30dc6c5d Signed-off-by: Christopher M. Cantalupo <[email protected]>
- Due to error in pyyaml scientific notation floating point numbers without a decimal point are parsed as strings: e.g. "1e+09". - Fix is based on PR: <yaml/pyyaml#174> to the pyyaml project. Change-Id: I5cc4afc0d6eecf204b92ba111185d8cc30dc6c5d Signed-off-by: Christopher M. Cantalupo <[email protected]>
- Due to error in pyyaml scientific notation floating point numbers without a decimal point are parsed as strings: e.g. "1e+09". - Fix is based on PR: <yaml/pyyaml#174> to the pyyaml project. Change-Id: I5cc4afc0d6eecf204b92ba111185d8cc30dc6c5d Signed-off-by: Christopher M. Cantalupo <[email protected]>
Any progress on this? PyYAML generates invalid hashes after all! Currenly we are bitten by a Git commit that happens to be called |
@coldfix r u still working on this? there seems to be conflicts to the mainline. |
Hey @fujitatomoya, not actively as there doesn't seem to be any interest in upstream for merging this. If an update is requested I might look into it. No use in regularly resolving conflicts otherwise. |
Superseeded by #555. |
Resolves #173.
fixes that scientific notation without dot in the mantissa is not resolved as float, as would be requested by YAML 1.2 spec.
Best, Thomas