Closed sf-migrator-bot closed 7 years ago
Diff:
--- old
+++ new
@@ -1,3 +1,5 @@
+Description
+===========
Today taurus uses some external libraries that need local customization.
This customization may be required for different reasons:
@@ -125,12 +127,11 @@
#: Auto initialize Qt logging to python logging
DEFAULT_QT_AUTO_INIT_LOG = True
- #: Auto initialize Qarbon resources (icons)
+ #: Auto initialize taurus resources (icons)
DEFAULT_QT_AUTO_INIT_RES = True
#: Remove input hook (only valid for PyQt4)
DEFAULT_QT_AUTO_REMOVE_INPUTHOOK = True
-
#: Auto initialize Qt
QT_AUTO_INIT = DEFAULT_QT_AUTO_INIT
@@ -144,15 +145,16 @@
#: Auto initialize Qt logging to python logging
QT_AUTO_INIT_LOG = DEFAULT_QT_AUTO_INIT_LOG
- #: Auto initialize Qarbon resources (icons)
+ #: Auto initialize taurus resources (icons)
QT_AUTO_INIT_RES = DEFAULT_QT_AUTO_INIT_RES
#: Remove input hook (only valid for PyQt4)
QT_AUTO_REMOVE_INPUTHOOK = DEFAULT_QT_AUTO_REMOVE_INPUTHOOK
-
References
==============
-The implementation I propose is based on the success story of IPython management
-of external dependencies through the usage of IPython.external pattern.
+The implementation I propose is based on the success story of [IPython](http://www.ipython.org) management
+of external dependencies through the usage of [IPython.external pattern](https://github.com/ipython/ipython/tree/master/IPython/external "IPython.external pattern").
+
+This implementation has also proved to work before on the [Qarbon project](http://qarbon.rtfd.org) with a similar [External pattern](https://github.com/ESRF-BCU/qarbon/tree/master/qarbon/external "Qarbon external management")
Original comment by: tiagocoutinho (http://sourceforge.net/u/tiagocoutinho)
Original comment by: tiagocoutinho (http://sourceforge.net/u/tiagocoutinho)
A patch has been sent to implement this feature
Original comment by: tiagocoutinho (http://sourceforge.net/u/tiagocoutinho)
Original comment by: tiagocoutinho (http://sourceforge.net/u/tiagocoutinho)
Original comment by: cpascual (http://sourceforge.net/u/cpascual)
After quite some troubles, I finally managed to apply the patch. The feature is now immplemented in the develop branch.
I also changed some more imports that were not covered in tiago's patch, mostly in docs and in sardana
Original comment by: cpascual (http://sourceforge.net/u/cpascual)
Thanks Carlos. You're the best!
Original comment by: tiagocoutinho (http://sourceforge.net/u/tiagocoutinho)
Ticket moved from /p/sardana/tickets/113/
Can't be converted:
Original comment by: tiagocoutinho (http://sourceforge.net/u/tiagocoutinho)
Description
Today taurus uses some external libraries that need local customization. This customization may be required for different reasons:
Local customizations are being made inline. This has some weakenesses. For example, Qt is being wrapped inside taurus/qt/. It is not possible to extend the wrapping for the PyQt4.uic package because before the Qt wrapping concept was added to taurus, an internal taurus sub-package called taurus/qt/uic already existed to help handle code generation in taurusuic4 tool. It is therefore not possible to wrap PyQt4.uic inside taurus.
This is a request to clearly isolate dependencies in a taurus sub package. I propose to make a taurus.external which isolates the management of these dependencies.
Here is the list of packages that need to be "externalized" and the reason:
In practice, the import statements in taurus should be changed from:
to:
and from:
to:
Special note for the Qt package
Backward compatibility
Since many taurus applications are relying on taurus.qt.Qt[Core|Gui], the implementation must take into account backward compatibility.
Handling of PyQt4.Qt
The PyQt4.Qt sub-package is a helper for the following packages: QtDBus QtHelp QtNetwork QtOpenGL QtScriptTools QtScript QtDeclarative QtCore QtGui
Today taurus uses Qt to address only QtCore and QtGui symbols. When taurus imports PyQt4.Qt indirectly a waste of ~25Mb of RAM (depends on implementation) is made by process which only needs QtCore and QtGui.
This package doesn't exist in PySide. The QtNetwork was only added in PyQt4 4.4.
Because of these problems it is proposed that an implementation of taurus.external.qt.Qt includes only symbols from QtCore and QtGui.
Colaborative Qt
Taurus Qt usage should depend on the private taurus qt configuration. The configuration describes the policy for using a specific Qt implementation. The usage of a specific Qt implementation should correspond to the following algorithm:
the Qt configuration could be based on taurus.tauruscustomsettings. Example:
References
The implementation I propose is based on the success story of IPython management of external dependencies through the usage of IPython.external pattern.
This implementation has also proved to work before on the Qarbon project with a similar External pattern
Reported by: tiagocoutinho ( http://sf.net/u/tiagocoutinho )