Ticket #27 (new task)

Opened 1 year ago

Last modified 7 months ago

[api] yadis.discover.discover should raise DiscoveryFailure when it doesn't discover

Reported by: http://keturn.myopenid.com/ Assigned to:
Priority: minor Milestone:
Keywords: api yadis discovery Cc:
Project: python-openid OpenID Protocol:
Series: 2.x.x Web Browser:

Description

Currently, it raises DiscoveryFailure? when it encounters certain types of failures, but if it gets a web page with no XRDS in it, it returns a thing and you have to call a method on it to figure out if it actually has the information necessary to finish Yadis or not.

It returns in that non-success case so that you can try to perform some alternate discovery method on the fetched document, potentially saving you a re-fetch if you're falling back to HTML.

Josh and I decided that it would really make much more sense for it to raise DiscoveryFailure? in that case, and to include the document in the failure object so you could still use it for whatever.

This is an interface change, but it's deep enough in the library that I don't think it's a practical worry.

Based on the sheer number of things we have named "discover" and the complexity of the tests in that area, I believe it's a good idea to make simplifications where we can.

Change History

05/20/08 16:31:18 changed by http://dag.myopenid.com/

  • type changed from defect to task.

This will require some significant refactoring of consumer.discover.discoverYadis

Let's reconsider whether this is actually worthwhile.