Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses the malformed GML polygon position-list case in #599 (not all cases in that umbrella issue).
_parse_georss_line()returnsNonefor invalid numeric coordinates, but the polygon branch of_parse_poslist()unconditionally indexes that result. Consequently an invalid numeric token such as.raisesTypeErrorthrough publicfeedparser.parse().Return
Nonewhen the ring parser fails, matching the existing geometry-parser failure contract. The existing_end_gml_poslist()already ignores an unsuccessful geometry result. Valid polygon coordinates, coordinate ordering and unrelated feed data are preserved. This does not change polygon validity/closure rules or broaden exception catching.Added 11 regressions/controls: three helper inputs, the same three complete Atom/GML feeds through both strict and loose parsers, the issue's minimized malformed input, and a valid ring control. Included a Fixed changelog fragment.
Checked #600/#602/#603/#604 and current open PRs: they address other #599 failures; none handles this invalid ring result.
Verification
Linux x86_64, baseline
a22c5521cbb109871f1a2318948581901bd47e26:With newest chardet 7.6.0, six existing encoding-expectation tests fail on both baseline (4299 passed, 6 failed) and patched source (4310 passed, 6 failed); new geometry tests pass. Those dependency-specific failures were not altered or hidden. The green full-suite run uses chardet 5.2.0 explicitly.
Tests ran with networking disabled and a clean environment; HTTP tests use the project's mocked responses. Windows/macOS and other supported Python versions were not tested locally. Upstream CI/merge success and performance claims are not made.
AI disclosure: this investigation, patch, regressions and PR text were prepared by an OpenAI coding assistant (gpt-6.1-sol) under guocn's explicit authorization. The account owner has not yet independently reviewed the changes.