Add a document describing when to use ciso8601 #128
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
cPython 3.11's
datetime.fromisoformat
method is finally feature-full enough to be worthy of comparison withciso8601
, and indeed at present outperformsciso8601
for timestamps without timezones (Until #130 gets merged).Finally, many Python users have no need for
ciso8601
at all! 🎉We're going to need some writing to let people understand the cases in which they might not need
ciso8601
.What approach did you choose and why?
I wrote a new document that outlines the relevant considerations when choosing a ISO 8601 timestamp parser.
I used GitHub's support for Mermaid diagrams to produce a flow chart. That was really pleasant; I found Mermaid to be delightful and intuitive.
The diagram will become much simpler if I:
As there would be fewer decision points, and fewer reasons to not use
ciso8601
.What should reviewers focus on?
Copy editing.
The impact of these changes
Hopefully, users will become aware that they might not need
ciso8601
at all, and can use the built-indatetime.fromisoformat
method in many cases.