You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ciso8601 was first created, there were no reasonable alternatives to it. By virtue of being implemented in C, it was simply much faster than Python implementations.
However, time have moved on, and there are viable alternatives, so the choice is more nuanced.
For example, as of Python 3.7, there exists datetime.fromisoformat that provides the inverse of datetime.isoformat. While it is not a complete replacement for ciso8601 (ex. it doesn't support formats like YYYYMMDD), for users that were only ever using ciso8601 to provide that inverse, they might be better served by using fromisoformat.
Further, the Pendulum project has implemented a fast C parser as well. While pendulum will be slower, they support a wider subset of the ISO 8601 spec.
So there is now a spectrum of quality parsers that users might want to use:
From a practical standpoint, this would involve mentioning alternatives in ciso8601's README (or perhaps a new document). It would also mean rewriting any other docs to tone down any rhetoric.
(Aside: In general, I'd like to see more collaboration between the various ISO 8601 parse projects, especially Pendulum and udatetime)
The text was updated successfully, but these errors were encountered:
When
ciso8601
was first created, there were no reasonable alternatives to it. By virtue of being implemented in C, it was simply much faster than Python implementations.However, time have moved on, and there are viable alternatives, so the choice is more nuanced.
For example, as of Python 3.7, there exists
datetime.fromisoformat
that provides the inverse ofdatetime.isoformat
. While it is not a complete replacement forciso8601
(ex. it doesn't support formats likeYYYYMMDD
), for users that were only ever using ciso8601 to provide that inverse, they might be better served by usingfromisoformat
.Further, the Pendulum project has implemented a fast C parser as well. While pendulum will be slower, they support a wider subset of the ISO 8601 spec.
So there is now a spectrum of quality parsers that users might want to use:
It might be time for
ciso8601
to change its marketing to be more nuanced. Originally, when there were no real alternatives, it made sense to say:But perhaps now we should be doing something similar to a flow-chart:
(Aside: I backported
fromisoformat
to pre-Python 3.7 versions: )From a practical standpoint, this would involve mentioning alternatives in
ciso8601
's README (or perhaps a new document). It would also mean rewriting any other docs to tone down any rhetoric.(Aside: In general, I'd like to see more collaboration between the various ISO 8601 parse projects, especially
Pendulum
andudatetime
)The text was updated successfully, but these errors were encountered: