Skip to content
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

Support Python 3.5 in version 0.95.1 #957

Merged
merged 14 commits into from Dec 30, 2020

Conversation

akrabat
Copy link
Member

@akrabat akrabat commented Dec 3, 2020

pip will not install a Python 3 compatible version of rst2pdf (0.95+) due to classifiers we use in setup.py. This is a hotfix to 0.95, to create 0.95.1 that will allow a valid version of rst2pdf to be installed on older Linuxes that have Python 3.4 or 3.5 as their default.

To provide some level of confidence, I've added CI and have made it pass. I've had to ignore all the vectorpdf tests though as they generate different PDFs on each run and I don't know why. Checking locally, the PDFs created looked the same to me, so 🤷‍♀️. We have removed vectorpdf in 0.98 anyway, so I'm not concerned.

I also back-ported the Inkscape 1.0 fix so that I could test locally where the generated PDF was fine. test_fancytitles fails on CI, so I've just ignored it. Again, we've removed Inkscape from 0.98, so it's gone now anyway.

GitHub Actions doesn't support Python 3.4, so I've left Travis in for that one, but it's very very slow.

Fixes #955

pip will not install a Python 3 compatible version of rst2pdf (0.95+)
due to classifiers we use in setup.py. This is a hotfix to 0.95, to
create 0.95.1 that will allow a valid version of rst2pdf to be installed
on older Linuxes that have Python 3.4 or 3.5 as their default.
@akrabat
Copy link
Member Author

akrabat commented Dec 3, 2020

Hmm... I'm not sure I can actually PR this as I don't want to merge it to master!

This PR is therefore here for review purposes.

@akrabat
Copy link
Member Author

akrabat commented Dec 3, 2020

@stephenfin
Copy link
Contributor

I don't think this should go into master. Rather, we should create something like a stable/0.95 branch. Maybe that's what you're proposing and GitHub just isn't able to identify that? If so, could we do the following?

git checkout 0.95
git checkout -b stable/0.95
git push origin stable/0.95
#propose PR

@akrabat akrabat changed the base branch from master to stable/0.95 December 4, 2020 10:59
@akrabat
Copy link
Member Author

akrabat commented Dec 4, 2020

That makes sense @stephenfin.

I've created the stable/0.95 branch from the 0.95 tag.

This is consistent with our mainline development.
Backport of PR rst2pdf#870 (68d4ed7):

> Inkscape 1.0 final has replaced the '--export-file' argument
> with '--export-filename' [1]. Update our calls accordingly.
These generate different hashes each time for me on Python 3.4 and we
removed vectorpdf in PR rst2pdf#896 for rstpdf 0.98.
This one is just too unrealiable!
This is no longer in rst2pdf so we didn't test Python 3.8 with this
system before.
@akrabat
Copy link
Member Author

akrabat commented Dec 4, 2020

Looks like 0.95 won't work on Python 3.4 due to the Pillow 6.2 requirement.

@oz123
Copy link
Collaborator

oz123 commented Dec 5, 2020

@akrabat why is Python 3.4 support needed? It's EOL for years now. Python 3.5 also, but some Enterprise linux still have it (although one should be able to install 3.6 from external RPM repositories). I think one can safely remove Python3.4 without hurting anyone.

@akrabat
Copy link
Member Author

akrabat commented Dec 7, 2020

@oz123 See #955 (comment). For Debian Stretch, 3.5 is the current version, so supporting that seems wise. I'm not sure if any important distros ship with 3.4 or not, but the restraints in our requirements.txt mean that 3.4 isn't so simple anyway, so I was going to to ignore it.

Copy link
Contributor

@stephenfin stephenfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Good to have CI etc.

@lornajane
Copy link
Contributor

What's the status of this? I think we're aggreed that Python 3.5 is enough, and I see the base of the PR changed for that. It's approved, but not merged, do we have more do to here? (I am not sure how I would test this...)

The version of pillow that we require doesn't work for Py 3.4, so do not
imply that it works.
@akrabat
Copy link
Member Author

akrabat commented Dec 30, 2020

There's still something weird about the CI for Python 3.5 as it passed before I removed the 3.4 stuff. Merging and releasing anyway as it's better than not having it.

@akrabat akrabat added this to the 0.95.1 milestone Dec 30, 2020
@akrabat akrabat merged commit 945736c into rst2pdf:stable/0.95 Dec 30, 2020
@akrabat akrabat changed the title Prepare 0.95.1 to support Python 3.4 and 3.5 Support Python 3.5 in version 0.95.1 Dec 30, 2020
@stephenfin
Copy link
Contributor

🥳

@akrabat akrabat deleted the prepare-0.95.1 branch January 2, 2022 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

latest pip (20.3) cannot install latest rst2pdf (0.93) for python 3.5
4 participants