michalc / sqlite-s3-query

Python functions to query SQLite files stored on S3
MIT License
251 stars 15 forks source link

fix: work on httpx 0.23.0 #37

Closed michalc closed 2 years ago

michalc commented 2 years ago

In previous versions of https, a HEAD request's iter_bytes would return a simple empty byte string. Now, it looks like no byte string it returned, and so next would raise a StopIteration. We use the 2nd argument to next to ignore the StopIteration if it happens.

(The next is there it exhaust the iterable to make sure httpx knows it can re-use the connection to S3)