- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 33.3k
          gh-89157: Make C and Python implementation of datetime.date.fromisoformat consistent.
          #131007
        
          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
Changes from all commits
09958cc
              37140a9
              2cf9d18
              1a6d229
              644ab29
              d742472
              9ff8a9e
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -2083,6 +2083,7 @@ def test_fromisoformat_fails(self): | |
| '10000-W25-1', # Invalid year | ||
| '2020-W25-0', # Invalid day-of-week | ||
| '2020-W25-8', # Invalid day-of-week | ||
| '٢025-03-09' # Unicode characters | ||
| '2009\ud80002\ud80028', # Separators are surrogate codepoints | ||
| ] | ||
|  | ||
|  | @@ -3534,7 +3535,7 @@ def test_fromisoformat_fails_datetime(self): | |
| '2009-04-19T03:15:4500:00', # Bad time zone separator | ||
| '2009-04-19T03:15:45.123456+24:30', # Invalid time zone offset | ||
| '2009-04-19T03:15:45.123456-24:30', # Invalid negative offset | ||
| '2009-04-10ᛇᛇᛇᛇᛇ12:15', # Too many unicode separators | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this changed? The problem isn't that there are Unicode characters but that there is more than one of them. The old description was now accurate. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is a bit late now, it probably should have been asked a month ago when you approved this. In hindsight I agree the previous one was better. | ||
| '2009-04-10ᛇᛇᛇᛇᛇ12:15', # Unicode chars | ||
| '2009-04\ud80010T12:15', # Surrogate char in date | ||
| '2009-04-10T12\ud80015', # Surrogate char in time | ||
| '2009-04-19T1', # Incomplete hours | ||
|  | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Make the pure Python implementation of :func:`datetime.date.fromisoformat`, | ||
| only accept ASCII strings for consistency with the C implementation. | 
Uh oh!
There was an error while loading. Please reload this page.