GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — Fix Server.readline() dropping buffered lines after a non-LF line boundary by fdcastel · Pull Request #79 · FirebirdSQL/python3-driver Conversation
Member
ProblemThe new The buffer is built with Only the last buffered piece can be an incomplete line, because it is the tail of the last query. Any earlier piece is complete; it just ends on a non-LF boundary. Fixif self.__line_buffer and (len(self.__line_buffer) > 1 or self.__line_buffer[0].endswith('\n') or self._eof): return self.__line_buffer.pop(0) Evidence (live, Firebird on localhost, Windows)Two trace sessions observed the same workload. One was read through
2.0.3 (blocking iteration) also captures 21 of 21 in the last scenario, so this is a regression in the new loop. Tests
The rest of the timed-output design works as discussed in #71: an idle trace yields
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…ndary readline() treated any buffered piece not ending in '\n' as an incomplete line and re-read it via _read_output(init=...), which replaces the whole line buffer. str.splitlines() also breaks on CR, FF and other non-LF separators, so a bare CR inside SQL text in trace output discarded every line buffered after it. Only the last buffered piece can be incomplete. Refs FirebirdSQL#70.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | ||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |