Skip to content

AI junk - #431

Closed
tomatotomata wants to merge 2 commits into
pallets:mainfrom
tomatotomata:codex/reject-max-age-url-safe-429
Closed

AI junk#431
tomatotomata wants to merge 2 commits into
pallets:mainfrom
tomatotomata:codex/reject-max-age-url-safe-429

Conversation

@tomatotomata

@tomatotomata tomatotomata commented Jul 29, 2026

Copy link
Copy Markdown

Summary

  • reject unexpected keyword arguments on URLSafeSerializer.loads instead of silently ignoring them
  • add an explicit typing overload so type checkers flag timed-only arguments such as max_age
  • add regression coverage and an unreleased changelog entry

This keeps accidental use of max_age on an untimed serializer from appearing to enforce expiry.

Validation

  • PYTHONPATH=src python -m pytest -q (298 passed)
  • PYTHONPATH=src python -m pytest tests/test_itsdangerous/test_url_safe.py -q (131 passed)
  • python -m ruff check src/itsdangerous/url_safe.py tests/test_itsdangerous/test_url_safe.py
  • python -m compileall -q src tests
  • git diff --check

Fixes #429

@davidism davidism closed this Jul 29, 2026
@davidism davidism changed the title Reject timed arguments in URLSafeSerializer.loads AI junk Jul 29, 2026
@davidism

Copy link
Copy Markdown
Member

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.

URLSafeSerializer.loads silently ignores unexpected max_age argument

2 participants