Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-logzero for openSUSE:Factory checked in at 2021-03-24 16:16:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-logzero (Old) and /work/SRC/openSUSE:Factory/.python-logzero.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-logzero" Wed Mar 24 16:16:56 2021 rev:10 rq:881046 version:1.7.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-logzero/python-logzero.changes 2021-01-31 16:52:20.828731713 +0100 +++ /work/SRC/openSUSE:Factory/.python-logzero.new.2401/python-logzero.changes 2021-03-24 16:17:56.400253032 +0100 @@ -1,0 +2,8 @@ +Wed Mar 17 12:43:09 UTC 2021 - Sebastian Wagner <sebix+novell....@sebix.at> + +- update to version 1.6.5: + - Export loglevels directly (you can use eg. `logzero.DEBUG` instead of `logging.DEBUG`) + - `setup_default_logger` use `backupCount` + - Update dependencies + - PRs: (386)[https://github.com/metachris/logzero/pull/386] +------------------------------------------------------------------- Old: ---- logzero-1.6.3.tar.gz New: ---- logzero-1.7.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-logzero.spec ++++++ --- /var/tmp/diff_new_pack.iH0i4M/_old 2021-03-24 16:17:56.980253641 +0100 +++ /var/tmp/diff_new_pack.iH0i4M/_new 2021-03-24 16:17:56.984253645 +0100 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-logzero -Version: 1.6.3 +Version: 1.7.0 Release: 0 Summary: A logging module for Python License: MIT ++++++ logzero-1.6.3.tar.gz -> logzero-1.7.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logzero-1.6.3/HISTORY.md new/logzero-1.7.0/HISTORY.md --- old/logzero-1.6.3/HISTORY.md 2020-11-15 11:04:49.000000000 +0100 +++ new/logzero-1.7.0/HISTORY.md 2021-03-17 12:24:13.000000000 +0100 @@ -1,14 +1,22 @@ History ======= -1.6.1 (2020-11-15) +1.6.5 (2021-03-17) +------------------ +- Export loglevels directly (you can use eg. `logzero.DEBUG` instead of `logging.DEBUG`) +- `setup_default_logger` use `backupCount` +- Update dependencies +- PRs: (386)[https://github.com/metachris/logzero/pull/386] + + +1.6.3 (2020-11-15) ------------------ - JSON logging with UTF-8 enabled by default ([PR 357](https://github.com/metachris/logzero/pull/357)) -1.6.0 (2020-10-29) ------------------- +1.6.0 (1.6.2) (2020-10-29) +-------------------------- - JSON logging support ([PR 344][]) - Ability to easily change colors ([\#82][]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logzero-1.6.3/PKG-INFO new/logzero-1.7.0/PKG-INFO --- old/logzero-1.6.3/PKG-INFO 2020-11-15 11:04:50.700741500 +0100 +++ new/logzero-1.7.0/PKG-INFO 2021-03-17 12:24:17.513669500 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: logzero -Version: 1.6.3 +Version: 1.7.0 Summary: Robust and effective logging for Python 2 and 3 Home-page: https://github.com/metachris/logzero Author: Chris Hager @@ -12,6 +12,7 @@ [](https://logzero.readthedocs.io/en/latest/?badge=latest) [](https://pypi.python.org/pypi/logzero) [](https://anaconda.org/conda-forge/logzero) + [](https://pepy.tech/project/logzero) Robust and effective logging for Python 2 and 3. @@ -39,6 +40,12 @@ * Heavily inspired by the [Tornado web framework](https://github.com/tornadoweb/tornado). + Installation: + + ```shell + python -m pip install logzero + ``` + Example Usage ------------- @@ -64,6 +71,9 @@ # Start writing into a logfile logzero.logfile("/tmp/logzero-demo.log") + + # Set a minimum loglevel + logzero.loglevel(logzero.WARNING) ``` This is the output: @@ -127,6 +137,11 @@ Install `logzero` with [pip](https://pip.pypa.io): + ```shell + python -m pip install logzero + ``` + + Here's how you setup a virtualenv and download and run the demo: ```shell # Create and activate a virtualenv in ./venv/ @@ -237,14 +252,22 @@ History ======= - 1.6.1 (2020-11-15) + 1.6.5 (2021-03-17) + ------------------ + - Export loglevels directly (you can use eg. `logzero.DEBUG` instead of `logging.DEBUG`) + - `setup_default_logger` use `backupCount` + - Update dependencies + - PRs: (386)[https://github.com/metachris/logzero/pull/386] + + + 1.6.3 (2020-11-15) ------------------ - JSON logging with UTF-8 enabled by default ([PR 357](https://github.com/metachris/logzero/pull/357)) - 1.6.0 (2020-10-29) - ------------------ + 1.6.0 (1.6.2) (2020-10-29) + -------------------------- - JSON logging support ([PR 344][]) - Ability to easily change colors ([\#82][]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logzero-1.6.3/README.md new/logzero-1.7.0/README.md --- old/logzero-1.6.3/README.md 2020-11-15 11:04:49.000000000 +0100 +++ new/logzero-1.7.0/README.md 2021-03-17 12:24:13.000000000 +0100 @@ -4,6 +4,7 @@ [](https://logzero.readthedocs.io/en/latest/?badge=latest) [](https://pypi.python.org/pypi/logzero) [](https://anaconda.org/conda-forge/logzero) +[](https://pepy.tech/project/logzero) Robust and effective logging for Python 2 and 3. @@ -31,6 +32,12 @@ * Heavily inspired by the [Tornado web framework](https://github.com/tornadoweb/tornado). +Installation: + +```shell +python -m pip install logzero +``` + Example Usage ------------- @@ -56,6 +63,9 @@ # Start writing into a logfile logzero.logfile("/tmp/logzero-demo.log") + +# Set a minimum loglevel +logzero.loglevel(logzero.WARNING) ``` This is the output: @@ -119,6 +129,11 @@ Install `logzero` with [pip](https://pip.pypa.io): +```shell +python -m pip install logzero +``` + +Here's how you setup a virtualenv and download and run the demo: ```shell # Create and activate a virtualenv in ./venv/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logzero-1.6.3/docs/conf.py new/logzero-1.7.0/docs/conf.py --- old/logzero-1.6.3/docs/conf.py 2020-11-15 11:04:49.000000000 +0100 +++ new/logzero-1.7.0/docs/conf.py 2021-03-17 12:24:13.000000000 +0100 @@ -15,6 +15,7 @@ import sys import os +import sphinx_rtd_theme # If extensions (or modules to document with autodoc) are in another # directory, add these directories to sys.path here. If the directory is @@ -40,7 +41,7 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx_rtd_theme'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -111,14 +112,15 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +# html_theme = 'default' +html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a # theme further. For a list of options available for each theme, see the # documentation. html_theme_options = { - 'navigation_depth': 4, - 'collapse_navigation': False + 'collapse_navigation': False, + 'navigation_depth': -1 } # Add any paths that contain custom themes here, relative to this directory. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logzero-1.6.3/docs/index.rst new/logzero-1.7.0/docs/index.rst --- old/logzero-1.6.3/docs/index.rst 2020-11-15 11:04:49.000000000 +0100 +++ new/logzero-1.7.0/docs/index.rst 2021-03-17 12:24:13.000000000 +0100 @@ -204,7 +204,7 @@ logger.debug("hello") # Set a minimum log level - logzero.loglevel(logging.INFO) + logzero.loglevel(logzero.INFO) # Set a logfile (all future log messages are also saved there) logzero.logfile("/tmp/logfile.log") @@ -213,7 +213,7 @@ logzero.logfile("/tmp/logfile.log", disableStderrLogger=True) # You can also set a different loglevel for the file handler - logzero.logfile("/tmp/logfile.log", loglevel=logging.ERROR) + logzero.logfile("/tmp/logfile.log", loglevel=logzero.ERROR) # Set a rotating logfile (replaces the previous logfile handler) logzero.logfile("/tmp/rotating-logfile.log", maxBytes=1000000, backupCount=3) @@ -249,8 +249,8 @@ from logzero import setup_logger logger1 = setup_logger(name="mylogger1") - logger2 = setup_logger(name="mylogger2", logfile="/tmp/test-logger2.log", level=logging.INFO) - logger3 = setup_logger(name="mylogger3", logfile="/tmp/test-logger3.log", level=logging.INFO, disableStderrLogger=True) + logger2 = setup_logger(name="mylogger2", logfile="/tmp/test-logger2.log", level=logzero.INFO) + logger3 = setup_logger(name="mylogger3", logfile="/tmp/test-logger3.log", level=logzero.INFO, disableStderrLogger=True) # Log something: logger1.info("info for logger 1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logzero-1.6.3/logzero/__init__.py new/logzero-1.7.0/logzero/__init__.py --- old/logzero-1.6.3/logzero/__init__.py 2020-11-15 11:04:49.000000000 +0100 +++ new/logzero-1.7.0/logzero/__init__.py 2021-03-17 12:24:13.000000000 +0100 @@ -29,7 +29,7 @@ logger = logzero.setup_logger(logfile="/tmp/test.log") -The default loglevel is `logging.DEBUG`. You can set it with the +The default loglevel is `DEBUG`. You can set it with the parameter `level`. See the documentation for more information: https://logzero.readthedocs.io @@ -42,6 +42,7 @@ from logzero.jsonlogger import JsonFormatter from logging.handlers import RotatingFileHandler, SysLogHandler +from logging import CRITICAL, ERROR, WARNING, WARN, INFO, DEBUG, NOTSET # noqa: F401 try: import curses # type: ignore @@ -50,7 +51,7 @@ __author__ = """Chris Hager""" __email__ = 'ch...@linuxuser.at' -__version__ = '1.6.3' +__version__ = '1.7.0' # Python 2+3 compatibility settings for logger bytes_type = bytes @@ -67,11 +68,11 @@ DEFAULT_FORMAT = '%(color)s[%(levelname)1.1s %(asctime)s %(module)s:%(lineno)d]%(end_color)s %(message)s' DEFAULT_DATE_FORMAT = '%y%m%d %H:%M:%S' DEFAULT_COLORS = { - logging.DEBUG: ForegroundColors.CYAN, - logging.INFO: ForegroundColors.GREEN, - logging.WARNING: ForegroundColors.YELLOW, - logging.ERROR: ForegroundColors.RED, - logging.CRITICAL: ForegroundColors.RED + DEBUG: ForegroundColors.CYAN, + INFO: ForegroundColors.GREEN, + WARNING: ForegroundColors.YELLOW, + ERROR: ForegroundColors.RED, + CRITICAL: ForegroundColors.RED } # Name of the internal default logger @@ -87,7 +88,7 @@ logger = None # Current state of the internal logging settings -_loglevel = logging.DEBUG +_loglevel = DEBUG _logfile = None _formatter = None @@ -97,7 +98,7 @@ colorama_init() -def setup_logger(name=__name__, logfile=None, level=logging.DEBUG, formatter=None, maxBytes=0, backupCount=0, fileLoglevel=None, disableStderrLogger=False, isRootLogger=False, json=False, json_ensure_ascii=False): +def setup_logger(name=__name__, logfile=None, level=DEBUG, formatter=None, maxBytes=0, backupCount=0, fileLoglevel=None, disableStderrLogger=False, isRootLogger=False, json=False, json_ensure_ascii=False): """ Configures and returns a fully configured logger instance, no hassles. If a logger with the specified name already exists, it returns the existing instance, @@ -116,7 +117,7 @@ :arg string name: Name of the `Logger object <https://docs.python.org/2/library/logging.html#logger-objects>`_. Multiple calls to ``setup_logger()`` with the same name will always return a reference to the same Logger object. (default: ``__name__``) :arg string logfile: If set, also write logs to the specified filename. - :arg int level: Minimum `logging-level <https://docs.python.org/2/library/logging.html#logging-levels>`_ to display (default: ``logging.DEBUG``). + :arg int level: Minimum `logging-level <https://docs.python.org/2/library/logging.html#logging-levels>`_ to display (default: ``DEBUG``). :arg Formatter formatter: `Python logging Formatter object <https://docs.python.org/2/library/logging.html#formatter-objects>`_ (by default uses the internal LogFormatter). :arg int maxBytes: Size of the logfile when rollover should occur. Defaults to 0, rollover never occurs. :arg int backupCount: Number of backups to keep. Defaults to 0, rollover never occurs. @@ -304,7 +305,7 @@ return repr(s) -def setup_default_logger(logfile=None, level=logging.DEBUG, formatter=None, maxBytes=0, backupCount=0, disableStderrLogger=False): +def setup_default_logger(logfile=None, level=DEBUG, formatter=None, maxBytes=0, backupCount=0, disableStderrLogger=False): """ Deprecated. Use `logzero.loglevel(..)`, `logzero.logfile(..)`, etc. @@ -315,18 +316,18 @@ .. code-block:: python from logzero import logger, setup_default_logger - setup_default_logger(level=logging.WARN) + setup_default_logger(level=WARN) logger.info("hello") # this will not be displayed anymore because minimum loglevel was set to WARN :arg string logfile: If set, also write logs to the specified filename. - :arg int level: Minimum `logging-level <https://docs.python.org/2/library/logging.html#logging-levels>`_ to display (default: `logging.DEBUG`). + :arg int level: Minimum `logging-level <https://docs.python.org/2/library/logging.html#logging-levels>`_ to display (default: `DEBUG`). :arg Formatter formatter: `Python logging Formatter object <https://docs.python.org/2/library/logging.html#formatter-objects>`_ (by default uses the internal LogFormatter). :arg int maxBytes: Size of the logfile when rollover should occur. Defaults to 0, rollover never occurs. :arg int backupCount: Number of backups to keep. Defaults to 0, rollover never occurs. :arg bool disableStderrLogger: Should the default stderr logger be disabled. Defaults to False. """ global logger - logger = setup_logger(name=LOGZERO_DEFAULT_LOGGER, logfile=logfile, level=level, formatter=formatter, disableStderrLogger=disableStderrLogger) + logger = setup_logger(name=LOGZERO_DEFAULT_LOGGER, logfile=logfile, level=level, formatter=formatter, backupCount=backupCount, disableStderrLogger=disableStderrLogger) return logger @@ -338,7 +339,7 @@ global _loglevel global _logfile global _formatter - _loglevel = logging.DEBUG + _loglevel = DEBUG _logfile = None _formatter = None @@ -355,14 +356,14 @@ reset_default_logger() -def loglevel(level=logging.DEBUG, update_custom_handlers=False): +def loglevel(level=DEBUG, update_custom_handlers=False): """ Set the minimum loglevel for the default logger (`logzero.logger`) and all handlers. This reconfigures only the internal handlers of the default logger (eg. stream and logfile). You can also update the loglevel for custom handlers by using `update_custom_handlers=True`. - :arg int level: Minimum `logging-level <https://docs.python.org/2/library/logging.html#logging-levels>`_ to display (default: `logging.DEBUG`). + :arg int level: Minimum `logging-level <https://docs.python.org/2/library/logging.html#logging-levels>`_ to display (default: `DEBUG`). :arg bool update_custom_handlers: If you added custom handlers to this logger and want this to update them too, you need to set `update_custom_handlers` to `True` """ logger.setLevel(level) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logzero-1.6.3/logzero.egg-info/PKG-INFO new/logzero-1.7.0/logzero.egg-info/PKG-INFO --- old/logzero-1.6.3/logzero.egg-info/PKG-INFO 2020-11-15 11:04:50.000000000 +0100 +++ new/logzero-1.7.0/logzero.egg-info/PKG-INFO 2021-03-17 12:24:17.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: logzero -Version: 1.6.3 +Version: 1.7.0 Summary: Robust and effective logging for Python 2 and 3 Home-page: https://github.com/metachris/logzero Author: Chris Hager @@ -12,6 +12,7 @@ [](https://logzero.readthedocs.io/en/latest/?badge=latest) [](https://pypi.python.org/pypi/logzero) [](https://anaconda.org/conda-forge/logzero) + [](https://pepy.tech/project/logzero) Robust and effective logging for Python 2 and 3. @@ -39,6 +40,12 @@ * Heavily inspired by the [Tornado web framework](https://github.com/tornadoweb/tornado). + Installation: + + ```shell + python -m pip install logzero + ``` + Example Usage ------------- @@ -64,6 +71,9 @@ # Start writing into a logfile logzero.logfile("/tmp/logzero-demo.log") + + # Set a minimum loglevel + logzero.loglevel(logzero.WARNING) ``` This is the output: @@ -127,6 +137,11 @@ Install `logzero` with [pip](https://pip.pypa.io): + ```shell + python -m pip install logzero + ``` + + Here's how you setup a virtualenv and download and run the demo: ```shell # Create and activate a virtualenv in ./venv/ @@ -237,14 +252,22 @@ History ======= - 1.6.1 (2020-11-15) + 1.6.5 (2021-03-17) + ------------------ + - Export loglevels directly (you can use eg. `logzero.DEBUG` instead of `logging.DEBUG`) + - `setup_default_logger` use `backupCount` + - Update dependencies + - PRs: (386)[https://github.com/metachris/logzero/pull/386] + + + 1.6.3 (2020-11-15) ------------------ - JSON logging with UTF-8 enabled by default ([PR 357](https://github.com/metachris/logzero/pull/357)) - 1.6.0 (2020-10-29) - ------------------ + 1.6.0 (1.6.2) (2020-10-29) + -------------------------- - JSON logging support ([PR 344][]) - Ability to easily change colors ([\#82][]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logzero-1.6.3/setup.cfg new/logzero-1.7.0/setup.cfg --- old/logzero-1.6.3/setup.cfg 2020-11-15 11:04:50.700741500 +0100 +++ new/logzero-1.7.0/setup.cfg 2021-03-17 12:24:17.513669500 +0100 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.6.3 +current_version = 1.7.0 commit = True tag = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logzero-1.6.3/setup.py new/logzero-1.7.0/setup.py --- old/logzero-1.6.3/setup.py 2020-11-15 11:04:49.000000000 +0100 +++ new/logzero-1.7.0/setup.py 2021-03-17 12:24:13.000000000 +0100 @@ -13,7 +13,7 @@ setup( name='logzero', - version='1.6.3', + version='1.7.0', description="Robust and effective logging for Python 2 and 3", long_description=readme + '\n\n' + history, long_description_content_type='text/markdown', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logzero-1.6.3/tests/test_logzero.py new/logzero-1.7.0/tests/test_logzero.py --- old/logzero-1.6.3/tests/test_logzero.py 2020-11-15 11:04:49.000000000 +0100 +++ new/logzero-1.7.0/tests/test_logzero.py 2021-03-17 12:24:13.000000000 +0100 @@ -64,7 +64,7 @@ logzero.reset_default_logger() temp = tempfile.NamedTemporaryFile() try: - logger = logzero.setup_logger(logfile=temp.name, level=logging.INFO) + logger = logzero.setup_logger(logfile=temp.name, level=logzero.INFO) logger.debug("test log output") with open(temp.name) as f: @@ -152,14 +152,14 @@ logzero.logger.debug("debug1") # will be logged # Reconfigure with loglevel INFO - logzero.setup_default_logger(logfile=temp.name, level=logging.INFO, disableStderrLogger=disableStdErrorLogger) + logzero.setup_default_logger(logfile=temp.name, level=logzero.INFO, disableStderrLogger=disableStdErrorLogger) logzero.logger.debug("debug2") # will not be logged logzero.logger.info("info1") # will be logged # Reconfigure with a different formatter log_format = '%(color)s[xxx]%(end_color)s %(message)s' formatter = logzero.LogFormatter(fmt=log_format) - logzero.setup_default_logger(logfile=temp.name, level=logging.INFO, formatter=formatter, disableStderrLogger=disableStdErrorLogger) + logzero.setup_default_logger(logfile=temp.name, level=logzero.INFO, formatter=formatter, disableStderrLogger=disableStdErrorLogger) logzero.logger.info("info2") # will be logged with new formatter logzero.logger.debug("debug3") # will not be logged @@ -192,7 +192,7 @@ # Add a custom file handler filehandler = logging.FileHandler(temp2.name) - filehandler.setLevel(logging.DEBUG) + filehandler.setLevel(logzero.DEBUG) filehandler.setFormatter(logzero.LogFormatter(color=False)) logzero.logger.addHandler(filehandler) @@ -208,12 +208,12 @@ logzero.logger.debug("debug3") # Reconfigure logger to set minimum loglevel to INFO - logzero.setup_default_logger(logfile=temp.name, level=logging.INFO) + logzero.setup_default_logger(logfile=temp.name, level=logzero.INFO) logzero.logger.debug("debug4") logzero.logger.info("info1") # Reconfigure logger to set minimum loglevel back to DEBUG - logzero.setup_default_logger(logfile=temp.name, level=logging.DEBUG) + logzero.setup_default_logger(logfile=temp.name, level=logzero.DEBUG) logzero.logger.debug("debug5") with open(temp.name) as f: @@ -245,7 +245,7 @@ logzero.reset_default_logger() temp = tempfile.NamedTemporaryFile() try: - logger = logzero.setup_logger(logfile=temp.name, fileLoglevel=logging.WARN) + logger = logzero.setup_logger(logfile=temp.name, fileLoglevel=logzero.WARN) logger.info("info1") logger.warning("warn1") @@ -306,8 +306,8 @@ logzero.reset_default_logger() temp = tempfile.NamedTemporaryFile() try: - logzero.loglevel(level=logging.INFO) - logzero.logfile(temp.name, loglevel=logging.DEBUG) + logzero.loglevel(level=logzero.INFO) + logzero.logfile(temp.name, loglevel=logzero.DEBUG) logzero.logger.debug("debug") logzero.logger.info("info") @@ -327,7 +327,7 @@ """ temp = tempfile.NamedTemporaryFile() try: - logger = logzero.setup_logger(level=logging.INFO, logfile=temp.name, fileLoglevel=logging.DEBUG) + logger = logzero.setup_logger(level=logzero.INFO, logfile=temp.name, fileLoglevel=logzero.DEBUG) logger.debug("debug") logger.info("info") with open(temp.name) as f: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logzero-1.6.3/tests/test_new_api.py new/logzero-1.7.0/tests/test_new_api.py --- old/logzero-1.6.3/tests/test_new_api.py 2020-11-15 11:04:49.000000000 +0100 +++ new/logzero-1.7.0/tests/test_new_api.py 2021-03-17 12:24:13.000000000 +0100 @@ -8,8 +8,6 @@ """ import os import tempfile -import logging - import logzero @@ -54,7 +52,7 @@ try: logzero.logfile(temp.name) logzero.logger.info("info1") - logzero.loglevel(logging.WARN) + logzero.loglevel(logzero.WARN) logzero.logger.info("info2") logzero.logger.warning("warn1") @@ -79,7 +77,7 @@ # try: # logzero.logfile(temp.name) # logzero.logger.info("info1") - # logzero.loglevel(logging.WARN) + # logzero.loglevel(logzero.WARN) # logzero.logger.info("info2") # logzero.logger.warning("warn1") @@ -131,13 +129,13 @@ temp = tempfile.NamedTemporaryFile() try: # Set logfile with custom loglevel - logzero.logfile(temp.name, loglevel=logging.WARN) + logzero.logfile(temp.name, loglevel=logzero.WARN) logzero.logger.info("info1") logzero.logger.warning("warn1") # If setting a loglevel with logzero.loglevel(..) it will not overwrite # the custom loglevel of the file handler - logzero.loglevel(logging.INFO) + logzero.loglevel(logzero.INFO) logzero.logger.info("info2") logzero.logger.warning("warn2")