When encoding, encode bytes values as BLOB 'hexbytes', not just 'hexbytes'.
When decoding, call fromhex directly instead of going through pymonetdb.Binary.
pymonetdb.Binary() tried to hexdecode its argument, this has now been removed.
If I understand PEP249 correctly, pymonetdb.Binary is intended for
application code to portably mark data as Binary. This was necessary
in Python 2 where strings and byte arrays shared the same underlying type.
For example, SQLAlchemy calls pymonetdb.Binary() on bytes objects,
with the old implementation this used to crash.
When encoding, encode bytes values as BLOB 'hexbytes', not just 'hexbytes'. When decoding, call fromhex directly instead of going through pymonetdb.Binary.
pymonetdb.Binary() tried to hexdecode its argument, this has now been removed. If I understand PEP249 correctly, pymonetdb.Binary is intended for application code to portably mark data as Binary. This was necessary in Python 2 where strings and byte arrays shared the same underlying type.
For example, SQLAlchemy calls pymonetdb.Binary() on bytes objects, with the old implementation this used to crash.