向后兼容的代理模块
项目描述
这是一个ETS代理包,它包含所有ETS项目的代理模块,将旧式的enthought命名空间导入(版本3)映射到重构后的ETS包(版本4)。例如
from enthought.traits.api import HasTraits
现在简单化为
from traits.api import HasTraits
为了方便,此包还包含一个重构工具,可以将项目转换为新的命名空间(这样就不依赖于代理)
$ ets3to4 -h usage: ets3to4 DIRECTORY This utility, can be used to convert projects from ETS version 3 to 4. It simply replaces old namespace strings (e.g. 'enthought.traits.api') to new ones (e.g. 'traits.api'), in all Python files in DIRECTORY recursively. Once the conversion of your project is complete, the etsproxy module should no longer be necessary. However, this tool is very simple and does not catch all corner cases.
该模块将在未来删除,并且旧式的(enthought.xxx)导入应该(随着时间的推移)转换为新的导入。