You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project I'm working on uses pymysql, I tried to pass the Connect class to the AwsWrapperConnection, however, it's failing because it's casting the port argument to a string, even though I'm passing an int.
I patched the initfor the Connection to enforce the int type for the port. However, looks like it isn't the only issue. Now, I'm getting an error related to the in_transaction property:
File "/venv/lib/python3.12/site-packages/aws_advanced_python_wrapper/mysql_driver_dialect.py", line 124, in is_in_transaction
raise UnsupportedOperationError(
aws_advanced_python_wrapper.UnsupportedOperationError: [DriverDialect] target driver 'MySQL Connector Python' dialect doesn't support 'in_transaction'.
Describe the feature
Support the usage of the pymysql connector
Use Case
The project I'm working on uses pymysql, I tried to pass the
Connect
class to theAwsWrapperConnection
, however, it's failing because it's casting the port argument to astring
, even though I'm passing anint
.Code that's turning the port into a string:
pymysql code enforcing the int type:
connections.py
I wonder if it's possible to remove that cast to string or adapt somehow to support pymysql. I'm not sure if that's all it's going to take, though.
Proposed Solution
Remove the cast to string for the port
or a condition for the pymysql library
Other Information
No response
Acknowledgements
The AWS Advanced Python Wrapper version used
1.1.1
Python version used
3.12
Operating System and version
Ubuntu 22.04
The text was updated successfully, but these errors were encountered: