python-filewrap 0.2.3__tar.gz → 0.2.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-filewrap
3
- Version: 0.2.3
3
+ Version: 0.2.3.1
4
4
  Summary: Python file wrappers.
5
5
  Home-page: https://github.com/ChenyangGao/web-mount-packs/tree/main/python-module/python-filewrap
6
6
  License: MIT
@@ -349,8 +349,9 @@ class AsyncBufferedReader(BufferedReader):
349
349
  break
350
350
  if length < BUFSIZE:
351
351
  part1, part2 = buf_view[length:].tobytes(), buf_view[:length].tobytes()
352
- buf_view[:length] = part1
353
- buf_view[length:] = part2
352
+ index = len(part1)
353
+ buf_view[:index] = part1
354
+ buf_view[index:] = part2
354
355
  running = False
355
356
  buf_pos = self._buf_pos = BUFSIZE - length
356
357
  else:
@@ -765,6 +766,8 @@ class AsyncTextIOWrapper(TextIOWrapper):
765
766
  else:
766
767
  del buf[idx:]
767
768
  break
769
+ if peek_b:
770
+ await read(len(peek_b))
768
771
  c = await read(1)
769
772
  if not c:
770
773
  reach_end = True
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-filewrap"
3
- version = "0.2.3"
3
+ version = "0.2.3.1"
4
4
  description = "Python file wrappers."
5
5
  authors = ["ChenyangGao <wosiwujm@gmail.com>"]
6
6
  license = "MIT"