Opened 4 months ago
Last modified 3 months ago
#36247 assigned Cleanup/optimization
BaseGeometryWidget unncessarily writes an error log when deserializing malformed geometry
Reported by: | David Buhler | Owned by: | hesham hatem |
---|---|---|---|
Component: | GIS | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Claude Paroz | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
The following bit of error logging happens during deserialization of malformed geometry:
https://github.com/django/django/blob/stable/4.2.x/django/contrib/gis/forms/widgets.py#L55
I believe this is more appropriate as a warning or debug log as returning a None value will result in a validation error rather than a failed request. This will create noise when looking for error logs that need to be actioned on.
This also impacts the 5.2.x branch.
Change History (12)
comment:1 by , 4 months ago
Cc: | added |
---|
comment:2 by , 4 months ago
comment:3 by , 4 months ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:4 by , 4 months ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:5 by , 4 months ago
Has patch: | set |
---|---|
Needs documentation: | set |
Needs tests: | set |
Version: | 4.2 → dev |
follow-up: 7 comment:6 by , 4 months ago
Hey folks, thanks for picking this up. Is there any chance this will make it into a 5.2.x release?
comment:7 by , 4 months ago
Replying to David Buhler:
Hey folks, thanks for picking this up. Is there any chance this will make it into a 5.2.x release?
Hello David, this change will be available, once merged, in main
and in 6.0
and higher. The 5.2
series is currently at beta status so only bugs introduced during the 5.2
development cycle are backported. The code referenced by this ticket is 10-12 years old so it will not receive backports (this is the documented backport policy).
follow-up: 9 comment:8 by , 4 months ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:9 by , 4 months ago
Triage Stage: | Ready for checkin → Accepted |
---|
Hello Hesham! I need to kindly ask you to please read the contributing checklist docs carefully as they state that:
If the pull request passes all the criteria below and is not your own, please set the “Triage Stage” on the corresponding Trac ticket to “Ready for checkin”.
Special attention to "and is not your own". You should not set your own PR was ready for checkin. This will be done by a reviewer once your PR is reviewed and approved. When I mentioned in another PR that you need to update the ticket flags, this is not the ticket "Triage Stage", but the booleans "has patch", "patch needs improvement" and "needs tests". I hope this makes sense!
comment:10 by , 4 months ago
Oh, I see! I sincerely apologize for the misunderstanding. I appreciate you taking the time to explain this, and I’ll be more careful to follow the correct process in the future. Thank you for your patience and guidance!
comment:11 by , 3 months ago
Needs documentation: | unset |
---|---|
Needs tests: | unset |
comment:12 by , 3 months ago
Patch needs improvement: | set |
---|
I'm fine with the idea to change the log severity to warning or debug.