rogerbinns / apsw

Another Python SQLite wrapper
https://rogerbinns.github.io/apsw/
Other
733 stars 97 forks source link

Use recent Python for typing #438

Closed rogerbinns closed 1 year ago

rogerbinns commented 1 year ago

Typing information is trying hard to be compatible with all versions of Python, so it uses List instead of list, and has to worry about typing.Protocol not existing and a whole bunch of other baggage like Union everywhere | could be used. This also makes the documentation confusing. See also discussion in https://github.com/rogerbinns/apsw/pull/436

Redo the typing information using recent types and practises, even though it will become incorrect for the older Python versions. The typing does not affect runtime behaviour, only documentation and mypy.