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

Update requirements, Python 3.5 error with naked raise #4600

Closed
wants to merge 1 commit into from

Conversation

adamn
Copy link

@adamn adamn commented Oct 20, 2016

raise with no arguments can only be used in an except clause as of Python 3.5.

While I was in there, updated some outdated packaging/testing packages

@tomchristie
Copy link
Member

Not clear on first sight why the linting failed in the build.

@adamn
Copy link
Author

adamn commented Oct 20, 2016

The linting failed with 405 (but not on my machine oddly).

http://flake8.readthedocs.io/en/latest/user/error-codes.html

The new flake8 is ignoring the #noqa:

from rest_framework.fields import *  # NOQA # isort:skip
from rest_framework.relations import *  # NOQA # isort:skip

It looks like they want you to put #noqa on all the uses now, not the import:

https://gitlab.com/pycqa/flake8/issues/146

@tomchristie
Copy link
Member

Okay, so I guess that'll either need the noqa addressing, or else just isolate this particular PR to the raise exc only.

@adamn
Copy link
Author

adamn commented Oct 20, 2016

I think we should # noqa the whole file with a todo to do the explicit import or # noqa all those lines. It's good to have the benefits of the new linter everywhere else.

@adamn
Copy link
Author

adamn commented Oct 20, 2016

Give me a few minutes - I'll just make the linter pass. Just a bit of grunt work.

[EDIT] Give me till tomorrow ... this will require a bit of work

@tomchristie tomchristie added this to the 3.5.1 Release milestone Oct 21, 2016
@tomchristie
Copy link
Member

naked raise now resolved in e3686ac

Welcome to resubmit this with just the package updates / noqa fix 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants