Bug #84389 Add read_default_file argument for connect()
Submitted: 3 Jan 2017 12:26 Modified: 13 Aug 2019 21:46
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / Python Severity:S4 (Feature request)
Version:2.1 OS:Any
Assigned to: CPU Architecture:Any

[3 Jan 2017 12:26] Daniël van Eeden
Description:
When porting code from MySQLdb to mysql.connector:
"AttributeError: Unsupported argument 'read_default_file'"

The reason was this:
c = mysql.connector.connect(read_default_file='foo.cnf')

How to repeat:
See description

Suggested fix:
Let read_default_file be an alias for option_files to make mysql.connector more compatible with MySQLdb.
[5 Jan 2017 5:58] MySQL Verification Team
Hello Daniël,

Thank you for the report and feature request!

Thanks,
Umesh
[13 Aug 2019 21:46] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Connector/Python 8.0.18 release, and here's the changelog entry:

Let read_default_file be an alias for option_files to make mysql.connector
more compatible with MySQLdb.

Thank you for the bug report.