| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
Move the project to the src layout to ensure we are testing on the
generated package rather than the checked out source tree.
|
| |\
| |
| | |
isoparse: Fail with inconsistent time separators
|
| | |
| |
| |
| |
| |
| |
| | |
Fail when separators are used inconsistently to split the time porting
of a string. Even if more restrictive, we have warned that we were going
to fail on invalid cases of ISO formatted strings. This will prevent
invalid iso formatted strings from being unexpectedly parsed.
|
| |\ \
| | |
| | | |
Call .decode() only for binary data
|
| | |/
| |
| |
| |
| |
| |
| | |
We can handle both bytes and bytearray in the same way in Python 2 and
Python 3.
Co-authored-by: Mario Corchero <mariocj89@gmail.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As the function is wrapped around a decorator that converts the input to
bytes, when an exception is raised that includes the value, it contains
the value as bytes (b"<val>"). To provide the expected str in Python 3,
decode that to unicode.
This will result in `u""` for Python 2 callers, but given that we plan
to drop support for Python 2 in the short term, it feels acceptable.
|
| |/
|
|
| |
Save an unnecessary len call.
|
| | |
|
| | |
|
| |
|
|
|
| |
Periodic update of all links that point to redirects or http targets
when an https target is available.
|
| |
|
|
|
|
|
|
|
|
| |
This was originally dead code, because an indentation error had `__repr__`
defined after the `return` statement in `__str__`. The definition of the
`__repr__` is also changed to be more in line with the conception of a
repr as "what you would have to evalue to get this object".
Even though this is not guaranteed behavior, this commit also adds a
regression test to avoid simple errors like this in the future.
|
| |
|
|
|
|
|
|
|
|
|
| |
In attempting to pass-through the string representation of an exception
we are wrapping, we made the erroneous assumption that `args[0]` would
always be a string (or something that can concatenate cleanly with a
string). This turns out not to be the case with `IllegalMonthError`,
where it is an integer, so to avoid raising an erroneous `TypeError`, we
first convert the wrapped exception to a string.
See GH issue #981.
|
| |
|
|
|
| |
Fixes several misspellings, typos and styling errors (e.g. github ->
GitHub) in the comments and documentation.
|
| | |
|
| | |
|
| |
|
|
|
| |
Ensures that ValueErrors raised when building the datetime from an
already-parsed string will be raised as ParserError as well.
|
| |
|
|
|
| |
This gives a nicer string representation while retaining access to the
input string in the exception arguments.
|
| |
|
|
| |
This switches the error from UnboundLocalError to TypeError.
|
| |
|
|
| |
This is a minor refactoring to improve the code organization.
|
| |
|
|
|
| |
This makes the grouping of the logic clearer; UTC is used either in the
first group or the second group.
|
| | |
|
| | |
|
| |
|
|
|
| |
The bytes type is available on all supported Pythons. Can remove
workaround and make the code more forward compatible with Python 3.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
RFC 3339 does not specify a limit to the number of fractional digits
that can be provided. In the wild, languages like Go will provide up
to 9 digits by default.
Since the standard library's `datetime` only supports precision down
to microseconds, any extra digits in the fractional component are
truncated.
Fixes #786
|
| |
|
|
|
|
| |
The old behavior parsed the string, modified the 24 component to 0
and then parsed the string a second time, passing an unmodified
version to the datetime.time constructor.
|
| |
|
|
|
|
| |
- Update tests with the correct examples
- Update AUTHORS.md
- Closes GH issue #658
|
| | |
|
| | |
|
| |
|
|
| |
Add changelog file
|
| |
|
|
|
|
| |
This commit allows the user to specify None
when the dont care about the time zone information
in the date time parse.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Added assertion that year is always positive.
Co-authored-by: Lauren Oldja <loldja@users.noreply.github.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
edit warning per suggestion
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Available on all supported Python versions.
https://docs.python.org/3/library/functions.html#callable
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|