mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Upgrade sortedcontainers, python_dateutil, and html5lib for better Python 3.10 compatibility
Summary: Based on https://github.com/gristlabs/grist-core/pull/251. It may not look like it, but there's very little going on in this diff: - Tweak the DATEVALUE doctest for Python 2/3 compatibility. - Mirrors the PR's changes to requirements3.txt in requirements.txt, i.e. make the same dependency upgrades in Python 2. - Make the same upgrades in the thirdparty folder for the Python 2 nacl sandbox. Test Plan: Updated one doctest for dateutil. Checked changelog of sortedcontainers. html5lib is only used by messytables and isn't actually relevant. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3609
This commit is contained in:
@@ -292,11 +292,16 @@ def DATEVALUE(date_string, tz=None):
|
||||
>>> DATEVALUE("asdf")
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
dateutil.parser._parser.ParserError: Unknown string format: asdf
|
||||
{}: Unknown string format: asdf
|
||||
"""
|
||||
return dateutil.parser.parse(date_string).replace(tzinfo=_get_tzinfo(tz))
|
||||
|
||||
|
||||
DATEVALUE.__doc__ = DATEVALUE.__doc__.format(
|
||||
"dateutil.parser._parser.ParserError" if six.PY3 else "ParserError"
|
||||
)
|
||||
|
||||
|
||||
def DAY(date):
|
||||
"""
|
||||
Returns the day of a date, as an integer ranging from 1 to 31. Same as `date.day`.
|
||||
|
||||
Reference in New Issue
Block a user