Improve coreapi importing by gsvr · Pull Request #5921 · encode/django-rest-framework (original) (raw)

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

Already on GitHub?Sign in to your account

Conversation8 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

gsvr

Description

Closes #5918
Import coreapi from rest_framework.compat, not directly.

@gsvr

@DEKHTIARJonathan

Please release a new version on PyPI as soon as this PR is merged ;)

Thanks for the work

@gsvr

@carltongibson I hope I opened this PR in the right way, first time contributing 😅
I did two additional things to what you stated in the issue:

  1. Added and coreschema is not None, not sure if this was necessary but it looked safer.
  2. Changed the import in test_renderers.py - I doubt this is necessary but it's more consistent with other imports in tests.

Please let me know if you want a test for this, it didn't look like something you were testing generally.

@carltongibson

@gsvr Thanks for this.

@ALL: This will go into a 3.8.2. There are a couple of issues for that, so it'll be first half of next week. If you cannot wait until then you should install directly from GitHub. (Pip has first-class support for this. It's not something to avoid.)

carltongibson

Choose a reason for hiding this comment

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

Yep. Looks good.

@gsvr

@carltongibson It's not a problem for me, I just pinned my version to <3.8 for now. Thanks for the quick responses :)

@carltongibson

v3.8.2 is now available on PyPI. Thanks all.

@xordoquy

@LuisHCK please, don't use passive aggressive tone.
We - anyone that contributed here - have no part in your code not working as you'd have wished/expected.
You just don't bring anything valuable to the issue here beside negative comments.
Please, be constructive. Write the simplest possible test case where you can show your issue and open a PR so we may look at it.

@rpkilby

@LuisHCK. These changes are included in the 3.8.2 release (see: here). I would check again what version of DRF is installed. You may also want to recreate your virtual environment.

pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request

Nov 17, 2020

@gsvr