Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

ResourceWarning: unclosed SSLSocket #271

@GergelyKalmar

Description

@GergelyKalmar

Environment details

  • OS type and version: Ubuntu 20.04 LTS
  • Python version: Python 3.8.10
  • pip version: pip 22.0.4
  • google-cloud-secret-manager version: 2.9.2

Steps to reproduce

  1. Create a file called secret.py with the following contents:
from google.cloud.secretmanager import SecretManagerServiceClient

with SecretManagerServiceClient() as client:
   response = client.access_secret_version(name='projects/project/secrets/secret/versions/latest')
  1. Execute python -Wall secret.py

Stack trace

.../lib/python3.8/site-packages/grpc/_channel.py:1548: ResourceWarning: unclosed <ssl.SSLSocket fd=10, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=('2a02:1210:22bd:8300:2b23:d126:3a74:f57b', 46782, 0, 0), raddr=('2a00:1450:400a:801::200a', 443, 0, 0)>
  self._channel.close(cygrpc.StatusCode.cancelled, 'Channel closed!')
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: secretmanagerIssues related to the googleapis/python-secret-manager API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions