boto3 s3 客户端记录的 close() 方法丢失?

问题描述 投票:0回答:1

根据https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.close,此方法应该存在(我认为在其他地方描述为解决臭名昭著的未关闭 SSL 套接字警告)。这是否只是 AWS 文档缺陷的又一案例?

$ pip freeze | grep boto3
boto3==1.24.19

$ python
Python 3.9.10 (main, Jan 15 2022, 11:48:00)
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import boto3
>>> c = boto3.client('s3')
>>> c.close()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/sbrown/.virtualenvs/moreroku/lib/python3.9/site-packages/botocore/client.py", line 838, in __getattr__
    raise AttributeError(
AttributeError: 'S3' object has no attribute 'close'
python amazon-web-services amazon-s3 client boto3
1个回答
2
投票

啊,看起来代码即将发布。

https://github.com/boto/botocore/pull/1810

© www.soinside.com 2019 - 2024. All rights reserved.