Re: Failed test with reportlab-4.0.0

James PK <[email protected]> Fri, 9 Jun 2023 11:10:33 +0100
Newsgroups gmane.comp.python.reportlab.user
Message-ID <CA+QYwF0LC6L6tSrcSqyLs=pdvgAiuc0oVVR7NiE5OiFbGaZs8Q@mail.gmail.com>
--===============2008140877145612411==
Content-Type: multipart/alternative; boundary="0000000000003420f905fdaf908a"

--0000000000003420f905fdaf908a
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Antonio,

Thanks for the feedback and test results. We made changes to our extensions
for bitmaps and text paths in 4.0 (
https://docs.reportlab.com/releases/notes/whats-new-40/),
and it looks like you witnessed that in your test.

However, we have released 4.0.4 that as appropriate, should now skip
specific tests if we can't find the right extensions.

Regards,

James


On Sat, 20 May 2023 at 15:21, Antonio T. sagitter <
[email protected]> wrote:

> Hi all.
>
> A test of reportlab-4.0.0, compiled in Fedora 38 with Python-3.11, is
> failing with these errors:
>
> + cd reportlab-4.0.0
> + cp -a build/lib/reportlab tests/
> + cp -a build/lib/reportlab docs/
> + cp -a build/lib/reportlab docs/userguide/
> + /usr/bin/python3 setup.py tests
> .........Traceback (most recent call last):
>    File
> "/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/docs/userguide/genuserguid=
e.py",
>
> line 107, in <module>
>      main()
>    File
> "/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/docs/userguide/genuserguid=
e.py",
>
> line 105, in main
>      run(pagesize, verbose,outDir)
>    File
> "/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/docs/userguide/genuserguid=
e.py",
>
> line 56, in run
>      exec(open_and_read(f+'.py', mode=3D'r'), G, G)
>    File "<string>", line 175, in <module>
>    File
> "/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/docs/userguide/reportlab/g=
raphics/charts/textlabels.py",
>
> line 20, in <module>
>      from ..utils import text2Path as _text2Path   #here for continuity
>      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>    File
> "/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/docs/userguide/reportlab/g=
raphics/utils.py",
>
> line 255, in <module>
>      globals().update(__makeTextPathsCode__())
>                       ^^^^^^^^^^^^^^^^^^^^^^^
>    File
> "/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/docs/userguide/reportlab/g=
raphics/utils.py",
>
> line 253, in __makeTextPathsCode__
>      raise ImportError(f'Could not create text2PathDescription for using
> backends from {TP!a}')
> ImportError: Could not create text2PathDescription for using backends
> from ('freetype', '_renderPM')
>
> F......s.E.E...............EEEsEEs.......................................=
....................................................................E......=
...........................................................................=
.....................................ss....................................=
..............E...............
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> ERROR: test_graphics_barcode
> (test_graphics_barcode.BarcodeWidgetTestCase.test_graphics_barcode)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/tests/test_graphics_barcod=
e.py",
>
> line 340, in test_graphics_barcode
>
> self.createSample('test_cbcim.png',createBarcodeImageInMemory('EAN13',
> value=3D'123456789012'))
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>    File
> "/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/tests/reportlab/graphics/b=
arcode/__init__.py",
>
> line 152, in createBarcodeImageInMemory
>      return d.asString(format)
>             ^^^^^^^^^^^^^^^^^^
>    File
> "/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/tests/reportlab/graphics/s=
hapes.py",
>
> line 806, in asString
>      from reportlab.graphics import renderPM
>    File
> "/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/tests/reportlab/graphics/r=
enderPM.py",
>
> line 20, in <module>
>      from .utils import setFont as _setFont, RenderPMError
>    File
> "/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/tests/reportlab/graphics/u=
tils.py",
>
> line 255, in <module>
>      globals().update(__makeTextPathsCode__())
>                       ^^^^^^^^^^^^^^^^^^^^^^^
>    File
> "/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/tests/reportlab/graphics/u=
tils.py",
>
> line 253, in __makeTextPathsCode__
>      raise ImportError(f'Could not create text2PathDescription for using
> backends from {TP!a}')
> ImportError: Could not create text2PathDescription for using backends
> from ('freetype', '_renderPM')
>
> I send you the full log attached
>
> Regards.
> --
> ---
> Antonio Trande
> Fedora Project
> mailto: [email protected]
> GPG key: 0x40FDA7B70789A9CD
> GPG keys server: https://keyserver.dcc.sib.swiss/
> _______________________________________________
> reportlab-users mailing list
> [email protected]
> https://pairlist2.pair.net/mailman/listinfo/reportlab-users
>


--=20
--=20
[email protected]

ReportLab Europe Ltd.
Compton Road
Wimbletech - Zone 2
London SW19 7NB, UK
Tel. +44 20 8191 7277

--0000000000003420f905fdaf908a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi Antonio,<br><div><br></div><div>Thanks for the feedback=
 and test results. We made changes to our extensions for bitmaps and text p=
aths in 4.0 (<a href=3D"https://docs.reportlab.com/releases/notes/whats-new=
-40/">https://docs.reportlab.com/releases/notes/whats-new-40/</a>),=C2=A0</=
div><div>and it looks like you=C2=A0witnessed that in your test.</div><div>=
<br></div><div>However, we have released 4.0.4 that as appropriate, should =
now skip specific tests if we can&#39;t=C2=A0find the right extensions.</di=
v><div><br></div><div>Regards,</div><div><br></div><div>James</div><div><br=
></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail=
_attr">On Sat, 20 May 2023 at 15:21, Antonio T. sagitter &lt;<a href=3D"mai=
lto:[email protected]">[email protected]</a>&gt; wrote:<b=
r></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex=
;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all.<br>
<br>
A test of reportlab-4.0.0, compiled in Fedora 38 with Python-3.11, is <br>
failing with these errors:<br>
<br>
+ cd reportlab-4.0.0<br>
+ cp -a build/lib/reportlab tests/<br>
+ cp -a build/lib/reportlab docs/<br>
+ cp -a build/lib/reportlab docs/userguide/<br>
+ /usr/bin/python3 setup.py tests<br>
.........Traceback (most recent call last):<br>
=C2=A0 =C2=A0File <br>
&quot;/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/docs/userguide/genuserg=
uide.py&quot;, <br>
line 107, in &lt;module&gt;<br>
=C2=A0 =C2=A0 =C2=A0main()<br>
=C2=A0 =C2=A0File <br>
&quot;/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/docs/userguide/genuserg=
uide.py&quot;, <br>
line 105, in main<br>
=C2=A0 =C2=A0 =C2=A0run(pagesize, verbose,outDir)<br>
=C2=A0 =C2=A0File <br>
&quot;/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/docs/userguide/genuserg=
uide.py&quot;, <br>
line 56, in run<br>
=C2=A0 =C2=A0 =C2=A0exec(open_and_read(f+&#39;.py&#39;, mode=3D&#39;r&#39;)=
, G, G)<br>
=C2=A0 =C2=A0File &quot;&lt;string&gt;&quot;, line 175, in &lt;module&gt;<b=
r>
=C2=A0 =C2=A0File <br>
&quot;/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/docs/userguide/reportla=
b/graphics/charts/textlabels.py&quot;, <br>
line 20, in &lt;module&gt;<br>
=C2=A0 =C2=A0 =C2=A0from ..utils import text2Path as _text2Path=C2=A0 =C2=
=A0#here for continuity<br>
=C2=A0 =C2=A0 =C2=A0^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br>
=C2=A0 =C2=A0File <br>
&quot;/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/docs/userguide/reportla=
b/graphics/utils.py&quot;, <br>
line 255, in &lt;module&gt;<br>
=C2=A0 =C2=A0 =C2=A0globals().update(__makeTextPathsCode__())<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 ^^^^^^^^^^^^^^^^^^^^^^^<br>
=C2=A0 =C2=A0File <br>
&quot;/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/docs/userguide/reportla=
b/graphics/utils.py&quot;, <br>
line 253, in __makeTextPathsCode__<br>
=C2=A0 =C2=A0 =C2=A0raise ImportError(f&#39;Could not create text2PathDescr=
iption for using <br>
backends from {TP!a}&#39;)<br>
ImportError: Could not create text2PathDescription for using backends <br>
from (&#39;freetype&#39;, &#39;_renderPM&#39;)<br>
F......s.E.E...............EEEsEEs.........................................=
..................................................................E........=
...........................................................................=
...................................ss......................................=
............E...............<br>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
ERROR: test_graphics_barcode <br>
(test_graphics_barcode.BarcodeWidgetTestCase.test_graphics_barcode)<br>
----------------------------------------------------------------------<br>
Traceback (most recent call last):<br>
=C2=A0 =C2=A0File <br>
&quot;/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/tests/test_graphics_bar=
code.py&quot;, <br>
line 340, in test_graphics_barcode<br>
<br>
self.createSample(&#39;test_cbcim.png&#39;,createBarcodeImageInMemory(&#39;=
EAN13&#39;, <br>
value=3D&#39;123456789012&#39;))<br>
<br>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br>
=C2=A0 =C2=A0File <br>
&quot;/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/tests/reportlab/graphic=
s/barcode/__init__.py&quot;, <br>
line 152, in createBarcodeImageInMemory<br>
=C2=A0 =C2=A0 =C2=A0return d.asString(format)<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^^^^^^^^^^^^^^^^^^<br>
=C2=A0 =C2=A0File <br>
&quot;/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/tests/reportlab/graphic=
s/shapes.py&quot;, <br>
line 806, in asString<br>
=C2=A0 =C2=A0 =C2=A0from reportlab.graphics import renderPM<br>
=C2=A0 =C2=A0File <br>
&quot;/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/tests/reportlab/graphic=
s/renderPM.py&quot;, <br>
line 20, in &lt;module&gt;<br>
=C2=A0 =C2=A0 =C2=A0from .utils import setFont as _setFont, RenderPMError<b=
r>
=C2=A0 =C2=A0File <br>
&quot;/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/tests/reportlab/graphic=
s/utils.py&quot;, <br>
line 255, in &lt;module&gt;<br>
=C2=A0 =C2=A0 =C2=A0globals().update(__makeTextPathsCode__())<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 ^^^^^^^^^^^^^^^^^^^^^^^<br>
=C2=A0 =C2=A0File <br>
&quot;/home/sagitter/rpmbuild/BUILD/reportlab-4.0.0/tests/reportlab/graphic=
s/utils.py&quot;, <br>
line 253, in __makeTextPathsCode__<br>
=C2=A0 =C2=A0 =C2=A0raise ImportError(f&#39;Could not create text2PathDescr=
iption for using <br>
backends from {TP!a}&#39;)<br>
ImportError: Could not create text2PathDescription for using backends <br>
from (&#39;freetype&#39;, &#39;_renderPM&#39;)<br>
<br>
I send you the full log attached<br>
<br>
Regards.<br>
-- <br>
---<br>
Antonio Trande<br>
Fedora Project<br>
mailto: <a href=3D"mailto:[email protected]" target=3D"_blank">sag=
[email protected]</a><br>
GPG key: 0x40FDA7B70789A9CD<br>
GPG keys server: <a href=3D"https://keyserver.dcc.sib.swiss/" rel=3D"norefe=
rrer" target=3D"_blank">https://keyserver.dcc.sib.swiss/</a><br>
_______________________________________________<br>
reportlab-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">r=
[email protected]</a><br>
<a href=3D"https://pairlist2.pair.net/mailman/listinfo/reportlab-users" rel=
=3D"noreferrer" target=3D"_blank">https://pairlist2.pair.net/mailman/listin=
fo/reportlab-users</a><br>
</blockquote></div><br clear=3D"all"><div><br></div><span class=3D"gmail_si=
gnature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><d=
iv dir=3D"ltr"><div><a value=3D"+442084056420">-- <br>[email protected]=
<br><br>ReportLab Europe Ltd.<br>Compton Road<br>Wimbletech - Zone 2<br>Lon=
don SW19 7NB, UK<br>Tel. +44 20 8191 7277<br></a></div></div></div>

--0000000000003420f905fdaf908a--

--===============2008140877145612411==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline