The context manager implementation for PyMySql Connection objects was replaced with different functionality in the versions between bullseye and bookworm; change the code to not use Connections as context managers at all to maintain compatibility with both versions.
The context manager implementation for PyMySql Connection objects was replaced with different functionality in the versions between bullseye and bookworm; change the code to not use Connections as context managers at all to maintain compatibility with both versions.