diff -Nru python-easydev-0.9.35+dfsg/debian/changelog python-easydev-0.9.37/debian/changelog --- python-easydev-0.9.35+dfsg/debian/changelog 2018-04-22 21:53:49.000000000 +0000 +++ python-easydev-0.9.37/debian/changelog 2019-01-23 06:45:34.000000000 +0000 @@ -1,3 +1,28 @@ +python-easydev (0.9.37-1) unstable; urgency=medium + + * Team upload. + + [ Andreas Tille ] + * Fix watch file + * debhelper 12 + * Activate Testsuite field + * Point Vcs fields to salsa.debian.org + * Standards-Version: 4.3.0 + * Remove trailing whitespace in debian/copyright + + [ Piotr Ożarowski ] + * do not use pkg_resources + + [ Nick Morrott ] + * d/control: refresh build-dependencies for tests + * d/patches: refresh external-appdirs.patch + * d/rules: generate egg_info for tests + * d/rules: skip test requiring network access + * d/rules: delete coverage report from build tree + * Drop unused python-easydev.lintian-overrides. + + -- Andreas Tille Wed, 23 Jan 2019 07:45:34 +0100 + python-easydev (0.9.35+dfsg-2) unstable; urgency=medium * Correct ITP bug number in previous changelog entry diff -Nru python-easydev-0.9.35+dfsg/debian/compat python-easydev-0.9.37/debian/compat --- python-easydev-0.9.35+dfsg/debian/compat 2017-10-18 03:54:12.000000000 +0000 +++ python-easydev-0.9.37/debian/compat 2019-01-23 06:45:34.000000000 +0000 @@ -1 +1 @@ -9 +12 diff -Nru python-easydev-0.9.35+dfsg/debian/control python-easydev-0.9.37/debian/control --- python-easydev-0.9.35+dfsg/debian/control 2018-04-22 21:43:57.000000000 +0000 +++ python-easydev-0.9.37/debian/control 2019-01-23 06:45:34.000000000 +0000 @@ -1,36 +1,42 @@ Source: python-easydev -Section: python -Priority: optional Maintainer: Debian Med Packaging Team Uploaders: Afif Elghraoui -Build-Depends: - debhelper (>= 9), - dh-python, - python-all, - python-setuptools, - python-appdirs, - python-colorama, - python-pexpect, - python-appdirs, - python3-all, - python3-setuptools, - python3-appdirs, - python3-colorama, - python3-pexpect, - python3-appdirs, -Standards-Version: 4.1.3 +Section: python +Testsuite: autopkgtest-pkg-python +Priority: optional +Build-Depends: debhelper (>= 12~), + dh-python, + python-all, + python-setuptools, + python-appdirs, + python-colorlog, + python-colorama, + python-nose, + python-pexpect, + python-pytest, + python-pytest-cov, + python-pytest-mock, + python3-all, + python3-setuptools, + python3-appdirs, + python3-colorlog, + python3-colorama, + python3-nose, + python3-pexpect, + python3-pytest, + python3-pytest-cov, + python3-pytest-mock, +Standards-Version: 4.3.0 +Vcs-Browser: https://salsa.debian.org/med-team/python-easydev +Vcs-Git: https://salsa.debian.org/med-team/python-easydev.git Homepage: https://easydev-python.readthedocs.io/en/latest/ -Vcs-Git: https://anonscm.debian.org/git/debian-med/python-easydev.git -Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/python-easydev.git -#Testsuite: autopkgtest-pkg-python Package: python-easydev Architecture: all -Depends: - ${python:Depends}, - ${misc:Depends}, - python-pkg-resources, - python-appdirs, +Depends: ${python:Depends}, + ${misc:Depends}, + python-pkg-resources, + python-appdirs Description: common utilities to ease the development of Python packages (Python 2) The package easydev provides miscellaneous functions that are often used in other Python packages. easydev should help developers in speeding up their @@ -40,11 +46,10 @@ Package: python3-easydev Architecture: all -Depends: - ${python3:Depends}, - ${misc:Depends}, - python3-pkg-resources, - python3-appdirs, +Depends: ${python3:Depends}, + ${misc:Depends}, + python3-pkg-resources, + python3-appdirs Description: common utilities to ease the development of Python packages (Python 3) The package easydev provides miscellaneous functions that are often used in other Python packages. easydev should help developers in speeding up their diff -Nru python-easydev-0.9.35+dfsg/debian/copyright python-easydev-0.9.37/debian/copyright --- python-easydev-0.9.35+dfsg/debian/copyright 2017-10-18 05:33:42.000000000 +0000 +++ python-easydev-0.9.37/debian/copyright 2019-01-23 06:45:34.000000000 +0000 @@ -86,15 +86,15 @@ this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: GPL-3.0 diff -Nru python-easydev-0.9.35+dfsg/debian/patches/external-appdirs.patch python-easydev-0.9.37/debian/patches/external-appdirs.patch --- python-easydev-0.9.35+dfsg/debian/patches/external-appdirs.patch 2017-10-18 05:33:22.000000000 +0000 +++ python-easydev-0.9.37/debian/patches/external-appdirs.patch 2019-01-23 06:45:34.000000000 +0000 @@ -2,10 +2,10 @@ easydev used its own convenience copy, which we don't need. Author: Afif Elghraoui Forwarded: not-needed -Last-Update: 2017-10-18 ---- python-easydev.orig/easydev/config_tools.py -+++ python-easydev/easydev/config_tools.py -@@ -367,7 +367,7 @@ +Last-Update: 2019-01-22 +--- a/easydev/config_tools.py ++++ b/easydev/config_tools.py +@@ -370,7 +370,7 @@ def __init__(self, name, verbose=False): self.verbose = verbose @@ -14,3 +14,25 @@ self.appdirs = appdirs.AppDirs(name) def init(self): +--- a/test/test_appdirs.py ++++ b/test/test_appdirs.py +@@ -11,16 +11,16 @@ + app.user_log_dir + + with mock.patch("sys.platform", "darwin"): +- from easydev import appdirs ++ import appdirs + app = appdirs.AppDirs("test") + getter(app) + + with mock.patch("sys.platform", "win32"): +- from easydev import appdirs ++ import appdirs + app = appdirs.AppDirs("test") + getter(app) + + with mock.patch("sys.platform", "linux"): +- from easydev import appdirs ++ import appdirs + app = appdirs.AppDirs("test") + getter(app) diff -Nru python-easydev-0.9.35+dfsg/debian/patches/no_pkg_resources.patch python-easydev-0.9.37/debian/patches/no_pkg_resources.patch --- python-easydev-0.9.35+dfsg/debian/patches/no_pkg_resources.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-easydev-0.9.37/debian/patches/no_pkg_resources.patch 2019-01-23 06:45:34.000000000 +0000 @@ -0,0 +1,24 @@ +From: Piotr Ożarowski +Date: Wed, 16 Jan 2019 10:34:07 +0100 +Origin: https://lists.debian.org/debian-python/2019/01/msg00060.html +Description: Do not use pkg_resources to avoid build failure + kg_resources.DistributionNotFound: The 'easydev' distribution was not found and is required by the application + +--- a/easydev/__init__.py ++++ b/easydev/__init__.py +@@ -20,15 +20,6 @@ from __future__ import print_function + + + __version__ = "0.9.36" +-try: +- import pkg_resources +-except ImportError as err: +- print(err) +- print("version set to {} manually.".format(__version__)) +- version = __version__ +-else: +- version = pkg_resources.require("easydev")[0].version +- __version__ = version + + from . import browser + from .browser import browse as onweb diff -Nru python-easydev-0.9.35+dfsg/debian/patches/series python-easydev-0.9.37/debian/patches/series --- python-easydev-0.9.35+dfsg/debian/patches/series 2017-10-18 05:33:42.000000000 +0000 +++ python-easydev-0.9.37/debian/patches/series 2019-01-23 06:45:34.000000000 +0000 @@ -1,2 +1,3 @@ external-appdirs.patch privacy.patch +no_pkg_resources.patch diff -Nru python-easydev-0.9.35+dfsg/debian/python-easydev.lintian-overrides python-easydev-0.9.37/debian/python-easydev.lintian-overrides --- python-easydev-0.9.35+dfsg/debian/python-easydev.lintian-overrides 2017-10-18 05:49:55.000000000 +0000 +++ python-easydev-0.9.37/debian/python-easydev.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -# needed for hinge; The python3 module is also packaged -new-package-should-not-package-python2-module diff -Nru python-easydev-0.9.35+dfsg/debian/rules python-easydev-0.9.37/debian/rules --- python-easydev-0.9.35+dfsg/debian/rules 2017-10-18 05:38:44.000000000 +0000 +++ python-easydev-0.9.37/debian/rules 2019-01-23 06:45:34.000000000 +0000 @@ -3,11 +3,19 @@ export LC_ALL=C.UTF-8 export PYBUILD_NAME=easydev +export PYBUILD_BEFORE_TEST={interpreter} {dir}/setup.py egg_info -e {build_dir} +export PYBUILD_AFTER_TEST=cd {build_dir}; rm -rf *.egg-info +export PYBUILD_TEST_ARGS=-k-test_url + %: dh $@ --with python2,python3 --buildsystem=pybuild override_dh_install: dh_install + + # remove coverage report + $(RM) debian/*/usr/lib/python*/dist-packages/.coverage + # Allow python{,3}-easydev to be co-installable # and avoid the generic name "browse" for an executable in /usr/bin cd debian/python-easydev/usr/bin \ diff -Nru python-easydev-0.9.35+dfsg/debian/watch python-easydev-0.9.37/debian/watch --- python-easydev-0.9.35+dfsg/debian/watch 2017-10-18 04:58:50.000000000 +0000 +++ python-easydev-0.9.37/debian/watch 2019-01-23 06:45:34.000000000 +0000 @@ -1,5 +1,3 @@ version=4 -# releases on github don't keep up with pypi, but -# pypi.debian.net seems to be down -#https://pypi.debian.net/python-easydev/python-easydev-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) +https://pypi.python.org/simple/easydev .*/easydev-@ANY_VERSION@@ARCHIVE_EXT@#sha256=.* diff -Nru python-easydev-0.9.35+dfsg/easydev/config_tools.py python-easydev-0.9.37/easydev/config_tools.py --- python-easydev-0.9.35+dfsg/easydev/config_tools.py 2017-02-20 19:57:48.000000000 +0000 +++ python-easydev-0.9.37/easydev/config_tools.py 2017-12-22 21:49:43.000000000 +0000 @@ -98,9 +98,11 @@ which can be read with ConfigParser as follows: - .. code-block:: python - >>> from ConfigParser import ConfigParser + .. doctest:: + + >>> # Python 3 code + >>> from configparser import ConfigParser >>> config = ConfigParser() >>> config.read("file.ini") [] @@ -133,13 +135,13 @@ You can now also directly access to an option as follows:: - >>> c.General.tag + c.General.tag Then, you can add or remove sections (:meth:`remove_section`, :meth:`add_section`), or option from a section :meth:`remove_option`. You can save the instance into a file or print it:: - >>> print(c) + print(c) .. warning:: if you set options manually (e.G. self.GA.test =1 if GA is a section and test one of its options), then the save/write does not work @@ -231,8 +233,9 @@ Let us build up a standard config file: .. code-block:: python - >>> import ConfigParser - >>> c = ConfigParser.ConfigParser() + >>> # Python 3 code + >>> from configparser import ConfigParser + >>> c = ConfigParser() >>> c.add_section('general') >>> c.set('general', 'step', str(1)) >>> c.set('general', 'verbose', 'True') diff -Nru python-easydev-0.9.35+dfsg/easydev/__init__.py python-easydev-0.9.37/easydev/__init__.py --- python-easydev-0.9.35+dfsg/easydev/__init__.py 2017-02-20 19:58:45.000000000 +0000 +++ python-easydev-0.9.37/easydev/__init__.py 2018-04-11 19:45:41.000000000 +0000 @@ -18,13 +18,17 @@ from __future__ import print_function #from __future__ import absolute_import -__version__ = "0.9.34" -import pkg_resources +__version__ = "0.9.36" try: - version = pkg_resources.require("easydev")[0].version -except: + import pkg_resources +except ImportError as err: + print(err) + print("version set to {} manually.".format(__version__)) version = __version__ +else: + version = pkg_resources.require("easydev")[0].version + __version__ = version from . import browser from .browser import browse as onweb diff -Nru python-easydev-0.9.35+dfsg/easydev/logging_tools.py python-easydev-0.9.37/easydev/logging_tools.py --- python-easydev-0.9.35+dfsg/easydev/logging_tools.py 2017-02-20 19:10:25.000000000 +0000 +++ python-easydev-0.9.37/easydev/logging_tools.py 2018-04-11 19:47:27.000000000 +0000 @@ -14,77 +14,98 @@ # ############################################################################## import logging +import colorlog __all__ = ["Logging"] -class Logging(object): - """logging utility. +colors = { + 'DEBUG': 'cyan', + 'INFO': 'green', + 'WARNING': 'yellow', + 'ERROR': 'red', + 'CRITICAL': 'bold_red'} - When using the logging utility, it works like a singleton. - So, once logging level is set, you cannot set it again easily. - Here is a class that allows to do that. - .. warning:: this is a bit of a hack. Maybe this is not a proper solution but - it seems to do the job. + +class Logging(object): + """logging utility. :: - >>> l = Logging("INFO") + >>> l = Logging("root", "INFO") >>> l.info("test") INFO:root:test >>> l.level = "WARNING" >>> l.info("test") - """ - # I think that we can not inherit from logging. - def __init__(self, level): - """.. rubric:: constructor - - :param str level: valid levels are ["INFO", "DEBUG", "WARNING", - "CRITICAL", "ERROR"]. If set to True, level is internally set to - INFO. If set to False, level is seet internally to ERROR. - """ - self._debugLevel = None - self.debugLevel = level - self.logging = logging - self.info = logging.info - self.warning = logging.warning - self.critical = logging.critical - self.error = logging.error - self.debug = logging.debug + def __init__(self, name="root", level="WARNING"): + self.name = name + formatter = colorlog.ColoredFormatter( + "%(log_color)s%(levelname)-8s[%(name)s]: %(reset)s %(blue)s%(message)s", + datefmt=None, + reset=True, + log_colors=colors, + secondary_log_colors={}, + style='%' + ) + handler = colorlog.StreamHandler() + handler.setFormatter(formatter) + logger = colorlog.getLogger(self.name) + if len(logger.handlers) == 0: + logger.addHandler(handler) + self._set_level(level) def _set_level(self, level): - valid_level = [True, False, "INFO", "DEBUG", "WARNING", "CRITICAL", "ERROR"] - if level is True: - level = "INFO" - if level is False: - level = "ERROR" - if level in valid_level: - self._debugLevel = level - else: - raise ValueError("The level of debugging must be in %s " %valid_level) - # I'm not sure this is the best solution, but basicConfig can be called - # only once and populatse root.handlers list with one instance of - # logging.StreamHandler. So, I reset it before calling basicConfig - # that effectively changes the logging behaviour - logging.root.handlers = [] - logging.basicConfig(level=self._debugLevel) + if isinstance(level, bool): + if level is True: + level = "INFO" + if level is False: + level = "ERROR" + assert level in ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] + logging_level = getattr(colorlog.logging.logging, level) + colorlog.getLogger(self.name).setLevel(level) + def _get_level(self): - return self._debugLevel - debugLevel = property(_get_level, _set_level, - doc="Read/Write access to the debug level. Must be one of INFO, " + \ - "DEBUG, WARNING, CRITICAL, ERROR") - level = property(_get_level, _set_level, - doc="alias to :attr:`~easydev.logging_tools.Logging.debugLevel` (Read-only access)") - - # Used copy/deepcopy module - def __copy__(self): - print("WARNING: easydev.logging_tools.__copy__ deprecated. use copy() instead") - s = Logging(self.level) - return s - - def __deepcopy__(self, memo): - s = Logging(self.level) - return s + level = colorlog.getLogger(self.name).level + if level == 10: + return "DEBUG" + elif level == 20: + return "INFO" + elif level == 30: + return "WARNING" + elif level == 40: + return "ERROR" + elif level == 50: + return "CRITICAL" + else: + return level + level = property(_get_level, _set_level) + + def debug(self, msg): + colorlog.getLogger(self.name).debug(msg) + def info(self, msg): + colorlog.getLogger(self.name).info(msg) + def warning(self, msg): + colorlog.getLogger(self.name).warning(msg) + def critical(self, msg): + colorlog.getLogger(self.name).critical(msg) + def error(self, msg): + colorlog.getLogger(self.name).error(msg) + + + + + + + + + + + + + + + + diff -Nru python-easydev-0.9.35+dfsg/easydev/misc.py python-easydev-0.9.37/easydev/misc.py --- python-easydev-0.9.35+dfsg/easydev/misc.py 2017-07-09 21:40:34.000000000 +0000 +++ python-easydev-0.9.37/easydev/misc.py 2017-12-22 21:26:27.000000000 +0000 @@ -15,7 +15,6 @@ # Documentation: http://easydev-python.readthedocs.io # ############################################################################## - import os @@ -23,6 +22,7 @@ def get_home(): + """Return path of the HOME""" # This function should be robust # First, let us try with expanduser try: @@ -42,6 +42,7 @@ def cmd_exists(cmd): + """Return true if the command do exists in the environement""" try: import subprocess # for unix/max only diff -Nru python-easydev-0.9.35+dfsg/easydev/timer.py python-easydev-0.9.37/easydev/timer.py --- python-easydev-0.9.35+dfsg/easydev/timer.py 2017-01-15 17:29:35.000000000 +0000 +++ python-easydev-0.9.37/easydev/timer.py 2018-04-11 19:47:27.000000000 +0000 @@ -19,7 +19,7 @@ import time -class Timer(): +class Timer(object): """Timer working with *with* statement :: diff -Nru python-easydev-0.9.35+dfsg/PKG-INFO python-easydev-0.9.37/PKG-INFO --- python-easydev-0.9.35+dfsg/PKG-INFO 2017-07-11 14:05:29.000000000 +0000 +++ python-easydev-0.9.37/PKG-INFO 2018-04-11 19:52:36.000000000 +0000 @@ -1,12 +1,13 @@ Metadata-Version: 1.1 Name: easydev -Version: 0.9.35 +Version: 0.9.37 Summary: Common utilities to ease the development of Python packages Home-page: ['http://packages.python.org/easydev/'] Author: Thomas Cokelaer Author-email: cokelaer@ebi.ac.uk License: new BSD Download-URL: ['http://pypi.python.org/pypi/easydev'] +Description-Content-Type: UNKNOWN Description: easydev ########## @@ -28,7 +29,7 @@ :contributions: Please join https://github.com/cokelaer/easydev :source: Please use https://github.com/cokelaer/easydev :issues: Please use https://github.com/cokelaer/easydev/issues - :Python version supported: 2.6, 2.7, 3.3, 3.4, 3.5, 3.6 + :Python version supported: 2.7, 3.3, 3.4, 3.5, 3.6 The `easydev `_ package diff -Nru python-easydev-0.9.35+dfsg/README.rst python-easydev-0.9.37/README.rst --- python-easydev-0.9.35+dfsg/README.rst 2017-02-20 20:00:26.000000000 +0000 +++ python-easydev-0.9.37/README.rst 2018-04-11 19:48:16.000000000 +0000 @@ -19,7 +19,7 @@ :contributions: Please join https://github.com/cokelaer/easydev :source: Please use https://github.com/cokelaer/easydev :issues: Please use https://github.com/cokelaer/easydev/issues -:Python version supported: 2.6, 2.7, 3.3, 3.4, 3.5, 3.6 +:Python version supported: 2.7, 3.3, 3.4, 3.5, 3.6 The `easydev `_ package diff -Nru python-easydev-0.9.35+dfsg/setup.cfg python-easydev-0.9.37/setup.cfg --- python-easydev-0.9.35+dfsg/setup.cfg 2017-07-11 14:05:29.000000000 +0000 +++ python-easydev-0.9.37/setup.cfg 2018-04-11 19:52:36.000000000 +0000 @@ -3,7 +3,6 @@ [egg_info] tag_build = tag_date = 0 -tag_svn_revision = 0 [global] @@ -24,5 +23,5 @@ upload_dir = doc/build/html/ [tool:pytest] -addopts = --durations=10 --verbose +addopts = --cov=easydev --cov-report=term-missing --durations=10 --verbose diff -Nru python-easydev-0.9.35+dfsg/setup.py python-easydev-0.9.37/setup.py --- python-easydev-0.9.35+dfsg/setup.py 2017-07-09 21:07:56.000000000 +0000 +++ python-easydev-0.9.37/setup.py 2018-04-11 19:46:31.000000000 +0000 @@ -7,7 +7,7 @@ _MAJOR = 0 _MINOR = 9 -_MICRO = 35 +_MICRO = 37 version = '%d.%d.%d' % (_MAJOR, _MINOR, _MICRO) release = '%d.%d' % (_MAJOR, _MINOR) @@ -66,7 +66,7 @@ "themes/cno/static/*", "copybutton.js"]}, - install_requires = ['colorama', 'pexpect'], + install_requires = ['colorama', 'pexpect', "colorlog"], extras_require = { 'profiler': ["line_profiler_test"] }, diff -Nru python-easydev-0.9.35+dfsg/test/test_url.py python-easydev-0.9.37/test/test_url.py --- python-easydev-0.9.35+dfsg/test/test_url.py 2017-02-20 18:43:34.000000000 +0000 +++ python-easydev-0.9.37/test/test_url.py 2017-12-22 21:22:20.000000000 +0000 @@ -5,7 +5,7 @@ def test_isurl(): assert isurl_reachable("www.google.com") == True assert isurl_reachable("http://www.google.com") == True - assert isurl_reachable("https://fr.yahoo.com") == False # moved + #assert isurl_reachable("https://fr.yahoo.com") == False # moved assert isurl_reachable("wrong.co.ujj") == False assert isurl_reachable("http://wrong.co.ujj") == False assert isurl_reachable("http://wrong.co") == False