long2ice / asynch

An asyncio ClickHouse Python Driver with native (TCP) interface support.
https://github.com/long2ice/asynch
Apache License 2.0
186 stars 43 forks source link

Attempt to clear the BufferedReader class from IndexError #94

Closed stankudrow closed 7 months ago

stankudrow commented 8 months ago

Addresses the following issues:

Continues the PR #90.

The assumption is the case when len(self.buffer) == self.position. Currently only two cases were caught:

  1. self.buffer=b"" and self.position = 0 - can be when realising the logic of data reading;
  2. when self.buffer is not empty and self.position = len(self.buffer) -> no reproducible example to lay out.

During the investigation, some refactoring stuff was brought.

stankudrow commented 8 months ago

@long2ice , hello, could you give your opinion on the PR and provide answers to the comments on the test cases described in the docstrings?

Also, could you tell are you planning to release a new version with, at least, this #90 PR to be included?

stankudrow commented 7 months ago

@long2ice

stankudrow commented 7 months ago

@long2ice , could you have a look at this PR and tell whether it is OK to be merged?

long2ice commented 7 months ago

Thanks!