RepoJournal
FastAPI & Pydantic

FastAPI & Pydantic

FastAPI and the Pydantic + SQLModel async-Python stack

Pick a date

The Wire ยท Showcase

FASTAPI TIGHTENS STATIC FILE HANDLING, PYDANTIC ADDS FRACTION SUPPORT

By RepoJournal ยท Filed ยท About FastAPI & Pydantic

FastAPI 0.138.2 shipped with stricter HTTP method validation for static file routes, while Pydantic cleared a major type system gap by adding native Fraction support.

FastAPI released 0.138.2 [2] with a critical refactor to its frontend static file handler. The `app.frontend()` method now returns 404 for any HTTP method other than GET or HEAD when no static file matches [1]. This closes a gap where POST, PUT, and DELETE requests could leak information about your static file structure. It's a quiet but important security posture improvement for any FastAPI app serving static assets.

On the Pydantic side, the team shipped support for Python's `Fraction` type in pydantic-core [3], resolving a long-standing gap in numeric type coverage. This wraps up months of discussion around non-standard numeric types and gives you first-class validation and serialization for fractional math without custom validators. If your domain model needs precise rational arithmetic, you can now declare it directly in your schema.

Pydantic also patched compatibility issues with pytest 9.1.0 [4], which introduced breaking changes to test discovery and deprecations that were silently ignored in older pytest versions. The team caught these before they became production friction. Additionally, a regression test landed for pickling behavior of generic models across modules [5], addressing issue #9390 and preventing future serialization regressions.

Minor sponsor housekeeping hit both repos overnight [6], [7], with no impact to functionality. The FastAPI team also added "agent skills" infrastructure [8] for future AI integration patterns, though details remain minimal.

Action items

References

  1. [1] โ™ป๏ธ Make `app.frontend()` return 404 for methods other than `GET` or `HEAD` with no static file matches โ†— fastapi/fastapi
  2. [2] 0.138.2 โ†— fastapi/fastapi
  3. [3] Support `Fraction` type in `pydantic-core` โ†— pydantic/pydantic
  4. [4] Fix test failures with pytest >= 9.1.0 โ†— pydantic/pydantic
  5. [5] Add regression test for pickling behavior of generic models in different modules (#13367) pydantic/pydantic
  6. [6] ๐Ÿ”ง Update sponsors: remove Stainless (#15862) fastapi/fastapi
  7. [7] ๐Ÿ”ง Update sponsors: remove Stainless โ†— fastapi/fastapi
  8. [8] Add agent skills โ†— pydantic/pydantic

FAQ

What changed in FastAPI & Pydantic on June 30, 2026?
FastAPI 0.138.2 shipped with stricter HTTP method validation for static file routes, while Pydantic cleared a major type system gap by adding native Fraction support.
What should FastAPI & Pydantic teams do about it?
Upgrade to FastAPI 0.138.2 if serving static files through app.frontend() โ€ข Add Fraction fields to validation schemas if you use fractional math โ€ข Run Pydantic test suite against pytest 9.1.0+ to catch breakage early
Which FastAPI & Pydantic repositories shipped on June 30, 2026?
fastapi/fastapi, pydantic/pydantic

Related across the cluster

For your repos

The showcase is a teaser.
Your wire is the product.

Same engine. Different stack. Below: what changes when the wire is yours.

Showcase wire

  • โ€ข14 famous open source orgs
  • โ€ขOne wire per day
  • โ€ขPublic, generic
  • โ€ขRead on the web, when you remember

Your wire

  • โ†’Up to 1,500 of your repos - orgs, deps, vendors
  • โ†’Morning and evening briefs
  • โ†’Action items routed to your team
  • โ†’Slack delivery, email, breaking-news CVE alerts

Want a hands-on demo first? Ask a current user for an invite link.