boto3 S3客户端记录了CLOSS()方法缺失?

发布于 2025-02-11 21:34:44 字数 939 浏览 1 评论 0 原文

根据,此方法应该存在(我认为在其他地方描述的是解决臭名昭著的未关闭的SSL SSOCKEN警告)。这只是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'

According to https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.close, this method should exist (and I think is described elsewhere as addressing the infamous unclosed SSL socket warning). Is this just another case of AWS documentation flaws?

$ 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'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

篱下浅笙歌 2025-02-18 21:34:44

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

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

Ahh, looks like release of the code is imminent.

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文