Hello community,
here is the log from the commit of package python-logilab-common
checked in at Sat Sep 13 12:05:24 CEST 2008.
--------
--- python-logilab-common/python-logilab-common.changes 2008-08-22 18:05:26.000000000 +0200
+++ /mounts/work_src_done/STABLE/python-logilab-common/python-logilab-common.changes 2008-09-12 18:06:11.821674000 +0200
@@ -1,0 +2,8 @@
+Fri Sep 12 17:55:41 CEST 2008 - garloff@suse.de
+
+- Update to 0.35.0:
+ * fix #5945: wrong edge proporties in graph.DotBackend
+ * testlib: filter tests with tag decorator
+ * shellutils: new simple unzip function
+
+-------------------------------------------------------------------
Old:
----
logilab-common-0.34.0.tar.bz2
New:
----
logilab-common-0.35.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-logilab-common.spec ++++++
--- /var/tmp/diff_new_pack.C21666/_old 2008-09-13 12:05:17.000000000 +0200
+++ /var/tmp/diff_new_pack.C21666/_new 2008-09-13 12:05:17.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package python-logilab-common (Version 0.34.0)
+# spec file for package python-logilab-common (Version 0.35.0)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,7 +20,7 @@
Name: python-logilab-common
Summary: Python lowlevel functionality shared by logilab projects
-Version: 0.34.0
+Version: 0.35.0
Release: 1
BuildRequires: python-devel
Source: logilab-common-%{version}.tar.bz2
@@ -77,6 +77,11 @@
%{py_sitedir}/logilab/common/test/data/*
%changelog
+* Fri Sep 12 2008 garloff@suse.de
+- Update to 0.35.0:
+ * fix #5945: wrong edge proporties in graph.DotBackend
+ * testlib: filter tests with tag decorator
+ * shellutils: new simple unzip function
* Fri Aug 22 2008 garloff@suse.de
- Update to 0.34.0:
* changelog properly adds new line at the end of each entry
++++++ logilab-common-0.34.0.tar.bz2 -> logilab-common-0.35.0.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/logilab-common-0.34.0/adbh.py new/logilab-common-0.35.0/adbh.py
--- old/logilab-common-0.34.0/adbh.py 2008-08-07 20:35:06.000000000 +0200
+++ new/logilab-common-0.35.0/adbh.py 2008-09-09 18:49:59.000000000 +0200
@@ -257,7 +257,10 @@
def drop_index(self, cursor, table, column, unique=False):
if self.index_exists(cursor, table, column, unique):
idx = self._index_name(table, column, unique)
- cursor.execute('DROP INDEX %s' % idx)
+ if unique:
+ cursor.execute('ALTER TABLE %s DROP CONSTRAINT %s' % (table, idx))
+ else:
+ cursor.execute('DROP INDEX %s' % idx)
def index_exists(self, cursor, table, column, unique=False):
idx = self._index_name(table, column, unique)
@@ -366,7 +369,6 @@
sql += " WITH OWNER=%(owner)s"
if encoding:
sql += " ENCODING='%(encoding)s'"
- print sql % locals()
cursor.execute(sql % locals())
def create_language(self, cursor, extlang):
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/logilab-common-0.34.0/ChangeLog new/logilab-common-0.35.0/ChangeLog
--- old/logilab-common-0.34.0/ChangeLog 2008-08-07 20:35:08.000000000 +0200
+++ new/logilab-common-0.35.0/ChangeLog 2008-09-10 14:31:04.000000000 +0200
@@ -1,12 +1,21 @@
ChangeLog for logilab.common
============================
+2008-09-10 -- 0.35.0
+
+ * fix #5945: wrong edge proporties in graph.DotBackend
+
+ * testlib: filter tests with tag decorator
+
+ * shellutils: new simple unzip function
+
2008-08-07 -- 0.34.0
- * changelog propertly adds new line at the end of each entry
+ * changelog: properly adds new line at the end of each entry
- * add a with_tempdir decorator ensuring all temporary files and dirs are removed
+ * testlib: add a with_tempdir decorator ensuring all temporary files and dirs are removed
- * improve DotBackend configuration. graphiz rendered can now be selected and additionnal graph parameter used
+ * graph: improve DotBackend configuration. graphiz rendered can now be selected
+ and additionnal graph parameter used
* db: support of Decimal Type
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/logilab-common-0.34.0/clcommands.py new/logilab-common-0.35.0/clcommands.py
--- old/logilab-common-0.34.0/clcommands.py 2008-08-07 20:35:07.000000000 +0200
+++ new/logilab-common-0.35.0/clcommands.py 2008-08-11 10:05:03.000000000 +0200
@@ -68,7 +68,7 @@
except IndexError:
raise BadCommandUsage(msg)
if expected_size_after is not None and len(args_list) > expected_size_after:
- raise BadCommandUsage('Too much arguments')
+ raise BadCommandUsage('too many arguments')
return value
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/logilab-common-0.34.0/configuration.py new/logilab-common-0.35.0/configuration.py
--- old/logilab-common-0.34.0/configuration.py 2008-08-07 20:35:08.000000000 +0200
+++ new/logilab-common-0.35.0/configuration.py 2008-08-20 17:47:35.000000000 +0200
@@ -367,7 +367,7 @@
for opt_name, opt_dict in non_group_spec_options:
args, opt_dict = self.optik_option(provider, opt_name, opt_dict)
self._optik_parser.add_option(*args, **opt_dict)
- self._all_options[opt_name] = provider
+ self._all_options[opt_name] = provider
for gname, gdoc in groups:
goptions = [option for option in provider.options
if option[1].get('group') == gname]
@@ -401,10 +401,11 @@
opt_dict['callback'] = self.cb_set_provider_option
for specific in ('default', 'group', 'inputlevel'):
if opt_dict.has_key(specific):
- del opt_dict[specific]
if (OPTPARSE_FORMAT_DEFAULT
and specific == 'default' and opt_dict.has_key('help')):
opt_dict['help'] += ' [current: %default]'
+ else:
+ del opt_dict[specific]
args = ['--' + opt_name]
if opt_dict.has_key('short'):
self._short_options[opt_dict['short']] = opt_name
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/logilab-common-0.34.0/context.py new/logilab-common-0.35.0/context.py
--- old/logilab-common-0.34.0/context.py 1970-01-01 01:00:00.000000000 +0100
+++ new/logilab-common-0.35.0/context.py 2008-09-09 18:49:59.000000000 +0200
@@ -0,0 +1,11 @@
+from contextlib import contextmanager
+import tempfile
+import shutil
+
+@contextmanager
+def tempdir(ignore_error=False, onerror=None):
+ try:
+ path = tempfile.mkdtemp()
+ yield path
+ finally:
+ shutil.rmtree(path, ignore_error, onerror)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/logilab-common-0.34.0/graph.py new/logilab-common-0.35.0/graph.py
--- old/logilab-common-0.34.0/graph.py 2008-08-07 20:35:07.000000000 +0200
+++ new/logilab-common-0.35.0/graph.py 2008-09-09 18:49:13.000000000 +0200
@@ -12,6 +12,7 @@
import os.path as osp
import os
+import tempfile
def escape(value):
"""Make <value> usable in a dot file."""
@@ -53,7 +54,7 @@
def get_source(self):
"""returns self._source"""
if self._source is None:
- self.emit("}")
+ self.emit("}\n")
self._source = '\n'.join(self.lines)
del self.lines
return self._source
@@ -69,23 +70,27 @@
:rtype: str
:return: a path to the generated file
"""
+ name = self.graphname
+ dotfile = dotfile or ('%s.dot' % name)
if outputfile is not None:
storedir, basename, target = target_info_from_filename(outputfile)
+ if target != "dot":
+ pdot, dot_sourcepath = tempfile.mkstemp(".dot", name)
+ else:
+ dot_sourcepath = osp.join(storedir, dotfile)
else:
- storedir = '/tmp'
- basename = '%s.png' % (self.graphname)
target = 'png'
- outputfile = osp.join(storedir, basename)
- dotfile = dotfile or ('%s.dot' % self.graphname)
- dot_sourcepath = osp.join(storedir, dotfile)
- pdot = file(dot_sourcepath, 'w')
+ pdot, dot_sourcepath = tempfile.mkstemp(".dot", name)
+ ppng, outputfile = tempfile.mkstemp(".png", name)
+ pdot = open(dot_sourcepath,'w')
if isinstance(self.source, unicode):
pdot.write(self.source.encode('UTF8'))
else:
pdot.write(self.source)
pdot.close()
if target != 'dot':
- os.system('%s -T%s %s -o%s' % (self.renderer, target, dot_sourcepath, outputfile))
+ os.system('%s -T%s %s -o%s' % (self.renderer, target,
+ dot_sourcepath, outputfile))
os.unlink(dot_sourcepath)
return outputfile
@@ -99,8 +104,8 @@
Authorized props: see http://www.graphviz.org/doc/info/attrs.html
"""
attrs = ['%s="%s"' % (prop, value) for prop, value in props.items()]
- self.emit('edge [%s];' % ", ".join(attrs))
- self.emit('%s -> %s' % (normalize_node_id(name1), normalize_node_id(name2)))
+ n_from, n_to = normalize_node_id(name1), normalize_node_id(name2)
+ self.emit('%s -> %s edge [%s];' % (n_from, n_to, ", ".join(attrs)) )
def emit_node(self, name, **props):
"""Authorized props: see http://www.graphviz.org/doc/info/attrs.html
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/logilab-common-0.34.0/PKG-INFO new/logilab-common-0.35.0/PKG-INFO
--- old/logilab-common-0.34.0/PKG-INFO 2008-08-07 20:35:14.000000000 +0200
+++ new/logilab-common-0.35.0/PKG-INFO 2008-09-10 14:49:36.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: logilab-common
-Version: 0.34.0
+Version: 0.35.0
Summary: useful miscellaneous modules used by Logilab projects
Home-page: http://www.logilab.org/project/logilab-common
Author: Logilab
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/logilab-common-0.34.0/__pkginfo__.py new/logilab-common-0.35.0/__pkginfo__.py
--- old/logilab-common-0.34.0/__pkginfo__.py 2008-08-07 20:35:08.000000000 +0200
+++ new/logilab-common-0.35.0/__pkginfo__.py 2008-09-10 14:31:34.000000000 +0200
@@ -8,7 +8,7 @@
distname = 'logilab-common'
modname = 'common'
-numversion = (0, 34, 0)
+numversion = (0, 35, 0)
version = '.'.join([str(num) for num in numversion])
license = 'GPL'
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/logilab-common-0.34.0/pytest.py new/logilab-common-0.35.0/pytest.py
--- old/logilab-common-0.34.0/pytest.py 2008-08-07 20:35:05.000000000 +0200
+++ new/logilab-common-0.35.0/pytest.py 2008-08-26 16:47:56.000000000 +0200
@@ -549,6 +549,8 @@
action="callback", help="Minimal output")
parser.add_option('-P', '--profile', default=None, dest='profile',
help="Profile execution and store data in the given file")
+ parser.add_option('-m', '--match', default=None, dest='tags_pattern',
+ help="only execute test whose tag macht the current pattern")
try:
from logilab.devtools.lib.coverage import Coverage
@@ -591,7 +593,7 @@
# append additional args to the new sys.argv and let unittest_main
# do the rest
newargs += args
- return options, explicitfile
+ return options, explicitfile
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/logilab-common-0.34.0/README new/logilab-common-0.35.0/README
--- old/logilab-common-0.34.0/README 2008-08-07 20:35:05.000000000 +0200
+++ new/logilab-common-0.35.0/README 2008-09-09 18:49:59.000000000 +0200
@@ -60,6 +60,9 @@
Two mix-in classes to handle configuration from both command line
(using optik/optparse) and configuration file.
+* context.py :
+ One context manager (python 2.5+) to handle temporary directories.
+
* corbautils.py:
Usefull functions for use with the OmniORB CORBA library.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/logilab-common-0.34.0/shellutils.py new/logilab-common-0.35.0/shellutils.py
--- old/logilab-common-0.34.0/shellutils.py 2008-08-07 20:35:07.000000000 +0200
+++ new/logilab-common-0.35.0/shellutils.py 2008-08-25 09:07:19.000000000 +0200
@@ -141,6 +141,20 @@
return files
+def unzip(archive, destdir):
+ import zipfile
+ if not exists(destdir):
+ os.mkdir(destdir)
+ zfobj = zipfile.ZipFile(archive)
+ for name in zfobj.namelist():
+ if name.endswith('/'):
+ os.mkdir(join(destdir, name))
+ else:
+ outfile = open(join(destdir, name), 'wb')
+ outfile.write(zfobj.read(name))
+ outfile.close()
+
+
class Execute:
"""This is a deadlock safe version of popen2 (no stdin), that returns
an object with errorlevel, out and err.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/logilab-common-0.34.0/test/unittest_configuration.py new/logilab-common-0.35.0/test/unittest_configuration.py
--- old/logilab-common-0.34.0/test/unittest_configuration.py 2008-08-07 20:35:06.000000000 +0200
+++ new/logilab-common-0.35.0/test/unittest_configuration.py 2008-08-20 17:45:00.000000000 +0200
@@ -165,7 +165,7 @@
--dothis=<y or n>
-v<string>, --value=<string>
--multiple=<comma separated values>
- you can also document the option [current: none]
+ you can also document the option [current: ('yop',)]
--number=<int>
--choice=