the following sample will raise errors with 50% probability (with something like I have no entries for method POST: URLMatcher(http\:\/\/geekiepedia\.testing/learning_objects/[a-zA-Z0-9]+))
This is counter intuitive since the routes don't actually conflict (request methods are different), but looking at the source I can see that the request method does not take in part in the matching process, and I could open an issue about that specifically.
However, there are still conflict scenarios that cannot be disambiguated by the request method itself, like:
If we replace the _entries dict with an OrderedDict, we have control of the iteration order (the route we add first will try to be matched first) and we have our setups disambiguate between routes simply by changing the order they're added.
So we applied this hack in the end, prior to registering URIs:
the following sample will raise errors with 50% probability (with something like
I have no entries for method POST: URLMatcher(http\:\/\/geekiepedia\.testing/learning_objects/[a-zA-Z0-9]+)
)This is counter intuitive since the routes don't actually conflict (request methods are different), but looking at the source I can see that the request method does not take in part in the matching process, and I could open an issue about that specifically.
However, there are still conflict scenarios that cannot be disambiguated by the request method itself, like:
If we replace the
_entries
dict with anOrderedDict
, we have control of the iteration order (the route we add first will try to be matched first) and we have our setups disambiguate between routes simply by changing the order they're added.So we applied this hack in the end, prior to registering URIs:
But we are wondering if this change makes sense for all users?