Hello community,
here is the log from the commit of package python3-logilab-common for
openSUSE:Factory checked in at 2016-03-17 16:35:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-logilab-common (Old)
and /work/SRC/openSUSE:Factory/.python3-logilab-common.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-logilab-common"
Changes:
--------
---
/work/SRC/openSUSE:Factory/python3-logilab-common/python3-logilab-common.changes
2015-10-20 00:06:52.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.python3-logilab-common.new/python3-logilab-common.changes
2016-03-17 16:48:27.000000000 +0100
@@ -1,0 +2,20 @@
+Tue Mar 15 15:30:11 UTC 2016 - [email protected]
+
+- specfile:
+ * update copyright year
+
+- update to version 1.2.0:
+ * [configuration] fix crash on python 3.5 1.2.0 centos/1.2.0-1
+ debian/1.2.0-1
+ * [testlib] drop unused TestCase.pdbclass
+ * [date] take milliseconds into account in datetime2ticks
+ * rpm: mx package was renamed it is now python-egenix-mx-base
+ * Add .git and .tox to STD_BLACKLIST
+ * Move coverage utility from pytest to testlib
+ * [testlib] Deprecate doctest things in favour of stdlib module
+ * [tox] Pass command line arguments to underlying command
+ * [configuration] Fix multi-line strings handling
+ * wip modutils: modpath_from_file('/foo/bar/baz/__init__.py') should
+ ignore the __init__.py partx
+
+-------------------------------------------------------------------
Old:
----
logilab-common-1.1.0.tar.gz
New:
----
logilab-common-1.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-logilab-common.spec ++++++
--- /var/tmp/diff_new_pack.QDusrQ/_old 2016-03-17 16:48:28.000000000 +0100
+++ /var/tmp/diff_new_pack.QDusrQ/_new 2016-03-17 16:48:28.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python3-logilab-common
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: python3-logilab-common
-Version: 1.1.0
+Version: 1.2.0
Release: 0
Url: http://www.logilab.org/projects/common/
Summary: Python lowlevel functionality shared by logilab projects
++++++ logilab-common-1.1.0.tar.gz -> logilab-common-1.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/logilab-common-1.1.0/ChangeLog
new/logilab-common-1.2.0/ChangeLog
--- old/logilab-common-1.1.0/ChangeLog 2015-10-12 17:39:18.000000000 +0200
+++ new/logilab-common-1.2.0/ChangeLog 2016-03-15 10:24:29.000000000 +0100
@@ -1,6 +1,15 @@
ChangeLog for logilab.common
============================
+2016-03-15 -- 1.2.0
+
+ * pytest: TraceController class, pause_tracing and resume_tracing
+ functions, deprecated from 0.63.1, got removed. The nocoverage
+ and pause_trace utilities are now available from the testlib
+ module rather than pytest.
+
+ * date: datetime2ticks uses the milliseconds from the datetime objects
+
2015-10-12 -- 1.1.0
* configuration: have a stable order for sections (#298658)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/logilab-common-1.1.0/PKG-INFO
new/logilab-common-1.2.0/PKG-INFO
--- old/logilab-common-1.1.0/PKG-INFO 2015-10-12 17:51:14.000000000 +0200
+++ new/logilab-common-1.2.0/PKG-INFO 2016-03-15 10:38:06.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: logilab-common
-Version: 1.1.0
+Version: 1.2.0
Summary: collection of low-level Python packages and modules used by Logilab
projects
Home-page: http://www.logilab.org/project/logilab-common
Author: Logilab
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/logilab-common-1.1.0/__pkginfo__.py
new/logilab-common-1.2.0/__pkginfo__.py
--- old/logilab-common-1.1.0/__pkginfo__.py 2015-10-12 17:39:18.000000000
+0200
+++ new/logilab-common-1.2.0/__pkginfo__.py 2016-03-15 10:24:29.000000000
+0100
@@ -25,7 +25,7 @@
subpackage_of = 'logilab'
subpackage_master = True
-numversion = (1, 1, 0)
+numversion = (1, 2, 0)
version = '.'.join([str(num) for num in numversion])
license = 'LGPL' # 2.1 or later
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/logilab-common-1.1.0/logilab/common/__init__.py
new/logilab-common-1.2.0/logilab/common/__init__.py
--- old/logilab-common-1.1.0/logilab/common/__init__.py 2015-10-12
17:39:18.000000000 +0200
+++ new/logilab-common-1.2.0/logilab/common/__init__.py 2016-03-15
10:24:29.000000000 +0100
@@ -38,7 +38,7 @@
__pkginfo__.version = __version__
sys.modules['logilab.common.__pkginfo__'] = __pkginfo__
-STD_BLACKLIST = ('CVS', '.svn', '.hg', 'debian', 'dist', 'build')
+STD_BLACKLIST = ('CVS', '.svn', '.hg', '.git', '.tox', 'debian', 'dist',
'build')
IGNORED_EXTENSIONS = ('.pyc', '.pyo', '.elc', '~', '.swp', '.orig')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/logilab-common-1.1.0/logilab/common/configuration.py
new/logilab-common-1.2.0/logilab/common/configuration.py
--- old/logilab-common-1.1.0/logilab/common/configuration.py 2015-10-12
17:39:18.000000000 +0200
+++ new/logilab-common-1.2.0/logilab/common/configuration.py 2016-03-15
10:24:29.000000000 +0100
@@ -635,7 +635,7 @@
parser = self.cfgfile_parser
parser.read([config_file])
# normalize sections'title
- for sect, values in parser._sections.items():
+ for sect, values in list(parser._sections.items()):
if not sect.isupper() and values:
parser._sections[sect.upper()] = values
elif not self.quiet:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/logilab-common-1.1.0/logilab/common/date.py
new/logilab-common-1.2.0/logilab/common/date.py
--- old/logilab-common-1.1.0/logilab/common/date.py 2015-10-12
17:39:18.000000000 +0200
+++ new/logilab-common-1.2.0/logilab/common/date.py 2016-03-15
10:24:29.000000000 +0100
@@ -237,7 +237,7 @@
return datetime(somedate.year, somedate.month, somedate.day)
def datetime2ticks(somedate):
- return timegm(somedate.timetuple()) * 1000
+ return timegm(somedate.timetuple()) * 1000 + int(somedate.microsecond /
1000)
def ticks2datetime(ticks):
miliseconds, microseconds = divmod(ticks, 1000)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/logilab-common-1.1.0/logilab/common/pytest.py
new/logilab-common-1.2.0/logilab/common/pytest.py
--- old/logilab-common-1.1.0/logilab/common/pytest.py 2015-10-12
17:39:18.000000000 +0200
+++ new/logilab-common-1.2.0/logilab/common/pytest.py 2016-03-15
10:24:29.000000000 +0100
@@ -121,7 +121,6 @@
import inspect
import traceback
from inspect import isgeneratorfunction, isclass
-from contextlib import contextmanager
from random import shuffle
from itertools import dropwhile
@@ -130,7 +129,7 @@
from logilab.common import testlib, STD_BLACKLIST
# use the same unittest module as testlib
from logilab.common.testlib import unittest, start_interactive_mode
-from logilab.common.deprecation import deprecated
+from logilab.common.testlib import nocoverage, pause_trace, replace_trace #
bwcompat
from logilab.common.debugger import Debugger, colorize_source
import doctest
@@ -152,62 +151,6 @@
CONF_FILE = 'pytestconf.py'
-## coverage pausing tools
-
-@contextmanager
-def replace_trace(trace=None):
- """A context manager that temporary replaces the trace function"""
- oldtrace = sys.gettrace()
- sys.settrace(trace)
- try:
- yield
- finally:
- # specific hack to work around a bug in pycoverage, see
- # https://bitbucket.org/ned/coveragepy/issue/123
- if (oldtrace is not None and not callable(oldtrace) and
- hasattr(oldtrace, 'pytrace')):
- oldtrace = oldtrace.pytrace
- sys.settrace(oldtrace)
-
-
-def pause_trace():
- """A context manager that temporary pauses any tracing"""
- return replace_trace()
-
-class TraceController(object):
- ctx_stack = []
-
- @classmethod
- @deprecated('[lgc 0.63.1] Use the pause_trace() context manager')
- def pause_tracing(cls):
- cls.ctx_stack.append(pause_trace())
- cls.ctx_stack[-1].__enter__()
-
- @classmethod
- @deprecated('[lgc 0.63.1] Use the pause_trace() context manager')
- def resume_tracing(cls):
- cls.ctx_stack.pop().__exit__(None, None, None)
-
-
-pause_tracing = TraceController.pause_tracing
-resume_tracing = TraceController.resume_tracing
-
-
-def nocoverage(func):
- """Function decorator that pauses tracing functions"""
- if hasattr(func, 'uncovered'):
- return func
- func.uncovered = True
-
- def not_covered(*args, **kwargs):
- with pause_trace():
- return func(*args, **kwargs)
- not_covered.uncovered = True
- return not_covered
-
-## end of coverage pausing tools
-
-
TESTFILE_RE = re.compile("^((unit)?test.*|smoketest)\.py$")
def this_is_a_testfile(filename):
"""returns True if `filename` seems to be a test file"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/logilab-common-1.1.0/logilab/common/testlib.py
new/logilab-common-1.2.0/logilab/common/testlib.py
--- old/logilab-common-1.1.0/logilab/common/testlib.py 2015-10-12
17:39:18.000000000 +0200
+++ new/logilab-common-1.2.0/logilab/common/testlib.py 2016-03-15
10:24:29.000000000 +0100
@@ -44,6 +44,7 @@
# disable camel case warning
# pylint: disable=C0103
+from contextlib import contextmanager
import sys
import os, os.path as osp
import re
@@ -78,7 +79,7 @@
from logilab.common import textutils
-__all__ = ['unittest_main', 'find_tests']
+__all__ = ['unittest_main', 'find_tests', 'nocoverage', 'pause_trace']
DEFAULT_PREFIXES = ('test', 'regrtest', 'smoketest', 'unittest',
'func', 'validation')
@@ -199,6 +200,40 @@
break
+# coverage pausing tools #####################################################
+
+@contextmanager
+def replace_trace(trace=None):
+ """A context manager that temporary replaces the trace function"""
+ oldtrace = sys.gettrace()
+ sys.settrace(trace)
+ try:
+ yield
+ finally:
+ # specific hack to work around a bug in pycoverage, see
+ # https://bitbucket.org/ned/coveragepy/issue/123
+ if (oldtrace is not None and not callable(oldtrace) and
+ hasattr(oldtrace, 'pytrace')):
+ oldtrace = oldtrace.pytrace
+ sys.settrace(oldtrace)
+
+
+pause_trace = replace_trace
+
+
+def nocoverage(func):
+ """Function decorator that pauses tracing functions"""
+ if hasattr(func, 'uncovered'):
+ return func
+ func.uncovered = True
+
+ def not_covered(*args, **kwargs):
+ with pause_trace():
+ return func(*args, **kwargs)
+ not_covered.uncovered = True
+ return not_covered
+
+
# test utils ##################################################################
@@ -293,7 +328,6 @@
class TestCase(unittest.TestCase):
"""A unittest.TestCase extension with some additional methods."""
maxDiff = None
- pdbclass = Debugger
tags = Tags()
def __init__(self, methodName='runTest'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/logilab-common-1.1.0/logilab_common.egg-info/PKG-INFO
new/logilab-common-1.2.0/logilab_common.egg-info/PKG-INFO
--- old/logilab-common-1.1.0/logilab_common.egg-info/PKG-INFO 2015-10-12
17:51:10.000000000 +0200
+++ new/logilab-common-1.2.0/logilab_common.egg-info/PKG-INFO 2016-03-15
10:37:37.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: logilab-common
-Version: 1.1.0
+Version: 1.2.0
Summary: collection of low-level Python packages and modules used by Logilab
projects
Home-page: http://www.logilab.org/project/logilab-common
Author: Logilab
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/logilab-common-1.1.0/test/unittest_date.py
new/logilab-common-1.2.0/test/unittest_date.py
--- old/logilab-common-1.1.0/test/unittest_date.py 2015-10-12
17:39:18.000000000 +0200
+++ new/logilab-common-1.2.0/test/unittest_date.py 2016-03-15
10:24:29.000000000 +0100
@@ -20,11 +20,12 @@
"""
from logilab.common.testlib import TestCase, unittest_main, tag
-from logilab.common.date import date_range, endOfMonth
-from logilab.common.date import add_days_worked, nb_open_days, \
- get_national_holidays, ustrftime, ticks2datetime, utcdatetime
+from logilab.common.date import (date_range, endOfMonth, add_days_worked,
+ nb_open_days, get_national_holidays, ustrftime, ticks2datetime,
+ utcdatetime, datetime2ticks)
from datetime import date, datetime, timedelta
+from calendar import timegm
import pytz
try:
@@ -166,6 +167,13 @@
self.assertEqual(d, self.datetimecls(2014, 7, 26, 10, 0, 0, 57))
self.assertIsNone(d.tzinfo)
+ def test_datetime2ticks(self):
+ d = datetime(2014, 11, 26, 12, 0, 0, 57, tzinfo=pytz.utc)
+ timestamp = timegm(d.timetuple())
+ self.assertEqual(datetime2ticks(d), timestamp * 1000)
+ d = d.replace(microsecond=123456)
+ self.assertEqual(datetime2ticks(d), timestamp * 1000 + 123)
+
class MxDateTC(DateTC):
datecls = mxDate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/logilab-common-1.1.0/test/unittest_pytest.py
new/logilab-common-1.2.0/test/unittest_pytest.py
--- old/logilab-common-1.1.0/test/unittest_pytest.py 2015-10-12
17:39:18.000000000 +0200
+++ new/logilab-common-1.2.0/test/unittest_pytest.py 2016-03-15
10:24:29.000000000 +0100
@@ -81,21 +81,6 @@
with replace_trace(tracefn):
myfn()
- def test_legacy_pause_resume_tracing(self):
- def tracefn(frame, event, arg):
- pass
-
- with replace_trace(tracefn):
- pause_tracing()
- self.assertIs(sys.gettrace(), None)
- with replace_trace(tracefn):
- pause_tracing()
- self.assertIs(sys.gettrace(), None)
- resume_tracing()
- self.assertIs(sys.gettrace(), tracefn)
- self.assertIs(sys.gettrace(), None)
- resume_tracing()
- self.assertIs(sys.gettrace(), tracefn)
if __name__ == '__main__':
unittest_main()