enthought / enthought/traits

Adaptation manager has ill-defined `sort` usage.

Open
#172 2 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
Python
Stars
462
Forks
90
PR merge metrics
No merged PRs in 30d

Description

In `AdaptationManager._adapt` there's a line:

```
edges.sort(cmp=_by_weight_then_from_protocol_specificity)
```

But the `_by_weight_then_from_protocol_specificity` function doesn't give a transitive relation, so the results of the sort are undefined. It's not clear to me how important the sort order is here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.