-
-
Notifications
You must be signed in to change notification settings - Fork 244
relax config type check on JWT_*_TOKEN_EXPIRES #233
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
Conversation
65c810a
to
a5a425f
Compare
Nice 👍 Could you add a unit test for the |
I was just about to ask; I wasn't sure if you'd want the extra dependency or not. :) |
For sure, thanks for checking 👍 Having the extra development dependency doesn't bother me at all. Thanks for contributing! |
Oh, that reminds me. With the added requirement of the Cheers. |
Whoops, I totally forgot that tox used it's own dependencies as well. Gotta love dependency management right? If you add six and dateutils to the tox.ini I expect these tests should pass 👍 |
Actually, only |
I think I'm missing something about your test setup; dateutil imports were failing with dateutil in requirements.txt, but started working when I added it to deps in tox.ini. edit: look what i get for posting without scrolling up :) |
Instead of requiring JWT_ACCESS_TOKEN_EXPIRES and JWT_REFRESH_TOKEN_EXPIRES to be of type `datetime.timedelta` or `False`, checks in config.py support any value that can be successfully added to a `datetime.datetime` object. Closes vimalloc#214.
afc23c6
to
076789a
Compare
Yeah, the requirements.txt contains a bunch of additional stuff that isn't needed for unit tests (such as the code to generate documentation or push up new releases to PyPI). For the sake of speed, I have tox setup to only install the necessary requirements for running the unit tests instead of all the code in the requirements.txt. Thanks for spending the time to put this together, it looks good 👍 |
This has been released in 3.18.0. Cheers. |
Instead of requiring JWT_ACCESS_TOKEN_EXPIRES and JWT_REFRESH_TOKEN_EXPIRES to
be of type
datetime.timedelta
orFalse
, checks in config.py support anyvalue that can be successfully added to a
datetime.datetime
object.Closes #214.
(I'm not well-configured to test this atm, so I'm relying on CI to slap me down if there's a problem here.)