Title: Percents de-escaping isn't handled when no parameters are used in the dbapi. · Issue #608 · googleapis/python-bigquery · GitHub
Open Graph Title: Percents de-escaping isn't handled when no parameters are used in the dbapi. · Issue #608 · googleapis/python-bigquery
X Title: Percents de-escaping isn't handled when no parameters are used in the dbapi. · Issue #608 · googleapis/python-bigquery
Description: >>> import google.cloud.bigquery.dbapi >>> conn = google.cloud.bigquery.dbapi.connect() /home/jim/p/g/python-bigquery/google/cloud/bigquery/client.py:444: UserWarning: Cannot create BigQuery Storage client, the dependency google-cloud-bi...
Open Graph Description: >>> import google.cloud.bigquery.dbapi >>> conn = google.cloud.bigquery.dbapi.connect() /home/jim/p/g/python-bigquery/google/cloud/bigquery/client.py:444: UserWarning: Cannot create BigQuery Storag...
X Description: >>> import google.cloud.bigquery.dbapi >>> conn = google.cloud.bigquery.dbapi.connect() /home/jim/p/g/python-bigquery/google/cloud/bigquery/client.py:444: UserWarning: Cannot crea...
Opengraph URL: https://github.com/googleapis/python-bigquery/issues/608
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Percents de-escaping isn't handled when no parameters are used in the dbapi.","articleBody":"\r\n```python\r\n\r\n\u003e\u003e\u003e import google.cloud.bigquery.dbapi\r\n\u003e\u003e\u003e conn = google.cloud.bigquery.dbapi.connect()\r\n/home/jim/p/g/python-bigquery/google/cloud/bigquery/client.py:444: UserWarning: Cannot create BigQuery Storage client, the dependency google-cloud-bigquery-storage is not installed.\r\n warnings.warn(\r\n\u003e\u003e\u003e cursor = conn.cursor()\r\n\u003e\u003e\u003e cursor.execute(\"select 'foo %%', %(x)s\", dict(x=1))\r\n\u003e\u003e\u003e cursor.fetchall()\r\n[Row(('foo %', 1), {'f0_': 0, 'f1_': 1})]\r\n\u003e\u003e\u003e cursor.execute(\"select 'foo %%'\", dict(x=1))\r\n\u003e\u003e\u003e cursor.fetchall()\r\n[Row(('foo %',), {'f0_': 0})]\r\n\u003e\u003e\u003e cursor.execute(\"select 'foo %%'\")\r\n\u003e\u003e\u003e cursor.fetchall()\r\n[Row(('foo %%',), {'f0_': 0})]\r\n```\r\n\r\nBonus:\r\n\r\nif people don't escape:\r\n\r\n```\r\n\u003e\u003e\u003e cursor.execute(\"select 'foo %'\")\r\n\u003e\u003e\u003e cursor.fetchall()\r\n[Row(('foo %',), {'f0_': 0})]\r\n\u003e\u003e\u003e cursor.execute(\"select 'foo %'\", dict(x=1))\r\nTraceback (most recent call last):\r\n File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\r\n File \"/home/jim/p/g/python-bigquery/google/cloud/bigquery/dbapi/_helpers.py\", line 273, in with_closed_check\r\n return method(self, *args, **kwargs)\r\n File \"/home/jim/p/g/python-bigquery/google/cloud/bigquery/dbapi/cursor.py\", line 172, in execute\r\n formatted_operation = _format_operation(operation, parameters=parameters)\r\n File \"/home/jim/p/g/python-bigquery/google/cloud/bigquery/dbapi/cursor.py\", line 460, in _format_operation\r\n return _format_operation_dict(operation, parameters)\r\n File \"/home/jim/p/g/python-bigquery/google/cloud/bigquery/dbapi/cursor.py\", line 434, in _format_operation_dict\r\n return operation % formatted_params\r\nValueError: unsupported format character ''' (0x27) at index 13\r\n```\r\n\r\n","author":{"url":"https://github.com/jimfulton","@type":"Person","name":"jimfulton"},"datePublished":"2021-04-14T20:08:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/608/python-bigquery/issues/608"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:49451ee0-1722-bbef-3532-d843d99d2b3c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A33A:118815:2FF4CF1:441091F:6A511E13 |
| html-safe-nonce | 6be70be347a1db12f80b025090997d06c774d2b650f25b8c6a85a7f141c4db43 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzNBOjExODgxNToyRkY0Q0YxOjQ0MTA5MUY6NkE1MTFFMTMiLCJ2aXNpdG9yX2lkIjoiNTc2NDE0MDMzOTc1MDMxMzQ5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2761d1ccfdbbf49a5b9f8b012a6915485cdbc678e58f25bd66c0a1e0816e05ae |
| hovercard-subject-tag | issue:858226113 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-bigquery/608/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8f35eabda9fa518a1715096ed6142166a0b91903cbbd38672cd190677908cbec/googleapis/python-bigquery/issues/608 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8f35eabda9fa518a1715096ed6142166a0b91903cbbd38672cd190677908cbec/googleapis/python-bigquery/issues/608 |
| og:image:alt | >>> import google.cloud.bigquery.dbapi >>> conn = google.cloud.bigquery.dbapi.connect() /home/jim/p/g/python-bigquery/google/cloud/bigquery/client.py:444: UserWarning: Cannot create BigQuery Storag... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jimfulton |
| hostname | github.com |
| expected-hostname | github.com |
| None | f0f0f3a40c5b69803a8255a8e44323880bf9c4db54d5c076f2130bedf2a1dde5 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-bigquery git https://github.com/googleapis/python-bigquery.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992475 |
| octolytics-dimension-repository_nwo | googleapis/python-bigquery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992475 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-bigquery |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 44909533816f7f99ff04e7a0fe692733af67ed84 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width