Support for PyMySQL
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
調査の方向性
prepare_connect_info から開始し、その port プロパティが PyMySQL connections.py の検証に到達するまでを追跡します。整数のポートを使った既存の接続フローを確認し、他のコネクタを壊さずにサポートが機能することを確認します。完了の条件は、PyMySQL 接続が設定されたポートを受け入れることです。
索引モデルが issue の本文から書いたものです。
説明
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 the AwsWrapperConnection, however, it's failing because it's casting the port argument to a string, even though I'm passing an int.
Code that's turning the port into a string:
def prepare_connect_info(self, host_info: HostInfo, props: Properties) -> Properties:
prop_copy: Properties = Properties(props.copy())
prop_copy["host"] = host_info.host
if host_info.is_port_specified():
prop_copy["port"] = str(host_info.port)
PropertiesUtils.remove_wrapper_props(prop_copy)
return prop_copy
pymysql code enforcing the int type:
connections.py
// ...
self.port = port or 3306
if type(self.port) is not int:
raise ValueError("port should be of type int")
// ...
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
if host_info.is_port_specified():
prop_copy["port"] = host_info.port
or a condition for the pymysql library
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
The AWS Advanced Python Wrapper version used
1.1.1
Python version used
3.12
Operating System and version
Ubuntu 22.04
- 主要言語
- Python
- スター
- 99
- フォーク
- 22
- 平均マージ
- 6分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws/aws-advanced-python-wrapper のほかの issue
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
aws/aws-advanced-python-wrapper#1278 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 72/100
aws/aws-advanced-python-wrapper#1276 · コメント 1 件 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
aws/aws-advanced-python-wrapper#1275 · コメント 1 件 ·
aws/aws-advanced-python-wrapper の issue をすべて見る
似ている issue
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
debpalash/VoiceStudio#2624 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Make Catch2 optional when `RDK_BUILD_CPP_TESTS=OFF`対応中かも @pechersky が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
There are a few redundant calls to `fdesc._setCloseOnExec()`対応中かも @gudnimg が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信