GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — chore: unit test coverage and additional refactoring for `spanner_dbapi` by mf2199 · Pull Request #532 · googleapis/python-spanner-django
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
Conversation
|
| ) | ||
| from .version import google_client_info | ||
| from google.cloud.spanner_dbapi.connection import Connection | ||
| from google.cloud.spanner_dbapi.connection import connect |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
FWIW our current isort config will mangle this formatting. Did you do this by hand?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yes, I did. It would work either way, and was more of the matter of a consistent visual appearance.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # TODO: File a bug with Cloud Spanner and the Python client maintainers | ||
| # about a lost commit when res isn't read from. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I know your change just moved this comment, but I wonder what the story is here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It would be a good question for the original code developer who unfortunately is no longer a member of our team. I'm not even sure what's the purpose of res, as the function does not return anything. We should probably revise this method later.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| # pyformat_str_count = after_values_sql.count("%s") | ||
| # if pyformat_str_count > 0: | ||
| # raise ProgrammingError( | ||
| # 'no params yet there are %d "%%s" tokens' % pyformat_str_count | ||
| # ) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| # pyformat_str_count = after_values_sql.count("%s") | |
| # if pyformat_str_count > 0: | |
| # raise ProgrammingError( | |
| # 'no params yet there are %d "%%s" tokens' % pyformat_str_count | |
| # ) |
LGTM, no reason to keep the old code around as far as I can tell.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This has already been addressed in a separate PR - precisely for the reason mentioned earlier, that is not to make this already large PR even bigger.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # def test_handle_insert(self): | ||
| # pass | ||
| # | ||
| # def test_do_execute_insert_heterogenous(self): | ||
| # pass | ||
| # | ||
| # def test_do_execute_insert_homogenous(self): | ||
| # pass |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looks like these are new tests, why add them as commented stubs here?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This has also been addressed in a separate PR.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…on-spanner-django into q-logic-refactor-cursor-alt # Conflicts: # google/cloud/spanner_dbapi/__init__.py # google/cloud/spanner_dbapi/connection.py # google/cloud/spanner_dbapi/cursor.py # tests/spanner_dbapi/test_connect.py # tests/spanner_dbapi/test_connection.py
Q logic refactor cursor alt
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This looks generally good to me, with a couple of small questions/suggestions regarding the docs. I'll leave the official approval to @c24t.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@olavloite Thanks for the review. Made all the changes as suggested. PTAL. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.