Opened 18 years ago
Closed 18 years ago
#5161 closed (fixed)
mysql backend repeatedly adds warnings filter
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Uncategorized | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
See /trunk/django/db/backends/mysql/base.py, line 82 (r5609 at time of writing).
The mysql backend's cursor() method calls warnings.filterwarnings() each time a cursor is requested (if DEBUG==True). Instead, filterwarnings() should only be called once (e.g. at module load), to avoid needlessly adding identical filters to the warnings module's internal list.
Attachments (1)
Change History (4)
comment:1 by , 18 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
by , 18 years ago
| Attachment: | patch_5161.diff added |
|---|
comment:2 by , 18 years ago
| Has patch: | set |
|---|
comment:3 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [6229]) Fixed #5161 -- Changed MySQL backend only to report warning once. Thanks, durdinator