Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency django-ninja to v1 - autoclosed #22

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 12, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
django-ninja (source) ^0.21.0 -> ^1.0.0 age adoption passing confidence

Release Notes

vitalik/django-ninja (django-ninja)

v1.3.0: 1.3.0

Compare Source

This version brings few enahcments

  1. Serialisation context now has request and response code
    class SchemaWithCustomSerializer(Schema):
        test1: str
        test2: str

        @​model_serializer(mode="wrap")
        def ser_model(self, handler, info):
            request =  info.context["request"]  # !!!
            response_status =  info.context["response_status"]  # !!!
            return handler(self)
  1. With PatchDict you can quickly define schemas with all optional fields and use it as dict with ONLY fields that were passed in request payload (aka patch requests)
from ninja import PatchDict

class SomeSchema(Schema):
    name: str
    description: str
    due_date: date

### Note all fields a required

@​api.patch("/patch")
def modify_data(request, payload: PatchDict[SomeSchema]):

### payload  ! <--- payload is a type of dict and contains only keys that were passed in request body (validated with SomeSchema)

    for attr, value in payload.items():
        setattr(obj, attr, value)
    
    obj.save()

All changes

New Contributors

Full Changelog: vitalik/django-ninja@v1.2.2...v1.3.0

v1.2.2: 1.2.2

Compare Source

What's Changed

Full Changelog: vitalik/django-ninja@v1.2.1...v1.2.2

v1.2.1

Compare Source

Fixed throttling in async mode

v1.2.0: 1.2.0

Compare Source

What's new

with most notable

All changes:

Docs

New Contributors

Full Changelog: vitalik/django-ninja@v1.1.0...v1.2.0

v1.1.0: 1.1.0

Compare Source

What's Changed

New Contributors

Full Changelog: vitalik/django-ninja@v1.0.1...v1.1.0

v1.0.1: 1.0.1

Compare Source

Fixed from_orm compatibility

v1.0: 1.0

Compare Source

Read more details and examples here https://django-ninja.dev/whatsnew_v1/

or watch overview video :

SCR-20231116-qmoj

Overview

  • 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 tried 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

Contributors

@​AlTosterino
@​AmiZya
@​Kristinus
@​ddahan
@​dipbazz
@​ivoire
@​lilleswing
@​marius-mather
@​pavel-beaufort
@​pawelngei
@​scott-8
@​skokado
@​vincentdavis
@​vpoulailleau
@​yasoob

Thank you !

Full Changelog: vitalik/django-ninja@v0.22.2...v1.0

v0.22.2: 0.22.2

Compare Source

  • Fixed schema generation bug #​774

v0.22.1: 0.22.1

Compare Source

Fixes a swagger ui error

v0.22.0: 0.22.0

What's Changed

New Contributors

Full Changelog: vitalik/django-ninja@v.0.21.0...v0.22.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Contributor Author

renovate bot commented Dec 12, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: poetry.lock
Updating dependencies
Resolving dependencies...


Because no versions of django-ninja match >1.0.0,<1.0.1 || >1.0.1,<1.1.0 || >1.1.0,<2.0.0
 and django-ninja (1.0) depends on pydantic (>=2.0,<3.0.0), django-ninja (>=1.0.0,<1.0.1 || >1.0.1,<1.1.0 || >1.1.0,<2.0.0) requires pydantic (>=2.0,<3.0.0).
And because django-ninja (1.0.1) depends on pydantic (>=2.0,<3.0.0)
 and django-ninja (1.1.0) depends on pydantic (>=2.0,<3.0.0), django-ninja (>=1.0.0,<2.0.0) requires pydantic (>=2.0,<3.0.0).
So, because miskatonic depends on both pydantic (^1.10.5) and django-ninja (^1.0.0), version solving failed.

@renovate renovate bot force-pushed the renovate/django-ninja-1.x branch from 5060044 to f7eabd3 Compare December 15, 2024 20:19
Copy link
Contributor Author

renovate bot commented Dec 15, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: poetry.lock
Updating dependencies
Resolving dependencies...


Because no versions of django-ninja match >1.0.0,<1.0.1 || >1.0.1,<1.1.0 || >1.1.0,<1.2.0 || >1.2.0,<1.2.1 || >1.2.1,<1.2.2 || >1.2.2,<1.3.0 || >1.3.0,<2.0.0
 and django-ninja (1.0) depends on pydantic (>=2.0,<3.0.0), django-ninja (>=1.0.0,<1.0.1 || >1.0.1,<1.1.0 || >1.1.0,<1.2.0 || >1.2.0,<1.2.1 || >1.2.1,<1.2.2 || >1.2.2,<1.3.0 || >1.3.0,<2.0.0) requires pydantic (>=2.0,<3.0.0).
And because django-ninja (1.0.1) depends on pydantic (>=2.0,<3.0.0)
 and django-ninja (1.1.0) depends on pydantic (>=2.0,<3.0.0), django-ninja (>=1.0.0,<1.2.0 || >1.2.0,<1.2.1 || >1.2.1,<1.2.2 || >1.2.2,<1.3.0 || >1.3.0,<2.0.0) requires pydantic (>=2.0,<3.0.0).
And because django-ninja (1.2.0) depends on pydantic (>=2.0,<3.0.0)
 and django-ninja (1.2.1) depends on pydantic (>=2.0,<3.0.0), django-ninja (>=1.0.0,<1.2.2 || >1.2.2,<1.3.0 || >1.3.0,<2.0.0) requires pydantic (>=2.0,<3.0.0).
And because django-ninja (1.2.2) depends on pydantic (>=2.0,<3.0.0)
 and django-ninja (1.3.0) depends on pydantic (>=2.0,<3.0.0), django-ninja (>=1.0.0,<2.0.0) requires pydantic (>=2.0,<3.0.0).
So, because miskatonic depends on both pydantic (^1.10.5) and django-ninja (^1.0.0), version solving failed.

@renovate renovate bot changed the title Update dependency django-ninja to v1 fix(deps): update dependency django-ninja to v1 Dec 15, 2024
@mergify mergify bot merged commit c3e2ed4 into master Dec 15, 2024
8 of 12 checks passed
@renovate renovate bot changed the title fix(deps): update dependency django-ninja to v1 fix(deps): update dependency django-ninja to v1 - autoclosed Dec 15, 2024
@renovate renovate bot deleted the renovate/django-ninja-1.x branch December 15, 2024 20:48
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.

0 participants