enthought / enthought/enable

Move context_menu_tool to enable.tools namespace

Open
#442 4 comments 0 reactions 0 assignees View on GitHub
discussion type: refactor
Dominant language
C
Stars
97
Forks
45
PR merge metrics
No merged PRs in 30d

Description

Motivated by #441, I guess part of the reasons why it is hard to find `context_menu_tool` is that extra `pyface` layer at `enable.tools.pyface`, when all the other tools sit at the level of `enable.tools`. Re-exporting it in `api` would help (that is #441).

Back when the tool was added in #84, pyface was not a runtime requirement of enable ([see this __init__.py](https://github.com/enthought/enable/blob/dd7f6e7b239f9fc46768c5fc15c3099b41cfc762/enable/__init__.py)) and I guess the intention then was to keep pyface an optional dependency of enable. But since then pyface has officially become enable runtime dependency, and is imported from plenty more places.

Looks like we can move `context_menu_tool` out to `enable.tools`?

When we do this, it is important that the original module is kept with import aliases for backward compatibility.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.