Skip to content

fix: raise ParserError for empty string in parse()#965

Open
SAY-5 wants to merge 1 commit into
python-pendulum:masterfrom
SAY-5:fix-parse-empty-string
Open

fix: raise ParserError for empty string in parse()#965
SAY-5 wants to merge 1 commit into
python-pendulum:masterfrom
SAY-5:fix-parse-empty-string

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 13, 2026

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

pendulum.parse("") raised ValueError: year 0 is out of range instead of ParserError; the common-format parser now rejects a match that captured neither a date nor a time component. Closes #849.

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.

Parser raises ValueError instead of ParseError for empty strings

1 participant