Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Remove pending deprecation spew from unit tests. #2407

Merged

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented 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.

- 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 tseaver added lang: python Issues specific to Python. yoshi labels Nov 6, 2018
@codecov-io
Copy link

codecov-io commented Nov 6, 2018

Codecov Report

Merging #2407 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2407      +/-   ##
============================================
+ Coverage     86.72%   86.72%   +<.01%     
  Complexity     5241     5241              
============================================
  Files           458      458              
  Lines         20867    20870       +3     
  Branches       2252     2252              
============================================
+ Hits          18096    18099       +3     
  Misses         1968     1968              
  Partials        803      803
Impacted Files Coverage Δ Complexity Δ
...transformer/py/PythonImportSectionTransformer.java 98.44% <100%> (+0.01%) 69 <1> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93eae22...d414f65. Read the comment docs.

@@ -36,7 +36,7 @@ def showcase(session, py):
session.virtualenv_dirname = 'showcase-' + py

# Install all test dependencies, then install this package in-place.
session.install('pytest')
session.install('pytest', 'mock')

This comment was marked as spam.

This comment was marked as spam.

@tseaver
Copy link
Contributor Author

tseaver commented Nov 7, 2018

@lukesneeringer I'm not sure how to debug the python-test failure, given that I can't see the generated output. The gradlew googleJavaFormat build tests pass on my local machine: is there a way to run them such that they don't remove the generated code?

@tseaver tseaver merged commit 92f282c into master Nov 8, 2018
@tseaver tseaver deleted the 2389-python-add_stacklevel_2_to_pendingdeprecationwarning branch November 8, 2018 17:40
tseaver added a commit to googleapis/google-cloud-python that referenced this pull request Nov 8, 2018
tseaver pushed a commit to googleapis/google-cloud-python that referenced this pull request Nov 14, 2018
tseaver pushed a commit to googleapis/google-cloud-python that referenced this pull request Nov 14, 2018
tseaver pushed a commit to googleapis/google-cloud-python that referenced this pull request Nov 14, 2018
tseaver pushed a commit to googleapis/google-cloud-python that referenced this pull request Nov 14, 2018
tseaver pushed a commit to googleapis/google-cloud-python that referenced this pull request Nov 14, 2018
tseaver pushed a commit to googleapis/google-cloud-python that referenced this pull request Nov 14, 2018
tseaver pushed a commit to googleapis/google-cloud-python that referenced this pull request Nov 14, 2018
tseaver added a commit to googleapis/google-cloud-python that referenced this pull request Nov 15, 2018
tseaver added a commit to googleapis/google-cloud-python that referenced this pull request Nov 15, 2018
tseaver added a commit to googleapis/google-cloud-python that referenced this pull request Nov 15, 2018
erikwebb pushed a commit to erikwebb/google-cloud-python that referenced this pull request Dec 3, 2018
busunkim96 pushed a commit to googleapis/python-videointelligence that referenced this pull request Dec 19, 2019
busunkim96 pushed a commit to googleapis/python-videointelligence that referenced this pull request 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.
busunkim96 pushed a commit to googleapis/python-websecurityscanner that referenced this pull request Jan 30, 2020
Includes fixes from these PRs:

- googleapis/gapic-generator#2407
- googleapis/gapic-generator#2396

Includes changes to generated tests.

Closes #6476.
busunkim96 pushed a commit to googleapis/python-automl that referenced this pull request Jan 31, 2020
busunkim96 pushed a commit to googleapis/python-automl that referenced this pull request Jan 31, 2020
crwilcox pushed a commit to googleapis/python-bigtable that referenced this pull request Jan 31, 2020
Includes fixes from these PRs:

- googleapis/gapic-generator#2407
- googleapis/gapic-generator#2396

Includes changes to generated tests.

Closes #6492.
busunkim96 pushed a commit to googleapis/python-container that referenced this pull request Jan 31, 2020
Includes fixes from these PRs:

- googleapis/gapic-generator#2407
- googleapis/gapic-generator#2396

Includes changes to generated tests.

Includes synth replacements to work around generated docstring issue:

- googleapis/gapic-generator/issues/2449

Closes #6483.
crwilcox pushed a commit to googleapis/python-firestore that referenced this pull request Jan 31, 2020
* Firestore: pick up fixes to GAPIC generator.

Closes #6497.

Includes changes to generated tests.

Includes fixes from these PRs:

- googleapis/gapic-generator#2407
- googleapis/gapic-generator#2396

* Fix overlong lines introduced in PR #6481.
crwilcox pushed a commit to googleapis/python-spanner that referenced this pull request 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.
busunkim96 pushed a commit to googleapis/python-dlp that referenced this pull request Jan 31, 2020
leahecole pushed a commit to googleapis/python-texttospeech that referenced this pull request Jan 31, 2020
crwilcox pushed a commit to googleapis/python-vision that referenced this pull request Feb 1, 2020
Includes fixes from these PRs:

- googleapis/gapic-generator#2407
- googleapis/gapic-generator#2396

Includes changes to generated tests.

Closes #6475.
crwilcox pushed a commit to googleapis/python-trace that referenced this pull request 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-tasks that referenced this pull request Feb 4, 2020
plamut pushed a commit to googleapis/python-bigquery-datatransfer that referenced this pull request Feb 5, 2020
plamut pushed a commit to googleapis/python-bigquery-storage that referenced this pull request Feb 5, 2020
plamut pushed a commit to googleapis/python-dataproc that referenced this pull request Feb 5, 2020
plamut pushed a commit to googleapis/python-logging that referenced this pull request Feb 5, 2020
Includes fixes from these PRs:

- googleapis/gapic-generator#2407
- googleapis/gapic-generator#2396

Includes changes to generated tests.

Closes #6474.
busunkim96 pushed a commit to googleapis/python-oslogin that referenced this pull request Feb 5, 2020
busunkim96 pushed a commit to googleapis/python-oslogin that referenced this pull request 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.
busunkim96 pushed a commit to googleapis/python-kms that referenced this pull request Feb 5, 2020
busunkim96 pushed a commit to googleapis/python-kms that referenced this pull request Feb 5, 2020
busunkim96 pushed a commit to googleapis/python-iot that referenced this pull request Feb 5, 2020
busunkim96 pushed a commit to googleapis/python-iot that referenced this pull request Feb 5, 2020
busunkim96 pushed a commit to googleapis/python-language that referenced this pull request Feb 6, 2020
plamut pushed a commit to googleapis/python-error-reporting that referenced this pull request Feb 6, 2020
Closes #6496.

Includes generated test changes.

Includes fixes from these PRs:

- googleapis/gapic-generator#2407
- googleapis/gapic-generator#2396
crwilcox pushed a commit to googleapis/python-datastore that referenced this pull request Feb 6, 2020
busunkim96 pushed a commit to googleapis/python-asset that referenced this pull request Feb 7, 2020
busunkim96 pushed a commit to googleapis/python-asset that referenced this pull request Feb 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lang: python Issues specific to Python. yoshi
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants