Add Path for type of read_default_file connection parametr
オープン
まだ誰も着手していません。
feature-request
- 主要言語
- Python
- スター
- 2.5k
- フォーク
- 443
- 平均マージ
- 18時間 21分
- マージ済み PR(30日)
- 4
説明
Sample code:
from pathlib import Path
import MySQLdb
conn = MySQLdb.connect(
read_default_file=Path(__file__).with_name('mylogin.cnf').resolve())
Error:
Traceback (most recent call last):
File "<input>", line 2, in <module>
File "/home/test/projects/venv/lib/python3.6/site-packages/MySQLdb/__init__.py", line 85, in Connect
return Connection(*args, **kwargs)
File "/home/test/projects/venv/lib/python3.6/site-packages/MySQLdb/connections.py", line 208, in __init__
super(Connection, self).__init__(*args, **kwargs2)
TypeError: connect() argument 12 must be str, not PosixPath
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Reproduce the sample using pathlib.Path with MySQLdb.connect, then start at MySQLdb/init.py and connections.py, as shown in the traceback. Check how read_default_file reaches the connection layer and verify that Path input no longer raises the reported TypeError while existing string input still works.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- mysql, python
- 領域
- databases
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100