Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-sphinxcontrib-plantuml for openSUSE:Factory checked in at 2024-03-13 22:21:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-sphinxcontrib-plantuml (Old) and /work/SRC/openSUSE:Factory/.python-sphinxcontrib-plantuml.new.1770 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sphinxcontrib-plantuml" Wed Mar 13 22:21:12 2024 rev:9 rq:1157653 version:0.29 Changes: -------- --- /work/SRC/openSUSE:Factory/python-sphinxcontrib-plantuml/python-sphinxcontrib-plantuml.changes 2024-03-08 18:10:13.108431315 +0100 +++ /work/SRC/openSUSE:Factory/.python-sphinxcontrib-plantuml.new.1770/python-sphinxcontrib-plantuml.changes 2024-03-13 22:22:30.508967914 +0100 @@ -1,0 +2,8 @@ +Wed Mar 13 15:27:29 UTC 2024 - Dirk Müller <dmuel...@suse.com> + +- update to 0.29: + * fix deprecation warning during batch processing + * fix markdown-ness in README + * pass max width to latex adjustbox + +------------------------------------------------------------------- Old: ---- sphinxcontrib-plantuml-0.27.tar.gz New: ---- sphinxcontrib-plantuml-0.29.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-sphinxcontrib-plantuml.spec ++++++ --- /var/tmp/diff_new_pack.5rpkYs/_old 2024-03-13 22:22:30.968984893 +0100 +++ /var/tmp/diff_new_pack.5rpkYs/_new 2024-03-13 22:22:30.968984893 +0100 @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-sphinxcontrib-plantuml -Version: 0.27 +Version: 0.29 Release: 0 Summary: Sphinx API for Web Apps License: BSD-2-Clause ++++++ sphinxcontrib-plantuml-0.27.tar.gz -> sphinxcontrib-plantuml-0.29.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-0.27/README.rst new/plantuml-0.29/README.rst --- old/plantuml-0.27/README.rst 2023-10-31 10:36:11.000000000 +0100 +++ new/plantuml-0.29/README.rst 2024-03-10 11:30:21.000000000 +0100 @@ -36,7 +36,8 @@ EOT % chmod +x /usr/local/bin/plantuml -Then, write PlantUML text under the ``.. uml::`` directive:: +Then, write PlantUML text under the ``.. uml::`` (or ``.. plantuml::``) +directive:: .. uml:: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-0.27/setup.py new/plantuml-0.29/setup.py --- old/plantuml-0.27/setup.py 2023-10-31 10:36:11.000000000 +0100 +++ new/plantuml-0.29/setup.py 2024-03-10 11:30:21.000000000 +0100 @@ -6,7 +6,7 @@ setup( name='sphinxcontrib-plantuml', - version='0.27', + version='0.29', url='https://github.com/sphinx-contrib/plantuml/', download_url='https://pypi.python.org/pypi/sphinxcontrib-plantuml', license='BSD', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-0.27/sphinxcontrib/plantuml.py new/plantuml-0.29/sphinxcontrib/plantuml.py --- old/plantuml-0.27/sphinxcontrib/plantuml.py 2023-10-31 10:36:11.000000000 +0100 +++ new/plantuml-0.29/sphinxcontrib/plantuml.py 2024-03-10 11:30:21.000000000 +0100 @@ -24,7 +24,7 @@ from docutils.parsers.rst import directives from docutils.parsers.rst import Directive -from sphinx import util +import sphinx from sphinx.errors import SphinxError from sphinx.util import ( i18n, @@ -327,11 +327,17 @@ self._pending_keys.append(key) def render_batches(self): + if sphinx.version_info[:2] >= (6, 1): + from sphinx.util.display import progress_message + else: + from sphinx.util import progress_message + pending_keys = sorted(self._pending_keys) for fileformat in self.image_formats: for i in range(0, len(pending_keys), self.batch_size): keys = pending_keys[i : i + self.batch_size] - with util.progress_message( + + with progress_message( 'rendering plantuml diagrams [%d..%d/%d]' % (i, i + len(keys), len(pending_keys)) ): @@ -626,7 +632,7 @@ ) -def _latex_adjustbox_options(self, node): +def _latex_adjustbox_options(self, node): # noqa: C901 adjustbox_options = [] if 'width' in node: if 'scale' in node: @@ -645,6 +651,13 @@ if 'scale' in node: if not adjustbox_options: adjustbox_options.append('scale=%s' % (float(node['scale']) / 100.0)) + if 'max-width' in node: + if 'scale' in node: + w = self.latex_image_length(node['max-width'], node['scale']) + else: + w = self.latex_image_length(node['max-width']) + if w: + adjustbox_options.append('max width=%s' % w) return adjustbox_options @@ -796,6 +809,7 @@ def setup(app): app.add_node(plantuml, **_NODE_VISITORS) app.add_directive('uml', UmlDirective) + app.add_directive('plantuml', UmlDirective) try: app.add_config_value('plantuml', 'plantuml', 'html', types=(str, tuple, list)) except TypeError: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plantuml-0.27/tests/test_functional.py new/plantuml-0.29/tests/test_functional.py --- old/plantuml-0.27/tests/test_functional.py 2023-10-31 10:36:11.000000000 +0100 +++ new/plantuml-0.29/tests/test_functional.py 2024-03-10 11:30:21.000000000 +0100 @@ -309,6 +309,19 @@ readfile('plantuml_fixture.tex')) +@with_runsphinx('latex', plantuml_latex_output_format='tikz') +def test_buildlatex_simple_max_width_with_tikz(): + """Generate simple LaTeX with TikZ + + .. uml:: + :max-width: 50mm + + Hello + """ + assert re.search(br'\\adjustbox\{max width=50mm\}\{\\input\{+plantuml-', + readfile('plantuml_fixture.tex')) + + @with_runsphinx('latex', plantuml_latex_output_format='pdf') def test_buildlatex_simple_with_pdf(): """Generate simple LaTeX with PDF