[reportlab-users] Python 3.8 wheels

Marius Gedminas marius at gedmin.as
Thu Oct 31 07:01:43 EDT 2019


On Thu, Oct 31, 2019 at 09:07:46AM +0000, Robin Becker wrote:
> Hi Marius.
> 
> I have now used the Pillow hack (which mostly comes from Manylinux anyway)
> to get windows wheels. No idea why they stuck on the rc1 though. I used the
> released 3.8.0.

Yeah, I did the same for my Appveyor builds.

> Hopefully you will get all green lights.

Yes!  My Jenkins is now green!  (Except for the jobs that need lxml and
pygame, neither of which has 3.8 wheels yet.)

> I have been using image differencing for some time to spot changes in
> ReportLab, but simple blink comparator isn't good enough. I might try your
> imgdiff code for differences.

I've been using this script to compare two sets of PDFs pixel-by-pixel:
https://gist.github.com/mgedmin/522305fb3a716654c1a2d641dc452825

It's terrible and I apologize.

Highlights:

- it uses ImageMagick's `convert foo.pdf foo.png` to render each page of
  the PDF (at 72 dpi) into a numbered PNG file (note that ImageMagick's
  PDF renderer is disabled on Ubuntu via /etc/ImageMagick-6/policy.xml,
  due to recent spate of security vulnerabilities in GhostScript, so
  that's fun)

- it uses Pillow to load the PNGs and compares pixel data (this was
  faster than spawning ImageMagic's compare for each pair of images).

- it uses ImageMagick's `compare foo.png bar.png` to produce a
  third image where identical bits are 50% faded out and differing bits
  are highlighted in red (this works great, when the majority of the
  page is black and white, a bit less great when a single difference
  near the top of the page shifts all the text down for this and all the
  rest of the pages in the document)

- it generates an HTML report with the thumbnails of differing pages,
  for a quick overview.

I then tend to open the two versions of a page in browser tabs and flip
between them with (Shift+)Ctrl+Tab to look closer at what happened.

Regards,
Marius Gedminas
-- 
Lisp-style macros [...] are to C-style macros what Emacs is to cat.
                -- Jacek Generowicz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://pairlist2.pair.net/pipermail/reportlab-users/attachments/20191031/243e535e/attachment.sig>


More information about the reportlab-users mailing list