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 Sarah Boyce, 4 months ago

Cc: Claude Paroz added

comment:2 by Claude Paroz, 4 months ago

I'm fine with the idea to change the log severity to warning or debug.

comment:3 by Sarah Boyce, 4 months ago

Triage Stage: UnreviewedAccepted

comment:4 by hesham hatem, 4 months ago

Owner: set to hesham hatem
Status: newassigned

comment:5 by Natalia Bidart, 4 months ago

Has patch: set
Needs documentation: set
Needs tests: set
Version: 4.2dev

comment:6 by David Buhler, 4 months ago

Hey folks, thanks for picking this up. Is there any chance this will make it into a 5.2.x release?

in reply to:  6 comment:7 by Natalia Bidart, 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).

comment:8 by hesham hatem, 4 months ago

Triage Stage: AcceptedReady for checkin

in reply to:  8 comment:9 by Natalia Bidart, 4 months ago

Triage Stage: Ready for checkinAccepted

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 hesham hatem, 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 hesham hatem, 3 months ago

Needs documentation: unset
Needs tests: unset

comment:12 by Sarah Boyce, 3 months ago

Patch needs improvement: set
Note: See TracTickets for help on using tickets.
Back to Top