Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Makeinflection package truly optional#9303

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

browniebroke
Copy link
Member

@browniebrokebrowniebroke commentedMar 18, 2024
edited
Loading

Description

Fix#9291

The 3.15 release started to use theinflection package (#8017), but this was neither added as a dependency from DRF nor properly documented.

Since this is only needed for generating the OpenAPI schema (which is deprecated), I don't think it's worth introducing this package as a hard dependency, we can document it likepyyaml anduritemplate.

Since the former solution was1 3 lines, perhaps we can use it as fallback wheninflection isn't installed?

robd003 reacted with thumbs up emojiulgens reacted with heart emoji
@browniebrokebrowniebroke changed the titleMake inflection package truly optionalMakeinflection package truly optionalMar 18, 2024
@auvipyauvipy requested a review fromtfranzelMarch 18, 2024 20:24
Copy link
Member

@tfranzeltfranzel left a comment
edited
Loading

Choose a reason for hiding this comment

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

Actually I would handle it analog touritemplate, which does a graceful import and then asserts on it missing during a call.

I don't like this because it is inconsistent with the other optional libs and also silently uses a slightly degraded implementation without anyone noticing.

I think it should be like this:

asserturitemplate,'`uritemplate` must be installed for OpenAPI schema support.'

browniebroke reacted with thumbs up emoji
@browniebroke
Copy link
MemberAuthor

Fair enough

Co-authored-by: T. Franzel <13507857+tfranzel@users.noreply.github.com>
Copy link
Member

@tfranzeltfranzel left a comment

Choose a reason for hiding this comment

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

awesome. thanks@browniebroke

browniebroke reacted with rocket emoji
@tfranzeltfranzel merged commit2f66c29 intoencode:masterMar 18, 2024
@browniebrokebrowniebroke deleted the fix-inflection-optional-package branchMarch 18, 2024 22:43
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tfranzeltfranzeltfranzel approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3.15 missing package inflection
2 participants
@browniebroke@tfranzel

[8]ページ先頭

©2009-2025 Movatter.jp