Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-charset-normalizer for 
openSUSE:Factory checked in at 2021-12-09 19:45:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-charset-normalizer (Old)
 and      /work/SRC/openSUSE:Factory/.python-charset-normalizer.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-charset-normalizer"

Thu Dec  9 19:45:18 2021 rev:10 rq:936118 version:2.0.9

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-charset-normalizer/python-charset-normalizer.changes
      2021-12-02 02:22:34.933166895 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-charset-normalizer.new.2520/python-charset-normalizer.changes
    2021-12-09 19:45:33.473131770 +0100
@@ -1,0 +2,8 @@
+Mon Dec  6 20:08:41 UTC 2021 - Dirk M??ller <dmuel...@suse.com>
+
+- update to 2.0.9:
+  * Moderating the logging impact (since 2.0.8) for specific
+    environments
+  * Wrong logging level applied when setting kwarg `explain` to True 
+
+-------------------------------------------------------------------

Old:
----
  charset_normalizer-2.0.8.tar.gz

New:
----
  charset_normalizer-2.0.9.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-charset-normalizer.spec ++++++
--- /var/tmp/diff_new_pack.XUBl56/_old  2021-12-09 19:45:34.165132104 +0100
+++ /var/tmp/diff_new_pack.XUBl56/_new  2021-12-09 19:45:34.169132106 +0100
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-charset-normalizer
-Version:        2.0.8
+Version:        2.0.9
 Release:        0
 Summary:        Python Universal Charset detector
 License:        MIT

++++++ charset_normalizer-2.0.8.tar.gz -> charset_normalizer-2.0.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/charset_normalizer-2.0.8/.codecov.yml 
new/charset_normalizer-2.0.9/.codecov.yml
--- old/charset_normalizer-2.0.8/.codecov.yml   1970-01-01 01:00:00.000000000 
+0100
+++ new/charset_normalizer-2.0.9/.codecov.yml   2021-12-03 20:26:17.000000000 
+0100
@@ -0,0 +1,8 @@
+coverage:
+  status:
+    project:
+      default:
+        target: 88%
+        threshold: null
+    patch: false
+    changes: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/charset_normalizer-2.0.8/CHANGELOG.md 
new/charset_normalizer-2.0.9/CHANGELOG.md
--- old/charset_normalizer-2.0.8/CHANGELOG.md   2021-11-24 20:42:56.000000000 
+0100
+++ new/charset_normalizer-2.0.9/CHANGELOG.md   2021-12-03 20:26:17.000000000 
+0100
@@ -2,6 +2,14 @@
 All notable changes to charset-normalizer will be documented in this file. 
This project adheres to [Semantic 
Versioning](https://semver.org/spec/v2.0.0.html).
 The format is based on [Keep a 
Changelog](https://keepachangelog.com/en/1.0.0/).
 
+## [2.0.9](https://github.com/Ousret/charset_normalizer/compare/2.0.8...2.0.9) 
(2021-12-03)
+
+### Changed
+- Moderating the logging impact (since 2.0.8) for specific environments (PR 
#147)
+
+### Fixed
+- Wrong logging level applied when setting kwarg `explain` to True (PR #146)
+
 ## [2.0.8](https://github.com/Ousret/charset_normalizer/compare/2.0.7...2.0.8) 
(2021-11-24)
 ### Changed
 - Improvement over Vietnamese detection (PR #126)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/charset_normalizer-2.0.8/charset_normalizer/api.py 
new/charset_normalizer-2.0.9/charset_normalizer/api.py
--- old/charset_normalizer-2.0.8/charset_normalizer/api.py      2021-11-24 
20:42:56.000000000 +0100
+++ new/charset_normalizer-2.0.9/charset_normalizer/api.py      2021-12-03 
20:26:17.000000000 +0100
@@ -68,20 +68,21 @@
         )
 
     if explain:
+        previous_logger_level = logger.level  # type: int
         logger.addHandler(explain_handler)
+        logger.setLevel(logging.DEBUG)
 
     length = len(sequences)  # type: int
 
     if length == 0:
-        logger.warning(
-            "Given content is empty, stopping the process very early, 
returning empty utf_8 str match"
-        )
+        logger.warning("Encoding detection on empty bytes, assuming utf_8 
intention.")
         if explain:
             logger.removeHandler(explain_handler)
+            logger.setLevel(previous_logger_level or logging.WARNING)
         return CharsetMatches([CharsetMatch(sequences, "utf_8", 0.0, False, 
[], "")])
 
     if cp_isolation is not None:
-        logger.warning(
+        logger.debug(
             "cp_isolation is set. use this flag for debugging purpose. "
             "limited list of encoding allowed : %s.",
             ", ".join(cp_isolation),
@@ -91,7 +92,7 @@
         cp_isolation = []
 
     if cp_exclusion is not None:
-        logger.warning(
+        logger.debug(
             "cp_exclusion is set. use this flag for debugging purpose. "
             "limited list of encoding excluded : %s.",
             ", ".join(cp_exclusion),
@@ -101,7 +102,7 @@
         cp_exclusion = []
 
     if length <= (chunk_size * steps):
-        logger.warning(
+        logger.debug(
             "override steps (%i) and chunk_size (%i) as content does not fit 
(%i byte(s) given) parameters.",
             steps,
             chunk_size,
@@ -187,7 +188,7 @@
         )  # type: bool
 
         if encoding_iana in {"utf_16", "utf_32"} and not bom_or_sig_available:
-            logger.info(
+            logger.debug(
                 "Encoding %s wont be tested as-is because it require a BOM. 
Will try some sub-encoder LE/BE.",
                 encoding_iana,
             )
@@ -218,7 +219,7 @@
                 )
         except (UnicodeDecodeError, LookupError) as e:
             if not isinstance(e, LookupError):
-                logger.warning(
+                logger.debug(
                     "Code page %s does not fit given bytes sequence at ALL. 
%s",
                     encoding_iana,
                     str(e),
@@ -234,7 +235,7 @@
                 break
 
         if similar_soft_failure_test:
-            logger.warning(
+            logger.info(
                 "%s is deemed too similar to code page %s and was consider 
unsuited already. Continuing!",
                 encoding_iana,
                 encoding_soft_failed,
@@ -329,7 +330,7 @@
         )  # type: float
         if mean_mess_ratio >= threshold or early_stop_count >= 
max_chunk_gave_up:
             tested_but_soft_failure.append(encoding_iana)
-            logger.warning(
+            logger.info(
                 "%s was excluded because of initial chaos probing. Gave up %i 
time(s). "
                 "Computed mean chaos is %f %%.",
                 encoding_iana,
@@ -419,6 +420,7 @@
             )
             if explain:
                 logger.removeHandler(explain_handler)
+                logger.setLevel(previous_logger_level)
             return CharsetMatches([results[encoding_iana]])
 
         if encoding_iana == sig_encoding:
@@ -428,6 +430,7 @@
             )
             if explain:
                 logger.removeHandler(explain_handler)
+                logger.setLevel(previous_logger_level)
             return CharsetMatches([results[encoding_iana]])
 
     if len(results) == 0:
@@ -458,6 +461,7 @@
 
     if explain:
         logger.removeHandler(explain_handler)
+        logger.setLevel(previous_logger_level)
 
     return results
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/charset_normalizer-2.0.8/charset_normalizer/version.py 
new/charset_normalizer-2.0.9/charset_normalizer/version.py
--- old/charset_normalizer-2.0.8/charset_normalizer/version.py  2021-11-24 
20:42:56.000000000 +0100
+++ new/charset_normalizer-2.0.9/charset_normalizer/version.py  2021-12-03 
20:26:17.000000000 +0100
@@ -2,5 +2,5 @@
 Expose version
 """
 
-__version__ = "2.0.8"
+__version__ = "2.0.9"
 VERSION = __version__.split(".")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/charset_normalizer-2.0.8/docs/conf.py 
new/charset_normalizer-2.0.9/docs/conf.py
--- old/charset_normalizer-2.0.8/docs/conf.py   2021-11-24 20:42:56.000000000 
+0100
+++ new/charset_normalizer-2.0.9/docs/conf.py   2021-12-03 20:26:17.000000000 
+0100
@@ -74,7 +74,7 @@
 # The short X.Y version.
 version = '2.0'
 # The full version, including alpha/beta/rc tags.
-release = '2.0.8'
+release = '2.0.9'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/charset_normalizer-2.0.8/tests/test_logging.py 
new/charset_normalizer-2.0.9/tests/test_logging.py
--- old/charset_normalizer-2.0.8/tests/test_logging.py  2021-11-24 
20:42:56.000000000 +0100
+++ new/charset_normalizer-2.0.9/tests/test_logging.py  2021-12-03 
20:26:17.000000000 +0100
@@ -10,7 +10,7 @@
         self.logger = logging.getLogger("charset_normalizer")
         self.logger.handlers.clear()
         self.logger.addHandler(logging.NullHandler())
-        self.logger.level = None
+        self.logger.level = logging.WARNING
 
     def test_explain_true_behavior(self, caplog):
         test_sequence = b'This is a test sequence of bytes that should be 
sufficient'

Reply via email to