[
https://issues.apache.org/jira/browse/LIBCLOUD-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495790#comment-13495790
]
John Carr commented on LIBCLOUD-257:
------------------------------------
Sorry about the formatting, it was a quick refactor of the monkey patch I ended
up using to get it working for me to show the nature of the problem. While I
tested the original monkey patch quite a bit, in my haste I didn't test the
monkey-patch-less version. I can attach a new patch if you like, but you have
probably already fixed it locally if you were able to recreate the problem and
prove this fixes it?
While I agree that making this patch only active on 2.6 is probably a good
idea, I just wanted to stress that this isn't some weird hack to make python
2.6 work. Calling self.close() if the method is HEAD is the right thing to do.
Or at least, thats what python 2.7 and later do - this patch it is essentially
a backport of the behaviour found on all later pythons.
What is the preferred way to hide something like this from python 2.7 and later
in libcloud?
> S3 get_object hangs when object doesn't exist but only on python 2.6
> --------------------------------------------------------------------
>
> Key: LIBCLOUD-257
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-257
> Project: Libcloud
> Issue Type: Bug
> Components: Storage
> Environment: Python2.6
> Reporter: John Carr
> Attachments: fix_s3_hanging_python26.diff
>
>
> A colleague wrote a proof-of-concept script against S3 with libcloud and
> python 2.7. When I tried to run it on a 2.6 machine it failed. It hung whilst
> calling get_object. I traced this back to a change between python 2.6 and 2.7
> and how it handles 'HEAD' requests.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira