.. -*- coding: utf-8 -*- Project logilab-common ====================== :creation date: 2006/09/26 a bunch of modules providing low level functionnalities shared among some python projects devel .. image:: https://jenkins.logilab.org/job/logilab-common/badge/icon :target: https://jenkins.logilab.org/job/logilab-common/ Please note that some of the modules have some extra dependencies. README ====== .. vcsinclude:: README Version 1.5.0 ------------- :expected date: 2021/01/19 Ticket #10146340 allow to pass a debug_callback argument to Registry._select_best ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: done Version 1.4.1 ------------- :publication date: 2017/07/11 :expected date: n/a Version 1.4.0 ------------- :publication date: 2017/03/20 :expected date: n/a Version 1.3.0 ------------- :publication date: 2016/11/18 :expected date: n/a Ticket #8267966 testlib.with_tempdir is not thread-safe ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending which potentially leads to a bad value left in tempfile.tempdir which make normal tempfile usages crash unexpectedly. Comments :: On 2016/09/22 08:16 - fcayre wrote : We should discourage the usage of this decorator, which is easy to replace. Deprecate ? > On 2016/09/22 11:39 - dlaxalde wrote : > I tend to prefer a context manager for this. Or the decorator should add an > extra parameter to the decorated function *à la mock.patch* instead of > changing `tempfile.tempdir`. Ticket #6820061 typo in shellutils.py __slot__ -> __slots__ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending logilab/common/shellutils.py has a typo. on DummyProgressBar you have a __slot__ attribute which was presumably intended to be __slots__. Ticket #8396846 /usr/bin/pytest conflict with pytest ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: done pytest 3.0 finally switched from using py.test to pytest as binary name. So please stop providing a pytest binary. See https://github.com/pytest-dev/pytest/issues/1833, https://lists.logilab.org/pipermail/python-projects/2015-June/003605.html, https://lists.logilab.org/pipermail/python-projects/2015-June/003606.html, and https://lists.logilab.org/pipermail/python-projects/2015-October/003615.html for some discussion around this issue. Version 1.2.2 ------------- :publication date: 2016/06/21 :expected date: n/a Ticket #298387 add a main entry point for pytest ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: done Something that would be useful as: python -m logilab.common.pytest currently, the only way to achieve this is through: `python -c from logilab.common import pytest; pytest.run()` which is quite ugly. The motivation behind this is to be able to run `pytest` using a specific python interpreter (and not be bound the shebang in the ``pytest`` script), typically one from a virtualenv. Ticket #6302914 TypeError: Item in ``from list'' not a string ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending upgrading from logilab-common from 1.1.0 to 1.2.0 I get (I assume this is a logilab-common bug, not a cubicweb one, redirect me if this is a wrong assumption) : :: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/cubicweb/cwctl.py", line 146, in run_arg status = cmdmeth(appid) File "/usr/local/lib/python2.7/dist-packages/cubicweb/cwctl.py", line 725, in upgrade_instance mih = config.migration_handler() File "/usr/local/lib/python2.7/dist-packages/cubicweb/server/serverconfig.py", line 350, in migration_handler verbosity=verbosity) File "/usr/local/lib/python2.7/dist-packages/cubicweb/server/migractions.py", line 101, in __init__ self.repo = config.repository() File "/usr/local/lib/python2.7/dist-packages/cubicweb/cwconfig.py", line 1004, in repository return Repository(self, TasksManager(), vreg=vreg) File "/usr/local/lib/python2.7/dist-packages/cubicweb/server/repository.py", line 186, in __init__ self.init_cnxset_pool() File "/usr/local/lib/python2.7/dist-packages/cubicweb/server/repository.py", line 237, in init_cnxset_pool self.set_schema(self.deserialize_schema()) File "/usr/local/lib/python2.7/dist-packages/cubicweb/server/repository.py", line 315, in set_schema self.vreg.set_schema(schema) File "/usr/local/lib/python2.7/dist-packages/cubicweb/cwvreg.py", line 424, in set_schema self.reload(self.config.appobjects_path(), force_reload=False) File "/usr/local/lib/python2.7/dist-packages/cubicweb/cwvreg.py", line 474, in reload self.register_objects(path) File "/usr/local/lib/python2.7/dist-packages/cubicweb/cwvreg.py", line 519, in register_objects path, self.config.extrapath) File "/usr/local/lib/python2.7/dist-packages/logilab/common/registry.py", line 681, in register_objects self.load_file(filepath, modname) File "/usr/local/lib/python2.7/dist-packages/cubicweb/cwvreg.py", line 484, in load_file return super(CWRegistryStore, self).load_file(filepath, modname) File "/usr/local/lib/python2.7/dist-packages/logilab/common/registry.py", line 737, in load_file module = __import__(modname, fromlist=modname.split('.')[:-1]) TypeError: Item in ``from list'' not a string instance app not upgraded: Item in ``from list'' not a string Comments :: On 2016/06/02 18:01 - jcristau wrote : what's the value of `modname`? > On 2016/06/03 07:18 - alutz wrote : > I hear that David and Adrien have a patch for this, they just haven't pushed > it yet (or I haven't seen it). Version 1.2.1 ------------- :publication date: 2016/05/27 :expected date: n/a Ticket #6213577 ChangeLogEntry should write unicode objects ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending instead of str Ticket #6060938 datetime2ticks doesn't work anymore with date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending prior to c74bf0d253b8, one could give a python date object to datetime2tick, but this now causes a traceback:: AttributeError: 'datetime.date' object has no attribute 'microsecond' Ticket #6085650 stop using load_module_from_name for registry loading ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending this is useless vs __import__ and causes pb in some cases (eg not considering properly parent package's __path__). Version 1.2.0 ------------- :publication date: 2016/03/15 :expected date: n/a Version 1.1.0 ------------- :publication date: 2015/10/12 :expected date: n/a Ticket #1716420 testlib: allow fail or skip in generative tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending if the fail or skip happens in the generator (rather than when executing the yielded function), we report it as an error. Ticket #1716053 clean up incestuous relationship between pytest and testlib ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: validation pending testlib should stay generic, and pytest specific things should live in pytest.py Ticket #2086835 configuration: bytes type should return an int ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending and not a float Ticket #1716063 drop deprecated TestCase methods ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: validation pending we should have done this in 1.0... Ticket #298658 generated config has unstable section ordering ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending Craig Hobbs reported on the mailing list: This causes generated rcfiles (like those of pylint) to be output with random section order. The fix is simple - just sort the section item iteration (see below). Bug can be reproduced with python 2 using ``PYTHONHASHSEED=random``. Ticket #1716128 umessage broken on python3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 1.000 :state: validation pending test coverage is poor, so this only showed up with CubicWeb's tests. Version 1.0.2 ------------- :publication date: 2015/07/08 :expected date: n/a Ticket #295922 pytest -t should randomize tests order ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending ``pytest -t`` runs tests in whichever order ``os.listdir()`` returned, which is what ``readdir(2)`` returned. Bottom line, this order is perfectly stable between consecutive runs. A little randomness should help spot tests that are not fully independent of one another. Comments :: On 2015/07/09 08:16 - rmeradi wrote : Can you show a case where this problem can happen? > On 2015/07/09 08:20 - rcardona wrote : > run the following snippet and notice how the output doesn't change between > invocations :: > > python -c "import os; print os.listdir('.')" On 2015/07/09 08:33 - rmeradi wrote : Sorry I didn't explain well my question. I don't see how the tests can't be fully independent of one another if they are run in separete environements. > On 2015/07/09 09:06 - jcristau wrote : > they aren't run in separate environments, they're run in the same process > (plus they may have side effects on the system) On 2015/07/09 09:16 - rmeradi wrote : I know that they are run in the same process but they don't share data between them that what's I mean by seperate environnements. So I though that they are independent. But I see the problem of the side effects on the system. Ticket #296847 missing setuptools dependency ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: validation pending setup.py doesn't declare a setuptools requirement, causing the debian package to lack a python-pkg-resources dependency Version 1.0.1 ------------- :publication date: 2015/07/01 :expected date: n/a Ticket #295480 removal of __pkginfo__ breaks pylint ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: validation pending https://bitbucket.org/logilab/pylint/issue/575/support-for-logilabcommon-100 Version 1.0.0 ------------- :publication date: 2015/06/30 :expected date: n/a Ticket #2402 cleanup unused module and get a 1.0 out ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: validation pending pending deprecated modules: * astutils: move to astng * bind (never been used) * html: deprecated * interface: deprecated, use zope.interface or similar * logger/logservice: use logging module * monclient/monserver: move to its own package if used * patricia (never been used) * twisted_distutils (not used anymore) * visitor? useless but used ? Comments :: On 2006/11/08 14:22 - sthenault wrote : interface won't be deprecated yet since it's to widely used in our projects, and I don't want to make most of them depends on zope.interface. On 2010/08/26 07:45 - sthenault wrote : This has been partly done. See lgc README file for more info Ticket #294756 modutils tests fail inside a python 3 virtualenv ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending :: FAIL: test_4 (unittest_modutils.is_standard_module_tc) ---------------------------------------------------------------------- Traceback (most recent call last) File " line 209, in test_4 self.assertEqual(modutils.is_standard_module('hashlib'), True) File "/usr/lib/python3.4/unittest/case.py", line 797, in assertEqual assertion_func(first, second, msg=msg) File "/usr/lib/python3.4/unittest/case.py", line 790, in _baseAssertEqual raise self.failureException(msg) AssertionError: False != True Ticket #122443 Support __path__ in modutils ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: validation pending As per the following docs: http://docs.python.org/2/tutorial/modules.html#packages-in-multiple-directories python packages (__init__.py files) can update their __path__ variable to contain a list of different directories. This allows developers to have different parts of their package live in different directories. The function _module_file() in modutils.py, when handling package files, assumes that the "path = [mp_filename]" (line 636). This could support the __path__ mechanism by loading the module and then setting "path = module.__path__". The following patch has been tested and works as intended. 608a609 > mod0 = modpath[0] 610c611 < _, mp_filename, mp_desc = find_module(modpath[0], path) --- > mp_file, mp_filename, mp_desc = find_module(modpath[0], path) 636c637,638 < path = [mp_filename] --- > module = load_module(mod0, mp_file, mp_filename, mp_desc) > path = module.__path__ Comments :: On 2013/04/11 12:17 - sthenault wrote : though the whole point of this function is to *not actually import modules*, so such patch can't be accepted. On 2015/06/25 17:35 - rcardona wrote : there is some more support for namespace packages in upcoming changes, though it probably still doesn't catch all cases (e.g. nested namespaces) Ticket #105845 [testlib] tags don't work with python 3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending see skipped test case Ticket #294478 testlib.TestCase.datadir fails when cls.__module__ is qualified ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending we use __import__ wrongly. Ticket #294479 use more standard source layout ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 5.000 :state: validation pending - put sources under logilab/common in the source tree instead of directly in the toplevel directory - declare logilab namespace - use setuptools instead of a dual setuptools/distutils build system Version 0.63.2 -------------- :publication date: 2014/11/30 :expected date: n/a Ticket #281909 pytz should not be an install_requires ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending but a test_require Ticket #281908 pytest.replace_trace does not work with pycoverage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending due to a bug in pycoverage https://bitbucket.org/ned/coveragepy/issue/123 one cannot use sys.settrace for the tracer function injected by the cTracer object of pycoverage. This breaks coverage tests of every test using testlib... Comments :: On 2014/12/01 10:18 - cdevienne wrote : This pycoverage bug was fixed 3 years ago... What version of coverage do you use ? Version 0.63.1 -------------- :publication date: 2014/11/28 :expected date: n/a Ticket #280757 legacy tracing hacks of pytest inhibates coverage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending see http://blog.unlish.com/2014/11/nose-coverage-and-cubicweb.html Ticket #280806 tearDownModule handling is broken ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending tests pass fine when executed via pytest, but fails when executed from python directly (python path/to/test.py). In this later case, the tearDownModule is executed at the end of test class (instead of the end of the module). Ticket #241807 unittest_compat.Py25CompatTC breaks test suite with Python 3.4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending A first test of unittest_compat.Py25CompatTC (which currently happens to be test_all()) passes. A second test of unittest_compat.Py25CompatTC (which currently happens to be test_any()) fails and breaks all later tests in all modules/classes. tearDown() (run for first test) deletes logilab.common.compat module instance cached in sys.modules. Next setUp() (run for second test) calls remove_builtins(), which removes builtins.any(). Next test_any() tries 'from logilab.common.compat import any', which fails, because importlib._bootstrap uses builtins.any() since Python 3.4. It results in many "NameError: name 'any' is not defined" exceptions. I think that these tests could be skipped with Python >=3.4. I use logilab-common 0.61.0. ======================== unittest_compat.py ======================== test_all (unittest_compat.Py25CompatTC) ... ok test_any (unittest_compat.Py25CompatTC) ... unhandled exception occurred while testing unittest_compat Traceback (most recent call last): File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 664, in _proceed testfunc(*args, **kwargs) File "/tmp/logilab-common-0.61.0/build/lib/logilab/common/test/unittest_compat.py", line 89, in test_any from logilab.common.compat import any File "", line 2214, in _find_and_load File "", line 2203, in _find_and_load_unlocked File "", line 1200, in _load_unlocked File "", line 742, in __exit__ NameError: name 'any' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 429, in testfile options=self.options, outstream=sys.stderr) File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 765, in __init__ testLoader=NonStrictTestLoader()) File "/usr/lib64/python3.4/unittest/main.py", line 93, in __init__ self.runTests() File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 828, in runTests return self._runTests() File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 873, in _runTests result = self.testRunner.run(self.test) File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 956, in run test(result, runcondition=self._runcondition, options=self.options) File "/usr/lib64/python3.4/unittest/suite.py", line 87, in __call__ return self.run(*args, **kwds) File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 1109, in _ts_run self._wrapped_run(result,runcondition=runcondition, options=options) File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 1129, in _ts_wrapped_run test._wrapped_run(result, debug, runcondition=runcondition, options=options) File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 1134, in _ts_wrapped_run test(result, runcondition, options) File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 594, in __call__ status = self._proceed(result, testMethod) File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 677, in _proceed result.addError(self, self.__exc_info()) File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 316, in addError super(SkipAwareTestResult, self).addError(test, err) File "/usr/lib64/python3.4/unittest/runner.py", line 67, in addError super(TextTestResult, self).addError(test, err) File "/usr/lib64/python3.4/unittest/result.py", line 17, in inner return method(self, *args, **kw) File "/usr/lib64/python3.4/unittest/result.py", line 114, in addError self.errors.append((test, self._exc_info_to_string(err, test))) File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 278, in _exc_info_to_string frames = inspect.getinnerframes(tb) File "/usr/lib64/python3.4/inspect.py", line 1332, in getinnerframes framelist.append((tb.tb_frame,) + getframeinfo(tb, context)) File "/usr/lib64/python3.4/inspect.py", line 1292, in getframeinfo filename = getsourcefile(frame) or getfile(frame) File "/usr/lib64/python3.4/inspect.py", line 574, in getsourcefile if any(filename.endswith(s) for s in all_bytecode_suffixes): NameError: name 'any' is not defined ******************************************************************************* Comments :: On 2014/11/20 07:25 - Arfrever wrote : test/unittest_compat.py has been deleted in logilab-common 0.63.0, so this problem is no longer present. > On 2014/11/28 12:31 - jcristau wrote : > indeed, closing Ticket #241813 unittest_date failures with Python 3.4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending unittest_date triggers exceptions with Python 3.4. I use logilab-common 0.61.0. ========================= unittest_date.py ========================= test_add_days_worked (unittest_date.DateTC) ... ok test_day (unittest_date.DateTC) enumerate days ... ok test_get_national_holidays (unittest_date.DateTC) ... ok ok ok test_month (unittest_date.DateTC) enumerate months ... ok test_open_days_afternoon (unittest_date.DateTC) ... ok test_open_days_afternoon_before_holiday (unittest_date.DateTC) ... ok test_open_days_afternoon_before_saturday (unittest_date.DateTC) ... ok test_open_days_day_nextday (unittest_date.DateTC) ... ok test_open_days_friday_monday (unittest_date.DateTC) ... ok test_open_days_friday_monday_with_two_weekends (unittest_date.DateTC) ... ok test_open_days_friday_saturday (unittest_date.DateTC) ... ok test_open_days_friday_sunday (unittest_date.DateTC) ... ok test_open_days_now_and_before (unittest_date.DateTC) ... ok test_open_days_now_now (unittest_date.DateTC) ... ok test_open_days_now_now2 (unittest_date.DateTC) ... ok test_open_days_saturday_monday (unittest_date.DateTC) ... ok test_open_days_saturday_sunday (unittest_date.DateTC) ... ok test_open_days_saturday_tuesday (unittest_date.DateTC) ... ok test_open_days_tuesday_friday (unittest_date.DateTC) ... ok test_open_days_tuesday_wednesday (unittest_date.DateTC) week-end + easter monday ... ok test_ticks2datetime_before_1900 (unittest_date.DateTC) ... ok test_ustrftime_before_1900 (unittest_date.DateTC) ... ok test_add_days_worked (unittest_date.MxDateTC) ... test_add_days_worked (unittest_date.MxDateTC) ... test_add_days_worked (unittest_date.MxDateTC) ... test_add_days_worked (unittest_date.MxDateTC) ... unhandled exception occurred while testing unittest_date Traceback (most recent call last): File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 550, in quiet_run func(*args, **kwargs) File "/tmp/logilab-common-0.61.0/build/lib/logilab/common/test/unittest_date.py", line 160, in setUp self.check_mx() File "/tmp/logilab-common-0.61.0/build/lib/logilab/common/test/unittest_date.py", line 157, in check_mx self.skipTest('mx.DateTime is not installed') File "/usr/lib64/python3.4/unittest/case.py", line 635, in skipTest raise SkipTest(reason) unittest.case.SkipTest: mx.DateTime is not installed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 1134, in _ts_wrapped_run test(result, runcondition, options) File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 586, in __call__ if not self.quiet_run(result, self.setUp): File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 554, in quiet_run self._addSkip(result, str(e)) TypeError: _addSkip() missing 1 required positional argument: 'reason' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 550, in quiet_run func(*args, **kwargs) File "/tmp/logilab-common-0.61.0/build/lib/logilab/common/test/unittest_date.py", line 160, in setUp self.check_mx() File "/tmp/logilab-common-0.61.0/build/lib/logilab/common/test/unittest_date.py", line 157, in check_mx self.skipTest('mx.DateTime is not installed') File "/usr/lib64/python3.4/unittest/case.py", line 635, in skipTest raise SkipTest(reason) unittest.case.SkipTest: mx.DateTime is not installed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 1129, in _ts_wrapped_run test._wrapped_run(result, debug, runcondition=runcondition, options=options) File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 1136, in _ts_wrapped_run test(result) File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 586, in __call__ if not self.quiet_run(result, self.setUp): File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 554, in quiet_run self._addSkip(result, str(e)) TypeError: _addSkip() missing 1 required positional argument: 'reason' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 550, in quiet_run func(*args, **kwargs) File "/tmp/logilab-common-0.61.0/build/lib/logilab/common/test/unittest_date.py", line 160, in setUp self.check_mx() File "/tmp/logilab-common-0.61.0/build/lib/logilab/common/test/unittest_date.py", line 157, in check_mx self.skipTest('mx.DateTime is not installed') File "/usr/lib64/python3.4/unittest/case.py", line 635, in skipTest raise SkipTest(reason) unittest.case.SkipTest: mx.DateTime is not installed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 1134, in _ts_wrapped_run test(result, runcondition, options) File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 586, in __call__ if not self.quiet_run(result, self.setUp): File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 554, in quiet_run self._addSkip(result, str(e)) TypeError: _addSkip() missing 1 required positional argument: 'reason' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 550, in quiet_run func(*args, **kwargs) File "/tmp/logilab-common-0.61.0/build/lib/logilab/common/test/unittest_date.py", line 160, in setUp self.check_mx() File "/tmp/logilab-common-0.61.0/build/lib/logilab/common/test/unittest_date.py", line 157, in check_mx self.skipTest('mx.DateTime is not installed') File "/usr/lib64/python3.4/unittest/case.py", line 635, in skipTest raise SkipTest(reason) unittest.case.SkipTest: mx.DateTime is not installed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 429, in testfile options=self.options, outstream=sys.stderr) File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 765, in __init__ testLoader=NonStrictTestLoader()) File "/usr/lib64/python3.4/unittest/main.py", line 93, in __init__ self.runTests() File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 828, in runTests return self._runTests() File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 873, in _runTests result = self.testRunner.run(self.test) File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 956, in run test(result, runcondition=self._runcondition, options=self.options) File "/usr/lib64/python3.4/unittest/suite.py", line 87, in __call__ return self.run(*args, **kwds) File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 1109, in _ts_run self._wrapped_run(result,runcondition=runcondition, options=options) File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 1131, in _ts_wrapped_run test._wrapped_run(result, debug) File "/usr/lib64/python3.4/site-packages/logilab/common/pytest.py", line 1136, in _ts_wrapped_run test(result) File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 586, in __call__ if not self.quiet_run(result, self.setUp): File "/usr/lib64/python3.4/site-packages/logilab/common/testlib.py", line 554, in quiet_run self._addSkip(result, str(e)) TypeError: _addSkip() missing 1 required positional argument: 'reason' ******************************************************************************* Difference between unittest/case.py in Python 3.3 and 3.4 contains: - def _addSkip(self, result, reason): + def _addSkip(self, result, test_case, reason): Ticket #277372 ureports is broken when using an io.StringIO as stream ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending there should be only unicode objects Ticket #280794 utcdatetime problem with tz-ed datetimes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending The utcdatetime implementation mess-up the datetime if it has a tzinfo. The following code illustrate the problem:: >>> import dateutil.parser >>> from logilab.common.date import utcdatetime >>> d = dateutil.parser.parse('2014-11-12T12:00:00Z') >>> print d 2014-11-12 12:00:00+00:00 >>> print repr(d) datetime.datetime(2014, 11, 12, 12, 0, tzinfo=tzutc()) >>> d = utcdatetime(d) >>> print repr(d) datetime.datetime(2014, 11, 12, 12, 0, 0, 2) The last datetime should have been datetime.datetime(2014, 11, 12, 12). Ticket #115237 PyPI vs Logilab distfile checksum mismatch for logilab-common-0.58.3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending The checksums don't match between the PyPI hosted distfile and the distribution provided distfile; seems like a potential security issue (distfile modified after the fact) as the tarball unpacks on FreeBSD if I do make makesum with ports: $ fetch -o - -q http://download.logilab.org/pub/common/logilab-common-0.58.3.tar.gz | sha256 ad8c9cafe1dbbd54753694733562f39d4bbcb8467308fb64f7803dfe30ea5e86 $ fetch -o - -q http://pypi.python.org/packages/source/l/logilab-common/logilab-common-0.58.3.tar.gz| sha256 dc4a11c5a50303ccd86cf8d04b30c7fbeaa831f83c0e7c46b164dd2329f87323 $ uname -or FreeBSD 9.1-PRERELEASE Ticket #278550 SyntaxErrors with Python 3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending logilab-common 0.63.0 stopped using 2to3, but not all modules have been updated to have syntax compatible with Python 3: $ python3.4 setup.py install --root=/tmp/root ... $ python3.4 -m compileall -fq /tmp/root *** Error compiling '/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/cli.py'... File "/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/cli.py", line 69 print 'readline is not available :-(' ^ SyntaxError: invalid syntax *** Error compiling '/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/daemon.py'... File "/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/daemon.py", line 54 def daemonize(pidfile=None, uid=None, umask=077): ^ SyntaxError: invalid token *** Error compiling '/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/dbf.py'... File "/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/dbf.py", line 82 raise IOError, 'The file is not large enough to be a dbf file' ^ SyntaxError: invalid syntax *** Error compiling '/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/optparser.py'... File "/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/optparser.py", line 58 print '\ncommands:' ^ SyntaxError: Missing parentheses in call to 'print' *** Error compiling '/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/test/data/module.py'... File "/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/test/data/module.py", line 24 print '!!!' ^ SyntaxError: Missing parentheses in call to 'print' *** Error compiling '/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/test/data/module2.py'... File "/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/test/data/module2.py", line 40 assert `1` ^ SyntaxError: invalid syntax *** Error compiling '/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/test/data/noendingnewline.py'... File "/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/test/data/noendingnewline.py", line 23 print 'a' ^ SyntaxError: Missing parentheses in call to 'print' *** Error compiling '/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/test/data/nonregr.py'... File "/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/test/data/nonregr.py", line 14 print v.get('yo') ^ SyntaxError: invalid syntax *** Error compiling '/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/test/data/sub/momo.py'... File "/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/test/data/sub/momo.py", line 1 print 'yo' ^ SyntaxError: Missing parentheses in call to 'print' *** Error compiling '/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/urllib2ext.py'... File "/tmp/root/usr/lib64/python3.4/site-packages/logilab/common/urllib2ext.py", line 87 print '\nresponse: %s\n--------------\n' % response.code, response.info() ^ SyntaxError: invalid syntax Version 0.63.0 -------------- :publication date: 2014/11/05 :expected date: n/a Ticket #264017 drop support for python <= 2.5 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: task :load: 2.000 :state: validation pending Ticket #253516 [graph] clearer exception when dot is not installed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: validation pending currently we get:: File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Ticket #265740 make source py3k-compatible without 2to3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 5.000 :state: validation pending targetting at least 3.3, because not having u'foo' string literals makes 3.2 too painful. Ticket #269083 [pylint] crash in modutils ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: validation pending pylint 1.2.0, astroid 1.1.0, common 0.62.1 :: Traceback (most recent call last): File "/usr/bin/pylint", line 3, in run_pylint() File "/usr/lib/pymodules/python2.7/pylint/__init__.py", line 21, in run_pylint Run(sys.argv[1:]) File "/usr/lib/pymodules/python2.7/pylint/lint.py", line 1047, in __init__ linter.check(args) File "/usr/lib/pymodules/python2.7/pylint/lint.py", line 626, in check self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers) File "/usr/lib/pymodules/python2.7/pylint/lint.py", line 712, in check_astroid_module walker.walk(astroid) File "/usr/lib/pymodules/python2.7/pylint/utils.py", line 714, in walk self.walk(child) File "/usr/lib/pymodules/python2.7/pylint/utils.py", line 714, in walk self.walk(child) File "/usr/lib/pymodules/python2.7/pylint/utils.py", line 714, in walk self.walk(child) File "/usr/lib/pymodules/python2.7/pylint/utils.py", line 711, in walk cb(astroid) File "/usr/lib/pymodules/python2.7/pylint/checkers/typecheck.py", line 275, in visit_assign function_node = safe_infer(node.value.func) File "/usr/lib/pymodules/python2.7/pylint/checkers/utils.py", line 85, in safe_infer value = inferit.next() File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 313, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 337, in wrapper for node in func(*args, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/inference.py", line 213, in infer_getattr for owner in self.expr.infer(context): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 313, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/inference.py", line 243, in infer_subscript value = self.value.infer(context).next() File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 313, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 115, in _infer_stmts for infered in stmt.infer(context): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 313, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 115, in _infer_stmts for infered in stmt.infer(context): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 313, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 337, in wrapper for node in func(*args, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/inference.py", line 167, in infer_callfunc for infered in callee.infer_call_result(self, callcontext): File "/usr/lib/pymodules/python2.7/astroid/scoped_nodes.py", line 649, in infer_call_result for infered in returnnode.value.infer(context): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 313, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 337, in wrapper for node in func(*args, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/inference.py", line 161, in infer_callfunc for callee in self.func.infer(context): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 313, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 337, in wrapper for node in func(*args, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/inference.py", line 213, in infer_getattr for owner in self.expr.infer(context): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 313, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 115, in _infer_stmts for infered in stmt.infer(context): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 313, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 115, in _infer_stmts for infered in stmt.infer(context): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 313, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 337, in wrapper for node in func(*args, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/inference.py", line 161, in infer_callfunc for callee in self.func.infer(context): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 313, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 337, in wrapper for node in func(*args, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/inference.py", line 213, in infer_getattr for owner in self.expr.infer(context): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 313, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 115, in _infer_stmts for infered in stmt.infer(context): File "/usr/lib/pymodules/python2.7/astroid/bases.py", line 313, in wrapped for res in _func(node, context, **kwargs): File "/usr/lib/pymodules/python2.7/astroid/inference.py", line 181, in infer_import yield self.do_import_module(self.real_name(name)) File "/usr/lib/pymodules/python2.7/astroid/mixins.py", line 103, in do_import_module return mymodule.import_module(modname, level=level) File "/usr/lib/pymodules/python2.7/astroid/brain/py2gi.py", line 125, in _new_import_module return _orig_import_module(self, modname, relative_only, level) File "/usr/lib/pymodules/python2.7/astroid/scoped_nodes.py", line 355, in import_module return MANAGER.ast_from_module_name(modname) File "/usr/lib/pymodules/python2.7/astroid/manager.py", line 121, in ast_from_module_name filepath = self.file_from_module_name(modname, context_file) File "/usr/lib/pymodules/python2.7/astroid/manager.py", line 165, in file_from_module_name context_file=contextfile) File "/usr/lib/python2.7/dist-packages/logilab/common/modutils.py", line 297, in file_from_modpath return _file_from_modpath(modpath, path, context) File "/usr/lib/python2.7/dist-packages/logilab/common/modutils.py", line 559, in _file_from_modpath mtype, mp_filename = _module_file(modpath, path) File "/usr/lib/python2.7/dist-packages/logilab/common/modutils.py", line 621, in _module_file module = sys.modules[modpath.pop(0)] KeyError: 'scikits' Ticket #253517 pylint: "no module named paste" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: deprecated From: kris kvilekval To: code-quality@python.org Subject: [code-quality] ImportError: No module named paste I am using pip to install all dependencies of new packages and am running into a few issues (see error at end of email). The following patch seems to remove the issue. Not sure why imports of names space packages had to be greater than one, but it seems like pip installs namespaces differently than easy_install did. :: $ hg diff diff --git a/modutils.py b/modutils.py --- a/modutils.py +++ b/modutils.py @@ -612,11 +612,14 @@ except AttributeError: checkeggs = False # pkg_resources support (aka setuptools namespace packages) - if pkg_resources is not None and modpath[0] in pkg_resources._namespace_packages and len(modpath) > 1: +# if pkg_resources is not None and modpath[0] in pkg_resources._namespace_packages and len(modpath) > 1: + if pkg_resources is not None and modpath[0] in pkg_resources._namespace_packages:# # setuptools has added into sys.modules a module object with proper # __path__, get back information from there module = sys.modules[modpath.pop(0)] path = module.__path__ + mtype = PKG_DIRECTORY + mp_filename = path[0] imported = [] while modpath: modname = modpath[0] Comments :: On 2014/06/17 12:18 - sthenault wrote : see https://bitbucket.org/logilab/pylint/issue/203/importing-namespace-packages-crashes Ticket #174440 textutils.py text_to_dict doctest depends on order of dictionary keys ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending This doctest fails under python3.3 on my system because the dictionary keys get sorted differently. I would recommend skipping the doctest. Ticket #149345 unittest_modutils,_umessage.py failures in 0.59.1, py3.3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending Let's start with ======================= unittest_modutils.py ======================= F..E..E..EEEEE........EEE.E......... ====================================================================== No idea what's going on here. NameError: global name 'file' is not defined is the first. You mean logilab/common/modutils.py doesn't know about file????? AttributeError: 'NoneType' object has no attribute 'startswith', ditto. These do fine under py3.2 These ======================= unittest_umessage.py ======================= FF.F it seems are making error for the sake of one white space space. - Raphaël DUPONT ? - + Raphaël DUPONT and the other 3 err in comparison by 1 space. Now let's see if the next page lets me add the log via an attachment Comments :: On 2014/02/12 02:04 - idella4 wrote : under py3.3 in version 0.61.0, unittest_modutils appear resolved. error by 1 white space persists in unittest_umessage.py: ================================================ FAIL: test_decode_QP (unittest_umessage.UMessageTC) ---------------------------------------------------------------------- Traceback (most recent call last) ======================================================= AssertionError: 'Raphaël DUPONT' != 'Raphaël DUPONT' - Raphaël DUPONT ? - + Raphaël DUPONT FAIL: test_get_all (unittest_umessage.UMessageTC) ---------------------------------------------------------------------- ======================================================= AssertionError: Lists differ: ['élément à accents élément à accents FAIL: test_get_subject (unittest_umessage.UMessageTC) ---------------------------------------------------------------------- ======================================================= AssertionError: 'À LA MER' != 'À LA MER' - À LA MER ? - + À LA MER Version 0.62.1 -------------- :publication date: 2014/07/30 :expected date: n/a Ticket #185648 load options from file in file order, not option declaration order. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: validation pending Cf. https://bitbucket.org/logilab/pylint/issue/87/ for the rationale and use case. Comments :: On 2014/04/10 16:12 - atruchet wrote : Cf TUI documentation updated for pylint at https://bitbucket.org/Anthony-Truchet/pylint/commits/1bb14cf3e564dfd0fcbfe9600abf858b5ef432ac Ticket #252838 support skipping whole TestCase class ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: validation pending :: @skip('for some reason') class TC(TestCase): [...] does not work in lgc, although it does in plain unittest. Ticket #258060 use of class decorator in shellutils breaks py2.5 compat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending still needed by pylint for now Version 0.62.0 -------------- :publication date: 2014/07/30 :expected date: n/a Ticket #255526 modutils: cleanup_sys_modules should return the list of modules it removed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: validation pending Version 0.61.0 -------------- :publication date: 2014/02/11 :expected date: n/a Ticket #202314 predictable graph output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending graph output generated by the graph module should be somewaht sorted to be predictable and so easily tested (in e.g. pylint) Ticket #207561 CVE-2014-1838: temp file issue in pdf_ext.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending def extract_keys_from_pdf(filename): # what about using 'pdftk filename dump_data_fields' and parsing the output ? os.system('pdftk %s generate_fdf output /tmp/toto.fdf' % filename) lines = file('/tmp/toto.fdf').readlines() return extract_keys(lines) def fill_pdf(infile, outfile, fields): write_fields(file('/tmp/toto.fdf', 'w'), fields) os.system('pdftk %s fill_form /tmp/toto.fdf output %s flatten' % (infile, outfile)) Ticket #207562 CVE-2014-1839: temp file issue in shellutils.Execute ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending class Execute: """This is a deadlock safe version of popen2 (no stdin), that returns an object with errorlevel, out and err. """ def __init__(self, command): outfile = tempfile.mktemp() errfile = tempfile.mktemp() self.status = os.system("( %s ) >%s 2>%s" % (command, outfile, errfile)) >> 8 self.out = open(outfile, "r").read() self.err = open(errfile, "r").read() os.remove(outfile) os.remove(errfile) From the tempfile.mktemp() docstring: “This function is unsafe and should not be used. The file name refers to a file that did not exist at some point, but by the time you get around to creating it, someone else may have beaten you to the punch.” Version 0.60.1 -------------- :publication date: 2013/12/16 :expected date: n/a Ticket #186698 date.date_range not consistent between daily and monthly list of dates ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending .. sourcecode:: python start_date, stop_date = datetime(2006, 3, 12), datetime(2006, 6, 27) date.date_range(start_date, stop_date, incmonth=True) gives a generator where the first element is April the 12th (and not 12th March). Moreover, the last date is 2006-07-01 instead of 2006-06-01. Ticket #174606 file_from_modpath raise IOError on some cases ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending eg when package has no `__init__.py` file Ticket #177651 nested namespace packages (extend_path) cannot be imported ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending extend_path support for namespace packages doesn't work if there are two or more levels of namespace packages above the module to be imported. dist_dir_1/ ..outer/ ....__init__.py (with extend_path) ....inner/ ......__init__.py (with extend_path) ......module1.py dist_dir_2/ ..outer/ ....__init__.py (with extend_path) ....inner/ ......__init__.py (with extend_path) ......module2.py Current code in _module_file() near end of modutils.py will search sys.path for 'inner' instead of searching sys.path for 'outer/inner' Ticket #180876 pylint/modutils: "IOError: [Errno 24] Too many open files" under PyPy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending see https://bitbucket.org/logilab/pylint/issue/89/ioerror-errno-24-too-many-open-files-under Ticket #180836 python3 install on windows platform won't always work ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending see discussion on https://bitbucket.org/logilab/pylint/pull-request/58/51-building-pylint-windows-installer-for/diff Ticket #190806 testlib doesn't handle skip in setUp or tearDown ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: validation pending standard unittest handles them gracefully, lgc's TestCase class turns them into errors. Version 0.60.0 -------------- :publication date: 2013/07/26 :expected date: n/a Ticket #140667 [configuration] rename option_name to option_attrname ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: validation pending Since OptionsProviderMixIn.option_name() returns the name of the attribute of the config object, it would be better to name it option_attrname(). Ticket #108205 Deprecation Warning filter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: validation pending Implement a handler to refine the deprecation message handling. Messages are dropped for versions more recent than the 'compatible' version. Example: .. sourcecode:: python handler = deprecation.DeprecationHandler("module_name") handler.compatibility('1.3') handler.warn('1.2', "message.") @handler.deprecated('1.2', 'Message') def any_func(): pass Ticket #137244 file_from_modpath crash with python 3.3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending due to change in find_module wrt builtin modules. See mail from Chris Wong on python-projects for details. Ticket #155138 [graph] crash under python3 when trying to write utf8 data ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending Ticket #119967 locale issue, tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending Set LC_ALL-C and run the test suite and around 4 tests fall over. Python has this inherent weakness with locale and unicode vs. ascii In latest 0.59.0, not yet checked prior versions but almost definitely will be the same. Test suite and package requires robustness to manage either type. Comments :: On 2013/02/09 17:26 - idella4 wrote : diff -ur logilab-common-0.59.0.orig/test/unittest_umessage.py logilab-common-0.59.0/test/unittest_umessage.py --- test/unittest_umessage.py 2013-01-24 01:42:03.000000000 +0800 +++ test/unittest_umessage.py 2013-02-10 00:53:58.431767641 +0800 @@ -21,16 +21,17 @@ from logilab.common.testlib import TestCase, unittest_main from logilab.common.umessage import UMessage, decode_QP +import io DATA = join(dirname(abspath(__file__)), 'data') class UMessageTC(TestCase): def setUp(self): - msg1 = email.message_from_file(open(join(DATA, 'test1.msg'))) + msg1 = email.message_from_file(io.open(join(DATA, 'test1.msg'), encoding='utf8')) self.umessage1 = UMessage(msg1) - msg2 = email.message_from_file(open(join(DATA, 'test2.msg'))) + msg2 = email.message_from_file(io.open(join(DATA, 'test2.msg'), encoding='utf8')) self.umessage2 = UMessage(msg2) def test_get_subject(self): apears to make for a fix On 2013/02/09 18:05 - anon wrote : Your change actually breaks the test under python2. On 2013/02/10 05:08 - idella4 wrote : yes, I missed. try:: diff -ur logilab-common-0.59.0.orig/test/unittest_umessage.py logilab-common-0.59.0/test/unittest_umessage.py --- test/unittest_umessage.py 2013-01-24 01:42:03.000000000 +0800 +++ test/unittest_umessage.py 2013-02-10 00:53:58.431767641 +0800 @@ -21,15 +21,20 @@ from logilab.common.testlib import TestCase, unittest_main from logilab.common.umessage import UMessage, decode_QP +import sys, io DATA = join(dirname(abspath(__file__)), 'data') class UMessageTC(TestCase): def setUp(self): - msg1 = email.message_from_file(open(join(DATA, 'test1.msg'))) - self.umessage1 = UMessage(msg1) - msg2 = email.message_from_file(open(join(DATA, 'test2.msg'))) + if sys.version_info >= (3, 2): + msg1 = email.message_from_file(io.open(join(DATA, 'test1.msg'), encoding='utf8')) + msg2 = email.message_from_file(io.open(join(DATA, 'test2.msg'), encoding='utf8')) + else: + msg1 = email.message_from_file(open(join(DATA, 'test1.msg'))) + msg2 = email.message_from_file(open(join(DATA, 'test2.msg'))) + self.umessage1 = UMessage(msg1) self.umessage2 = UMessage(msg2) def test_get_subject(self): and I get passes all with LC_ALL=C run them all with 0.59.0- On 2013/02/10 05:10 - idella4 wrote : the formatter in this web page discouteously deletes all the white space in the def setUp(self):, but I am sure you can re-correct them > On 2013/02/15 08:35 - sthenault wrote : > done Ticket #119819 [registry] select_or_none should not catch ObjectNotFound ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: rejected unlike NoSelectableObject, this error usually spots a bug. If one want to catch it, it has to do it explicitly. Ticket #144526 [testlib] assertSameElements removed in Python 3.3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending See the bug on Gentoo here: https://bugs.gentoo.org/show_bug.cgi?id=449276 The problem is this section: .. sourcecode:: python if not hasattr(unittest.TestCase, 'assertItemsEqual'): # python 3.2 has deprecated assertSameElements and is missing # assertItemsEqual assertItemsEqual = unittest.TestCase.assertSameElements This is just replacing something that was removed in Python 3.2 with something removed in Python 3.3. It should use assertCountEqual (new in Python 3.2) instead of assertSameElements. Comments :: On 2013/06/26 08:10 - idella4 wrote : I am puzzled. This patch is missing the point. This is just replacing something that was removed in Python 3.2 with something removed in Python 3.3. It should use assertCountEqual has not been invoked, and it still fails under py3.3. This @@ -1186,7 +1186,10 @@ if not hasattr(unittest.TestCase, 'assertItemsEqual'): # python 3.2 has deprecated assertSameElements and is missing # assertItemsEqual - assertItemsEqual = unittest.TestCase.assertSameElements + if sys.version_info <= (3, 2): + assertItemsEqual = unittest.TestCase.assertSameElements + else: + assertItemsEqual = unittest.TestCase.assertCountEqual import doctest works since it substitutes assertCountEqualunder py3.3 which I gather is the whole point. Though my system has some odd quirk, if sys.version_info <= (3, 2): ought arguably be if sys.version_info != (3, 3): but never mind, take yr pick. > On 2013/06/27 05:26 - quantheory wrote : > I just now noticed the patch that got attached here, which of course is wrong. > Actually, I personally would use this block, and not refer to > assertSameElements at all: > > # In Python 3.2, assertItemsEqual was deprecated and assertCountEqual was > added. if sys.version_info >= (3,2): assertItemsEqual = > unittest.TestCase.assertCountEqual > > You don't want to use "!=", because that will break again as soon as 3.4 comes > out. Ticket #117533 [testlib] with_tempdir doesn't work for generators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: validation pending the finally block is run long before the generator uses the tempdir Ticket #123418 have a tempdir context manager ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.000 :state: rejected to avoid having one in every test suite (or worse) Ticket #136037 NameError: global name 'file' is not defined ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending Falls over with "NameError: global name 'file' is not defined" in "modutils.py" because variable name is wrong. Apply the following patch: --- C:/Python33/Lib/site-packages/logilab/common/modutils.py Sat Mar 23 15:28:37 2013 +++ C:/Python33/Lib/site-packages/logilab/common/modutils.py Sat Mar 23 15:24:49 2013 @@ -570,7 +570,7 @@ if importer.find_module(modpath[0]): if not importer.find_module('/'.join(modpath)): raise ImportError('No module named %s in %s/%s' % ( - '.'.join(modpath[1:]), file, modpath)) + '.'.join(modpath[1:]), filepath, modpath)) return ZIPFILE, abspath(filepath) + '/' + '/'.join(modpath), filepath raise ImportError('No module named %s' % '.'.join(modpath)) Ticket #8796 support setuptools namespace packages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 2.000 :state: validation pending setuptoos introduce the notion of 'namespace' package allowing to have sub-parts of a same package split into several eggs (eg what's used to build proper eggs for logilab'subpackages...) this should be understood by pylint/astng? Comments :: On 2009/03/30 13:24 - anon wrote : The minimal sample below creates this output ("source lint_ns.sh"), note that the code itself works (prints the paste module's repr), but pylint can't see said module: pylint 0.18.0, astng 0.19.0, common 0.39.0 Python 2.5.2 (r252:60911, Nov 14 2008, 19:46:32) [GCC 4.3.2] ************* Module paste.lint_ns C: 1: Missing docstring E: 1: No name 'script' in module 'paste' F: 1: Unable to import 'paste.script' (No module named script) I could not reproduce the "TypeError: '_Yes' object is unindexable" I get with a more complex project, let's hope that disappears when all modules can be found. ==> lint_ns.sh <== # must be sourced! if test ! -d bin; then virtualenv2.5 --no-site-packages . . bin/activate PYTHONPATH=. bin/python ./setup.py develop -U fi bin/python -m paste.lint_ns bin/pylint --version bin/pylint -rn paste ==> setup.py <== from setuptools import setup setup( name = "lint_ns", version = "0.1", packages = ["paste.lint_ns"], namespace_packages = ["paste"], install_requires = [ "setuptools==0.6c9", "PasteScript>=1.6.2", "pylint==0.18.0", #"logilab.pylintinstaller==0.1.1", ], ) ==> paste/__init__.py <== """Namespace package.""" __import__('pkg_resources').declare_namespace(__name__) ==> paste/lint_ns/__init__.py <== from paste.script import templates if __name__ == "__main__": print repr(templates) > On 2009/03/30 13:29 - sthenault wrote : > huum that's the one I was mainly interested in :( > On 2010/01/06 10:46 - kevingill wrote : > I experienced this problem using the zope system. Zope uses large numbers or > namespace eggs. > > I work around it by modifying _module_file in modutils.py > > before the line : > > > > while modpath: > > > > insert: > > > > try: _, mp_filename, mp_desc = find_module(os.sep.join(modpath), path) except > ImportError: if checkeggs: return _search_zip(modpath, pic)[:2] raise mtype = > mp_desc[2] return mtype, mp_filename > > > > This returns the correct name for imports from namespace eggs. It may mess up > .zip eggs. It lowers the quality of the import error message. > > On 2011/01/21 13:04 - anon wrote : > Has there been any progress or workaround for this issue? On 2011/01/22 15:13 - dsully wrote : Also looking for an update here. It looks like the code from kevingill above has been added to modutils.py already running logilab_common 0.53.0, but it doesn't fix the E0611 errors from Pylint. Thanks On 2011/06/14 03:37 - anon wrote : I have a few namespaced modules as well. as it stands i cannot use pylint because of the 300+ false positives it gives due to this error. Any updates? On 2011/11/03 10:53 - anon wrote : I have a similar problem with ``pkgutil.extend_path``. I added code to reproduce it to GitHub_ .. _GitHub: https://bitbucket.org/tommi/pylint-pkgutil-weirdness/ On 2012/04/26 15:53 - jd wrote : This is preliminary because it only supports top-level namespace packages, but generalizing won't be too hard. In logilab.common.modutils, import pkg_resources. Then in _module_file() insert the following lines just after `while modpath`: while modpath: if modpath[0] in pkg_resources._namespace_packages and len(modpath) > 1: module = sys.modules[modpath.pop(0)] path = module.__path__ With this I don't errors related to namespace packages anymore. On 2012/12/04 15:49 - rbarrois wrote : A common issue appears when using pylint on one namespace-enabled package using data from other parts of the same namespace. Typical issue: - foo.bar and foo.baz are two packages belonging to the "foo" namespace - In foo.baz.blah, there is "from . import mymod" The above patch will try to import "foo.baz.mymod" from the site-packages installed foo/ folder (brought in by foo.bar) instead of looking for foo.baz.blah. I have written a patch that works fine on our setup:: diff --git a/modutils.py b/modutils.py index 2cae005..b2e8c6b 100644 --- a/modutils.py +++ b/modutils.py @@ -35,6 +35,7 @@ from os.path import splitext, join, abspath, isdir, dirname, exists, basename from imp import find_module, load_module, C_BUILTIN, PY_COMPILED, PKG_DIRECTORY from distutils.sysconfig import get_config_var, get_python_lib, get_python_version from distutils.errors import DistutilsPlatformError +import pkg_resources try: import zipimport @@ -545,13 +546,40 @@ def _file_from_modpath(modpath, path=None, context=None): documentation for more information """ assert len(modpath) > 0 + + # List of paths to test, as (modpath, path). + # The 'modpath' is needed for namespaced package handling. + paths = [] + if context is not None: + paths.append((modpath, [context])) + + paths.append((modpath, path)) + + if len(modpath) > 1 and modpath[0] in pkg_resources._namespace_packages: + # Looks like a namespaced package, try system-wide package too + module = modpath[0] + module = sys.modules[module] + namespaced_path = module.__path__ + + # We need to lookup modpath[1:] within that module + paths.append((modpath[1:], namespaced_path)) + + # Iterate over all (modpath, path) combination until a valid one is found + mtype = mp_filename = None + found = False + for _modpath, _path in paths: try: - mtype, mp_filename = _module_file(modpath, [context]) + mtype, mp_filename = _module_file(_modpath, _path) + found = True + break except ImportError: - mtype, mp_filename = _module_file(modpath, path) - else: - mtype, mp_filename = _module_file(modpath, path) + pass + + if not found: + raise ImportError("No module named %s in %s" % ( + '.'.join(modpath), [p for _modpath, p in paths])) + if mtype == PY_COMPILED: try: return get_source_file(mp_filename) @@ -604,6 +632,10 @@ def _module_file(modpath, path=None): checkeggs = True except AttributeError: checkeggs = False + + # We'll alter modpath, so let's make a copy + modpath = list(modpath) + imported = [] while modpath: try: > On 2012/12/20 21:09 - jd wrote : > Unfortunately your patch doesn't work for me (logilab-common==0.58.3): > namespace packages aren't found, just like with no patch. > > This bug deserves some love from the package maintainers. On 2013/01/21 22:04 - anon wrote : I am also working with a package hierarchy that is heavily namespace'd. I too have many error false positives on modules that Pylint can't import. I use Pylint and flymake to make my Emacs a Python IDE; the false errors reported by failure to import namespace'd packages masks bigger errors frequently. We catch them later, usually, but we could be catching them earlier if Pylint would properly import our packages. On 2013/01/31 09:43 - anon wrote : I solved the problem when using pkgutil.extend_path. It works for me with pylint 0.25.1, astng 0.23.1, common 0.57.1, Python 2.7.3 May be someone may test ist with other versions. .. highlight:: python 588a589 > path = (path is None and sys.path or path) 592,594c593,594 < _path = (path is None and sys.path or path) < for __path in _path: < if not __path in pic: --- > for _path in path: > if not _path in pic: 596c596 < pic[__path] = zipimport.zipimporter(__path) --- > pic[_path] = zipimport.zipimporter(_path) 598c598 < pic[__path] = None --- > pic[_path] = None 604,606c604,611 < try: < _, mp_filename, mp_desc = find_module(modpath[0], path) < except ImportError: --- > mp_filenames = [] > for _path in path: > try: > _, mp_filename, mp_desc = find_module(modpath[0], [_path]) > mp_filenames.append((mp_filename, mp_desc)) > except ImportError: > pass > if not mp_filenames: 609,624c614,629 < raise < else: < if checkeggs: < fullabspath = [abspath(x) for x in _path] < try: < pathindex = fullabspath.index(dirname(abspath(mp_filename))) < emtype, emp_filename, zippath = _search_zip(modpath, pic) < if pathindex > _path.index(zippath): < # an egg takes priority < return emtype, emp_filename < except ValueError: < # XXX not in _path < pass < except ImportError: < pass < checkeggs = False --- > raise ImportError('No module %s in %s' % ('.'.join(modpath), > '.'.join(imported))) > if checkeggs: > fullabspath = [abspath(x) for x in path] > try: > pathindex = fullabspath.index(dirname(abspath(mp_filename))) > emtype, emp_filename, zippath = _search_zip(modpath, pic) > if pathindex > _path.index(zippath): > # an egg takes priority > return emtype, emp_filename > except ValueError: > # XXX not in _path > pass > except ImportError: > pass > checkeggs = False 626d630 < mtype = mp_desc[2] 628,631c632,639 < if mtype != PKG_DIRECTORY: < raise ImportError('No module %s in %s' % ('.'.join(modpath), < '.'.join(imported))) < path = [mp_filename] --- > for mtype in [p[1][2] for p in mp_filenames]: > if mtype != PKG_DIRECTORY: > raise ImportError('No module %s in %s' % ('.'.join(modpath), > '.'.join(imported))) > path = [p[0] for p in mp_filenames] > else: > mp_filename, mp_desc = mp_filenames[0] > mtype = mp_desc[2] Version 0.59.1 -------------- :expected date: n/a Ticket #120506 api split: break register_object into smaller parts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: rejected sometimes one wants to register_objects in various chunks (without redoing the initialisation phase for each chunk) Ticket #2469 better cyclic imports analysis algorithm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: validation pending it takes soooo long time on MoinMoin for instance. ps :: $ pygrep "from MoinMoin" * | wc -l 536 Ticket #129786 Fix space/tab usage in registry.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending Hello, I'm applying this patch to the debian package since registry.py line 808 mixes spaces and tabs in code indentation. --- a/registry.py +++ b/registry.py @@ -803,7 +803,7 @@ class RegistryStore(dict): and getattr(obj, '__select__', None)): return False elif issubclass(obj, RegistrableInstance): - return False + return False elif not isinstance(obj, RegistrableInstance): return False if not obj.__regid__: Cheers, Sandro Ticket #120897 Installation fails on Python 3.3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending When installing via pip on python 3.3, the setup fails on bad syntax on some of the test modules. You can see an example here: https://travis-ci.org/vmalloc/shakedown/jobs/5072200 Comments :: On 2013/04/17 11:57 - vmalloc wrote : validated Ticket #115775 use WatchedFileHandler instead of FileHandler if available ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending this would allow log file rotation, instead of continuing to log in obsolete, or even deleted, files. Ticket #119965 accidental(?) syntax inconsistency in registry.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending This is fairly trivial. In latest version 0.50.0 (not checked previous), in file registry.py, Line 807 return False is made of a space and 2 tabs then return False. This white space inconsistency causes a test to fail in py3.2 --- registry.py 2013-01-24 01:42:03.000000000 +0800 +++ registry.py 2013-02-09 22:48:43.988923037 +0800 @@ -803,7 +803,7 @@ and getattr(obj, '__select__', None)): return False elif issubclass(obj, RegistrableInstance): - return False + return False elif not isinstance(obj, RegistrableInstance): return False if not obj.__regid__: The white space may have been corrupted again pasting it above. Save making a second issue, There are 4 tests that will also fall over with LC_ALL=C set for locale, python having this inherent fragility for locale settings. We figured how to fix it in setup.py, sure you can if we can Comments :: On 2013/02/09 15:27 - idella4 wrote : just realised, already filed by Arfrever in 117580 Ticket #117580 TabError in logilab.common.registry with Python 3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending logilab-common 0.59.0 introduced 2 tabs in registry.py, but the rest of this file uses spaces, so a TabError now occurs with Python 3. :: $ python3.2 -c 'import logilab.common.registry' Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.2/site-packages/logilab/common/registry.py", line 807 return False ^ TabError: inconsistent use of tabs and spaces in indentation Fix (for original registry.py not transformed by 2to3): :: sed -e "806s/\t\t/ /" -i registry.py Comments :: On 2013/02/09 15:20 - idella4 wrote : yes, you filed already. ditto here Version 0.59.0 -------------- :expected date: n/a Ticket #113099 add a spec file for RPM generation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: done Ticket #93009 add OrderedDict compatiblity code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.000 :state: rejected OrderedDict is available from python 2.7 on in the `collections` library module. An activestate recipe is available at http://code.activestate.com/recipes/576693 and is supposed to work from python 2.4 on. Comments :: On 2012/05/21 07:41 - acampeas wrote : also available (and maintained) from http://pypi.python.org/pypi/ordereddict/ Ticket #113458 [configuration] enhance merge_options implementation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: done * option dict is not copied, leaving room for undesired side effect * an optional argument allowing to ensure all options are in the same group would be sometime useful (eg cw sources) Ticket #98742 make it easy to store instances in registries, not only classes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: done it is useful for at least http://www.cubicweb.org/ticket/2406609 Comments :: On 2012/12/18 08:32 - fcayre wrote : Patch https://www.logilab.org/patch/111692 aims at making it possible to register/ unregister *instances* automatically. This could be made possible using stack inspection in the __init__ method of a dedicated RegistrableInstance class. > On 2012/12/18 10:25 - acampeas wrote : > I'm not too fond of a stack-inspection technique, which will be obscure and > unobvious to maintain. > > I wonder what's the problem with the current way (apart from gut > feelings/cosmetics). Ticket #53393 python3: fix tests and run them also during build ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: task :load: 1.000 :state: done most non working tests should be fixed quite easily or skipped. Then, we can also run the tests during the build for python3 (fix it in debian.py3k) Ticket #111011 [registry] inconsistent behaviour when no registration callback vs call to register_all ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: done one call load_ancestors_then_object, the other barely register all objects. We should either find that load_ancestors_then_object is not (anymore) useless and drop it, or use it in both cases. Ticket #107436 [windows] use colorama if available to get colored log outputs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: resolved see http://pypi.python.org/pypi/colorama Version 0.58.3 -------------- :expected date: n/a Ticket #82161 python3: logilab.common.date.ustrftime() is incompatible ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: done From: Arfrever Frehtes Taifersar Arahesis Date: Fri, 28 Oct 2011 17:13:15 +0200 To: Logilab Python Projects logilab.common.date.ustrftime() is incompatible with Python 3: $ python2.7 -c 'import datetime, logilab.common.date; print(repr(logilab.common.date.ustrftime(datetime.date(2011, 10, 28))))' u'2011-10-28' $ python3.2 -c 'import datetime, logilab.common.date; print(repr(logilab.common.date.ustrftime(datetime.date(2011, 10, 28))))' Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.2/site-packages/logilab/common/date.py", line 288, in ustrftime return str(somedate.strftime(str(fmt)), encoding) TypeError: decoding str is not supported datetime.date.strftime() already returns str instead of bytes in Python 3, so decoding is not needed. logilab.common.date.ustrftime() tries to support dates before year 1900. datetime.date.strftime() supports dates since year 1000 in Python 3.2 and dates since year 1 in Python 3.3: $ python3.1 -c 'import datetime; print(repr(datetime.date(1, 1, 1).strftime("%Y-%m-%d")))' Traceback (most recent call last): File "", line 1, in ValueError: year=1 is before 1900; the datetime strftime() methods require year >= 1900 $ python3.2 -c 'import datetime; print(repr(datetime.date(1, 1, 1).strftime("%Y-%m-%d")))' Traceback (most recent call last): File "", line 1, in ValueError: year=1 is before 1000; the datetime strftime() methods require year >= 1000 $ python3.2 -c 'import datetime; print(repr(datetime.date(1000, 1, 1).strftime("%Y-%m-%d")))' '1000-01-01' $ python3.3 -c 'import datetime; print(repr(datetime.date(1, 1, 1).strftime("%Y-%m-%d")))' '1-01-01' I'm attaching the patch, which fixes logilab.common.date.ustrftime(). This patch fixes errors in test_ticks2datetime_before_1900() and test_ustrftime_before_1900() in unittest_date.py with Python 3.2. (There are no other errors in unittest_date.py with Python 3.2.) Ticket #111010 [registry] setdefault unexpectidly raise RegistryNotFound ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: done (wrong exception catched) Ticket #105847 [table] encode to iso-8859-1 instead of using unicode ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: done this is bad Ticket #104045 test/data directory is only partially installed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: done Hello, the content of test/data is: $ ls logilab-common-0.58.2/test/data/ ChangeLog foo.txt MyPyPa-0.1.0-py2.5.egg normal_file.txt subdir_differ_dir content_differ_dir __init__.py MyPyPa-0.1.0.zip reference_dir test1.msg deprecation.py lmfp newlines.txt same_dir test2.msg file_differ_dir module2.py noendingnewline.py spam.txt test.ini find_test module.py nonregr.py sub write_protected_file.txt but when the data dir is copied in the build/installed location it only contains: $ ls logilab-common-0.58.2/build/lib/logilab/common/test/data deprecation.py find_test __init__.py lmfp module2.py module.py noendingnewline.py nonregr.py So it seems only the "python" source files are installed and not all the files in there, needed to run the test suite. Thanks, Sandro Ticket #109740 string conversion bug in date.py when given a month with an accented character (e.g. "décembre") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: done Trying to read in UTF-8 the month written in Latin-1. Traceback, when setting, in Documentor, a month which gets to be written with a Latin-1 accented character : File "[...]/logilab/common/date.py", line 294, in ustrftime return unicode(somedate.strftime(str(fmt)), encoding) File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 1: invalid continuation byte Comments :: On 2012/10/24 08:37 - sthenault wrote : this usually occurs due to bad locale configuration. Hard to fix in logilab.common On 2012/10/24 11:48 - sthenault wrote : there is actually a bug in ustrftime, which is not properly detecting **LC_TIME** encoding. Reopening Ticket #104047 Tests fails when run under python3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: done Hello, several unittests fails when running them with python3, here's the log of the run under py3k (so including even skipped or succesfully ones): # use the default python version to select the script dir to run the tests PYTHONPATH=/home/morph/deb/build-area/logilab-common-0.58.2/build/lib.linux-x86_64-2.7/ /home/morph/deb/build-area/logilab-common-0.58.2/build/scripts-2.7/pytest -t /home/morph/deb/build-area/logilab-common-0.58.2/build/lib.linux-x86_64-2.7/logilab/common/test ====================== unittest_decorators.py ====================== ............ ========================= unittest_date.py ========================= ............................................... ======================== unittest_pytest.py ======================== .. ========================= unittest_tree.py ========================= ........................ ====================== unittest_shellutils.py ====================== ....................... ===================== unittest_deprecation.py ====================== .... ====================== unittest_changelog.py ======================= unittest_changelog.py:33: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.assertStreamEquals(open(self.cl_file), out) . ======================= unittest_umessage.py ======================= .... ==================== unittest_configuration.py ===================== ............. ======================= unittest_modutils.py ======================= ................................... ======================= unittest_xmlutils.py ======================= ..... ======================== unittest_cache.py ========================= ........ ==================== unittest_ureports_text.py ===================== ....... ====================== unittest_taskqueue.py ======================= ..... ======================== unittest_graph.py ========================= .............. ======================== unittest_table.py ========================= ..................................... ====================== unittest_textutils.py ======================= ......................................... ====================== unittest_fileutils.py ======================= ............ ====================== unittest_interface.py ======================= ..... ======================= unittest_testlib.py ======================== ............................................................................unittest_testlib.py:180: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.assertDirEqual(ed1, ed2) unittest_testlib.py:181: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.assertDirEqual(ref, ref) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib.linux-x86_64-2.7/logilab/common/testlib.py:1059: DeprecationWarning: Non-standard: please copy test method to your TestCase class osp.join(path_b, ipath_b, ifiles_b[index])) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib.linux-x86_64-2.7/logilab/common/testlib.py:998: DeprecationWarning: Non-standard: please copy test method to your TestCase class msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) unittest_testlib.py:182: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.assertDirEqual( ref, same) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib.linux-x86_64-2.7/logilab/common/testlib.py:1150: DeprecationWarning: Non-standard: please copy test method to your TestCase class callableObj(*args, **kwargs) ..unittest_testlib.py:166: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.tc.assertFileEqual(foo, foo) .........unittest_testlib.py:193: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.tc.assertStreamEqual(stream1, stream1) .....unittest_testlib.py:119: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.tc.assertXMLStringWellFormed(valid) ... ==================== unittest_ureports_html.py ===================== ....... ======================== unittest_compat.py ======================== .... ======================= unittest_registry.py ======================= .......... ******************************************************************************* Ran 415 test cases in 11.40s (0.35s CPU) All 23 modules OK PYTHONPATH=/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/ /home/morph/deb/build-area/logilab-common-0.58.2/build/scripts-3.2/pytest -t /home/morph/deb/build-area/logilab-common-0.58.2/build/lib//logilab/common/test ====================== unittest_decorators.py ====================== /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:1087: DeprecationWarning: Please use assertTrue instead. self.assert_(isinstance(obj, klass), msg) .....unittest_decorators.py:181: DeprecationWarning: Please use assertFalse instead. self.failIf('bar' in foo.__dict__) unittest_decorators.py:183: DeprecationWarning: Please use assertTrue instead. self.failUnless('bar' in foo.__dict__) ...EF.. ====================================================================== ERROR: test_monkeypatch_callable_non_callable (unittest_decorators.DecoratorsTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_decorators.py", line 60, in test_monkeypatch_callable_non_callable self.assertEqual(MyClass().foo(), 12) TypeError: __call__() takes exactly 2 arguments (1 given) no stdout no stderr ====================================================================== FAIL: test_monkeypatch_instance_method (unittest_decorators.DecoratorsTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_decorators.py", line 38, in test_monkeypatch_instance_method self.assertTrue(isinstance(MyClass.meth1, types.MethodType)) File "/usr/lib/python3.2/unittest/case.py", line 506, in assertTrue raise self.failureException(msg) AssertionError: False is not true no stdout no stderr ========================= unittest_date.py ========================= .....................EEunittest_date.py:150: DeprecationWarning: Please use skipTest instead. self.skip('mx.DateTime is not installed') SSSSSSSSSSSSSSSSSSSSSS ====================================================================== ERROR: test_ticks2datetime_before_1900 (unittest_date.DateTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_date.py", line 139, in test_ticks2datetime_before_1900 self.assertEqual(ustrftime(date, '%Y-%m-%d'), '1899-12-31') File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/date.py", line 288, in ustrftime return str(somedate.strftime(str(fmt)), encoding) TypeError: decoding str is not supported no stdout no stderr ====================================================================== ERROR: test_ustrftime_before_1900 (unittest_date.DateTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_date.py", line 133, in test_ustrftime_before_1900 self.assertEqual(ustrftime(date, '%Y-%m-%d %H:%M:%S'), '1328-03-12 06:30:00') File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/date.py", line 288, in ustrftime return str(somedate.strftime(str(fmt)), encoding) TypeError: decoding str is not supported no stdout no stderr ====================================================================== SKIPPED: test_add_days_worked (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_day (unittest_date.MxDateTC) enumerate days mx.DateTime is not installed ====================================================================== SKIPPED: test_get_national_holidays (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_month (unittest_date.MxDateTC) enumerate months mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_afternoon (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_afternoon_before_holiday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_afternoon_before_saturday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_day_nextday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_friday_monday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_friday_monday_with_two_weekends (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_friday_saturday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_friday_sunday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_now_and_before (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_now_now (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_now_now2 (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_saturday_monday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_saturday_sunday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_saturday_tuesday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_tuesday_friday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_tuesday_wednesday (unittest_date.MxDateTC) week-end + easter monday mx.DateTime is not installed ====================================================================== SKIPPED: test_ticks2datetime_before_1900 (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_ustrftime_before_1900 (unittest_date.MxDateTC) mx.DateTime is not installed ======================== unittest_pytest.py ======================== .. ========================= unittest_tree.py ========================= ........................ ====================== unittest_shellutils.py ====================== ................EE..... ====================================================================== ERROR: test_update_exact (unittest_shellutils.ProgressBarTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_shellutils.py", line 156, in test_update_exact expected_stream.write("\r["+('.'*dots)+(' '*(size-dots))+"]") TypeError: can't multiply sequence by non-int of type 'float' no stdout no stderr ====================================================================== ERROR: test_update_relative (unittest_shellutils.ProgressBarTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_shellutils.py", line 168, in test_update_relative expected_stream.write("\r["+('.'*dots)+(' '*(size-dots))+"]") TypeError: can't multiply sequence by non-int of type 'float' no stdout no stderr ===================== unittest_deprecation.py ====================== .... ====================== unittest_changelog.py ======================= unittest_changelog.py:33: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.assertStreamEquals(open(self.cl_file), out) unittest_changelog.py:33: ResourceWarning: unclosed file self.assertStreamEquals(open(self.cl_file), out) . ======================= unittest_umessage.py ======================= E/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:540: ResourceWarning: unclosed file return False EEE ====================================================================== ERROR: test_decode_QP (unittest_umessage.UMessageTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_umessage.py", line 30, in setUp msg1 = email.message_from_file(open(join(DATA, 'test1.msg'))) File "/usr/lib/python3.2/email/__init__.py", line 56, in message_from_file return Parser(*args, **kws).parse(fp) File "/usr/lib/python3.2/email/parser.py", line 68, in parse data = fp.read(8192) File "/usr/lib/python3.2/codecs.py", line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 898: invalid continuation byte no stdout no stderr ====================================================================== ERROR: test_get_all (unittest_umessage.UMessageTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_umessage.py", line 30, in setUp msg1 = email.message_from_file(open(join(DATA, 'test1.msg'))) File "/usr/lib/python3.2/email/__init__.py", line 56, in message_from_file return Parser(*args, **kws).parse(fp) File "/usr/lib/python3.2/email/parser.py", line 68, in parse data = fp.read(8192) File "/usr/lib/python3.2/codecs.py", line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 898: invalid continuation byte no stdout no stderr ====================================================================== ERROR: test_get_payload_no_multi (unittest_umessage.UMessageTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_umessage.py", line 30, in setUp msg1 = email.message_from_file(open(join(DATA, 'test1.msg'))) File "/usr/lib/python3.2/email/__init__.py", line 56, in message_from_file return Parser(*args, **kws).parse(fp) File "/usr/lib/python3.2/email/parser.py", line 68, in parse data = fp.read(8192) File "/usr/lib/python3.2/codecs.py", line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 898: invalid continuation byte no stdout no stderr ====================================================================== ERROR: test_get_subject (unittest_umessage.UMessageTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_umessage.py", line 30, in setUp msg1 = email.message_from_file(open(join(DATA, 'test1.msg'))) File "/usr/lib/python3.2/email/__init__.py", line 56, in message_from_file return Parser(*args, **kws).parse(fp) File "/usr/lib/python3.2/email/parser.py", line 68, in parse data = fp.read(8192) File "/usr/lib/python3.2/codecs.py", line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 898: invalid continuation byte no stdout no stderr ==================== unittest_configuration.py ===================== ............. ======================= unittest_modutils.py ======================= /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/modutils.py:554: ResourceWarning: unclosed file mtype, mp_filename = _module_file(modpath, path) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/modutils.py:354: ResourceWarning: unclosed file return '.'.join(parts[:i]) ............./home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/modutils.py:550: ResourceWarning: unclosed file mtype, mp_filename = _module_file(modpath, [context]) ..unittest_modutils.py:262: ResourceWarning: unclosed file m = modutils.load_module_from_modpath(['logilab', 'common', 'fileutils']) unittest_modutils.py:263: DeprecationWarning: Please use assertTrue instead. self.assert_( hasattr(logilab, 'common') ) unittest_modutils.py:264: DeprecationWarning: Please use assertTrue instead. self.assert_( hasattr(logilab.common, 'fileutils') ) unittest_modutils.py:265: DeprecationWarning: Please use assertTrue instead. self.assert_( m is logilab.common.fileutils ) ..../home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/modutils.py:532: ResourceWarning: unclosed file find_module(modname.split('.')[0], [from_file]) ................ ======================= unittest_xmlutils.py ======================= ..... ======================== unittest_cache.py ========================= unittest_cache.py:98: DeprecationWarning: Please use assertTrue instead. self.assert_('foo' not in list(self.cache.keys()), "Element 'foo' was not removed cache dictionnary") unittest_cache.py:99: DeprecationWarning: Please use assertTrue instead. self.assert_('foo' not in self.cache._usage, "Element 'foo' was not removed usage list") E..unittest_cache.py:72: DeprecationWarning: Please use assertTrue instead. 'key 1 has not been suppressed from the cache dictionnary') unittest_cache.py:74: DeprecationWarning: Please use assertTrue instead. 'key 1 has not been suppressed from the cache LRU list') EEEEE ====================================================================== ERROR: test_delitem (unittest_cache.CacheTestCase) Checks that elements are removed from both element dict and element ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache.py", line 100, in test_delitem self.assertItemsEqual(self.cache._usage, AttributeError: 'CacheTestCase' object has no attribute 'assertItemsEqual' no stdout no stderr ====================================================================== ERROR: test_recycling1 (unittest_cache.CacheTestCase) Checks the removal of old elements ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache.py", line 77, in test_recycling1 self.assertItemsEqual(self.cache._usage, AttributeError: 'CacheTestCase' object has no attribute 'assertItemsEqual' no stdout no stderr ====================================================================== ERROR: test_recycling2 (unittest_cache.CacheTestCase) Checks that accessed elements get in the front of the list ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache.py", line 89, in test_recycling2 self.assertItemsEqual(self.cache._usage, AttributeError: 'CacheTestCase' object has no attribute 'assertItemsEqual' no stdout no stderr ====================================================================== ERROR: test_setitem1 (unittest_cache.CacheTestCase) Checks that the setitem method works ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache.py", line 36, in test_setitem1 self.assertItemsEqual(self.cache._usage, AttributeError: 'CacheTestCase' object has no attribute 'assertItemsEqual' no stdout no stderr ====================================================================== ERROR: test_setitem2 (unittest_cache.CacheTestCase) Checks that the setitem method works for multiple items ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache.py", line 50, in test_setitem2 self.assertItemsEqual(self.cache._usage, AttributeError: 'CacheTestCase' object has no attribute 'assertItemsEqual' no stdout no stderr ====================================================================== ERROR: test_setitem3 (unittest_cache.CacheTestCase) Checks that the setitem method works when replacing an element in the cache ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache.py", line 60, in test_setitem3 self.assertItemsEqual(self.cache._usage, AttributeError: 'CacheTestCase' object has no attribute 'assertItemsEqual' no stdout no stderr ==================== unittest_ureports_text.py ===================== ....... ====================== unittest_taskqueue.py ======================= ..... ======================== unittest_graph.py ========================= .............. ======================== unittest_table.py ========================= ..........unittest_table.py:333: DeprecationWarning: Please use assertTrue instead. self.assert_(int(val) == 11) .unittest_table.py:345: DeprecationWarning: Please use assertTrue instead. self.assert_(val == 22) .unittest_table.py:311: DeprecationWarning: Please use assertTrue instead. self.assert_(int(val) == 15) .unittest_table.py:321: DeprecationWarning: Please use assertTrue instead. self.assert_(val == 30) ..........unittest_table.py:68: DeprecationWarning: Please use assertTrue instead. self.assert_(self.table[0] == self.table.data[0]) unittest_table.py:69: DeprecationWarning: Please use assertTrue instead. self.assert_(self.table[1] == self.table.data[1]) ...unittest_table.py:74: DeprecationWarning: Please use assertTrue instead. self.assert_(next(it) == self.table.data[0]) unittest_table.py:75: DeprecationWarning: Please use assertTrue instead. self.assert_(next(it) == self.table.data[1]) .E......... ====================================================================== ERROR: test_pprint (unittest_table.TableTC) only tests pprint doesn't raise an exception ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_table.py", line 209, in test_pprint self.table.pprint() File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/table.py", line 443, in pprint col_names_line.append(col_name.encode('iso-8859-1') + ' '*5) TypeError: can't concat bytes to str no stdout no stderr ====================== unittest_textutils.py ======================= ......................................... ====================== unittest_fileutils.py ======================= unittest_fileutils.py:76: DeprecationWarning: Please use assertTrue instead. self.assert_(exists(join(self.tempdir, '__init__.py'))) unittest_fileutils.py:77: DeprecationWarning: Please use assertTrue instead. self.assert_(exists(join(self.tempdir, 'sub'))) unittest_fileutils.py:78: DeprecationWarning: Please use assertTrue instead. self.assert_(not exists(join(self.tempdir, '__init__.pyc'))) unittest_fileutils.py:79: DeprecationWarning: Please use assertTrue instead. self.assert_(not exists(join(self.tempdir, 'CVS'))) .......Funittest_fileutils.py:56: ResourceWarning: unclosed file data = open(NEWLINES_TXT, 'U').read() .unittest_fileutils.py:97: DeprecationWarning: Please use assertTrue instead. self.assert_(not os.stat(self.rpath).st_mode & S_IWRITE) unittest_fileutils.py:99: DeprecationWarning: Please use assertTrue instead. self.assert_(os.stat(self.rpath).st_mode & S_IWRITE) unittest_fileutils.py:100: DeprecationWarning: Please use assertTrue instead. self.assert_(os.access(self.rpath, os.W_OK)) unittest_fileutils.py:102: DeprecationWarning: Please use assertTrue instead. self.assert_(os.stat(self.rwpath).st_mode & S_IWRITE) unittest_fileutils.py:103: DeprecationWarning: Please use assertTrue instead. self.assert_(os.access(self.rwpath, os.W_OK)) unittest_fileutils.py:105: DeprecationWarning: Please use assertTrue instead. self.assert_(os.stat(self.rwpath).st_mode & S_IWRITE) unittest_fileutils.py:106: DeprecationWarning: Please use assertTrue instead. self.assert_(os.access(self.rwpath, os.W_OK)) .unittest_fileutils.py:126: DeprecationWarning: Please use assertTrue instead. self.assert_(not os.stat(self.rpath).st_mode & S_IWRITE) unittest_fileutils.py:128: DeprecationWarning: Please use assertTrue instead. self.assert_(os.access(self.rpath, os.W_OK)) unittest_fileutils.py:129: DeprecationWarning: Please use assertTrue instead. self.assert_(os.stat(self.rpath).st_mode & S_IWRITE) unittest_fileutils.py:132: DeprecationWarning: Please use assertTrue instead. self.assert_(not os.stat(self.rpath).st_mode & S_IWRITE) .unittest_fileutils.py:112: DeprecationWarning: Please use assertTrue instead. self.assert_(not os.stat(self.rpath).st_mode & S_IWRITE) unittest_fileutils.py:115: DeprecationWarning: Please use assertTrue instead. self.assert_(not os.stat(self.rpath).st_mode & S_IWRITE) unittest_fileutils.py:117: DeprecationWarning: Please use assertTrue instead. self.assert_(os.access(self.rwpath, os.W_OK)) unittest_fileutils.py:118: DeprecationWarning: Please use assertTrue instead. self.assert_(os.stat(self.rwpath).st_mode & S_IWRITE) unittest_fileutils.py:120: DeprecationWarning: Please use assertTrue instead. self.assert_(os.access(self.rwpath, os.W_OK)) unittest_fileutils.py:121: DeprecationWarning: Please use assertTrue instead. self.assert_(os.stat(self.rwpath).st_mode & S_IWRITE) . ====================================================================== FAIL: relative_path (logilab.common.fileutils) Doctest: logilab.common.fileutils.relative_path ---------------------------------------------------------------------- Traceback (most recent call last) File "/usr/lib/python3.2/doctest.py", line 2153, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for logilab.common.fileutils.relative_path File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/fileutils.py", line 180, in relative_path ---------------------------------------------------------------------- File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/fileutils.py", line 203, in logilab.common.fileutils.relative_path Failed example: relative_path( from_file='/index.html', to_file='toto/index.html') Expected: Traceback (most recent call last): File "", line 1, in ? File "", line 37, in relative_path UnresolvableError Got: Traceback (most recent call last): File "/usr/lib/python3.2/doctest.py", line 1288, in __run compileflags, 1), test.globs) File "", line 1, in relative_path( from_file='/index.html', to_file='toto/index.html') File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/fileutils.py", line 231, in relative_path raise UnresolvableError() logilab.common.fileutils.UnresolvableError no stdout no stderr ====================== unittest_interface.py ======================= ..... ======================= unittest_testlib.py ======================== ........./home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:646: DeprecationWarning: Please use assertTrue instead. testfunc(*args, **kwargs) ...........F.......................................................unittest_testlib.py:180: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.assertDirEqual(ed1, ed2) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:1029: DeprecationWarning: Please use assertTrue instead. (ipath_a, path_a, ipath_b, path_b)) unittest_testlib.py:181: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.assertDirEqual(ref, ref) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:1059: DeprecationWarning: Non-standard: please copy test method to your TestCase class osp.join(path_b, ipath_b, ifiles_b[index])) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: DeprecationWarning: Non-standard: please copy test method to your TestCase class msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) unittest_testlib.py:182: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.assertDirEqual( ref, same) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:1150: DeprecationWarning: Non-standard: please copy test method to your TestCase class callableObj(*args, **kwargs) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) unittest_testlib.py:187: ResourceWarning: unclosed file self.assertRaises(AssertionError, self.assertDirEqual, ref, content_differ) unittest_testlib.py:187: ResourceWarning: unclosed file self.assertRaises(AssertionError, self.assertDirEqual, ref, content_differ) ..unittest_testlib.py:165: ResourceWarning: unclosed file self.assertRaises(AssertionError, self.tc.assertFileEqual, foo, spam) unittest_testlib.py:165: ResourceWarning: unclosed file self.assertRaises(AssertionError, self.tc.assertFileEqual, foo, spam) unittest_testlib.py:166: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.tc.assertFileEqual(foo, foo) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) .........unittest_testlib.py:193: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.tc.assertStreamEqual(stream1, stream1) unittest_testlib.py:194: ResourceWarning: unclosed file stream1 = open(foo) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:646: ResourceWarning: unclosed file testfunc(*args, **kwargs) /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/testlib.py:646: ResourceWarning: unclosed file testfunc(*args, **kwargs) .unittest_testlib.py:213: ResourceWarning: unclosed file text1 = open(foo).read() unittest_testlib.py:216: ResourceWarning: unclosed file text2 = open(spam).read() .EEEunittest_testlib.py:119: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.tc.assertXMLStringWellFormed(valid) ... ====================================================================== ERROR: test_unordered_equality_for_dicts (unittest_testlib.TestlibTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_testlib.py", line 143, in test_unordered_equality_for_dicts self.assertRaises(AssertionError, self.tc.assertItemsEqual, d1, d2) AttributeError: 'MockTestCase' object has no attribute 'assertItemsEqual' no stdout no stderr ====================================================================== ERROR: test_unordered_equality_for_iterables (unittest_testlib.TestlibTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_testlib.py", line 155, in test_unordered_equality_for_iterables self.assertRaises(AssertionError, self.tc.assertItemsEqual, range(5), range(6)) AttributeError: 'MockTestCase' object has no attribute 'assertItemsEqual' no stdout no stderr ====================================================================== ERROR: test_unordered_equality_for_lists (unittest_testlib.TestlibTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_testlib.py", line 127, in test_unordered_equality_for_lists self.assertRaises(AssertionError, self.tc.assertItemsEqual, l1, l2) AttributeError: 'MockTestCase' object has no attribute 'assertItemsEqual' no stdout no stderr ====================================================================== FAIL: test_tagged_class (unittest_testlib.TagTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_testlib.py", line 799, in test_tagged_class self.assertTrue(runner.does_match_tags(cls.test_one)) File "/usr/lib/python3.2/unittest/case.py", line 506, in assertTrue raise self.failureException(msg) AssertionError: False is not true no stdout no stderr ==================== unittest_ureports_html.py ===================== ....... ======================== unittest_compat.py ======================== .... ======================= unittest_registry.py ======================= .......... ******************************************************************************* Ran 413 test cases in 11.71s (0.41s CPU), 19 errors, 3 failures, 22 skipped 15 modules OK (8 failed) failures: /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_decorators [2/12], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_date [2/45], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_shellutils [2/23], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_umessage [4/4], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_cache [6/8], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_table [1/37], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_fileutils [1/12], /home/morph/deb/build-area/logilab-common-0.58.2/build/lib/logilab/common/test/unittest_testlib [4/95] sys:1: ResourceWarning: unclosed file Thanks, Sandro Comments :: On 2013/01/03 20:10 - stosi wrote : I still got the same failures with 0.58.3: PYTHONPATH=/home/morph/deb/build-area/logilab-common-0.58.3/build/lib/ /home/morph/deb/build-area/logilab-common-0.58.3/build/scripts-3.2/pytest -t /home/morph/deb/build-area/logilab-common-0.58.3/build/lib//logilab/common/test ====================== unittest_decorators.py ====================== ........EF.. ====================================================================== ERROR: test_monkeypatch_callable_non_callable (unittest_decorators.DecoratorsTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.3/build/lib/logilab/common/test/unittest_decorators.py", line 60, in test_monkeypatch_callable_non_callable self.assertEqual(MyClass().foo(), 12) TypeError: __call__() takes exactly 2 arguments (1 given) no stdout no stderr ====================================================================== FAIL: test_monkeypatch_instance_method (unittest_decorators.DecoratorsTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.58.3/build/lib/logilab/common/test/unittest_decorators.py", line 38, in test_monkeypatch_instance_method self.assertTrue(isinstance(MyClass.meth1, types.MethodType)) File "/usr/lib/python3.2/unittest/case.py", line 506, in assertTrue raise self.failureException(msg) AssertionError: False is not true On 2013/01/03 20:39 - anon wrote : I'm pasting the full test execution log, FTR: PYTHONPATH=/tmp/buildd/logilab-common-0.58.3/build/lib/ /tmp/buildd/logilab-common-0.58.3/build/scripts-3.2/pytest -t /tmp/buildd/logilab-common-0.58.3/build/lib//logilab/common/test ====================== unittest_decorators.py ====================== ........EF.. ====================================================================== ERROR: test_monkeypatch_callable_non_callable (unittest_decorators.DecoratorsTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/test/unittest_decorators.py", line 60, in test_monkeypatch_callable_non_callable self.assertEqual(MyClass().foo(), 12) TypeError: __call__() takes exactly 2 arguments (1 given) no stdout no stderr ====================================================================== FAIL: test_monkeypatch_instance_method (unittest_decorators.DecoratorsTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/test/unittest_decorators.py", line 38, in test_monkeypatch_instance_method self.assertTrue(isinstance(MyClass.meth1, types.MethodType)) File "/usr/lib/python3.2/unittest/case.py", line 506, in assertTrue raise self.failureException(msg) AssertionError: False is not true no stdout no stderr ========================= unittest_date.py ========================= .......................SSSSSSSSSSSSSSSSSSSSSS ====================================================================== SKIPPED: test_add_days_worked (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_day (unittest_date.MxDateTC) enumerate days mx.DateTime is not installed ====================================================================== SKIPPED: test_get_national_holidays (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_month (unittest_date.MxDateTC) enumerate months mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_afternoon (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_afternoon_before_holiday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_afternoon_before_saturday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_day_nextday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_friday_monday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_friday_monday_with_two_weekends (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_friday_saturday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_friday_sunday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_now_and_before (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_now_now (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_now_now2 (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_saturday_monday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_saturday_sunday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_saturday_tuesday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_tuesday_friday (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_open_days_tuesday_wednesday (unittest_date.MxDateTC) week-end + easter monday mx.DateTime is not installed ====================================================================== SKIPPED: test_ticks2datetime_before_1900 (unittest_date.MxDateTC) mx.DateTime is not installed ====================================================================== SKIPPED: test_ustrftime_before_1900 (unittest_date.MxDateTC) mx.DateTime is not installed ======================== unittest_pytest.py ======================== .. ========================= unittest_tree.py ========================= ........................ ====================== unittest_shellutils.py ====================== ....................... ===================== unittest_deprecation.py ====================== .... ====================== unittest_changelog.py ======================= . ======================= unittest_umessage.py ======================= E/tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:540: ResourceWarning: unclosed file return False EEE ====================================================================== ERROR: test_decode_QP (unittest_umessage.UMessageTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/test/unittest_umessage.py", line 30, in setUp msg1 = email.message_from_file(open(join(DATA, 'test1.msg'))) File "/usr/lib/python3.2/email/__init__.py", line 56, in message_from_file return Parser(*args, **kws).parse(fp) File "/usr/lib/python3.2/email/parser.py", line 68, in parse data = fp.read(8192) File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 893: ordinal not in range(128) no stdout no stderr ====================================================================== ERROR: test_get_all (unittest_umessage.UMessageTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/test/unittest_umessage.py", line 30, in setUp msg1 = email.message_from_file(open(join(DATA, 'test1.msg'))) File "/usr/lib/python3.2/email/__init__.py", line 56, in message_from_file return Parser(*args, **kws).parse(fp) File "/usr/lib/python3.2/email/parser.py", line 68, in parse data = fp.read(8192) File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 893: ordinal not in range(128) no stdout no stderr ====================================================================== ERROR: test_get_payload_no_multi (unittest_umessage.UMessageTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/test/unittest_umessage.py", line 30, in setUp msg1 = email.message_from_file(open(join(DATA, 'test1.msg'))) File "/usr/lib/python3.2/email/__init__.py", line 56, in message_from_file return Parser(*args, **kws).parse(fp) File "/usr/lib/python3.2/email/parser.py", line 68, in parse data = fp.read(8192) File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 893: ordinal not in range(128) no stdout no stderr ====================================================================== ERROR: test_get_subject (unittest_umessage.UMessageTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/test/unittest_umessage.py", line 30, in setUp msg1 = email.message_from_file(open(join(DATA, 'test1.msg'))) File "/usr/lib/python3.2/email/__init__.py", line 56, in message_from_file return Parser(*args, **kws).parse(fp) File "/usr/lib/python3.2/email/parser.py", line 68, in parse data = fp.read(8192) File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 893: ordinal not in range(128) no stdout no stderr ==================== unittest_configuration.py ===================== ............. ======================= unittest_modutils.py ======================= /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/modutils.py:554: ResourceWarning: unclosed file mtype, mp_filename = _module_file(modpath, path) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/modutils.py:354: ResourceWarning: unclosed file return '.'.join(parts[:i]) ............./tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/modutils.py:550: ResourceWarning: unclosed file mtype, mp_filename = _module_file(modpath, [context]) ..unittest_modutils.py:262: ResourceWarning: unclosed file m = modutils.load_module_from_modpath(['logilab', 'common', 'fileutils']) ..../tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/modutils.py:532: ResourceWarning: unclosed file find_module(modname.split('.')[0], [from_file]) ................ ======================= unittest_xmlutils.py ======================= ..... ======================== unittest_cache.py ========================= /usr/lib/python3.2/unittest/case.py:966: DeprecationWarning: assertSameElements is deprecated DeprecationWarning) ........ ==================== unittest_ureports_text.py ===================== ....... ====================== unittest_taskqueue.py ======================= ..... ======================== unittest_graph.py ========================= .............. ======================== unittest_table.py ========================= ..................................... ====================== unittest_textutils.py ======================= ......................................... ====================== unittest_fileutils.py ======================= ......unittest_fileutils.py:56: ResourceWarning: unclosed file data = open(NEWLINES_TXT, 'U').read() .... ====================== unittest_interface.py ======================= ..... ======================= unittest_testlib.py ======================== ........./tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:646: DeprecationWarning: Please use assertTrue instead. testfunc(*args, **kwargs) ...........S........................................................unittest_testlib.py:149: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.assertDirEqual(ed1, ed2) unittest_testlib.py:150: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.assertDirEqual(ref, ref) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:1059: DeprecationWarning: Non-standard: please copy test method to your TestCase class osp.join(path_b, ipath_b, ifiles_b[index])) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:998: DeprecationWarning: Non-standard: please copy test method to your TestCase class msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) unittest_testlib.py:151: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.assertDirEqual( ref, same) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:1150: DeprecationWarning: Non-standard: please copy test method to your TestCase class callableObj(*args, **kwargs) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) unittest_testlib.py:156: ResourceWarning: unclosed file self.assertRaises(AssertionError, self.assertDirEqual, ref, content_differ) unittest_testlib.py:156: ResourceWarning: unclosed file self.assertRaises(AssertionError, self.assertDirEqual, ref, content_differ) ..unittest_testlib.py:134: ResourceWarning: unclosed file self.assertRaises(AssertionError, self.tc.assertFileEqual, foo, spam) unittest_testlib.py:134: ResourceWarning: unclosed file self.assertRaises(AssertionError, self.tc.assertFileEqual, foo, spam) unittest_testlib.py:135: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.tc.assertFileEqual(foo, foo) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:998: ResourceWarning: unclosed file msg_prefix='Files differs\n-:%s\n+:%s\n'%(fname1, fname2)) .........unittest_testlib.py:162: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.tc.assertStreamEqual(stream1, stream1) unittest_testlib.py:163: ResourceWarning: unclosed file stream1 = open(foo) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:646: ResourceWarning: unclosed file testfunc(*args, **kwargs) /tmp/buildd/logilab-common-0.58.3/build/lib/logilab/common/testlib.py:646: ResourceWarning: unclosed file testfunc(*args, **kwargs) .unittest_testlib.py:182: ResourceWarning: unclosed file text1 = open(foo).read() unittest_testlib.py:185: ResourceWarning: unclosed file text2 = open(spam).read() .unittest_testlib.py:119: DeprecationWarning: Non-standard: please copy test method to your TestCase class self.tc.assertXMLStringWellFormed(valid) ... ====================================================================== SKIPPED: test_tagged_class (unittest_testlib.TagTC) fix me for py3k ==================== unittest_ureports_html.py ===================== ....... ======================== unittest_compat.py ======================== .... ======================= unittest_registry.py ======================= .......... ******************************************************************************* Ran 408 test cases in 11.38s (0.37s CPU), 5 errors, 1 failures, 23 skipped 21 modules OK (2 failed) Version 0.58.2 -------------- :publication date: 2012/07/30 :expected date: n/a Ticket #100935 [modutils] wrong parent class found in the mro leads to crash on super call [open] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 1.000 :state: resolved found in cubicweb: File "\\nl1grp1.melinda.local\PYL001A\Labo\Pagode\cubicweb\web\controller.py", line 170, in _return_to_original_view self._edited_entity.cw_clear_all_caches() File "\\nl1grp1.melinda.local\PYL001A\Labo\Pagode\cubes\timeseries\entities\abstract.py", line 21, in cw_clear_all_caches super(AbstractTSMixin, self).cw_clear_all_caches() TypeError: super(type, obj): obj must be an instance or subtype of type Ticket #100757 modutils.modpath_from_file function is broken ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending It makes stuff like cubicweb-ctl, when installed using debian packaged, fail like:: ERROR:cubicweb.configuration:could not import the command provider server/serverctl.py: Unable to find module for /usr/lib/python2.7/dist-packages/cubicweb/server/serverctl.py in /usr/share/cubicweb, /usr/bin, /usr/lib/python2.7, /usr/lib/python2.7/plat-linux2, /usr/lib/python2.7/lib-tk, /usr/lib/python2.7/lib-old, /usr/lib/python2.7/lib-dynload, /usr/local/lib/python2.7/dist-packages, /usr/lib/python2.7/dist-packages, /usr/lib/python2.7/dist-packages/PIL, /usr/lib/pymodules/python2.7 CubicWeb 3.15.1 (system mode) This is dur to the test (line 241):: if path.startswith(EXT_LIB_DIR): continue which prevent from loading ``/usr/lib/python2.7/dist-packages/cubicweb/server/serverctl.py``, since ``EXT_LIB_DIR`` is ``/usr/lib/python2.7/dist-packages/`` Version 0.58.1 -------------- :publication date: 2012/07/18 :expected date: n/a Ticket #99493 Make modutils module compatible with other implementations of Python (like Jython) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending Currently modutils module is not compatible with Jython, as it used distutils.get_config_var for computing STDLIB_DIR, which is dependent on the implementation. As STDLIB_DIR is only used in function is_standard_module, we should see if another implementation of is_standard_module is possible which works on all implementations of Python. Ticket #99627 Make testlib module compatible with other python flavours ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending Testlib module currently use __builtins__, this is considered to be an implementation detail, and it's generally recommended to only use the 'builtins' object. Ticket #98527 running pylint with ironpython ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending In order to run pylint under ironpython small modification is required in modutils.py --- logilab-common-0.58.0/modutils.py 2012-04-12 13:57:30.000000000 +0200 +++ c:/github/ironlangs/bin/Debug/Lib/site-packages/logilab/common/modutils.py 2012-06-05 12:09:56.921216800 +0200 @@ -50,7 +50,7 @@ # # :see: `Problems with /usr/lib64 builds `_ # :see: `FHS `_ -if sys.platform.startswith('win'): +if sys.platform.startswith('win') or sys.platform.startswith('cli'): PY_SOURCE_EXTS = ('py', 'pyw') PY_COMPILED_EXTS = ('dll', 'pyd') STD_LIB_DIR = get_python_lib(standard_lib=1) Steps to reproduce: - Install ironpython 2.7.3a3 - Install logilab-common, logilab-astng, pylint - Try to pylint something, the following error is reported: Traceback (most recent call last): File "p.py", line 3, in File "c:\github\ironlangs\bin\Debug\Lib\site-packages\pylint\lint.py", line 31, in File "c:\github\ironlangs\bin\Debug\Lib\site-packages\pylint\checkers\__init__.py", line 44, in File "c:\github\ironlangs\bin\Debug\Lib\site-packages\logilab\astng\__init__.py", line 58, in File "c:\github\ironlangs\bin\Debug\Lib\site-packages\logilab\astng\nodes.py", line 50, in File "c:\github\ironlangs\bin\Debug\Lib\site-packages\logilab\astng\scoped_nodes.py", line 45, in File "c:\github\ironlangs\bin\Debug\Lib\site-packages\logilab\astng\manager.py", line 31, in File "c:\github\ironlangs\bin\Debug\Lib\site-packages\logilab\common\modutils.py", line 61, in File "c:\github\ironlangs\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\ntpath.py", line 96, in join TypeError: len() of unsized object Version 0.58.0 -------------- :publication date: 2012/04/12 :expected date: n/a Ticket #88981 Add argments to shellutils.ProgressBar.update ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: validation pending Add arguments to update the progressbar to more than 1 step. It shall also be useful to allow to specify an absolute value. This will allow to write something like: .. sourcecode:: python downloader = Downloader() progress_bar = ProgressBar(download.total) while not downloader.finished: downloader.fetch_more() progress_bar.update(downloader.status, absolute=True) Ticket #84654 backport cw's registry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: validation pending Ticket #88942 DeprecatedProxy class ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: validation pending that would warn on attribute access Version 0.57.2 -------------- :publication date: 2012/03/26 :expected date: n/a Ticket #88808 No Error/Exception is raised when there is a wrong input in 'textutils.apply_units' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: validation pending Try with any character which does not correspond to '20s', '30min', '24h' or '3d' (time units example):: >>> apply_units('mama', TIME_UNITS) 0.0 Ticket #84159 lgc.testlib uses sys.exit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending lgc.testlib uses sys.exit when unittest2 is not found. This is evil and an ImportError must be raised instead. Version 0.57.1 -------------- :publication date: 2011/10/28 :expected date: n/a Ticket #81297 daemon should reset HOME ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending when dropping privileges we should set $HOME to the new user's home directory. (possibly also reset $PATH to drop the sbin dirs?) Ticket #79268 python3: monkeypatch failure with bound method ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending From: Arfrever Frehtes Taifersar Arahesis Date: Wed, 19 Oct 2011 12:56:08 +0200 Fix added in :changeset:a5fc783ebbfb isn't sufficient. `method_type()` cannot support bound method monkeypatching (only class will be used by constructor). .. sourcecode:: python --- a/compat.py +++ b/compat.py @@ -61,11 +61,11 @@ except AttributeError: # See also http://bugs.python.org/issue11776 if sys.version_info[0] == 3: def method_type(callable, instance, klass): - return types.MethodType(callable, klass) + return types.MethodType(callable, instance or klass()) else: # alias types otherwise method_type = types.MethodType Traceback:: unhandled exception occurred while testing unittest_ureports_html Traceback (most recent call last): File "/tmp/logilab-common-0.57.0/usr/lib64/python3.2/site-packages/logilab/common/pytest.py", line 11 29, in _ts_wrapped_run test._wrapped_run(result, debug, runcondition=runcondition, options=options) File "/tmp/logilab-common-0.57.0/usr/lib64/python3.2/site-packages/logilab/common/pytest.py", line 11 20, in _ts_wrapped_run self._handleModuleFixture(test, result) File "/tmp/logilab-common-0.57.0/usr/lib64/python3.2/site-packages/logilab/common/testlib.py", line 3 75, in _handleModuleFixture previousModule = self._get_previous_module(result) TypeError: _get_previous_module() takes exactly 2 arguments (1 given) Comments :: On 2011/10/19 14:07 - acampeas wrote : I'am asking: WHO is currently using lgc with python 3 and FOR WHAT ? Genuine question. This is a user survey. You can even skip the WHO part. > On 2011/10/19 14:22 - anon wrote : > logilab-common is used by pylint, which can be used to analyze Python-3-only > code. Version 0.57.0 -------------- :publication date: 2011/10/12 :expected date: n/a Ticket #75968 pidfiles are created with restrictive permissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending see https://www.cubicweb.org/ticket/1910818 Ticket #76068 pkginfo: only install unittest2 when python version < 2.7 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending Comments :: On 2011/09/24 06:05 - anon wrote : The correct check would be: if sys.version_info < (2, 7) or sys.version_info >= (3, 0) and sys.version_info < (3, 2): > On 2011/09/26 08:44 - Unknown author wrote : > Logilab doesn't want to support dead versions of python 3. Ticket #77648 provide a "cachedproperty" decorator ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: done The pyramid_ project provides a convenience ``reify`` decorator. Mercurial provides something very similar. I think it would be a nice replacement for our ``@property @cached``. It works by simply putting the result of the method in the instance's dict : simple and efficient IMO. .. _pyramid: https://docs.pylonsproject.org/docs/pyramid.html Ticket #75290 regression in support for Python 3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending logilab.common.decorators.monkeypatch() of logilab-common 0.56.1 was working correctly in Python 3. logilab.common.decorators.monkeypatch() of logilab-common 0.56.2 fails with Python 3 and breaks whole test suite:: Traceback (most recent call last): File "/var/tmp/portage/dev-python/logilab-common-0.56.2/temp/test-3.2/usr/bin/pytest", line 3, in from logilab.common.pytest import run File "/var/tmp/portage/dev-python/logilab-common-0.56.2/temp/test-3.2/usr/lib64/python3.2/site-packages/logilab/common/pytest.py", line 124, in from logilab.common import testlib, STD_BLACKLIST File "/var/tmp/portage/dev-python/logilab-common-0.56.2/temp/test-3.2/usr/lib64/python3.2/site-packages/logilab/common/testlib.py", line 346, in @monkeypatch(unittest.TestSuite) File "/var/tmp/portage/dev-python/logilab-common-0.56.2/temp/test-3.2/usr/lib64/python3.2/site-packages/logilab/common/decorators.py", line 238, in decorator setattr(klass, name, types.MethodType(func, None, klass)) TypeError: method expected 2 arguments, got 3 reported in http://lists.logilab.org/pipermail/python-projects/2011-September/003066.html Comments :: On 2011/09/09 15:48 - anon wrote : I wanted to post on the patch page but got an error (tuple index out of range), so here it is: A few remarks: - PEP recommends using an underscore instead of mutilating names (e.g. class_ or cls and not klass). For your kallable function, you can name it callable and use __builtin__.callable in its code, or name it _callable (it’s private to the module if I read correctly). - The callable builtin is back in 3.2, FYI. - You could put the version check around the function definition, to have the check at import time rather than runtime: if sys.version_info[0] == 3: def etc. else: def etc. —merwok > On 2011/09/09 16:02 - Unknown author wrote : > maybe "isinstance(x, collections.Callable)" which can be less painful during > the 2to3 conversion.. > On 2011/09/15 16:17 - Unknown author wrote : > I made new version of the patch from your remarks. Thanks. > On 2011/09/19 10:14 - acampeas wrote : > I know that callable is back in 3.2 but unfortunately we have to support at > least 3.1 (or whatever is in debian stable). On 2011/09/21 10:04 - acampeas wrote : Now, I'd very much like to know what for is used logilab.common wrt python 3 ... (this is for sure not coming from logilab and imo a bit unexpected). On 2011/09/24 06:17 - anon wrote : There is a typo in a comment in compat.py: "builti-in" > On 2011/09/26 09:38 - Unknown author wrote : > Arg, thanks for your sharp eyes anon. Bad vim-typing there. On 2011/09/30 16:59 - anon wrote : Apparently there is still another regression: Traceback (most recent call last): File "/tmp/logilab_common/usr/lib64/python3.2/site-packages/logilab/common/pytest.py", line 1129, in _ts_wrapped_run test._wrapped_run(result, debug, runcondition=runcondition, options=options) File "/tmp/logilab_common/usr/lib64/python3.2/site-packages/logilab/common/pytest.py", line 1120, in _ts_wrapped_run self._handleModuleFixture(test, result) File "/tmp/logilab_common/usr/lib64/python3.2/site-packages/logilab/common/testlib.py", line 375, in _handleModuleFixture previousModule = self._get_previous_module(result) TypeError: _get_previous_module() takes exactly 2 arguments (1 given) Version 0.56.2 -------------- :publication date: 2011/09/08 :expected date: n/a Ticket #74173 daemonize doesn't fully drop privileges ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending lgc.daemonize optionally calls setuid() to drop privileges but doesn't change group IDs. Ticket #73920 [decorator] monkeypatch should produce a method object ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: resolved Right now it is content to setattr the function object given as argument and everything works fine. Unless we use some piece of code who makes a distinction between function and methods (Cython comes to the mind). Version 0.56.1 -------------- :publication date: 2011/08/05 :expected date: n/a Ticket #72450 clcommands: --rc-file option doesn't work ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending clcommands adds a --rc-file option to be specified before the command, but then proceeds to try and run a "--rc-file" command instead of moving on to the next argument to get it. Version 0.56.0 -------------- :publication date: 2011/06/10 :expected date: n/a Ticket #68490 clcommands: make registration possible by class decoration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: validation pending Ticket #68466 date: new datetime/delta <-> seconds/days conversion function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: validation pending Ticket #68463 refactor @cached to allow usages such as @cached(cacheattr='_cachename') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: validation pending bw compat should be kept though Version 0.55.2 -------------- :publication date: 2011/04/01 :expected date: n/a Ticket #63998 pyro_ext: allow to create a server without registering with a pyro ns ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.300 :state: validation pending used by https://www.cubicweb.org/ticket/1528533 Comments :: On 2011/03/25 17:40 - Unknown author wrote : patch ready for review at https://www.logilab.org/patch/64004 On 2011/04/01 15:18 - Unknown author wrote : How to use it ? Only setting pyro-server=yes is now sufficient to have a server ? How can I access from backend script for example ? > On 2011/04/01 16:57 - Unknown author wrote : > use the source luke :-) > > set pyro-server=yes and set pyro-ns-name=NO_PYRONS : this will create a pyro > server for the repository, which will not be registered in a pyro nameserver. > How you get access to that server is your problem. :-) > > Seriously, though, the PYROLOC uri of the server is available in the > repository.pyro_uri attribute. We use this attribute in pylos to pass it to > commands which will need to connect to the repository. We also store it in the > DB as attribute of Worker entities so that instances sharing a DB can know the > pyro uri of the workers and delegate tasks to them. Ticket #64827 simple password generation function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: validation pending shellutils.generate_password Version 0.55.1 -------------- :publication date: 2011/03/28 :expected date: n/a Ticket #64028 date.ustrftime breaks if year <= 1900 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: validation pending When trying to ustrftime(date) with date.year <= 1900, it breaks. Also fix conversion from ticks to datetime, please. Ticket #62603 graph.py incorrectly builds command lines using %s to call dot ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending this breaks if e.g. there are some spaces in the paths / filenames See http://www.logilab.org/blogentry/20469 for more info Ticket #63174 [windows] pytest crash because HOME is not there ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: resolved C:\data\workspace\Pylos\cubes\pagode\test>pytest -xi test_import_export.py RoundTripTC ====================== test_import_export.py ======================= Building pylos-import-mixin-db for database tmpdb -> creating tables [....................] -> inserting default user and default groups. -> storing the schema in the database [................... ] C:\data\workspace\Pylos\logilab\database\fti.py:53: DeprecationWarning: ignorenonascii is deprecated, use substitute named parameter instead word = unormalize(word.lower(), ignorenonascii=True) -> database for instance data initialized. import mixin setup database start import commit import exporting exported comparing Cannot create new sheet in a read-only workbook Cannot create new sheet in a read-only workbook Cannot create new sheet in a read-only workbook Cannot create new sheet in a read-only workbook Cannot create new sheet in a read-only workbook Cannot create new sheet in a read-only workbook Cannot create new sheet in a read-only workbook Cannot create new sheet in a read-only workbook Cannot create new sheet in a read-only workbook Cannot create new sheet in a read-only workbook Cannot create new sheet in a read-only workbook Funhandled exception occurred while testing test_import_export Traceback (most recent call last): File "C:\data\workspace\Pylos\logilab\common\pytest.py", line 428, in testfile options=self.options, outstream=sys.stderr) File "C:\data\workspace\Pylos\logilab\common\pytest.py", line 764, in __init__ testLoader=NonStrictTestLoader()) File "C:\data\workspace\Pylos\unittest2\main.py", line 98, in __init__ self.runTests() File "C:\data\workspace\Pylos\logilab\common\pytest.py", line 827, in runTests return self._runTests() File "C:\data\workspace\Pylos\logilab\common\pytest.py", line 872, in _runTests result = self.testRunner.run(self.test) File "C:\data\workspace\Pylos\logilab\common\pytest.py", line 955, in run test(result, runcondition=self._runcondition, options=self.options) File "C:\data\workspace\Pylos\unittest2\suite.py", line 64, in __call__ return self.run(*args, **kwds) File "C:\data\workspace\Pylos\logilab\common\pytest.py", line 1109, in _ts_run self._wrapped_run(result,runcondition=runcondition, options=options) File "C:\data\workspace\Pylos\logilab\common\pytest.py", line 1134, in _ts_wrapped_run test(result, runcondition, options) File "C:\data\workspace\Pylos\logilab\common\testlib.py", line 574, in __call__ status = self._proceed(result, testMethod) File "C:\data\workspace\Pylos\logilab\common\testlib.py", line 646, in _proceed result.addFailure(self, self.__exc_info()) File "C:\data\workspace\Pylos\logilab\common\testlib.py", line 307, in addFailure self._create_pdb(descr, 'fail') File "C:\data\workspace\Pylos\logilab\common\testlib.py", line 242, in _create_pdb self.debuggers.append(self.pdbclass(sys.exc_info()[2])) File "C:\data\workspace\Pylos\logilab\common\debugger.py", line 101, in __init__ self._histfile = osp.join(os.environ["HOME"], ".pdbhist") File "C:\Python26\lib\os.py", line 423, in __getitem__ return self.data[key.upper()] KeyError: 'HOME' ******************************************************************************* Ran 1 test cases in 0.00s (0.00s CPU), 1 errors 0 modules OK (1 failed) Comments :: On 2011/03/09 14:51 - Unknown author wrote : waiting for patch review :eid:`63188` > On 2011/03/09 15:39 - sthenault wrote : > à la place tu peux utiliser la relation "Patch patch_ticket Ticket" Version 0.55.0 -------------- :publication date: 2011/02/18 :expected date: n/a Ticket #60288 broken graph.ordered_nodes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved with a graph such as {'a':[], 'b':[]} then function will loop endlessly. Comments :: On 2011/02/08 16:12 - Unknown author wrote : the new implementation returns elements in reverse order from the previous implementation (and this breaks cubiweb.cwconfig.CubicWebNoAppConfigurationreorder_cubes). Additionnally, if I call ordered_nodes twice on the same graph, the second call returns an empty tuple, which is quite unexpected (but consistent with the previous implementation, so you could argue this is bug-compatible) On 2011/02/09 11:18 - nchauvat wrote : logilab.common.ordered_nodes() does not return a graph. you are not supposed to call ordered_nodes() passing the result of ordered_nodes() as an argument. regarding {'a':[], 'b':[]} it is tested by http://hg.logilab.org/logilab/common/file/22b5fb5de9f7/test/unittest_graph.py#l56 and the test passes. What version are you using ? Ticket #62439 provide urllib extension to handle GSSAPI ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.300 :state: validation pending Version 0.54.0 -------------- :publication date: 2011/01/13 :expected date: n/a Ticket #51219 pytest: InnerTest masked by pattern usage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending Due to separation between pytest and testlib, InnerTest could now be masked accidentally. Hint: possible fix is to change pattern on the fly but not sure this use case is really widespread used. See `test/unittest_testlib.py test_inner_tests_selection` for details Comments :: On 2010/11/18 21:15 - sthenault wrote : should'nt InnerTest simply go away as we move to unittest2 own generative test feature ? > On 2010/11/19 09:32 - Unknown author wrote : > Plugin branch of unittest2 isn't stable enough to revamp our generative system > today. And the development of the whole branch seems to slow down since > several months: > > http://hg.python.org/unittest2/shortlog/67d08c1573ea > > The concerned plugin is the `moduleloading` plugin (not retested): > > http://hg.python.org/unittest2/rev/939422cbdb7b > > I'm afraid of InnerTest will survive 2010... Ticket #19129 --color broken on multi-line statement ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: rejected the IPython colorizer failed to parse partial of multi-line statement that may occurs in test failure traceback. Red error statement are inserted Ticket #8967 modutils _xmlplus detection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: rejected detected by launching pylint on a module using xml.etree result is the same whether pyxml is installed or not. Good:: >>> print xml.__path__ ['/usr/lib/python2.5/xml'] >>> print xml.etree.__path__ ['/usr/lib/python2.5/xml/etree'] >>> print xml.etree.__file__ /usr/lib/python2.5/xml/etree/__init__.pyc Bad:: >>> print xml.__path__ ['/usr/lib/python2.5/site-packages/_xmlplus', '/usr/lib/python2.5/xml'] >>> print xml.etree.__path__ ['/usr/lib/python2.5/xml/etree'] >>> print xml.etree.__file__ /usr/lib/python2.5/xml/etree/__init__.pyc Ticket #46102 pytest does not execute all doctests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: deprecated running pytest on test/unittest_fileutils.py, we find 12 tests; 2 are doctests, however the doctest for abspath_listdir (l.66) is not executed: neither on py2.x nor on py3.x. If we copy the content of the doctest to first_level_directory, it will be executed. (it yields an expected error message: abspath_listdir('/home') is not ['/home/adim', '/home/alf', '/home/arthur', '/home/auc']) Comments :: On 2010/09/16 12:11 - eanclin wrote : another doctest that is not executed by pytest is the docstring of the configuration module On 2010/09/16 19:17 - Unknown author wrote : Are you sure to have commented the skipped attribute ? Works well here. :: unittest_fileutils.py-class ModuleDocTest(DocTest): unittest_fileutils.py- """relative_path embed tests in docstring""" unittest_fileutils.py- from logilab.common import fileutils as module unittest_fileutils.py: skipped = ('abspath_listdir',) Ticket #51957 remove FDCapture from testlib.py and check tests for py3k ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: task :load: 2.000 :state: validation pending remove deprecated FDCapture from testlib.py; then check unittest_testlib for python3. For now, Pytest crashes on unittest_testlib because of it, so we are not sure if it is py3k compatible; of course, since we used it intensively in our test suites for testing the py3k versions of lgc, astng and pylint, it is expected to be all fine Ticket #47377 [unittest2] generative/paramaterized tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 2.000 :state: validation pending chain of generative (yielded) tests seems broken when one test fail. check plugin branch: http://answerpot.com/showthread.php?828744-Current+unittest2+plugins%3A+including+test+generators Ticket #47380 [unittest2] migrate to new setup/teardown module/class ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.000 :state: validation pending We should depreciate related testlib code in favor of new mechanism. Ticket #18966 weird behaviour of lgc.date.nb_open_days() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: validation pending # I comment here since I cannot create tickets. # The bug: # logilab.common.date.nb_open_days() is broken # How to reproduce:: from datetime import datetime from logilab.common.date import nb_open_days date = datetime(2009, 11, 22, 0, 0, 0, 0) # Sunday print nb_open_days(date, date) # -1 date1 = datetime(2009, 11, 29, 0, 0, 0, 0) # Sunday date2 = datetime(2009, 11, 30, 0, 0, 0, 0) # Sunday + 1 print nb_open_days(date1, date2) # -1 date1 = datetime(2009, 12, 31, 0, 0, 0, 0) # not a working day date2 = datetime(2010, 1, 1, 0, 0, 0, 0) # happy new year and not a working day print nb_open_days(date1, date2) # 1 Ticket #9384 adapt to unittest2 / discover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 5.000 :state: validation pending It looks like http://pypi.python.org/pypi/discover will be part of the stdlib for python2.7 and python3.2. I suppose that would deprecate logilab.common.testlib's own test discovery mechanism. Comments :: On 2010/03/09 14:48 - adimascio wrote : http://pypi.python.org/pypi/unittest2 is the new unittest implementation, available for python2.7 and python3.2 and usable as a standalone module for prior versions. On 2010/09/28 12:29 - sthenault wrote : lgc 0.52 started unittest2 integration, on the path before removal... Ticket #6509 new options without [yn] in contradiction with option names ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: deprecated w options without [yn] in are contradiction with option names and option help messages; example:: pylint --help [...] -r, --reports Tells wether to display a full report or only the messages [current: yes] but:: pylint --reports disables the reports ! also, the ancient use '-yn' is broken ... Comments :: On 2008/11/06 09:49 - Unknown author wrote : The traditionnal way of handling these options is to use --no-reports to replace --report n and to keep --reports to mean --reports y. Using the presence of the option to toggle the value is confusing. On 2008/11/11 01:40 - anon wrote : The =[yn] syntax should still be supported for compatibility reasons, to avoid breaking fex Eclipse+pydev usage of pylint. On 2008/11/14 12:06 - nchauvat wrote : I am backing out 692:8c66ea05839d to return to the previous behavior. Next time we will do it right. Ticket #19647 support python3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 3.000 :state: validation pending required to be able to run pylint on python3 Version 0.53.0 -------------- minimal python3 support :publication date: 2010/11/15 :expected date: n/a Ticket #51201 minimal python3 support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: task :load: 1.000 :state: validation pending Version 0.52.1 -------------- :publication date: 2010/10/14 :expected date: n/a Ticket #48782 configuration: unicode option name breaks with python2.5 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: validation pending py2.5 optparse doesn't like that Ticket #48785 modutils: Consider arch-specific installation for STD_LIB_DIR definition ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: validation pending as proposed on the python-projects mailing list Ticket #48787 textutils: text_to_dict don't skip comments (# lines) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: validation pending Version 0.52.0 -------------- :publication date: 2010/09/28 :expected date: n/a Ticket #46800 makes testlib/pytest works with unittest2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 2.000 :state: resolved and start deprecating things so we can get rid of them at some point Ticket #46803 restore minimal 2.3 compat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved minimal == being able to run pylint Version 0.51.1 -------------- :publication date: 2010/09/13 :expected date: n/a Ticket #38563 clcommands fixes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved Ticket #38566 logging_ext:: init_log should be splitted in smaller chunks to ease reuse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved Version 0.51.0 -------------- :publication date: 2010/08/26 :expected date: n/a Ticket #38194 cleanup clcommands api and deprecate optparser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: resolved Ticket #38197 minor api enhancements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: resolved * hg: new module regrouping some mercurial utility functions * textutils: new split_url_or_path and text_to_dict functions * logging_ext: - init_log now accept optionaly any arbitrary handler - threshold default to DEBUG if debug flag is true and no threshold specified * date: new ustrftime implementation working around datetime limitaion on dates < 1900 Ticket #9044 short documentation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved Add a short list to describe briefly each module of logilab.common (description list generated by epydoc for instance). Ticket #35331 String exception removed from Python >= 2.6 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved Hello, in Python versions >= 2.6, string exceptions have been removed. In logilab-common there is one of them you might want to address: testlib.py: raise "Error while reading \ This comes from a rather fast check, you might also want to give it a deeper look. Thanks in advance, Sandro Ticket #7131 update daemon.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.300 :state: resolved update options handling, logging and refactor to be usable by apycotbot/server.py and cubicweb/server/server.py at least (and check its usage in other active projects) Version 0.50.3 -------------- :publication date: 2010/06/07 :expected date: n/a Ticket #33180 0.50.2 - test suite fails ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved the test suite fails for 0.50.2 with these errors: ==================== unittest_configuration.py ===================== .........E... ====================================================================== ERROR: test_manpage (unittest_configuration.ConfigurationTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.50.2/test/unittest_configuration.py", line 292, in test_manpage self.cfg.generate_manpage(__pkginfo__, stream=StringIO()) File "/home/morph/deb/build-area/logilab-common-0.50.2/build/lib/logilab/common/configuration.py", line 576, in generate_manpage section, stream=stream or sys.stdout) File "/home/morph/deb/build-area/logilab-common-0.50.2/build/lib/logilab/common/optik_ext.py", line 377, in generate_manpage print >> stream, formatter.format_head(optparser, pkginfo, section) File "/home/morph/deb/build-area/logilab-common-0.50.2/build/lib/logilab/common/optik_ext.py", line 320, in format_head short_desc = self.format_short_description(pgm, pkginfo.short_desc) AttributeError: 'module' object has no attribute 'short_desc' ===================== unittest_deprecation.py ====================== ...E ====================================================================== ERROR: test_moved (unittest_deprecation.RawInputTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/morph/deb/build-area/logilab-common-0.50.2/test/unittest_deprecation.py", line 73, in test_moved any_func() File "/home/morph/deb/build-area/logilab-common-0.50.2/build/lib/logilab/common/deprecation.py", line 113, in callnew m = load_module_from_name(modpath) File "/home/morph/deb/build-area/logilab-common-0.50.2/build/lib/logilab/common/modutils.py", line 113, in load_module_from_name return load_module_from_modpath(dotted_name.split('.'), path, use_sys) File "/home/morph/deb/build-area/logilab-common-0.50.2/build/lib/logilab/common/modutils.py", line 152, in load_module_from_modpath mp_file, mp_filename, mp_desc = find_module(part, path) ImportError: No module named test It would be extra cool if you could provide a patch to apply against 0.50.2 so that I can upload the debian package (I'm currently waiting since this failure). Else, a .3 release might be nice aswell :) Regards, Sandro Comments :: On 2010/06/04 16:10 - stosi wrote : the commit 1150:d347bb3985e4 fixes the "AttributeError: 'module' object has no attribute 'short_desc'" but not the "ImportError: No module named test " error > On 2010/06/04 16:56 - nchauvat wrote : > http://www.logilab.org/projectenvironment/logilab-common%20tests/quick shows > the test failures. On 2013/02/13 15:57 - idella4 wrote : curious about the status of resolve. 1 out of 2 makes for a resolution? I can take the one patch and commit it to portage, but I would'nt be closing the gentoo bug equivalent of this as closed. > On 2013/02/15 08:33 - sthenault wrote : > do you still have this pb running tests as of 0.59 ? Using which python > version then ? I don't reproduce it using py 2.7. Ticket #24332 add option splitlines to testlib.assertTextEquals ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved for the cases when it is useful. assertLinesEquals already has one. Ticket #33179 Test suite repeatably fail when run on 2010-05-24 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved logilab-common v0.50.1 and .2 When test suite is executed and date is 2010-05-24 (you can replicate changing the date of your machine) it fails with: ========================= unittest_date.py ========================= ..............F....................F..... ====================================================================== FAIL: test_open_days_now_now (unittest_date.DateTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/tmp/buildd/logilab-common-0.50.2/test/unittest_date.py", line 115, in test_open_days_now_now self.assertOpenDays(x, x, 0) File "/tmp/buildd/logilab-common-0.50.2/test/unittest_date.py", line 80, in assertOpenDays self.assertEquals(got, expected) File "/usr/lib/python2.5/unittest.py", line 334, in failUnlessEqual (msg or '%r != %r' % (first, second)) AssertionError: -1 != 0 ====================================================================== FAIL: test_open_days_now_now (unittest_date.MxDateTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/tmp/buildd/logilab-common-0.50.2/test/unittest_date.py", line 115, in test_open_days_now_now self.assertOpenDays(x, x, 0) File "/tmp/buildd/logilab-common-0.50.2/test/unittest_date.py", line 80, in assertOpenDays self.assertEquals(got, expected) File "/usr/lib/python2.5/unittest.py", line 334, in failUnlessEqual (msg or '%r != %r' % (first, second)) AssertionError: -1 != 0 I've tried to test with date set to 2010-05-25 (yesterday), 2010-05-26 (today), 2010-05-31 (the next monday), 2010-06-24 (the 24th day of the next month) but all of them were executed just fine. Regards, Sandro Version 0.50.2 -------------- :publication date: 2010/05/21 :expected date: n/a Ticket #32717 modutils: is_standard_module false negative ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved with from module import something where something is not a sub-module Ticket #24450 optik_ext import breaks optparse ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved after optik_ext is imported, some stuff is overridden in the optparse module and this breaks help generation of "normal" optparse scripts:: File "/usr/lib/python2.5/optparse.py", line 1617, in format_option_help result.append(OptionContainer.format_option_help(self, formatter)) File "/home/alf/cubicweb/logilab/common/optik_ext.py", line 277, in format_option_help if option.level <= outputlevel and not option.help is SUPPRESS_HELP: AttributeError: Option instance has no attribute 'level' Comments :: On 2010/05/18 02:19 - anon wrote : Same issue with paver and logilab_common-0.50.1:: $ paver help Traceback (most recent call last): File "../workspace/.buildout/eggs/Paver-1.0.2-py2.6.egg/paver/tasks.py", line 170, in _run_task return do_task() File "../workspace/.buildout/eggs/Paver-1.0.2-py2.6.egg/paver/tasks.py", line 167, in do_task return func(**kw) File "../workspace/.buildout/eggs/Paver-1.0.2-py2.6.egg/paver/tasks.py", line 543, in help help_function() File "/usr/lib/python2.6/optparse.py", line 1664, in print_help file.write(self.format_help().encode(encoding, "replace")) File "/usr/lib/python2.6/optparse.py", line 1644, in format_help result.append(self.format_option_help(formatter)) File "/usr/lib/python2.6/optparse.py", line 1624, in format_option_help result.append(OptionContainer.format_option_help(self, formatter)) File "../workspace/.buildout/eggs/logilab_common-0.50.1-py2.6.egg/logilab/common/optik_ext.py", line 264, in format_option_help if option.level <= outputlevel and not option.help is SUPPRESS_HELP: AttributeError: Option instance has no attribute 'level' On 2010/05/18 02:38 - anon wrote : Basic NOP ... in ./eggs/logilab_common-0.50.1-py2.6.egg/logilab/common/optik_ext.py Changed line 264 from:: if option.level <= outputlevel and not option.help is SUPPRESS_HELP: To:: if getattr(option,'level',0) <= outputlevel) and not option.help is SUPPRESS_HELP: On 2010/05/18 02:42 - anon wrote : Turns out afayolle already fixed this in http://www.logilab.org/cgi-bin/hgwebdir.cgi/logilab/common/rev/d706bd7eabcf . Any ETA on 0.50.2? Version 0.50.1 -------------- :publication date: 2010/04/26 :expected date: n/a Ticket #23809 fix debian packaging ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved - fix some packaging bugs on version detection - update Logilab's debian/rules from Debian files - change LICENSE to LGPL2 everywhere Version 0.50.0 -------------- bugfix :publication date: 2010/04/20 :expected date: n/a Ticket #23389 @cached decorator hides the original function's docstring ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved hence impairing sphinx ability to properly include them using autoclass/autoxxx directives Ticket #23467 configuration: support for multiple providers with the same name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved so we can split pylint checkers into smaller chunks Ticket #23465 graph: support for generating html map file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved Version 0.49.0 -------------- :publication date: 2010/03/17 :expected date: n/a Ticket #20987 "pytest -x" go to the next test directory when an error/failure is encountered ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.300 :state: resolved (when there are multiple test directories, such as in cw). It should stop on the first failure. Ticket #20403 reorganize (or maybe even split out) lgc.db and lgc.adbh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: resolved These two modules are growing, and they are starting to beg for a refactoring. I'd like to, when I get some time for this, turn them into a dbapi package (either a subpackage of lgc or a separate project), with separate modules for the different backends we support, so that navigation in the code becomes manageable. Comments :: On 2010/02/11 09:19 - Unknown author wrote : actually, this seems to be the scope of `logilab-database`_. I'll keep the code in logilab-common as this project is alive and logilab-database is not yet. .. _logilab-database: http://www.logilab.org/project/logilab-database On 2010/02/11 09:47 - sthenault wrote : +1 for logilab.db Version 0.48.1 -------------- :publication date: 2010/02/26 :expected date: n/a Ticket #20722 adbh: unable to specify db port on [backup|restore]_commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved Ticket #20847 fix date processing for SQLServer 2005 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved bug : datetime is a subclass of date, so isinstance was returning true for datetime instances (and we were losing the time part for all datetime attributes) Version 0.48.0 -------------- :publication date: 2010/02/17 :expected date: n/a Ticket #20651 fix logilab.common.date mxdatetime support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved recent changes broke mxdatetime compatibility Ticket #20648 generative test should not be interrupted by self.skip() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved Make it possible to skip a InnerTest-based generative test alone, without skipping the whole test. Decide later if innerSkip should replace skip or not. Ticket #20649 various logilab.common.db fixes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 5.000 :state: resolved Version 0.47.0 -------------- :publication date: 2010/02/10 :expected date: n/a Ticket #20322 adbh: new sql_rename_col method ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved since syntax differs accross dbms Ticket #20320 deprecation: deprecated now takes an optional 'stacklevel' argument, default to 2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: resolved Ticket #20318 get back date utility functions from cw ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved trying to make python datetime module usable in real world... Ticket #19687 support backup and restore with SQL Server ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: resolved update adbh.py to support backup and restore on SQLServer. Comments :: On 2010/01/18 16:16 - Unknown author wrote : a bit tricky since the interface is different: SqlServer uses TransactSQL for this rather than an external command. > On 2010/01/19 08:45 - Unknown author wrote : > actually, I was too fast in closing this one Version 0.46.1 -------------- :publication date: 2010/02/05 :expected date: n/a Version 0.46.0 -------------- :publication date: 2009/12/23 :expected date: n/a Ticket #19442 SQL Server support in logilab.common.db and adbh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 2.000 :state: resolved Use pyodbc to access SQLServer Version 0.45.2 -------------- :publication date: 2009/11/23 :expected date: n/a Ticket #18960 fix spelling mistakes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved http://lists.logilab.org/pipermail/python-projects/2009-November/002101.html Version 0.45.1 -------------- :publication date: 2009/10/07 :expected date: n/a Ticket #10065 add diff_colorize_ansi() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: resolved add diff_corolize_ansi(lines, lines) to logilab.common.textutils Ticket #18349 configuration: make Method usable as 'callback' value ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved Ticket #18347 configuration: proper bytes and time option types support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved Ticket #8849 Using plugins, options and .pylintrc crashes PyLint ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved Laurent reported on python-projects I am trying to create a plugin that declares its own options for use with the .pylintrc file. This only works when the plugin is auto-loaded from the pylint.checkers package. When the plugin is outside pylint.checkers (given by .pylintrc's load-plugins), I get the traceback:: Traceback (most recent call last): File "D:\Apps\Python26\lib\runpy.py", line 121, in _run_module_as_main "__main__", fname, loader, pkg_name) File "D:\Apps\Python26\lib\runpy.py", line 34, in _run_code exec code in run_globals File "D:\Apps\Python26\lib\site-packages\pylint-0.18.0-py2.6.egg\pylint\lint.py", line 932, in Run(sys.argv[1:]) File "D:\Apps\Python26\lib\site-packages\pylint-0.18.0-py2.6.egg\pylint\lint.py", line 854, in __init__ linter.load_plugin_modules(plugins) File "D:\Apps\Python26\lib\site-packages\pylint-0.18.0-py2.6.egg\pylint\lint.py", line 300, in load_plugin_modules module.register(self) File "custom.py", line 15, in register linter.register_checker(CustomChecker(linter)) File "D:\Apps\Python26\lib\site-packages\pylint-0.18.0-py2.6.egg\pylint\lint.py", line 346, in register_checker self.register_options_provider(checker) File "d:\apps\python26\lib\site-packages\logilab_common-0.39.0-py2.6.egg\logilab\common\configuration.py", line 385, in register_options_provider non_group_spec_options, provider) File "d:\apps\python26\lib\site-packages\logilab_common-0.39.0-py2.6.egg\logilab\common\configuration.py", line 403, in add_option_group self._config_parser.add_section(group_name) File "D:\Apps\Python26\lib\ConfigParser.py", line 245, in add_section raise DuplicateSectionError(section) ConfigParser.DuplicateSectionError: Section 'CUSTOMCHECK' already exists To recreate this configuration: 1. Create the module custom.py, in a package other than pylint.checkers 2. In this module, declare a checker with custom options: .. sourcecode:: python from pylint.checkers import BaseChecker from pylint.interfaces import IASTNGChecker class CustomChecker(BaseChecker): __implements__ = IASTNGChecker name = 'customcheck' priority = -1 options = ( ('custom', {'default': ('value', ), 'type': 'csv', 'metavar': '', 'help': 'Custom option' }), ) def register(linter): print 'Registering custom checker' linter.register_checker(CustomChecker(linter)) 3. Create a custom.pylintrc file, that uses, loads and declares the checker's section:: [MASTER] load-plugins=custom [MESSAGE CONTROL] enable-checker=customcheck [CUSTOMCHECK] custom=v1,v2 4. Launch PyLint:: python -m pylint.lint --rcfile=custom.pylintrc custom.py Analysis: This happens because, in lint.py, class Run, method __init__: a. Internal plugins are loaded (using linter.load_plugin_modules(self._plugins) b. The .pylintrc file is loaded (using linter.read_config_file(), this overrides already declared contents) c. External plugins are loaded (using linter.load_plugin_modules(plugins)). This last step fails, as logilab-common is trying to (re-)add a section that already exists in the config file, loaded in b. Version 0.45.0 -------------- :publication date: 2009/08/26 :expected date: n/a Ticket #10009 Add function for XML processing instruction parsing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: resolved This function already exists in the version of `pybill` currently in development. Version 0.44.0 -------------- :publication date: 2009/08/07 :expected date: n/a Ticket #9877 add a module to read dbf file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.000 :state: resolved dbf is a fox pro database format. Ticket #9864 shellutils: class RawInput to supersede confirm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved shellutils.confirm is too limited. implement RawInput. Ticket #6613 arguments of options are broken ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: rejected arguments of options are broken, seemlingly due by appling some lower() on the argument values; example pylint :: $ pylint --disable-checker=W0704 [...] Exception: no checker named w0704 this might be related to implementation of : #4993: [Category Name] may be case insensitive in configuration file Ticket #9606 pytest: wrong tb when error under assertRaises ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved :: syt@scorpius:~/src/fcubicweb/cubes/vcsfile/test$ pytest unittest_write.py error_new_file -x ======================== unittest_write.py ========================= E ====================================================================== ERROR: test_error_new_file (unittest_write.HGSourceWriteTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/syt/src/fcubicweb/cubes/vcsfile/test/unittest_write.py", line 185, in test_error_new_file {'repo': self.repoeid, 'dir': u'dir1', 'name': u'tutu.txt'}) TypeError: __init__() takes exactly 2 arguments (3 given) while the expected tb is:: syt@scorpius:~/src/fcubicweb/cubes/vcsfile/test$ pytest unittest_write.py error_new_file -x ======================== unittest_write.py ========================= E ====================================================================== ERROR: test_error_new_file (unittest_write.HGSourceWriteTC) ---------------------------------------------------------------------- Traceback (most recent call last) File "/home/syt/src/fcubicweb/cubes/vcsfile/test/unittest_write.py", line 184, in test_error_new_file 'WHERE R eid %(repo)s', {'repo': self.repoeid, 'dir': u'dir1', 'name': u'tutu.txt'}) File "/home/syt/src/logilab/common/pytest.py", line 168, in not_covered return func(*args, **kwargs) File "/home/syt/src/fcubicweb/cubicweb/devtools/apptest.py", line 131, in execute return self.env.execute(*args, **kwargs) File "/home/syt/src/fcubicweb/cubicweb/devtools/_apptest.py", line 160, in execute return self.cnx.cursor(req).execute(unicode(rql), args, eidkey) File "/home/syt/src/fcubicweb/cubicweb/dbapi.py", line 586, in execute parameters, eid_key, build_descr) File "/home/syt/src/fcubicweb/cubicweb/server/repository.py", line 592, in execute build_descr) File "/home/syt/src/fcubicweb/cubicweb/devtools/__init__.py", line 268, in new_execute rset = base_execute(*args, **kwargs) File "/home/syt/src/fcubicweb/cubicweb/server/querier.py", line 649, in execute results = plan.execute() File "/home/syt/src/fcubicweb/cubicweb/server/querier.py", line 161, in execute result = step.execute() File "/home/syt/src/fcubicweb/cubicweb/server/ssplanner.py", line 427, in execute result = self.plan.insert_entity_defs() File "/home/syt/src/fcubicweb/cubicweb/server/querier.py", line 492, in insert_entity_defs for edef in row]) File "/home/syt/src/fcubicweb/cubicweb/server/repository.py", line 998, in glob_add_entity self.hm.call_hooks('before_add_entity', etype, session, entity) File "/home/syt/src/fcubicweb/cubicweb/server/hooksmanager.py", line 112, in call_hooks hook(*args, **kwargs) File "/home/syt/src/fcubicweb/cubes/vcsfile/hooks.py", line 205, in call CheckVersionedFileOp(session, entity) TypeError: __init__() takes exactly 2 arguments (3 given) problem seems in testlib around: .. sourcecode:: python # count number of relevant levels in the traceback: skip first since # it's our own _proceed function, and then start counting, using # unittest's heuristic nb_frames_skipped = self._count_relevant_tb_levels(tb.tb_next) for index, (frame, filename, lineno, funcname, ctx, ctxindex) in enumerate(frames): if not (0 < index <= nb_frames_skipped): continue Version 0.43.0 -------------- :publication date: 2009/07/22 :expected date: n/a Ticket #9766 add dbf read support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: resolved Use dbf.py from http://www.physics.ox.ac.uk/users/santoso/Software.Repository.html and thank Yusdi Santoso. Ticket #9796 add shellutils.confirm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: resolved move cubicweb.toolsutils.confirm() to logilab.common.shellutils Ticket #9764 add title to shellutils.ProgressBar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: resolved add option title to ProgressBar so that it can print some text before the bar itself. Ticket #8130 ubuntu upgrade bug ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: rejected cf http://forum.ubuntu-fr.org/viewtopic.php?id=217871 Ticket #9143 remaining junk in site-packages after python-central to python-support migration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved .pyc files and buggy symlinks are left. :: rm -rf /usr/lib/python*/site-packages/logilab* fixes the pb (though we may miss some other python-central generated files) Version 0.42.0 -------------- :publication date: 2009/07/02 :expected date: n/a Ticket #9561 adbh: fix default set_null_allowed implementation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved Ticket #9558 adbh: new case_sensitive resource descriptor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.010 :state: resolved Ticket #9554 new module for Pyro utilities ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved factorize common pyro stuff (objects [un]registration...) Version 0.41.0 -------------- :publication date: 2009/06/03 :expected date: n/a Ticket #9242 adbh: new methods ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved adbh: new alter_column_support flag, sql_set_null_allowed and sql_change_col_type methods Ticket #9244 modutils: new extrapath argument to modpath_from_file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.300 :state: resolved param extrapath: optional extra search path, with path as key and package name for the path as value. This is usually useful to handle package splited in multiple directories using __path__ trick. Version 0.40.1 -------------- :publication date: 2009/06/03 :expected date: n/a Ticket #9229 lgc.date doesn't work with python's datetime module ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved lgc.date functions should be able to work with both mx.DateTime and python's datetime module. Version 0.40.0 -------------- :publication date: 2009/05/14 :expected date: n/a Ticket #9162 new module with some sphinx utilities ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved Ticket #9166 use a global variable to control mx datetime / py datetime usage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved considered by umessage and db Version 0.39.1 -------------- :publication date: 2009/04/08 :expected date: n/a Ticket #6760 maboa crashes on unknown encoding ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 1.000 :state: resolved On maboa-htmlize I get the following :: while processing XXXX.mdir Traceback (most recent call last): File "/usr/bin/maboa-htmlize", line 22, in run(mbox,target_dir) File "/usr/bin/maboa-htmlize", line 10, in run proc.process_mailbox(mbox) File "/usr/lib/python2.5/site-packages/maboa/htmlize.py", line 195, in process_mailbox for dir_name, msg_filename, html, attachments in self._iterate_mailbox(mbox, indexer): File "/usr/lib/python2.5/site-packages/maboa/htmlize.py", line 155, in _iterate_mailbox msg_dict = self._msg_to_dict(message) File "/usr/lib/python2.5/site-packages/maboa/htmlize.py", line 105, in _msg_to_dict dico['from'] = mangle_addr(message.get('From','')) File "/usr/lib/python2.5/site-packages/logilab/common/umessage.py", line 52, in get return decode_QP(value) File "/usr/lib/python2.5/site-packages/logilab/common/umessage.py", line 24, in decode_QP parts.append(unicode(decoded, charset, 'replace')) LookupError: unknown encoding: Comments :: On 2009/03/30 10:30 - anon wrote : The cron that runs every day sends us this error... any idea of when this bug could be fixed ? On 2009/04/08 12:02 - Unknown author wrote : It's actually a problem in umessage.py. The ``decode_QP`` function doesn't handle encoded lines with no charset definition Version 0.39.0 -------------- :publication date: 2009/03/25 :expected date: n/a Ticket #8423 add flag to db module telling if we want to use mx.DateTime or datetime ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved Ticket #8589 migrate debian packaging to python-support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved reuse version 0.38.1-1 that Sandro Tosi put in debian. Ticket #8430 testlib: allows to skip a module by raising TestSkipped from module import ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved Ticket #8427 testlib: option to have cProfile reports ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved Ticket #7915 ImportError: cannot import name SIGXCPU on windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Reported by Sini Mäkelä, using 0.38.0 on Windows, python 2.5.2:: Traceback (most recent call last): File "c:\Python25\Scripts\pylint.bat", line 11, in from pylint import lint File "C:\Python25\Lib\site-packages\pylint\lint.py", line 31, in from pylint.checkers import utils File "C:\Python25\Lib\site-packages\pylint\checkers\__init__.py", line 40, in from logilab.astng.utils import ASTWalker File "C:\Python25\Lib\site-packages\logilab\astng\__init__.py", line 256, in List._proxied = MANAGER.astng_from_class(list) File "C:\Python25\Lib\site-packages\logilab\astng\manager.py", line 191, in astng_from_class modastng = self.astng_from_module_name(modname) File "C:\Python25\Lib\site-packages\logilab\astng\manager.py", line 142, in astng_from_module_name return self.astng_from_module(module, modname) File "C:\Python25\Lib\site-packages\logilab\astng\manager.py", line 176, in astng_from_module from logilab.astng.builder import ASTNGBuilder File "C:\Python25\Lib\site-packages\logilab\astng\builder.py", line 40, in from logilab.common.fileutils import norm_read File "c:\python25\lib\site-packages\logilab\common\fileutils.py", line 25, in from logilab.common.shellutils import find File "C:\Python25\Lib\site-packages\logilab\common\shellutils.py", line 23, in from logilab.common.proc import ProcInfo, NoSuchProcess File "C:\Python25\Lib\site-packages\logilab\common\proc.py", line 115, in from signal import signal, SIGXCPU, SIGKILL, SIGUSR2, SIGUSR1 ImportError: cannot import name SIGXCPU Comments :: On 2009/02/03 11:10 - Unknown author wrote : Changing line 115 of logilab/common/proc.py to:: from signal import * should be enough to get pylint to run. The change was probably introduced for apycot which does not run on Windows anyway. > On 2009/02/09 22:14 - anon wrote : > two more lines that need to be changed to get it to run on Windows: > > > from signal import * from os import * from threading import Timer, > currentThread, Thread, Event from time import time # from resource import > getrlimit, setrlimit, RLIMIT_CPU, RLIMIT_AS > On 2009/02/26 10:50 - anon wrote : issue not fixed in 0.38.1 > On 2009/02/26 11:25 - sthenault wrote : > gasp, that's true 0.38.1 did not include the patch fixing this... Version 0.38.1 -------------- :publication date: 2009/02/26 :expected date: n/a Ticket #8134 new monkeypatch decorator ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: resolved Version 0.38.0 -------------- :publication date: 2009/01/26 :expected date: n/a Ticket #4993 [Category Name] may be case insensitive in configuration file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved in the current version of the logilab.devtools.configuration module, Category name are case sensitive. [Exemple Category] != [EXEMPLE CATEGORY] Making Category name case insensitive may avoid common mistake. Comments :: On 2008/10/16 16:18 - Unknown author wrote : i implemented a unit test trying to produce the error but i failed. try to get in touch with pyves to talk about it. Ticket #4788 easy install ~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: resolved think about changing logilab-common layout and internal dev procedures to fit easy_install and PyPI. Ticket #5237 new specific options types in optik_ext for time/byte which understand associated units ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.000 :state: resolved using textutils.apply_units. Version 0.37.2 -------------- :publication date: 2009/01/08 :expected date: n/a Ticket #6913 bad type mapping from Datetime w/ mysql ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved should be datetime, not timestamp which is automatically updated on row writes Ticket #6917 encoding support in configuration file generation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved right now crash if there is some non ascii unicode strings Version 0.37.1 -------------- :publication date: 2008/12/11 :expected date: n/a Ticket #6809 contexts.py is syntactically incorrect wrt python2.4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved The current implementation of ``tempdir`` uses ``yield`` inside a try/finally block, which is incorrect in python2.4. ``tempdir`` should be implemented using the full context manager protocol (i.e. ``__enter__`` and ``__exit__``). Version 0.37.0 -------------- :publication date: 2008/12/09 :expected date: n/a Ticket #6780 add a "bytes" option type in configuration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: resolved The option should be able to understand common bytes units such as ``b``, ``kb``, ``mb``, ``gb`` and ``td``. Ticket #6778 add a new "time" option type in configuration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: resolved The option should be able to understand common time units such as ``ms``, ``s``, ``min``, ``h`` and ``d``. Ticket #6782 Implement a Priority Task Queue ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :state: resolved This class would be based on the standard ``Queue.Queue`` class. Ticket #6776 process management module ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :state: resolved A proc module would provide : - provide some functions to analyze /proc (on linux) - resource control (memory / time / cpu time) Version 0.36.1 -------------- :publication date: 2008/11/14 :expected date: n/a Ticket #6568 rename .restart to .pytest.restart ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved to avoid name clash with other tools Ticket #6594 add common.shellutils.globfind() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: resolved introduce shellutils.globfind as an alternative to find that accepts glob patterns (easier to have separate function for backward compatibility reasons) Ticket #6528 [common.configuration] check_date checks for a password ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved Bug report and patch by Alain Barthes (thx): problem line 165 in configuration.py Ticket #6592 incorrect edges syntax in dot file generation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.200 :state: resolved fix dot files' edge generation Before this patch, edges were defined using the following scheme : Node1 -> Node2 edge [attrs...] Node2 -> Node3 which `dot` understands as three instructions : Node1 -> Node2 ; edge [attr...]; Node2 -> Node3; which means that edge properties are applied to the Node2->Node3 edge rather than to the Node1->Node2 edge. The correct syntax is : Node1 -> Node2 [attr...]; Node2 -> Node3; Version 0.36.0 -------------- :publication date: 2008/10/30 :expected date: n/a Ticket #4910 default values are missing in manpage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved The %default variables are not expanded in the pylint manpage. Check for '[current: %default]' entries. Comments :: On 2008/09/17 09:37 - eanclin wrote : also, --generate-man option should be hidden. Ticket #3724 add require_version and require_module functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved It could be useful to have those 2 functions in order to declare that a test requires a specific version of python or a specfic module. If the requirement is not satisfied, the test would be skipped. In python >= 2.4, we would then be able to write :: @require_version('2.5') @require_module('mx.DateTime') def test_something(self): # ... Ticket #3841 change cache.Cache implementation to inherit from dict ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved so : * we don't have to reimplement methods of the dictionnary interface which only delegate to the underlying dict * we don't get at some point errors like "Cache has no method pop" Ticket #4932 pygmentize output of pytest ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved use pygments to output the tracebacks in colors when outputting to a terminal. Ticket #4943 pytest color output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved * use logilab.common.textutils to colorize pytest's output when stderr is a terminal (cf os.isatty()) ERROR: FAIL: and FAILED should appear ligthred * when run with option -i, pdb is started and pdb's list command outputs code in color. can this be configured ? * would outputing tracebacks in color be a good idea ? Ticket #5555 --restart option on pytest ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 1.500 :state: resolved When a lot of tests fail, we often use pytest as follows:: $ pytest -x test_foo.py # fix the first failure, and rerun pytest: $ pytest -x test_foo.py # etc. For big test suites (or when running pytest on a whole project), it would be nice to have a ``--restart`` option that would restart on the first failure. Version 0.35.2 -------------- :publication date: 2008/10/01 :expected date: n/a Ticket #3278 man page generation broken ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved optik specific substitution string for default value get inserted while it shouldn't. Ticket #5945 wrong edge proporties in graph.DotBackend ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Edges without properties have same properties as the previous edge. This is an obvious DotBackend.emit_edge bug (see http://www.graphviz.org/doc/info/lang.html "Semantic Notes") Ticket #5979 broken debian package w/ py < 2.5 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved :: Compiling /usr/lib/python2.4/site-packages/logilab/common/context.py ... File "/usr/lib/python2.4/site-packages/logilab/common/context.py", line 9 yield path SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause Comments :: On 2008/09/19 08:02 - sthenault wrote : module removed until a nicest way to deal with this is found Ticket #6011 lgc.configuration ignore customized option values ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved Custom option values passed on the command line are ignored if the option has a default value. Comments :: On 2008/09/15 17:17 - adimascio wrote : It looks like the problem appeared with this `changeset`_ .. _changeset: http://www.logilab.org/cgi-bin/hgwebdir.cgi/logilab/common/rev/42c8cae57420 Version 0.35.0 -------------- :publication date: 2008/09/10 :expected date: n/a Ticket #5962 tags in testlib ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved add tags to tests and select by tags with pytest Version 0.34.0 -------------- :publication date: 2008/08/07 :expected date: n/a Ticket #5747 add Decimal type ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.000 :state: resolved cf changelog messages. Ticket #5715 db: on queries like "SELECT 'a string'", postgres return 705 (aka 'unknown') type code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved in that case we're expecting that the db adapters'process_value() method returns an unicode string, though this is not the case (yet) Ticket #5742 fix progressbar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved stop overflow, flicking and incorrect progress. Ticket #5745 various little pytest improvements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.000 :state: resolved cf commit messages. Version 0.33.0 -------------- :publication date: 2008/06/27 :expected date: n/a Ticket #4995 Un escaped rest output ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 1.000 :state: resolved The rest ouput don't escape special rest character resulting to a invalid rest output. Comments :: On 2008/06/24 10:25 - ocayrol wrote : This bug doesn't concern logilab-doctools but logilab-common (cf. Configuration.py). Thus, I've changed the bug affectation. Version 0.32 ------------ :publication date: 2008/06/12 :expected date: n/a Ticket #5243 add a new TestCase assertion (is and xml egal tuple) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved add an assertIS and a assertXMLEqualsTuple to logilab.common.unittest.TestCase Ticket #5241 create an apply_unit function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved create a function parsing value with unit. eg: 1m 45s -> 105s Version 0.31.0 -------------- :publication date: 2008/05/08 :expected date: n/a Ticket #4947 customisation with pytestconf.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved when pytest finds pytestconf.py it uses its content to customize the command-line parser and the test runner. Version 0.30.0 -------------- :publication date: 2008/04/25 :expected date: n/a Ticket #4869 backport some part of the ChangeLog support from logilab.devtools ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved into a lgc.changelog module Ticket #4866 clcommands: bash completion helpers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved * hiddens commands * generic ListCommandsCommand useful to build bash completion helpers Ticket #4841 db: remember logged user on the connection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved Version 0.29.1 -------------- * date: new nb_open_days function counting worked days between two date * adbh: add -p option to mysql commands to ask for password :publication date: 2008/03/24 :expected date: n/a Version 0.28.2 -------------- restore python2.3 compatibility :publication date: 2008/02/18 :expected date: n/a Ticket #4724 testlib.py's genexp breaks python2.3 compat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved * testlib.py uses genexps * testlib.py does not work with python2.3's TestSuite class Version 0.28.1 -------------- :publication date: 2008/02/18 :expected date: n/a Ticket #4695 configuration: buggy merge_options, and should not pass key unrecognized to optparser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Ticket #4699 modutils: includ Stefan Rank's patch to deal with 2.4 relative import ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved Ticket #4702 testlib: fix generative tests description storage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved and they should be named so one can skip them easily Version 0.28.0 -------------- :publication date: 2008/02/06 :expected date: n/a Ticket #4624 new `attrdict` and `nullobject` classes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved attrdict to make values of a dictionary appears as object's attribute, nullobject to be used as default marker, with false boolean value. Ticket #4631 shellutils: new `chmod` function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved as os.chmod but accepting login/group as argument, not only uid/gid Ticket #4628 testlib: new `strict` argument to assertIsInstance ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved triggering object is an instance of class but not a subclass Version 0.27.0 -------------- :publication date: 2008/01/25 :expected date: n/a Ticket #4612 deprecation: new class_moved utility function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved Ticket #4616 interface: fix subinterface handling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Version 0.26.1 -------------- Minor enhancement :publication date: 2008/01/10 :expected date: n/a Ticket #4508 add man page for pytest ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved the pytest script does not have a man page. Ticket #4501 optparser does not understand --version at top level ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved when calling a program using optparser with --version, it crashes with "unknown command", which is annoying when using e.g. help2man. Ticket #4323 pytest manpage missing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved write a manpage for pytest. a simple one will do. Ticket #4519 textutils: infinite loop in normalize_text in some case ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved actually when an indent string containing space is given and text contains a non wrappable string longer the max line length. Version 0.26.0 -------------- :publication date: 2008/01/07 :expected date: n/a Ticket #4453 db: binarywrap support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved Ticket #4445 modutils: new LazyObject class ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved to support lazy loading of modules Version 0.25.2 -------------- :publication date: 2007/12/20 :expected date: n/a Ticket #4432 adbh: missing a "need_from_clause" attribute to indicate DBMS *requiring* something in the FROM clause ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved such as fu***** mysql. Version 0.25.1 -------------- :publication date: 2007/12/11 :expected date: n/a Ticket #4414 various mysql/postgres fixes in db.py and adbh.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved * table argument of list_indices should be case insensitive (adbh) * MySQLDB return an array instance in some cases (db) Ticket #3683 --profile option on pytest ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved displaying a profiling report after tests execution Version 0.25.0 -------------- :publication date: 2007/11/26 :expected date: n/a Ticket #4380 adbh: function to list tables/indices of a database ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Ticket #4325 logilab.common pas compatible avec python2.3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved This is what I get when upgrade logilab-common on debian. Paramétrage de python-logilab-common (0.24.0-1) ... INFO: using old version '/usr/bin/python2.3' Compiling /usr/lib/python2.3/site-packages/logilab/common/adbh.py ... File "/usr/lib/python2.3/site-packages/logilab/common/adbh.py", line 49 @classmethod ^ SyntaxError: invalid syntax pycentral: pycentral pkginstall: error byte-compiling files (51) pycentral pkginstall: error byte-compiling files (51) dpkg : erreur de traitement de python-logilab-common (--configure) : le sous-processus post-installation script a retourné une erreur de sortie d'état 1 [...] Des erreurs ont été rencontrées pendant l'exécution : python-logilab-common E: Sub-process /usr/bin/dpkg returned an error code (1) Comments :: On 2007/10/31 09:53 - Unknown author wrote : renamed and changed severity, because we really want to keep compatible with python2.3 Version 0.24.0 -------------- :publication date: 2007/10/30 :expected date: n/a Ticket #4311 new adbh module containing advanced db helpers from the "db" module ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved with support for registered procedures declaration Version 0.23.0 -------------- :publication date: 2007/10/17 :expected date: n/a Ticket #4306 more db extensions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved - mark support_users and support_groups methods as obsolete in favor of users_support and groups_support attributes - new ilike_support property on dbms helpers - extended db helper api - completed mysql support Version 0.22.2 -------------- :publication date: 2007/06/26 :expected date: n/a Ticket #3978 new 'typechanged' action for configuration.read_old_config ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved Version 0.22.1 -------------- Bug fix revision for 0.22 :publication date: 2007/06/18 :expected date: n/a Ticket #3900 pytest and devtools dependency ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: rejected pytest --coverage currently requires devtools to work, but devtools is not in Debian. The issue needs to be solved. Version 0.22.0 -------------- :publication date: 2007/05/14 :expected date: n/a Ticket #3879 deprecation: 'obsolete' decorator ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved with an optional message explaining why Ticket #3882 shellutils.mv should use shutil.move instead of os.rename as default action ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved so it don't crash when moving to another disk/partition Ticket #2681 --coverage option on pytest ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved which execute test under pycoverage, so we can afterwhat extract coverage information. Comments :: On 2007/06/08 10:14 - Unknown author wrote : I goofed when validating this one: the feature is buggy, and I was testing with the dev. repo in my PYTHONPATH.... Version 0.21.4 -------------- bugfix release (most notably pytest fixes / improvements) :publication date: 2007/03/09 :expected date: n/a Ticket #3676 missing pytest --help / -t options ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved Marien Zwart said :: Because of the place option parsing happens pytest relies on there being exactly one directory called "test" or "tests" somewhere below the current directory. The "pytest" main script walks down from the current directory and calls testlib.main on every directory called test or tests it finds. This main function then (re)parses the arguments and runs the tests. This is especially annoying for --help (which does nothing if there is no test or tests dir below the current one) or -t (specify testdir explicitly, which does nothing if there is no test or tests dir below the current one and runs the tests more than once if there is more than one). Ticket #3621 pytest should have return status different than 0 if some test failed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved currently you can't differentiate from the command line if all tests succeed or not Version 0.21.2 -------------- :publication date: 2007/02/05 :expected date: n/a Ticket #3471 truncated text in ReST normalization ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved When normalizing ReST text, result is sometimes truncated Version 0.21.1 -------------- :publication date: 2006/12/21 :expected date: n/a Ticket #3197 OptionsManagerMixin __init__ isn't passing correctly its "version" argument ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved this result in the `--version` option missing in pylint for instance Ticket #3266 textutils.normalize_text doesn't deal correctly with ReST formatted text ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved should have an argument or another function dedicated to ReST text Version 0.21.0 -------------- pre 1.0 version :publication date: 2006/11/14 :expected date: n/a Ticket #3023 cleanup __init__.py file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved move useful thinks in the package file into their own module. Deprecated functions which seems no more used. Ticket #3027 remove old deprecated functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved there are a lot of functions deprecated for a while there, it's now time to remove them. Ticket #3025 [db] psycopg2 mxDateTime adapters should only be registered if mxDateTime is available ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Ticket #3016 unknown encoding: unknown-8bit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Some mails have weird headers:: while processing /home/logilab/prive/depomail/SOPX01.mbox Traceback (most recent call last): File "/usr/bin/maboa-htmlize", line 13, in ? run() File "/usr/bin/maboa-htmlize", line 8, in run proc.process_mailbox(sys.argv[1]) File "hg_public/maboa/htmlize.py", line 161, in process_mailbox for dir_name, msg_filename, html, attachments in self._iterate_mailbox(mbox, indexer): File "hg_public/maboa/htmlize.py", line 120, in _iterate_mailbox msg_dict = self._msg_to_dict(message) File "hg_public/maboa/htmlize.py", line 89, in _msg_to_dict body.append(part.get_payload(decode=True)) File "hg_public/logilab/common/umessage.py", line 56, in get_payload return unicode(payload or '', message.get_content_charset() LookupError: unknown encoding: unknown-8bit maboa should not crash, but rather use a default encoding (e.g. iso-8859-1) in that case. Comments :: On 2006/11/10 10:38 - Unknown author wrote : actually a problem in logilab-common Ticket #3021 warnings on deprecated stuff ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved so we can get a 1.0 soon Version 0.20.2 -------------- :publication date: 2006/11/03 :expected date: n/a Version 0.20.1 -------------- :publication date: 2006/11/02 :expected date: n/a Ticket #2730 [db] passer à psycopg2 par défaut ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: resolved Ticket #2734 [umessage] utilise get_charset au lieu de get_content_charset dans get_payload ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved du coup il tombe pas sur le bon encodage Version 0.20.0 -------------- :publication date: 2006/10/30 :expected date: n/a Ticket #2709 backport dot backend from yams ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved Ticket #2719 [configuration] basic deprecated config handling support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved Ticket #2716 [db] incorrect date handling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved Ticket #2713 [db] methods on advanced helper to generate backup commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.250 :state: resolved Version 0.19.3 -------------- bug fixes :publication date: 2006/10/03 :expected date: n/a Ticket #899 missing pytest.bat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.000 :state: resolved Running "setup.py install" in windows gives this error towards the end: error: file 'bin\pytest.bat' does not exist And bin\pytest.bat isn't included in this .tar.gz. Ticket #900 textutils.normalise_[text|paragraph] crash with unsplitable word larger than the maximum line size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.250 :state: resolved :: File ".../logilab/common/textutils.py", line 116, in normalize_text result.append(normalize_paragraph(text, line_len, indent)) File ".../logilab/common/textutils.py", line 155, in normalize_paragraph while text[pos] != ' ': IndexError: string index out of range Version 0.19.2 -------------- :publication date: 2006/09/25 :expected date: n/a