Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-mkdocs for openSUSE:Factory 
checked in at 2023-08-08 15:54:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mkdocs (Old)
 and      /work/SRC/openSUSE:Factory/.python-mkdocs.new.22712 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-mkdocs"

Tue Aug  8 15:54:44 2023 rev:11 rq:1102738 version:1.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-mkdocs/python-mkdocs.changes      
2023-08-02 16:51:15.533794741 +0200
+++ /work/SRC/openSUSE:Factory/.python-mkdocs.new.22712/python-mkdocs.changes   
2023-08-08 15:54:47.452939393 +0200
@@ -1,0 +2,19 @@
+Fri Aug  4 07:34:55 UTC 2023 - Johannes Kastl <ka...@b1-systems.de>
+
+- update to 1.5.2:
+  * Bugfix (regression in 1.5.0): Restore functionality of
+    --no-livereload. (#3320)
+  * Bugfix (regression in 1.5.0): The new page title detection
+    would sometimes be unable to drop anchorlinks - fix that.
+    (#3325)
+  * Partly bring back pre-1.5 API: extra_javascript items will once
+    again be mostly strings, and only sometimes ExtraStringValue
+    (when the extra script functionality is used).
+  * Plugins should be free to append strings to
+    config.extra_javascript, but when reading the values, they must
+    still make sure to read it as str(value) in case it is an
+    ExtraScriptValue item. For querying the attributes such as
+    .type you need to check isinstance first. Static type checking
+    will guide you in that. (#3324)
+
+-------------------------------------------------------------------

Old:
----
  mkdocs-1.5.1.tar.gz

New:
----
  mkdocs-1.5.2.tar.gz

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

Other differences:
------------------
++++++ python-mkdocs.spec ++++++
--- /var/tmp/diff_new_pack.dqdE8e/_old  2023-08-08 15:54:48.584946477 +0200
+++ /var/tmp/diff_new_pack.dqdE8e/_new  2023-08-08 15:54:48.588946503 +0200
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-mkdocs
-Version:        1.5.1
+Version:        1.5.2
 Release:        0
 Summary:        Project documentation with Markdown
 License:        BSD-2-Clause

++++++ mkdocs-1.5.1.tar.gz -> mkdocs-1.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkdocs-1.5.1/docs/about/release-notes.md 
new/mkdocs-1.5.2/docs/about/release-notes.md
--- old/mkdocs-1.5.1/docs/about/release-notes.md        2023-07-28 
00:42:51.000000000 +0200
+++ new/mkdocs-1.5.2/docs/about/release-notes.md        2023-08-02 
16:51:14.000000000 +0200
@@ -27,6 +27,18 @@
 * [@oprypin](https://github.com/oprypin/)
 * [@ultrabug](https://github.com/ultrabug/)
 
+## Version 1.5.2 (2023-08-02)
+
+*   Bugfix (regression in 1.5.0): Restore functionality of `--no-livereload`. 
(#3320)
+
+*   Bugfix (regression in 1.5.0): The new page title detection would sometimes 
be unable to drop anchorlinks - fix that. (#3325)
+
+*   Partly bring back pre-1.5 API: `extra_javascript` items will once again be 
mostly strings, and only sometimes `ExtraStringValue` (when the extra `script` 
functionality is used).
+
+    Plugins should be free to append strings to `config.extra_javascript`, but 
when reading the values, they must still make sure to read it as `str(value)` 
in case it is an `ExtraScriptValue` item. For querying the attributes such as 
`.type` you need to check `isinstance` first. Static type checking will guide 
you in that. (#3324)
+
+See [commit log](https://github.com/mkdocs/mkdocs/compare/1.5.1...1.5.2).
+
 ## Version 1.5.1 (2023-07-28)
 
 *   Bugfix (regression in 1.5.0): Make it possible to treat `ExtraScriptValue` 
as a path. This lets some plugins still work despite the breaking change.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkdocs-1.5.1/mkdocs/__init__.py 
new/mkdocs-1.5.2/mkdocs/__init__.py
--- old/mkdocs-1.5.1/mkdocs/__init__.py 2023-07-28 00:42:51.000000000 +0200
+++ new/mkdocs-1.5.2/mkdocs/__init__.py 2023-08-02 16:51:14.000000000 +0200
@@ -2,4 +2,4 @@
 
 
 # For acceptable version formats, see https://www.python.org/dev/peps/pep-0440/
-__version__ = '1.5.1'
+__version__ = '1.5.2'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkdocs-1.5.1/mkdocs/__main__.py 
new/mkdocs-1.5.2/mkdocs/__main__.py
--- old/mkdocs-1.5.1/mkdocs/__main__.py 2023-07-28 00:42:51.000000000 +0200
+++ new/mkdocs-1.5.2/mkdocs/__main__.py 2023-08-02 16:51:14.000000000 +0200
@@ -251,8 +251,8 @@
 
 @cli.command(name="serve")
 @click.option('-a', '--dev-addr', help=dev_addr_help, metavar='<IP:PORT>')
-@click.option('--livereload', 'livereload', flag_value='livereload', 
default=True, hidden=True)
-@click.option('--no-livereload', 'livereload', flag_value='no-livereload', 
help=no_reload_help)
+@click.option('--no-livereload', 'livereload', flag_value=False, 
help=no_reload_help)
+@click.option('--livereload', 'livereload', flag_value=True, default=True, 
hidden=True)
 @click.option('--dirtyreload', 'build_type', flag_value='dirty', hidden=True)
 @click.option('--dirty', 'build_type', flag_value='dirty', 
help=serve_dirty_help)
 @click.option('-c', '--clean', 'build_type', flag_value='clean', 
help=serve_clean_help)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkdocs-1.5.1/mkdocs/commands/serve.py 
new/mkdocs-1.5.2/mkdocs/commands/serve.py
--- old/mkdocs-1.5.1/mkdocs/commands/serve.py   2023-07-28 00:42:51.000000000 
+0200
+++ new/mkdocs-1.5.2/mkdocs/commands/serve.py   2023-08-02 16:51:14.000000000 
+0200
@@ -1,6 +1,5 @@
 from __future__ import annotations
 
-import functools
 import logging
 import shutil
 import tempfile
@@ -22,17 +21,13 @@
 
 
 def serve(
-    config_file=None,
-    dev_addr=None,
-    strict=None,
-    theme=None,
-    theme_dir=None,
-    livereload='livereload',
-    build_type=None,
-    watch_theme=False,
-    watch=[],
+    config_file: str | None = None,
+    livereload: bool = True,
+    build_type: str | None = None,
+    watch_theme: bool = False,
+    watch: list[str] = [],
     **kwargs,
-):
+) -> None:
     """
     Start the MkDocs development server
 
@@ -48,16 +43,15 @@
     def mount_path(config: MkDocsConfig):
         return urlsplit(config.site_url or '/').path
 
-    get_config = functools.partial(
-        load_config,
-        config_file=config_file,
-        dev_addr=dev_addr,
-        strict=strict,
-        theme=theme,
-        theme_dir=theme_dir,
-        site_dir=site_dir,
-        **kwargs,
-    )
+    def get_config():
+        config = load_config(
+            config_file=config_file,
+            site_dir=site_dir,
+            **kwargs,
+        )
+        config.watch.extend(watch)
+        config.site_url = f'http://{config.dev_addr}{mount_path(config)}'
+        return config
 
     is_clean = build_type == 'clean'
     is_dirty = build_type == 'dirty'
@@ -70,12 +64,6 @@
         if config is None:
             config = get_config()
 
-        # combine CLI watch arguments with config file values
-        config.watch.extend(watch)
-
-        # Override a few config settings after validation
-        config.site_url = f'http://{config.dev_addr}{mount_path(config)}'
-
         build(config, live_server=None if is_clean else server, dirty=is_dirty)
 
     host, port = config.dev_addr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkdocs-1.5.1/mkdocs/config/config_options.py 
new/mkdocs-1.5.2/mkdocs/config/config_options.py
--- old/mkdocs-1.5.1/mkdocs/config/config_options.py    2023-07-28 
00:42:51.000000000 +0200
+++ new/mkdocs-1.5.2/mkdocs/config/config_options.py    2023-08-02 
16:51:14.000000000 +0200
@@ -945,11 +945,18 @@
         return self.path
 
 
-class ExtraScript(SubConfig[ExtraScriptValue]):
-    def run_validation(self, value: object) -> ExtraScriptValue:
+class ExtraScript(BaseConfigOption[Union[ExtraScriptValue, str]]):
+    def __init__(self):
+        super().__init__()
+        self.option_type = SubConfig[ExtraScriptValue]()
+
+    def run_validation(self, value: object) -> ExtraScriptValue | str:
+        self.option_type.warnings = self.warnings
         if isinstance(value, str):
-            value = {'path': value, 'type': 'module' if value.endswith('.mjs') 
else ''}
-        return super().run_validation(value)
+            if value.endswith('.mjs'):
+                return self.option_type.run_validation({'path': value, 'type': 
'module'})
+            return value
+        return self.option_type.run_validation(value)
 
 
 class MarkdownExtensions(OptionallyRequired[List[str]]):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkdocs-1.5.1/mkdocs/livereload/__init__.py 
new/mkdocs-1.5.2/mkdocs/livereload/__init__.py
--- old/mkdocs-1.5.1/mkdocs/livereload/__init__.py      2023-07-28 
00:42:51.000000000 +0200
+++ new/mkdocs-1.5.2/mkdocs/livereload/__init__.py      2023-08-02 
16:51:14.000000000 +0200
@@ -155,10 +155,11 @@
         self.server_bind()
         self.server_activate()
 
-        self.observer.start()
+        if self._watched_paths:
+            self.observer.start()
 
-        paths_str = ", ".join(f"'{_try_relativize_path(path)}'" for path in 
self._watched_paths)
-        log.info(f"Watching paths for changes: {paths_str}")
+            paths_str = ", ".join(f"'{_try_relativize_path(path)}'" for path 
in self._watched_paths)
+            log.info(f"Watching paths for changes: {paths_str}")
 
         log.info(f"Serving on {self.url}")
         self.serve_thread.start()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkdocs-1.5.1/mkdocs/structure/pages.py 
new/mkdocs-1.5.2/mkdocs/structure/pages.py
--- old/mkdocs-1.5.1/mkdocs/structure/pages.py  2023-07-28 00:42:51.000000000 
+0200
+++ new/mkdocs-1.5.2/mkdocs/structure/pages.py  2023-08-02 16:51:14.000000000 
+0200
@@ -437,7 +437,7 @@
         for el in root:
             if el.tag == 'h1':
                 # Drop anchorlink from the element, if present.
-                if len(el) > 0 and el[-1].tag == 'a' and not (el.tail or 
'').strip():
+                if len(el) > 0 and el[-1].tag == 'a' and not (el[-1].tail or 
'').strip():
                     el = copy.copy(el)
                     del el[-1]
                 # Extract the text only, recursively.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkdocs-1.5.1/mkdocs/tests/cli_tests.py 
new/mkdocs-1.5.2/mkdocs/tests/cli_tests.py
--- old/mkdocs-1.5.1/mkdocs/tests/cli_tests.py  2023-07-28 00:42:51.000000000 
+0200
+++ new/mkdocs-1.5.2/mkdocs/tests/cli_tests.py  2023-08-02 16:51:14.000000000 
+0200
@@ -21,7 +21,7 @@
         self.assertEqual(result.exit_code, 0)
         mock_serve.assert_called_once_with(
             dev_addr=None,
-            livereload='livereload',
+            livereload=True,
             build_type=None,
             config_file=None,
             strict=None,
@@ -53,7 +53,7 @@
         self.assertEqual(result.exit_code, 0)
         mock_serve.assert_called_once_with(
             dev_addr='0.0.0.0:80',
-            livereload='livereload',
+            livereload=True,
             build_type=None,
             config_file=None,
             strict=None,
@@ -70,7 +70,7 @@
         self.assertEqual(result.exit_code, 0)
         mock_serve.assert_called_once_with(
             dev_addr=None,
-            livereload='livereload',
+            livereload=True,
             build_type=None,
             config_file=None,
             strict=True,
@@ -89,7 +89,7 @@
         self.assertEqual(result.exit_code, 0)
         mock_serve.assert_called_once_with(
             dev_addr=None,
-            livereload='livereload',
+            livereload=True,
             build_type=None,
             config_file=None,
             strict=None,
@@ -108,7 +108,7 @@
         self.assertEqual(result.exit_code, 0)
         mock_serve.assert_called_once_with(
             dev_addr=None,
-            livereload='livereload',
+            livereload=True,
             build_type=None,
             config_file=None,
             strict=None,
@@ -127,7 +127,7 @@
         self.assertEqual(result.exit_code, 0)
         mock_serve.assert_called_once_with(
             dev_addr=None,
-            livereload='livereload',
+            livereload=True,
             build_type=None,
             config_file=None,
             strict=None,
@@ -144,7 +144,7 @@
         self.assertEqual(result.exit_code, 0)
         mock_serve.assert_called_once_with(
             dev_addr=None,
-            livereload='livereload',
+            livereload=True,
             build_type=None,
             config_file=None,
             strict=None,
@@ -161,7 +161,7 @@
         self.assertEqual(result.exit_code, 0)
         mock_serve.assert_called_once_with(
             dev_addr=None,
-            livereload='no-livereload',
+            livereload=False,
             build_type=None,
             config_file=None,
             strict=None,
@@ -178,7 +178,7 @@
         self.assertEqual(result.exit_code, 0)
         mock_serve.assert_called_once_with(
             dev_addr=None,
-            livereload='livereload',
+            livereload=True,
             build_type='dirty',
             config_file=None,
             strict=None,
@@ -195,7 +195,7 @@
         self.assertEqual(result.exit_code, 0)
         mock_serve.assert_called_once_with(
             dev_addr=None,
-            livereload='livereload',
+            livereload=True,
             build_type=None,
             config_file=None,
             strict=None,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mkdocs-1.5.1/mkdocs/tests/config/config_options_tests.py 
new/mkdocs-1.5.2/mkdocs/tests/config/config_options_tests.py
--- old/mkdocs-1.5.1/mkdocs/tests/config/config_options_tests.py        
2023-07-28 00:42:51.000000000 +0200
+++ new/mkdocs-1.5.2/mkdocs/tests/config/config_options_tests.py        
2023-08-02 16:51:14.000000000 +0200
@@ -9,7 +9,7 @@
 import sys
 import textwrap
 import unittest
-from typing import TYPE_CHECKING, Any, Dict, List, Optional, TypeVar
+from typing import TYPE_CHECKING, Any, Dict, List, Optional, TypeVar, Union
 from unittest.mock import patch
 
 if TYPE_CHECKING:
@@ -700,14 +700,14 @@
             option = c.ListOfItems(c.ExtraScript(), default=[])
 
         conf = self.get_config(Schema, {'option': ['foo.js', {'path': 
'bar.js', 'async': True}]})
-        assert_type(conf.option, List[c.ExtraScriptValue])
+        assert_type(conf.option, List[Union[c.ExtraScriptValue, str]])
         self.assertEqual(len(conf.option), 2)
-        self.assertIsInstance(conf.option[0], c.ExtraScriptValue)
+        self.assertIsInstance(conf.option[1], c.ExtraScriptValue)
         self.assertEqual(
-            [(x.path, x.type, x.defer, x.async_) for x in conf.option],
+            conf.option,
             [
-                ('foo.js', '', False, False),
-                ('bar.js', '', False, True),
+                'foo.js',
+                {'path': 'bar.js', 'type': '', 'defer': False, 'async': True},
             ],
         )
 
@@ -718,14 +718,14 @@
         conf = self.get_config(
             Schema, {'option': ['foo.mjs', {'path': 'bar.js', 'type': 
'module'}]}
         )
-        assert_type(conf.option, List[c.ExtraScriptValue])
+        assert_type(conf.option, List[Union[c.ExtraScriptValue, str]])
         self.assertEqual(len(conf.option), 2)
         self.assertIsInstance(conf.option[0], c.ExtraScriptValue)
         self.assertEqual(
-            [(x.path, x.type, x.defer, x.async_) for x in conf.option],
+            conf.option,
             [
-                ('foo.mjs', 'module', False, False),
-                ('bar.js', 'module', False, False),
+                {'path': 'foo.mjs', 'type': 'module', 'defer': False, 'async': 
False},
+                {'path': 'bar.js', 'type': 'module', 'defer': False, 'async': 
False},
             ],
         )
 
@@ -748,8 +748,8 @@
             warnings=dict(option="Sub-option 'foo': Unrecognised configuration 
name: foo"),
         )
         self.assertEqual(
-            [(x.path, x.type, x.defer, x.async_) for x in conf.option],
-            [('foo.js', '', False, False)],
+            conf.option,
+            [{'path': 'foo.js', 'type': '', 'defer': False, 'async': False, 
'foo': 'bar'}],
         )
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mkdocs-1.5.1/readthedocs.yml 
new/mkdocs-1.5.2/readthedocs.yml
--- old/mkdocs-1.5.1/readthedocs.yml    2023-07-28 00:42:51.000000000 +0200
+++ new/mkdocs-1.5.2/readthedocs.yml    1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-build:
-  image: latest
-
-python:
-  setup_py_install: true
-
-requirements_file: requirements/project.txt

Reply via email to