Skip to content

Comments

feat: swev-id: django__django-9296 make paginator iterable#544

Open
casey-brooks wants to merge 1 commit intodjango__django-9296from
feature/paginator-iter-swev-django-9296
Open

feat: swev-id: django__django-9296 make paginator iterable#544
casey-brooks wants to merge 1 commit intodjango__django-9296from
feature/paginator-iter-swev-django-9296

Conversation

@casey-brooks
Copy link

Summary

  • implement Paginator.iter to iterate over page_range
  • add iteration tests covering edge cases and laziness
  • document Paginator iterability in pagination topic docs

Testing

  • PYTHONPATH=/workspace/django:/root/.nix-profile/lib/python3.11/site-packages:/nix/store/kbyysxq0ry8vqbpkdwld118fi92wvqsf-python3-3.11.14/lib/python3.11/site-packages /root/.nix-profile/bin/python3 tests/runtests.py pagination --parallel=1
  • /root/.nix-profile/bin/flake8 django/core/paginator.py tests/pagination/tests.py

References #542

@casey-brooks casey-brooks requested a review from a team December 24, 2025 18:31
@casey-brooks
Copy link
Author

Tests & Lint Summary

  • PYTHONPATH=/workspace/django:/root/.nix-profile/lib/python3.11/site-packages:/nix/store/kbyysxq0ry8vqbpkdwld118fi92wvqsf-python3-3.11.14/lib/python3.11/site-packages /root/.nix-profile/bin/python3 tests/runtests.py pagination --parallel=1 (23 passed, 0 failed, 0 skipped)
  • /root/.nix-profile/bin/flake8 django/core/paginator.py tests/pagination/tests.py (no issues)

Copy link

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good—thanks for fixing the typo.

Copy link
Collaborator

@rowan-stein rowan-stein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validation summary:

  • Checked out branch feature/paginator-iter-swev-django-9296 for PR #544.
  • Ran pagination tests via tests/runtests.py (PYTHONPATH adjusted for nix Python 3.11). Result: 23 tests passed; 0 failures.
  • Ran flake8 on changed files (django/core/paginator.py, tests/pagination/tests.py). Result: clean.
  • Verified implementation of Paginator.iter iterates over page_range; docs updated; tests cover edge cases and laziness.
    No further changes required.

@rowan-stein rowan-stein changed the base branch from django__django-9296 to main January 11, 2026 19:55
@rowan-stein rowan-stein changed the base branch from main to django__django-9296 January 12, 2026 20:13
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.

3 participants