-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Increase stacklevel for UserWarning about AppKey usage #7484
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
Thanks for trying this out. Do you think it's possible to tweak the test to catch this? https://github.com/aio-libs/aiohttp/blob/master/tests/test_web_app.py#L147 |
Codecov Report
@@ Coverage Diff @@
## master #7484 +/- ##
==========================================
- Coverage 97.27% 97.27% -0.01%
==========================================
Files 106 106
Lines 31448 31442 -6
Branches 3567 3568 +1
==========================================
- Hits 30592 30586 -6
Misses 652 652
Partials 204 204
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Pytest doesn't really support it unfortunately pytest-dev/pytest#4343. I've tried a small workaround to at least check the file name where the warning is emitted but this is not something I would recommend for everything. Let me know what you think. |
That's probably fine. |
Backport to 3.9: 💚 backport PR created✅ Backport PR branch: Backported as #7489 🤖 @patchback |
(cherry picked from commit 466f1eb)
… about AppKey usage (#7489) **This is a backport of PR #7484 as merged into master (466f1eb).** ## What do these changes do? The `UserWarning` to use `web.AppKey` should be emitted on the call site. ## Checklist - [x] I think the code is well written - [ ] Unit tests for the changes exist - [ ] Documentation reflects the changes - [x] If you provide code modification, please add yourself to `CONTRIBUTORS.txt` * The format is <Name> <Surname>. * Please keep alphabetical order, the file is sorted by names. - [ ] Add a new news fragment into the `CHANGES` folder * name it `<issue_id>.<type>` for example (588.bugfix) * if you don't have an `issue_id` change it to the pr id after creating the pr * ensure type is one of the following: * `.feature`: Signifying a new feature. * `.bugfix`: Signifying a bug fix. * `.doc`: Signifying a documentation improvement. * `.removal`: Signifying a deprecation or removal of public API. * `.misc`: A ticket has been closed, but it is not of interest to users. * Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files." Co-authored-by: Marc Mueller <[email protected]>
What do these changes do?
The
UserWarning
to useweb.AppKey
should be emitted on the call site.Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.