Skip to content
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

pyyaml should detect duplicate keys and report an error. #41

Open
partofthething opened this issue Nov 22, 2016 · 2 comments
Open

pyyaml should detect duplicate keys and report an error. #41

partofthething opened this issue Nov 22, 2016 · 2 comments
Labels

Comments

@partofthething
Copy link

(NOTE: This is a migration of pyyaml.org's ticket #128, see potential solutions there)

In the 1.1 spec I believe this is considered an error; currently libyaml silently accepts duplicate keys.

@partofthething partofthething changed the title libyaml should detect duplicate keys and report an error. pyyaml should detect duplicate keys and report an error. Nov 22, 2016
smetj pushed a commit to smetj/wishbone that referenced this issue Jun 12, 2017
smetj pushed a commit to smetj/wishbone that referenced this issue Jun 12, 2017
smetj pushed a commit to smetj/wishbone that referenced this issue Sep 16, 2017
smetj pushed a commit to smetj/wishbone that referenced this issue Sep 16, 2017
@bob1de
Copy link

bob1de commented Oct 22, 2019

Hi,

Is there any progress on this? PyYAML silently accepting duplicate mapping keys lets people file issues every now and then because they try new configs and forget commenting out old keys and then wonder why the software they configure doesn't behave as expected...

If it's really needed for some internal functions of PyYAML, maybe accepting duplicate keys could be made an opt-out feature?

Best regards
Robert

@perlpunk
Copy link
Member

See also #165, for some reason all the discussion happened there. The problem to solve currently is how to implement it while still supporting merge keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants