Repository navigation
Replace unmaintained tonyg-rfc3339 with stdlib datetime parsing - #170
Merged
Merged
Conversation
tonyg-rfc3339 is unmaintained (both upstream repos archived), ships no wheel and no pyproject.toml, so it will stop installing when pip 25.3 removes the legacy setup.py bdist_wheel build path. Its only use was parsing date/date-time strings in the opt-in request validators, whose error messages already tell users to produce values with datetime.isoformat() — so stdlib fromisoformat() is the matching check. A small shim keeps the RFC 3339 'Z' suffix working on Python < 3.11. Fixes #169 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
omarryhan
force-pushed
the
fix/drop-tonyg-rfc3339
branch
from
July 9, 2026 07:34
8dfcd1e to
029ca79
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #169
Why
tonyg-rfc3339is unmaintained — thesis/python-rfc3339 was archived in 2021 and the original tonyg/python-rfc3339 in January 2026. It ships no wheel and nopyproject.toml, so once pip 25.3 removes the legacysetup.py bdist_wheelbuild path it will stop installing entirely.What
Its only use was
parse_date/parse_datetimein the opt-in request validators inaiogoogle/validate.py. Those validators' own error messages already tell users to produce values withdatetime.isoformat(), so the stdlibfromisoformat()is the semantically matching check (it was even already sitting there commented out).date_validator→datetime.date.fromisoformat()datetime_validator→datetime.datetime.fromisoformat()via a small helper that maps the RFC 3339Z/zUTC suffix to+00:00, sincefromisoformat()only accepts it natively from Python 3.11tonyg-rfc3339removed fromrequirements.txt,test_requirements.txt, anddocs_requirements.txtZ-suffixed, fractional-second, and offset datetimesTesting
Full unit suite (2939 tests) passes on Python 3.9 — i.e. on the pre-3.11 code path that needs the
Zshim — in a venv withouttonyg-rfc3339installed.Note: pre-3.11
fromisoformat()is slightly stricter than full RFC 3339 (no lowercasetseparator, fractional seconds limited to 3 or 6 digits). Since these validators check user-constructed request payloads rather than Google's responses, that strictness matches the documented contract.🤖 Generated with Claude Code