From: Florent R. <f.r...@fr...> - 2014-08-22 10:11:11
|
Hello, I am pleased to announce the release of pythondialog 3.1.0. You can read a summary of the changes in this version at: http://pythondialog.sourceforge.net/#news-3.1 For your convenience, here is a text dump of this summary: Main changes in version 3.1.0 * Experimental support for automatic widget size The Dialog class constructor accepts a new keyword-only argument: autowidgetsize. It is a boolean and currently defaults to False in order to preserve backward-compatibility. When set to True, pythondialog's widget-producing methods will behave as if width=0, height=0, etc. had been passed, except where these parameters are explicitely specified with different values. This has the effect that, except where you explicitely specify a size parameter such as width or height, the dialog backend will automatically compute a suitable widget size for you. Notes: + In order to differentiate between a default value obtained when autowidgetsize is disabled and an explicitely-specified width, height, etc., the size parameters modified by this change now default to None. In order to compensate for this information loss, the effective default values when autowidgetsize is False are now mentioned in the docstrings of the corresponding widget-producing methods. + The autowidgetsize option is currently marked as experimental. It may default to True in the next major release; please give some feedback on the [7]mailing list if you care. + You may encounter questionable results if you only set one of the width and height parameters to 0 for a given widget (seen in dialog 1.2-20140219). Examples using the autowidgetsize option can be found in the examples/with-autowidgetsize directory of the pythondialog distribution. * Improved installation instructions * Removal of _create_temporary_directory() in favor of tempfile.NamedTemporaryFile() There was no security problem in _create_temporary_directory() as far as I know, however it is usually better to use well-tested library functions whenever possible instead of custom ones. When _create_temporary_directory() was written, what was available from the tempfile module was not satisfactory, but this is not the case anymore. This change brings a small BACKWARD INCOMPATIBILITY: the UnableToCreateTemporaryDirectory exception is not defined anymore. Dialog.scrollbox() now creates a temporary file without any temporary directory, therefore there is no place anymore for this exception to be used. The equivalent condition in tempfile.NamedTemporaryFile() generates an OSError exception (more precisely, a FileExistsError in Python 3.3 or later, which is a subclass of OSError). As usual, this exception is wrapped by pythondialog and seen as a PythonDialogOSError by user code. Conclusion: wherever user code was expecting UnableToCreateTemporaryDirectory in previous versions, it should now expect a PythonDialogOSError, consistently with the tempfile module and OSError wrapping by pythondialog. This incompability should affect so few users, if any, that I think increasing the major number just for it would have caused more harm than good. * The programbox widget has been improved in dialog 1.2-20140112 and the demo uses it in a better way. * The files demo.py and simple_example.py have been moved to the examples directory of the source distribution. -- Florent |