This repository has been archived by the owner on Jun 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
PendingDeprecationWarning spew from generated tests #2389
Labels
lang: python
Issues specific to Python.
priority: p2
Moderately-important priority. Fix may not be included in next release.
Test
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
yoshi
Comments
tseaver
added
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
lang: python
Issues specific to Python.
priority: p2
Moderately-important priority. Fix may not be included in next release.
Test
yoshi
labels
Oct 18, 2018
Maybe a dumb question, but why are we planning to deprecate the |
tseaver
added a commit
that referenced
this issue
Nov 6, 2018
- Add 'stacklevel=2' to each emitted 'PendingDeprecationWarning'. - Fix detection of non-default 'client_config' argument (make the default 'None', and assign in the body). - Replace deprecation-emitting 'channel=channel' arguments to client constructors with mocks of the 'create_channel' utility function. Closes #2389.
tseaver
added a commit
to googleapis/google-cloud-python
that referenced
this issue
Nov 19, 2018
Includes fixes from these PRs: - googleapis/gapic-generator#2407 (closing googleapis/gapic-generator#2389) - googleapis/gapic-generator#2396 (for #5523 and dupes). Includes changes to generated tests. Closes #6502.
This was referenced Nov 19, 2018
tseaver
added a commit
to googleapis/google-cloud-python
that referenced
this issue
Nov 19, 2018
Includes fixes from these PRs: - googleapis/gapic-generator#2407 (closing googleapis/gapic-generator#2389) - googleapis/gapic-generator#2396 (for #5523 and dupes). Includes changes to *all* generated tests. Removes now-spurious docstring fixups. Closes #6507.
tseaver
added a commit
to googleapis/google-cloud-python
that referenced
this issue
Nov 19, 2018
Includes fixes from these PRs: - googleapis/gapic-generator#2407 (closing googleapis/gapic-generator#2389) - googleapis/gapic-generator#2396 (for #5523 and dupes). Includes changes to generated tests. Removes now-spurious docstring fixups. Closes #6511.
tseaver
added a commit
to googleapis/google-cloud-python
that referenced
this issue
Nov 19, 2018
Includes fixes from these PRs: - googleapis/gapic-generator#2407 (closing googleapis/gapic-generator#2389) - googleapis/gapic-generator#2396 (for #5523 and dupes). Includes changes to generated tests. Closes #6512.
busunkim96
pushed a commit
to googleapis/python-videointelligence
that referenced
this issue
Dec 19, 2019
Includes fixes from these PRs: - googleapis/gapic-generator#2407 (closing googleapis/gapic-generator#2389) - googleapis/gapic-generator#2396 (for #5523 and dupes). Includes changes to generated tests. Closes #6512.
crwilcox
pushed a commit
to googleapis/python-spanner
that referenced
this issue
Jan 31, 2020
Includes fixes from these PRs: - googleapis/gapic-generator#2407 (closing googleapis/gapic-generator#2389) - googleapis/gapic-generator#2396 (for #5523 and dupes). Includes changes to *all* generated tests. Removes now-spurious docstring fixups. Closes #6507.
crwilcox
pushed a commit
to googleapis/python-trace
that referenced
this issue
Feb 1, 2020
Includes fixes from these PRs: - googleapis/gapic-generator#2407 (closing googleapis/gapic-generator#2389) - googleapis/gapic-generator#2396 (for #5523 and dupes). Includes changes to generated tests. Removes now-spurious docstring fixups. Closes #6511.
busunkim96
pushed a commit
to googleapis/python-oslogin
that referenced
this issue
Feb 5, 2020
Includes fixes from these PRs: - googleapis/gapic-generator#2407 (closing googleapis/gapic-generator#2389) - googleapis/gapic-generator#2396 (for #5523 and dupes). Includes changes to generated tests. Closes #6502.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
lang: python
Issues specific to Python.
priority: p2
Moderately-important priority. Fix may not be included in next release.
Test
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
yoshi
Running unit tests for almost any GAPIC-generated package yields a spew of the following:
and:
I added a
stacklevel=2
argument to both of those warnings (which should be in the generated code anyway).It turns out that the test for the first one is bogus: literally every invocation triggers it!
For the second, most the warnings were coming from generated tests!
The generator certainly shouldn't be emitting tests which use the deprecated pattern (unless maybe there is one which uses
warnings.catch_warnings
to test that it is emitted).The text was updated successfully, but these errors were encountered: