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
Polyglot: Support Python 3 too #744
Conversation
This breaks math (test_slides and test_issue_363) |
Woohoo, 144 failures. |
142! |
140! |
111! |
Extensions are broken in py3, which is unsurprising since they do manual, obscure import things, relevant tests are test_extensions and test_fancytitles |
110! |
The tests are still failing ... hang on :)
They are going to keep failing for a while, I am done for today ;-) |
109! |
105! |
101! (with svglib instead of svg2rlg) |
100! |
With python 3.7 literally 1 (one) ONE test passes, compared to a couple hundred with 3.6 so ... that needs looking at :-) Looks like document frames are broken on python 3.7. Printing frames for a very basic document in python 2.7: [[56.6929133858, 70.8661417323, 481.88976378, 700.157480315, 6, 6, 6, 6,]] In 3.7: [[2.0, 7.0, 100.0, 100.0, 6, 6, 6, 6,]] I am guessing I broke something when removing the map() calls? |
Looks like a bug in adjustUnits |
In python 2.7:
In python 3.7:
In python 3.6: same as python 2.7 |
Back to 100 failures. |
95! |
I think most of the remaining failures are because I changed how the target reference ids are constructed, which should be easy to fix all in one swoop. |
I probably broke it in 42239d3 |
The worst part is that links include object ID, which means they change on each run :-( |
55! |
And that is it for today. |
I think the next problem is in syntax highlighting. |
Interesting one! stylesheet paths are in different order in py2 and py3: < [INFO] styles.py:113 StylePath:['/Users/ralsina/code/rst2pdf/rst2pdf/styles', '/Users/ralsina/.rst2pdf/styles', '.']
---
> [INFO] styles.py:113 StylePath:['/Users/ralsina/.rst2pdf/styles', '/Users/ralsina/code/rst2pdf/rst2pdf/styles', '.'] |
Still 55, but hey, that was just wrong. |
The basic difference seems to be that in python2 RL is inserting colors (specifically 0 0 0 rg) that it doesn't in python3. The outputs are identical in many tests except for that. |
44! |
Rebased against master after merging #755 |
This is most exciting. |
I am very happy. This branch was a lot of work :) |
Attempt to make the codebase py2/py3 compatible
And then progressively fix tests in py3 until they all pass (or close enough)