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

Make coreapi & markdown requirements optional #243

Merged

Conversation

intgr
Copy link
Contributor

@intgr intgr commented Jul 19, 2022

I have made things!

The coreapi and markdown dependencies in Django REST Framework have been optional for a long time, but installing a stubs package pulls them in regardless. I have moved these to "extras" dependencies. I tested this in my project and it causes no additional mypy inspections.

Related issues

Copy link
Member

@sobolevn sobolevn 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!

@sobolevn
Copy link
Member

Please, fix black 🙂

@intgr
Copy link
Contributor Author

intgr commented Jul 19, 2022

Fixed Black.

Oh, also, should requirements.txt be updated to install these extras?

-e .[compatible-mypy,coreapi,markdown]

@sobolevn
Copy link
Member

In development, yes, we want everything. Let's make -e .[all] for this case.

@sobolevn sobolevn merged commit 955482c into typeddjango:master Jul 19, 2022
@intgr
Copy link
Contributor Author

intgr commented Oct 26, 2022

This is now causing warnings with Python 3.11.

  1. I'm importing rest_framework in my code
  2. REST framework has an optional import of coreapi -- if coreapi is missing, there wouldn't be a problem
  3. djangorestframework-stubs requires installing coreapi
  4. coreapi imports Python's cgi module
  5. Python displays DeprecationWarning

Sorry to sound grumpy, but it's demotivating to work TypedDjango knowing it will take many months before there's a release and I'm able to take advantage of the changes. I do understand that TypedDjango maintainers are doing this in a volunteer capacity.

I was hoping that #228 would result in more frequent releases, but that has not happened.

@intgr intgr deleted the make-coreapi-markdown-deps-optional branch November 22, 2022 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Can 'coreapi' dependency be dropped?
2 participants