twisted / txaws

Twisted-based Asynchronous Libraries for Amazon Web Services and clouds that support the AWS APIs
MIT License
32 stars 18 forks source link

Deprecate _CanonicalRequest.from_request_component in favour of something better #70

Open mithrandi opened 7 years ago

mithrandi commented 7 years ago

This API takes a "sort of decoded" path where the path must be joined on slashes, but the components must not be urlencoded. This generally encourages doing bad things, so we should replace it with something better (eg. a list of decoded path components).

Julian commented 7 years ago

Is it worth bringing up hyperlink.URL / twisted.python.url.URL again?

mithrandi commented 7 years ago

I'm not really actually that familiar with the V4 auth code, maybe @markrwilliams can comment on whether a URL is a suitable structure for passing to the auth code. (At least I think it was him having Opinions™ about the test suite; my apologies if I'm mis-attributing again). However, I believe twisted.python.url.URL (and thus I assume hyperlink.URL) is unable to cope with non-value query strings (eg. https://s3.amazonaws.com/bucket/object?acl) so that would need to be fixed first.

markrwilliams commented 7 years ago

@mithrandi It was indeed me! I'd like to push URL construction as far down the call tree as possible, so I think we need some kind of class if not hyperlink.URL.

However, It turns out that hyperlink.url.URL.set allows valueless parameters