obspy/obspy — pull request #673 by megies (2013-10-31 13:20:41+00:00)
Title: ResourceIdentifier refactoring

This PR proposes three changes:

- only allow strings for the unique ID part of the `ResourceIdentifier` object. This might take away a tiny bit of flexibility, but makes the handling easier and more clear to users, I think.
- rename `ResourceIdentifier.resource_id` to `ResourceIdentifier.text` (old usage is deprecated properly). This was confusing as many event classes have an attribute `.resource_id` which is a `ResourceIdentifier` object but for the `ResourceIdentifier` object itself this was actually a string (or something else hashable).
- introduce an attribute `fixed` that determines if a user-set text is used as a fixed ID or if the ID is built up from `prefix` and a random uuid. This makes it possible for event classes to regenerate the random part of their `ResourceIdentifier` every time the referring object changes