New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TravisCI: ReportLab 3.5.0 breaks tests under Python 2.7 and 3.5 #1737
Comments
This is a tempory workaround, we need to understand what has changed in ReportLab, and if it is their bug report it to them. Reference GitHub issue biopython#1737.
Testing a workaround by pinning ReportLab 3.4 Note we currently only install ReportLab under Python 2.7 and 3.5, so that is why only those failed. |
Workaround in place - but someone needs to investigate how any why ReportLab 3.5.0 broke our test, and if we need to fix something on our code or not. Help welcome. |
This is a tempory workaround, we need to understand what has changed in ReportLab, and if it is their bug report it to them. Reference GitHub issue biopython#1737.
I finally realised the issue. |
Good work @rtf-const :) |
This seems to affect AppVeyor as well,
Seen on a couple of pull requests recently. |
Pull request #1753 should have fixed the TravisCI problem, let's see what AppVeyor does... |
Hi, I am maintainer of the reportlab package and this is a reverse bug pointed out to me by a debian person. It seems the issue here is actually a repeatability issue. The difference between the two versions of GD_region_linear.pdf is caused by an id embedded in the document so in one case it is /ID [<9737910ac7bddb2a43b171782188193c> <9737910ac7bddb2a43b171782188193c>] and in the other /ID [ ] the ID contains a timestamp. So you need to fix the timestamp using environment variable SOURCE_DATE_EPOCH. I attach a patch to latest code to fix. FWIW I'm not sure why you are messing with '\r\n' etc etc. PDF is a binary format and should always be read/written as bytes. Writing as a text file in windows may well break the document for that reason. Hopefully |
Thanks Robin - following up on this from the ReportLab side is a welcome surprise. Your patch sets a specific date, while @rtf-const toggled this setting: from reportlab import rl_config
rl_config.invariant = True Our Linux (TravisCI) and Windows (AppVeyor) tests are now passing. As to the |
Hat-tip Robin at ReportLab, see biopython#1737 (comment)
Hi Peter, the alternative using rl_config is another way to do this; it changes other things in the PDF as well eg it removes pdf comments that might have python ids in so is probably preferred for this case. |
Test cleanup applied as c7b909e - thanks @replabrobin |
Cross reference Debian issue: |
Noticed on some recent pull requests, e.g. #1735 (comment)
Python 2.7.14,
and Python 3.5,
Given the timing it looks like the release of ReportLab 3.5.0 earlier this week is to blame, see https://pypi.org/project/reportlab/#history
e.g. Our weekly TravisCI cron job failed on the previously passing master branch:
https://travis-ci.org/biopython/biopython/builds/404526057
The text was updated successfully, but these errors were encountered: