py-pgproto
py-pgproto copied to clipboard
Low-level IO utilities for PosgtreSQL drivers.
This fixes MagicStack/asyncpg#1006 :)
Getting a lot of these errors when trying to build https://github.com/MagicStack/asyncpg on Python 3.12: ``` asyncpg/pgproto/pgproto.c:40800:55: error: no member named 'ob_digit' in 'struct _longobject' const digit* digits = ((PyLongObject*)x)->ob_digit; ~~~~~~~~~~~~~~~~~~...
Should the argument `x` here have type `int32_t`? ```c pack_int32(char *buf, int64_t x) ``` I understand that the current version will produce exactly the same result.
While working on ChunkedBuffer: https://github.com/tzickel/chunkedbuffer I think it's for calling python methods which are already bound to a Python object, it's faster to do instead of (check the annotated output):...
When building from a29a6f6aaa09013cb33ffadb8dd57e21d671ab55 there are compilation errors on 3.12. On relatively newer versions of cython declaring a `const` at module initialization has been deprecated. ```bash Error compiling Cython file:...
When passing a timezone-aware datetime to `timestamp_encode()` an exception is raised when subtracting `pg_epoch_datetime` as is it timezone-naive. I believe that in this case `pg_epoch_datetime_utc` should be subtracted instead.