Skip to content

1.0 RC

Pre-release
Pre-release
Compare
Choose a tag to compare
@vitalik vitalik released this 07 Nov 16:59
· 251 commits to master since this release
cd66ac8

What's Changed

  • Fixed not awaitable response in async authentication (#44)

This looks like the final pre-release - and I'm happy to report that beta versions was successfully tested by multiple companies in production environments

What's new in 1.x

  • async authentication fully supported on all layers
  • New parameters markers syntax (+ Annotated[] syntax support)
  • CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
  • Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
    • Safer types.
    • Better extensibility.
    • Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
    • schema validators/resolvers now have extra context (like request)
  • Pagination class accepts a request object
  • allow adding routers by string path instead of explicit import

Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level

From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change

Documentation

  • Fix spelling error in motivation documentation by @lilleswing in #874
  • Add partial updates and strict validation to the CRUD tutorial by @ddahan in #877
  • docs: configure syntax coloring by @ivoire in #878
  • docs: use lowercase for language identifier by @ivoire in #879

New Contributors

Full Changelog: v1.0b2...v1.0rc