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
Prevent middleware error on older Django versions (<1.8) #603
Conversation
@zoidbergwill FYI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, probably code coverage would complain during CI.
@wsabransky does this mean we can support much lower version at https://github.com/census-instrumentation/opencensus-python/blob/master/contrib/opencensus-ext-django/setup.py#L42? |
@reyang Yep, I've tested this on 1.6.5 and it runs. |
Hmm, it seems like unit tests are failing for reasons potentially not related to this PR. Maybe due to this being moved into its own package? |
@wsabransky Great! Probably we can change the required Django version in |
The CI failure was introduced by the PostgreSQL lib update. |
@reyang I don't know enough about Django before 1.6.x to say with confidence that it would work. But 1.6.x is definitely safe. |
@wsabransky Great to know. Thank you! |
@wsabransky I have the CI fixed, would you rebase to the latest master and try? |
@reyang done |
contrib/opencensus-ext-django/opencensus/ext/django/middleware.py
Outdated
Show resolved
Hide resolved
@reyang Thanks for the ping, when we add support for testing multiple Django versions, we can test all the currently maintained versions then probably, which is great. |
FWIW we've been setting the minimum django version according to django's support timeline even though the opencensus middleware is technically compatible with older versions. We do the same thing for flask. Since we only depend on django to instrument it (and aren't e.g. running a django service ourselves), most of the usual security concerns don't apply. On the other hand, it makes our lives easier if we always set the minimum required versions of our dependencies such that it's impossible to accidentally install an old unsupported version. |
This reverts commit af51146.
@c24t Makes sense. I've reverted the supported minimum version change. Anything else you'd like to see to get this merged? |
Looks like lint and coverage checks are still failing. |
@c24t Any chance we could get this merged into a minor version update for the django extension? |
@wsabransky in case you haven't seen it already: this was released in https://github.com/census-instrumentation/opencensus-python/releases/tag/v0.5.0. |
No description provided.