Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite RevPrefixMap to avoid depending on internal details of PrefixMap #1094

Closed
mdickinson opened this issue Oct 11, 2021 · 3 comments · Fixed by #1098
Closed

Rewrite RevPrefixMap to avoid depending on internal details of PrefixMap #1094

mdickinson opened this issue Oct 11, 2021 · 3 comments · Fixed by #1098
Labels
Milestone

Comments

@mdickinson
Copy link
Member

mdickinson commented Oct 11, 2021

The RevPrefixMap trait type subclasses PrefixMap and depends on its internals. PrefixMap wasn't designed for subclassing, and indeed changes in Traits 6.3 broke RevPrefixMap as a result. I'd recommend rewriting RevPrefixMap as a direct subclass of TraitType.

@mdickinson
Copy link
Member Author

Temporary workaround in Traits: enthought/traits#1578.

@mdickinson
Copy link
Member Author

@rahulporuri Could we aim to include a fix for this in the Mayavi 4.7.4 release, too? That would give Traits the freedom to remove its workaround.

The fix I'd propose would be to start by simply pasting the Traits 6.2.0 version of PrefixMap directly into tvtk_base, and then incrementally rewriting to collapse the RevPrefixMap -> PrefixMap -> TraitType inheritance chain to just RevPrefixMap -> TraitType. We'd need some basic unit tests for RevPrefixMap, of course.

@rahulporuri rahulporuri added this to the 4.7.4 release milestone Oct 20, 2021
@rahulporuri
Copy link
Contributor

@mdickinson makes sense. added this to the 4.7.4 milestone for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants