[CONPY-205] Inconsistent raises based on paramters passed Created: 2022-05-25 Updated: 2022-07-06 Resolved: 2022-05-25 |
|
| Status: | Closed |
| Project: | MariaDB Connector/Python |
| Component/s: | DBAPI 2.0, Generic |
| Affects Version/s: | 1.0.11 |
| Fix Version/s: | 1.1.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Gavin D'souza | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Python Version: | 3.9.10 |
| Description |
|
Inconsistencies Observed:
```python In [2]: frappe.db.sql("select %s", ("gavin", )) In [3]: frappe.db.sql("select %(name)s", {"name": "gavin"}) In [4]: frappe.db.sql("select %(name)s", {"name": "gavin", "Bank": "bfrhsdbuzh"}) In [5]: frappe.db.sql("select %(name)s", {"name": "gavin", "Bank": None}) In [6]: frappe.db.sql("select 1", {"name": "gavin", "Bank": None}) ) ~/Desktop/frappe-bench-dev/apps/frappe/frappe/database/database.py in sql(self, query, values, as_dict, as_list, formatted, debug, ignore_ddl, as_utf8, auto_commit, update, explain, run, pluck) TypeError: Argument 2 must be Tuple or List! In [7]: frappe.db.sql("select 1", ("gavin", )) ~/Desktop/frappe-bench-dev/apps/frappe/frappe/database/database.py in sql(self, query, values, as_dict, as_list, formatted, debug, ignore_ddl, as_utf8, auto_commit, update, explain, run, pluck) DataError: Invalid number of parameters |
| Comments |
| Comment by Georg Richter [ 2022-05-25 ] |
|
Fixed in 1.1.0 |
| Comment by Gavin D'souza [ 2022-06-08 ] |
|
Hey Georg, what is the release schedule for 1.1.0 like? |
| Comment by Georg Richter [ 2022-06-08 ] |
|
Hi Gavin, The plan is to release 1.1.0 GA still in June. There are still some open issues, mainly documentation and a small memory leak. |