Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pin pymysql to avoid breaking behaviour #20475

Merged
merged 1 commit into from
Mar 28, 2023
Merged

Conversation

ankush
Copy link
Member

@ankush ankush commented Mar 28, 2023

  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 920, in get_default
    d = self.get_defaults(key, parent)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 936, in get_defaults
    defaults = frappe.defaults.get_defaults_for(parent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/defaults.py", line 222, in get_defaults_for
    .run(as_dict=True)
     ^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/query_builder/utils.py", line 85, in execute_query
    return frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 264, in sql
    self.log_query(query, values, debug, explain)
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/mariadb/database.py", line 203, in log_query
    self.last_query = query = self._cursor._last_executed
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Cursor' object has no attribute '_last_executed'. Did you mean: '_check_executed'?

```
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 920, in get_default
    d = self.get_defaults(key, parent)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 936, in get_defaults
    defaults = frappe.defaults.get_defaults_for(parent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/defaults.py", line 222, in get_defaults_for
    .run(as_dict=True)
     ^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/query_builder/utils.py", line 85, in execute_query
    return frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 264, in sql
    self.log_query(query, values, debug, explain)
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/mariadb/database.py", line 203, in log_query
    self.last_query = query = self._cursor._last_executed
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Cursor' object has no attribute '_last_executed'. Did you mean: '_check_executed'?
```
@ankush ankush requested review from a team and phot0n and removed request for a team March 28, 2023 06:35
@ankush ankush merged commit 229dcb3 into frappe:develop Mar 28, 2023
@ankush ankush deleted the pin_pymysql branch March 28, 2023 06:37
mergify bot pushed a commit that referenced this pull request Mar 28, 2023
```
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 920, in get_default
    d = self.get_defaults(key, parent)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 936, in get_defaults
    defaults = frappe.defaults.get_defaults_for(parent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/defaults.py", line 222, in get_defaults_for
    .run(as_dict=True)
     ^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/query_builder/utils.py", line 85, in execute_query
    return frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 264, in sql
    self.log_query(query, values, debug, explain)
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/mariadb/database.py", line 203, in log_query
    self.last_query = query = self._cursor._last_executed
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Cursor' object has no attribute '_last_executed'. Did you mean: '_check_executed'?
```

(cherry picked from commit 229dcb3)
ankush added a commit that referenced this pull request Mar 28, 2023
```
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 920, in get_default
    d = self.get_defaults(key, parent)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 936, in get_defaults
    defaults = frappe.defaults.get_defaults_for(parent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/defaults.py", line 222, in get_defaults_for
    .run(as_dict=True)
     ^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/query_builder/utils.py", line 85, in execute_query
    return frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 264, in sql
    self.log_query(query, values, debug, explain)
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/mariadb/database.py", line 203, in log_query
    self.last_query = query = self._cursor._last_executed
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Cursor' object has no attribute '_last_executed'. Did you mean: '_check_executed'?
```

(cherry picked from commit 229dcb3)

Co-authored-by: Ankush Menat <ankush@frappe.io>
ankush added a commit that referenced this pull request Mar 28, 2023
mergify bot added a commit that referenced this pull request Mar 28, 2023
```
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 920, in get_default
    d = self.get_defaults(key, parent)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 936, in get_defaults
    defaults = frappe.defaults.get_defaults_for(parent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/defaults.py", line 222, in get_defaults_for
    .run(as_dict=True)
     ^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/query_builder/utils.py", line 85, in execute_query
    return frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 264, in sql
    self.log_query(query, values, debug, explain)
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/mariadb/database.py", line 203, in log_query
    self.last_query = query = self._cursor._last_executed
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Cursor' object has no attribute '_last_executed'. Did you mean: '_check_executed'?
```

(cherry picked from commit 229dcb3)

Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 7cc358c)
ankush pushed a commit that referenced this pull request Mar 28, 2023
```
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 920, in get_default
    d = self.get_defaults(key, parent)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 936, in get_defaults
    defaults = frappe.defaults.get_defaults_for(parent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/defaults.py", line 222, in get_defaults_for
    .run(as_dict=True)
     ^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/query_builder/utils.py", line 85, in execute_query
    return frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 264, in sql
    self.log_query(query, values, debug, explain)
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/mariadb/database.py", line 203, in log_query
    self.last_query = query = self._cursor._last_executed
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Cursor' object has no attribute '_last_executed'. Did you mean: '_check_executed'?
```

(cherry picked from commit 229dcb3)

Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 7cc358c)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
frappe-pr-bot pushed a commit that referenced this pull request Mar 28, 2023
## [14.29.2](v14.29.1...v14.29.2) (2023-03-28)

### Bug Fixes

* pin pymysql to avoid breaking behaviour ([#20475](#20475)) ([#20476](#20476)) ([#20477](#20477)) ([26867dc](26867dc))
@ankush ankush mentioned this pull request Mar 28, 2023
ankush added a commit to ankush/frappe that referenced this pull request Mar 28, 2023
Actual fix for this bandaid fix: frappe#20475

Keeping pymysql hard pinned until we have better way to get last full
query.
ankush added a commit that referenced this pull request Mar 28, 2023
Actual fix for this bandaid fix: #20475

Keeping pymysql hard pinned until we have better way to get last full
query.
frappe-pr-bot pushed a commit that referenced this pull request Mar 28, 2023
# [14.30.0](v14.29.2...v14.30.0) (2023-03-28)

### Bug Fixes

* Avoid list update if user is doing some bulk operation ([0176031](0176031))
* consider JSON as Data for filters ([9f1108c](9f1108c))
* exception handling for bulk email sending ([#20451](#20451)) ([#20454](#20454)) ([10e8b5e](10e8b5e))
* fields are rendered empty after save ([#20270](#20270)) ([#20449](#20449)) ([f458489](f458489))
* Get translated value for child tables in print format ([03edc30](03edc30))
* hard link environment variable ([#20467](#20467)) ([#20469](#20469)) ([eaecc3f](eaecc3f))
* Permission error while processing role based notifications ([#20315](#20315)) ([#20427](#20427)) ([f909a5a](f909a5a))
* pin pymysql to avoid breaking behaviour ([#20475](#20475)) ([#20476](#20476)) ([7cc358c](7cc358c))
* suggested email ids in New Email dialog ([#20319](#20319)) ([#20474](#20474)) ([196d4fd](196d4fd))

### Features

* re-enable scheduler from desk ([#20434](#20434)) ([#20435](#20435)) ([0d19aff](0d19aff))
* show if address is "Disabled" ([#20446](#20446)) ([#20453](#20453)) ([186012b](186012b))
mergify bot pushed a commit that referenced this pull request Apr 4, 2023
Actual fix for this bandaid fix: #20475

Keeping pymysql hard pinned until we have better way to get last full
query.

(cherry picked from commit 024faff)
ankush added a commit that referenced this pull request Apr 4, 2023
Actual fix for this bandaid fix: #20475

Keeping pymysql hard pinned until we have better way to get last full
query.

(cherry picked from commit 024faff)

Co-authored-by: Ankush Menat <ankush@frappe.io>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant