Fokko opened a new pull request, #5171: URL: https://github.com/apache/iceberg/pull/5171
Mypy was so quiet, that I got a bit suspicious. The path to the config file was incorrect, therefore it was not working. I fixed all the violations, but also ran into some other issues: It looks like that open() returns an incompatible type: ``` python/tests/conftest.py:833: error: Incompatible return value type (got "BufferedWriter", expected "OutputStream") python/tests/conftest.py:833: note: Following member(s) of "BufferedWriter" have conflicts: python/tests/conftest.py:833: note: Expected: python/tests/conftest.py:833: note: def write(self, b: bytes) -> None python/tests/conftest.py:833: note: Got: python/tests/conftest.py:833: note: def write(self, Union[bytes, Union[bytearray, memoryview, array[Any], mmap, _CData, PickleBuffer]]) -> int ``` When fixing the type to the awkward signature, and converting `closed()` to `closed` (a property). I got the following: ``` python/tests/conftest.py:831: error: Only protocols that don't have non-method members can be used with issubclass() python/tests/conftest.py:831: note: Protocol "OutputStream" has non-method member(s): closed ``` Which basically tells us that we can't include `closed` in the protocol because I had to change it to a property to conform it to `IOBase`. My suggestion would be to get rid of the InputStream/OutputStream and just use the internal IOBase which is a bit richer, but we don't have to implement everything. I also stumbled upon this when trying to integrate the Avro library, but this wasn't an issue in the end because we vendor'ed it because we replaced the Avro schema with the iceberg one. Therefore we just could tailor the interfaces to our liking. WDYT? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
