Skip to content

Fix safe_load crash on malformed integer scalars (for example 0b_:)#928

Open
manit2004 wants to merge 1 commit into
yaml:mainfrom
manit2004:main
Open

Fix safe_load crash on malformed integer scalars (for example 0b_:)#928
manit2004 wants to merge 1 commit into
yaml:mainfrom
manit2004:main

Conversation

@manit2004
Copy link
Copy Markdown

This PR fixes an error-handling bug in integer construction: malformed integer-like YAML values such as 0b_: no longer leak a raw Python ValueError during safe_load. Instead, they now raise a proper YAML ConstructorError with clear context and location details, and a regression test was added to lock this behavior in.

Related Issue: #868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant