Animation gif test case failure under Python 3.10 in Fedora Rawhide #96

Closed
opened 3 years ago by josch · 1 comments
josch commented 3 years ago
Owner

By Georg Sauthoff on 2021-04-23T08:57:41.344Z

So Fedora is introducing Python 3.10 and thus rebuilt all Python packages - which introduced failures in two test cases:

_____________________ test_general[animation.gif-internal] ____
[..]
        y = pikepdf.open(out)
>       assert rec(x.Root) == rec(y.Root)
E       AssertionError: assert {'/Pages': {'...': '/Catalog'} == {'/Pages': {'...': '/Catalog'}
E         Omitting 1 identical items, use -vv to show
E         Differing items:
E         {'/Pages': {'/Count': Decimal('2'), '/Kids': [{'/Contents': {'stream': b'q\n86.2500 0 0 36.0000 0.0000 0.0000 cm\n/Im0... Decimal('86.25'), Decimal('36')], '/Resources': {'/XObject': {'/Im0': {...}}}, '/Type': '/Page'}], '/Type': '/Pages'}} != {'/Pages': {'/Count': Decimal('2'), '/Kids': [{'/Contents': {'stream': b'q\n86.2500 0 0 36.0000 0.0000 0.0000 cm\n/Im0... Decimal('86.25'), Decimal('36')], '/Resources': {'/XObject': {'/Im0': {...}}}, '/Type': '/Page'}], '/Type': '/Pages'}}
E         Use -v to get the full diff
src/img2pdf_test.py:6503: AssertionError

and

_____________________ test_general[animation.gif-pikepdf] ______________________
[..]
        y = pikepdf.open(out)
>       assert rec(x.Root) == rec(y.Root)
E       AssertionError: assert {'/Pages': {'...': '/Catalog'} == {'/Pages': {'...': '/Catalog'}
E         Omitting 1 identical items, use -vv to show
E         Differing items:
E         {'/Pages': {'/Count': Decimal('2'), '/Kids': [{'/Contents': {'stream': b'q\n86.2500 0 0 36.0000 0.0000 0.0000 cm\n/Im0... Decimal('86.25'), Decimal('36')], '/Resources': {'/XObject': {'/Im0': {...}}}, '/Type': '/Page'}], '/Type': '/Pages'}} != {'/Pages': {'/Count': Decimal('2'), '/Kids': [{'/Contents': {'stream': b'q\n86.2500 0 0 36.0000 0.0000 0.0000 cm\n/Im0... Decimal('86.25'), Decimal('36')], '/Resources': {'/XObject': {'/Im0': {...}}}, '/Type': '/Page'}], '/Type': '/Pages'}}
E         Use -v to get the full diff
src/img2pdf_test.py:6503: AssertionError

So basically it's one test-case that fails for 2 PDF engines.

See also:

It isn't architecture specific, i.e. it fails on x86_64 and aarch64. It fails in Fedora Rawhide, i.e. might also be related to upgraded dependencies.

PS: Your Gitlab instance isn't accessible anymore without login. Was this a deliberate change?


By josch on 2021-04-23T10:57:09.190Z


Can you run pytest with -v to get the full diff? The output above does not differ because it's not verbose enough.

You could also try running the tests for img2pdf from git to see whether my recent commits maybe changed this. Particularly commit cb2243fd10 fixed an error with animation.gif that only occurred with Pillow >= 8.2.0.

I cannot reproduce your finding that the gitlab instance is only accessible when logged in. I didn't change anything.


By Georg Sauthoff on 2021-04-23T13:33:44.774Z


Ok, the direct link to https://gitlab.mister-muffin.de/josch/img2pdf/ works for me without authentication.

But https://gitlab.mister-muffin.de/ just redirects to: https://gitlab.mister-muffin.de/users/sign_in

My expectation was to see an overview page of projects that are hosted on your gitlab instance, instead.

FWIW, https://gitlab.mister-muffin.de/josch yields a HTTP 500. Whereas, e.g. https://gitlab.com/gsauthof shows my repos etc.

Btw, my Firefox complains that some images are served over HTTP instead of HTTPS, like the rest of the page.


I'll have to set-up a rawhide instance/chroot to check the git version/get verbose output.

*By Georg Sauthoff on 2021-04-23T08:57:41.344Z* So Fedora is introducing Python 3.10 and thus rebuilt all Python packages - which introduced failures in two test cases: ``` _____________________ test_general[animation.gif-internal] ____ [..] y = pikepdf.open(out) > assert rec(x.Root) == rec(y.Root) E AssertionError: assert {'/Pages': {'...': '/Catalog'} == {'/Pages': {'...': '/Catalog'} E Omitting 1 identical items, use -vv to show E Differing items: E {'/Pages': {'/Count': Decimal('2'), '/Kids': [{'/Contents': {'stream': b'q\n86.2500 0 0 36.0000 0.0000 0.0000 cm\n/Im0... Decimal('86.25'), Decimal('36')], '/Resources': {'/XObject': {'/Im0': {...}}}, '/Type': '/Page'}], '/Type': '/Pages'}} != {'/Pages': {'/Count': Decimal('2'), '/Kids': [{'/Contents': {'stream': b'q\n86.2500 0 0 36.0000 0.0000 0.0000 cm\n/Im0... Decimal('86.25'), Decimal('36')], '/Resources': {'/XObject': {'/Im0': {...}}}, '/Type': '/Page'}], '/Type': '/Pages'}} E Use -v to get the full diff src/img2pdf_test.py:6503: AssertionError ``` and ``` _____________________ test_general[animation.gif-pikepdf] ______________________ [..] y = pikepdf.open(out) > assert rec(x.Root) == rec(y.Root) E AssertionError: assert {'/Pages': {'...': '/Catalog'} == {'/Pages': {'...': '/Catalog'} E Omitting 1 identical items, use -vv to show E Differing items: E {'/Pages': {'/Count': Decimal('2'), '/Kids': [{'/Contents': {'stream': b'q\n86.2500 0 0 36.0000 0.0000 0.0000 cm\n/Im0... Decimal('86.25'), Decimal('36')], '/Resources': {'/XObject': {'/Im0': {...}}}, '/Type': '/Page'}], '/Type': '/Pages'}} != {'/Pages': {'/Count': Decimal('2'), '/Kids': [{'/Contents': {'stream': b'q\n86.2500 0 0 36.0000 0.0000 0.0000 cm\n/Im0... Decimal('86.25'), Decimal('36')], '/Resources': {'/XObject': {'/Im0': {...}}}, '/Type': '/Page'}], '/Type': '/Pages'}} E Use -v to get the full diff src/img2pdf_test.py:6503: AssertionError ``` So basically it's one test-case that fails for 2 PDF engines. See also: - https://kojipkgs.fedoraproject.org/work/tasks/9610/66349610/build.log - https://koschei.fedoraproject.org/package/python-img2pdf It isn't architecture specific, i.e. it fails on x86_64 and aarch64. It fails in Fedora Rawhide, i.e. might also be related to upgraded dependencies. PS: Your Gitlab instance isn't accessible anymore without login. Was this a deliberate change? --- *By josch on 2021-04-23T10:57:09.190Z* --- Can you run pytest with `-v` to get the full diff? The output above does not differ because it's not verbose enough. You could also try running the tests for img2pdf from git to see whether my recent commits maybe changed this. Particularly commit cb2243fd1088ca5534dbdf295398c55f810bf18e fixed an error with animation.gif that only occurred with Pillow >= 8.2.0. I cannot reproduce your finding that the gitlab instance is only accessible when logged in. I didn't change anything. --- *By Georg Sauthoff on 2021-04-23T13:33:44.774Z* --- Ok, the direct link to https://gitlab.mister-muffin.de/josch/img2pdf/ works for me without authentication. But https://gitlab.mister-muffin.de/ just redirects to: https://gitlab.mister-muffin.de/users/sign_in My expectation was to see an overview page of projects that are hosted on your gitlab instance, instead. FWIW, https://gitlab.mister-muffin.de/josch yields a HTTP 500. Whereas, e.g. https://gitlab.com/gsauthof shows my repos etc. Btw, my Firefox complains that some images are served over HTTP instead of HTTPS, like the rest of the page. --- I'll have to set-up a rawhide instance/chroot to check the git version/get verbose output.
gms commented 3 years ago

I reenabled those test cases with 0.4.1 under Fedora rawhide and there they don't fail anymore:

src/img2pdf_test.py::test_gif_animation[internal] PASSED                 [ 17%]
src/img2pdf_test.py::test_gif_animation[pikepdf] PASSED                  [ 17%]

https://kojipkgs.fedoraproject.org//work/tasks/9727/71289727/build.log

So this issue can be closed.

I reenabled those test cases with 0.4.1 under Fedora rawhide and there they don't fail anymore: ``` src/img2pdf_test.py::test_gif_animation[internal] PASSED [ 17%] src/img2pdf_test.py::test_gif_animation[pikepdf] PASSED [ 17%] ``` https://kojipkgs.fedoraproject.org//work/tasks/9727/71289727/build.log So this issue can be closed.
josch closed this issue 3 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: josch/img2pdf#96
Loading…
There is no content yet.