Skip to content

chore(WOF-53): clear the remaining deprecation warnings - #126

Merged
lbruton merged 1 commit into
devfrom
chore/wof-deprecations
Nov 25, 2026
Merged

lbruton merged 1 commit into
devfrom
chore/wof-deprecations

Conversation

@lbruton

@lbruton lbruton commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Plane: WOF-53. Follow-up to WOF-52 (#124).

pytest -W error::DeprecationWarning collects and passes on CPython 3.12.13: 760 passed, 83.04% coverage, zero warnings (also with -W error::UserWarning).

Changes

  • Pydantic: the 15 class-based Config blocks in src/api/schemas/ move to model_config = ConfigDict(...). from_attributes and json_schema_extra are unchanged; the OpenAPI examples still render.
  • Session expiry: create_session_cookie in src/auth/utils.py uses datetime.now(timezone.utc). expires_at becomes an aware ISO 8601 value with a +00:00 offset.
    • No server code parses or compares expires_at. The cookie max_age in the login route enforces expiry, so a naive/aware TypeError cannot occur.
    • Tests came first: test_expires_at_is_aware_utc pins the aware form, and the duration tests use aware bounds.
  • Override test: test_override_in_range_returned compares against naive UTC, because schedule_override.created_at is a naive DateTime that SQLite fills in UTC.
  • TestClient: httpx2==2.16.2 goes into requirements-dev.txt. Starlette 1.10.0 (pinned through FastAPI 0.165.0) documents httpx2 as the TestClient backend and warns when it falls back to httpx. httpx stays in requirements.txt because src/api/routes/settings.py catches httpx exceptions at runtime. The production image is unchanged.

The suite now passes with -W error::DeprecationWarning (and with
-W error::UserWarning) on CPython 3.12.

- Move the 15 class-based Pydantic Config blocks in src/api/schemas/ to
  model_config = ConfigDict(...). from_attributes and json_schema_extra
  carry over unchanged.
- create_session_cookie uses datetime.now(timezone.utc), so expires_at is
  an aware ISO 8601 value with a +00:00 offset. No server code parses or
  compares expires_at; the cookie max_age in the login route enforces
  expiry, so the change cannot cause a naive/aware TypeError. New tests
  pin the aware UTC form.
- test_schedule_override_service compares against naive UTC, because
  schedule_override.created_at is a naive DateTime that SQLite fills in UTC.
- Add httpx2 to requirements-dev.txt. Starlette 1.10.0 TestClient prefers
  httpx2 and warns when it falls back to httpx. httpx stays in
  requirements.txt because settings.py catches its exceptions at runtime.
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 1

  • coderabbit-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f9daf62c-b7c2-422a-b951-23cc45f9e6dc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T17:14:15.238724Z 01f5136 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity ✅ 0 (≤ 100 complexity)
Duplication ✅ 0 (≤ 5 duplication)

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@lbruton
lbruton merged commit 0daa0e0 into dev Nov 25, 2026
4 checks passed
@lbruton
lbruton deleted the chore/wof-deprecations branch November 25, 2026 17:17
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.

1 participant