Skip to content

Reject int exptime that is a past Unix timestamp - #526

Merged
Dreamsorcerer merged 1 commit into
aio-libs:exptimefrom
RayBB:exptime-suggestions
Nov 23, 2026
Merged

Dreamsorcerer merged 1 commit into
aio-libs:exptimefrom
RayBB:exptime-suggestions

Conversation

@RayBB

@RayBB RayBB commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Builds on #523 with the suggestions from my review there:

  • Raise ValidationException for an int exptime that would be a Unix timestamp in the past, instead of storing nothing.
  • append/prepend reject True as exptime.
  • The _validate_exptime unit tests no longer use the server fixture.

An int too large to be seconds from now but below the current time was
sent as a past timestamp, so the item expired at once and the
DeprecationWarning was easy to miss. Raise ValidationException instead.

Also reject bool exptime in append/prepend, and run the
_validate_exptime unit tests without the server fixture.
@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Medium impact] This PR appears safe to merge.

Reviews (1) · Last reviewed commit: "Reject int exptime that is a past Unix t..." · Reviewed by Greptile

@Dreamsorcerer
Dreamsorcerer merged commit 00aa414 into aio-libs:exptime Nov 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants