Skip to content

Silence get_mtls_endpoint_and_cert_source is deprecated warnings in unit tests that are testing deprecated features #1939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mukund-ananthu opened this issue Feb 7, 2024 · 1 comment · May be fixed by #2393
Labels
api: pubsub Issues related to the Pub/Sub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@mukund-ananthu
Copy link

Currently, this is going to be suppressed in the python-pubsub/pytest.ini file

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Feb 7, 2024
@parthea
Copy link
Contributor

parthea commented Feb 8, 2024

Since this is part of the autogenerated code I'll transfer the issue to gapic-generator-python.

For more context on the issue, this line had to be added to pytest.ini in googleapis/python-pubsub#1074 to silence a warnings related to get_mtls_endpoint_and_cert_source which is deprecated

    # Remove warning once https://github.com/googleapis/gapic-generator-python/issues/1939 is fixed
    ignore:get_mtls_endpoint_and_cert_source is deprecated.:DeprecationWarning

The warnings appeared in generated tests. Assuming that the purpose of the test is to exercise the deprecated code, deprecation warnings should be silenced when testing these deprecated functions.

@parthea parthea transferred this issue from googleapis/python-pubsub Feb 8, 2024
@parthea parthea added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Feb 8, 2024
@parthea parthea changed the title Root cause and fix get_mtls_endpoint_and_cert_source is deprecated warnings Silence get_mtls_endpoint_and_cert_source is deprecated warnings in unit tests that are testing deprecated features Jun 11, 2024
@ohmayr ohmayr linked a pull request May 20, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants