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

Allow more data structures for JWT_TOKEN_LOCATION & JWT_BLACKLIST_TOKEN_CHECKS #215

Merged
merged 2 commits into from
Dec 25, 2018

Conversation

illia-v
Copy link
Contributor

@illia-v illia-v commented Dec 20, 2018

No description provided.

@pep8speaks
Copy link

Hello @illia-v! Thanks for submitting the PR.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling d1380fb on illia-v:more-allowed-data-structures into 5dd816c on vimalloc:master.

@coveralls
Copy link

coveralls commented Dec 20, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling b7c728e on illia-v:more-allowed-data-structures into 5dd816c on vimalloc:master.

@vimalloc
Copy link
Owner

Instead of hard coding a bunch of different types in here, why don't we instead check if the item is an iteratable. That should cover all valid inputs that could be given to those fields.

@illia-v
Copy link
Contributor Author

illia-v commented Dec 20, 2018

Checking that an item is collections.abc.Iterable is wrong because generators are iterables too :)

We can use a combination of collections.abc.Sequence and collections.abc.Set. It is not perfect too because it includes strings and ranges, but other checks handle these cases (tested).

@vimalloc
Copy link
Owner

Looks great, thanks for contributing! I’ll get a new release cut in the next few days with this change incorporated 👍

@vimalloc vimalloc merged commit c5f32c3 into vimalloc:master Dec 25, 2018
@illia-v illia-v deleted the more-allowed-data-structures branch December 26, 2018 09:51
@vimalloc
Copy link
Owner

vimalloc commented Jan 3, 2019

I released this in version 3.15.0, it should be showing up on pypi soon. Thanks for contributing! 👍

vimalloc pushed a commit that referenced this pull request Jan 10, 2019
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.

4 participants