tests: allow prerelease dependency versions under Python 3.9#479
Conversation
|
The error here is because we patch google/cloud/spanner_v1/session.py:371: in run_in_transaction
txn.commit(
google/cloud/spanner_v1/transaction.py:161: in commit
with trace_call("CloudSpanner.Commit", self._session, trace_attributes):
/usr/local/lib/python3.9/contextlib.py:117: in __enter__
return next(self.gen)
google/cloud/spanner_v1/_opentelemetry_tracing.py:55: in trace_call
span.set_status(Status(StatusCode.OK))
.nox/unit-3-9/lib/python3.9/site-packages/opentelemetry/trace/status.py:57: in __init__
logger.warning(
/usr/local/lib/python3.9/logging/__init__.py:1446: in warning
self._log(WARNING, msg, args, **kwargs)
/usr/local/lib/python3.9/logging/__init__.py:1575: in _log
record = self.makeRecord(self.name, level, fn, lno, msg, args,
/usr/local/lib/python3.9/logging/__init__.py:1544: in makeRecord
rv = _logRecordFactory(name, level, fn, lno, msg, args, exc_info, func,
/usr/local/lib/python3.9/logging/__init__.py:283: in __init__
ct = time.time()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def _time(_results=[1, 1.5]):
> return _results.pop(0)
E IndexError: pop from empty list
tests/unit/test_session.py:1192: IndexError
------------------------------ Captured log call -------------------------------
WARNING opentelemetry.trace.status:status.py:57 description should only be set when status_code is set to StatusCode.ERRORWe can clearly work around this issue by making our google/cloud/spanner_v1/_opentelemetry_tracing.py:55: in trace_call
span.set_status(Status(StatusCode.OK))clearly does not pass a non-default I wish there was a way for us to see the list of installed packages in the virtual environment. |
Also, drop use of 'pytz', which is no longer depended on by 'google-api-core' / 'google-cloud-core'. Instead, use either 'datetime.timezone.utc' or 'google.cloud._helpers.UTC', depending on usage.
7e2a985 to
ef8561a
Compare
* tests: move instance API systests to own module Refactor to use pytest fixtures / idioms, rather than old 'Config' setup / teardown. Toward #472. * tests: move database API systests to own module Refactor to use pytest fixtures / idioms, rather than old 'Config' setup / teardown. Toward #472. * tests: move table API systests to own module Refactor to use pytest fixtures / idioms, rather than old 'Config' setup / teardown. Toward #472. * tests: move backup API systests to own module [WIP] Refactor to use pytest fixtures / idioms, rather than old 'Config' setup / teardown. Toward #472. * tests: move streaming/chunnking systests to own module Refactor to use pytest fixtures / idioms, rather than old 'Config' setup / teardown. Toward #472. * tests: move session API systests to own module Refactor to use pytest fixtures / idioms, rather than old 'Config' setup/ teardown. Toward #472. * tests: move dbapi systests to owwn module Refactor to use pytest fixtures / idioms, rather than old 'Confog' setup / teardown. Toward #472. * tests: remove legacy systest setup / teardown code Closes #472. * tests: don't pre-create datbase before restore attempt * tests: fix instance config fixtures under emulator * tests: clean up alt instnce at module scope Avoids clash with 'test_list_instances' expectatons. * tests: work around MethodNotImplemented Raised from 'ListBackups' API on the CI emulator, but not locally. * chore: drop use of pytz in systests See #479 for rationale. * chore: fix fossil in comment * chore: move '_check_batch_status' to only calling module Likewise the 'FauxCall' helper class it uses. * chore: improve testcase name * tests: replicate dbapi systest changes from #412 into new module
|
Merge-on-green attempted to merge your PR for 6 hours, but it was not mergeable because either one of your required status checks failed, one of your required reviews was not approved, or there is a do not merge label. Learn more about your required status checks here: https://help.github.com/en/github/administering-a-repository/enabling-required-status-checks. You can remove and reapply the label to re-run the bot. |
Consensus from today's meeting is that testing against prereleases needs to happen outside the normal presubmit path. Reverts only part of PR #479.
Consensus from today's meeting is that testing against prereleases needs to happen outside the normal presubmit path. Reverts only part of PR #479.
Also, drop use of 'pytz', which is no longer depended on by
google-api-core/google-cloud-core.Instead, use either
datetime.timezone.utcorgoogle.cloud._helpers.UTC, depending on usage.