Replies: 1 comment
-
Hello @leifwar, Thank you for the feedback. Yes, some versions are sunset, even for certain Python 3 versions; they should not be used anymore. This is a very good point, and I am aware of that; however, the issue is that mypy and pyright are not aware of this. Since some versions of Python do not support function signature overloading as of today, I have no choice but to retain all the signatures that are originally from the Confluent Kafka Python package. Welcome for all the feedback 🙏🏻 Thanks again. |
Beta Was this translation helpful? Give feedback.
-
Several of the functions are typed with the union
str | bytes | None
where it should be eitherbytes | None
for Python 3 andstr | None
for Python 2 (given bycfl_PyBin
). Anyone using these stubs would then have to deal with a type hint that can never happen. Would it be possible to either drop the Python 2 type hints, since it should not be used anymore (https://www.python.org/doc/sunset-python-2/), or provide separate stubs for the two python versions?Beta Was this translation helpful? Give feedback.
All reactions