GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tests: allow prerelease dependency versions under Python 3.9 by tseaver · Pull Request #479 · googleapis/python-spanner

This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Conversation

@tseaver

@tseaver tseaver commented Aug 6, 2021

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tseaver
tseaver requested review from a team, crwilcox and larkee August 6, 2021 21:54
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 6, 2021
@product-auto-label product-auto-label Bot added the api: spanner Issues related to the googleapis/python-spanner API. label Aug 6, 2021
tseaver added a commit that referenced this pull request Aug 6, 2021
@tseaver
chore: drop use of pytz in systests
4b3a9e8
See #479 for rationale.
larkee
larkee approved these changes Aug 9, 2021
View reviewed changes
@tseaver tseaver added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 9, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 9, 2021
@tseaver

tseaver commented Aug 9, 2021

Copy link
Copy Markdown
Contributor Author

The error here is because we patch time.time, which ends up being called more than once because OT is emitting an unexpected warning message:

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.ERROR

We can clearly work around this issue by making our _time mock an infinite generator. However, I don't believe the traceback which triggered the error here. This line:

google/cloud/spanner_v1/_opentelemetry_tracing.py:55: in trace_call
    span.set_status(Status(StatusCode.OK))

clearly does not pass a non-default description to the Status constructor (which is what the warning is complaining about).

I wish there was a way for us to see the list of installed packages in the virtual environment.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tseaver added 3 commits August 10, 2021 15:09
@tseaver
tests: allow prerelease dependency versions under Python 3.9
b1d4112
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.
@tseaver
chore: debug installed OT versions on CI
0e05f4e
@tseaver
ci: force upgrade of pip to fix OT mangling
ef8561a
@tseaver
tseaver force-pushed the tests-allow-prerelease-deps-python39 branch from 7e2a985 to ef8561a Compare August 10, 2021 19:10
@tseaver
ci: harden samples against 429 in instance creation / deletion
1f4e858
See #416, PR #479.
@tseaver
tseaver requested a review from a team as a code owner August 10, 2021 20:43
@tseaver
ci: further harden samples against 429 in instance deletion
b04bf32
larkee pushed a commit that referenced this pull request Aug 11, 2021
@tseaver
tests: move systests into separate modules, refactor using pytest (#474)
5629bac
* 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
@tseaver
Merge branch 'master' into tests-allow-prerelease-deps-python39
b5a0bf2
@tseaver tseaver added the automerge Merge the pull request once unit tests and other checks pass. label Aug 11, 2021
@tseaver
tests: bump operation timeout for snippets to 240 seconds
78615bf
@tseaver tseaver added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Aug 11, 2021
@gcf-merge-on-green

gcf-merge-on-green Bot commented Aug 12, 2021

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Aug 12, 2021
@tseaver tseaver added automerge Merge the pull request once unit tests and other checks pass. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Aug 12, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 12, 2021
@gcf-merge-on-green
gcf-merge-on-green Bot merged commit 9746062 into master Aug 12, 2021
@gcf-merge-on-green
gcf-merge-on-green Bot deleted the tests-allow-prerelease-deps-python39 branch August 12, 2021 02:42
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Aug 12, 2021
@busunkim96 busunkim96 mentioned this pull request Aug 17, 2021
chore: release 2.0.0 googleapis/google-auth-library-python#829
Merged
tseaver added a commit that referenced this pull request Aug 17, 2021
@tseaver
tests: revert testing prerelease deps on Python 3.9
431cde1
Consensus from today's meeting is that testing against prereleases needs
to happen outside the normal presubmit path.

Reverts only part of PR #479.
This was referenced Aug 17, 2021
tests: revert testing against prerelease deps on Python 3.9 #527
Merged
Client libraries need out-of-band tests against prereleases of third party dependencies googleapis/google-cloud-python#10578
Closed
gcf-merge-on-green Bot pushed a commit that referenced this pull request Aug 18, 2021
@tseaver
tests: revert testing against prerelease deps on Python 3.9 (#527)
33f00ab
Consensus from today's meeting is that testing against prereleases needs to happen outside the normal presubmit path.

Reverts only part of PR #479.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@crwilcox crwilcox Awaiting requested review from crwilcox
1 more reviewer
@larkee larkee larkee approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: spanner Issues related to the googleapis/python-spanner API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@tseaver @larkee @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.