Conversation
|
@delfanbaum Cool, thanks! This looks much like what I had in mind, but never finished. I see that the CI fails with timeouts on loading the uv-related action. I don't know if this is only a hiccup, but I've seen previous reports about version 5, too. Apparently you have the same errors in your fork:
I agree with all your points above, but want to test it locally myself. The user interface needs to remain unchanged, but I think this is the case. Oh, and thanks for the |
|
Ah, good shout! I'd missed the setup failure; I was missing a |
|
Progress, but now we run into an old issue with Cairo that we have ignored for too long:
@replabrobin, can we finally nail this, and how? |
@delfanbaum I wonder if you also see these errors locally? You can run |
|
I don't remember getting that error on a machine that I'd installed > sig = self.signature = md5(usedforsecurity=False)
E TypeError: 'usedforsecurity' is an invalid keyword argument for openssl_md5()Might be a red herring though, since this appears to be a Additional context: ❯ uv run python
Python 3.8.20 (default, Oct 2 2024, 16:12:59)
[Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import reportlab
>>> reportlab.__version__
'4.4.3' |
|
Re Once I switch over to 3.9, I do get the E reportlab.graphics.utils.RenderPMError: cannot import desired renderPM backend rlPyCairo
E Seek advice at the users list see
E https://pairlist2.pair.net/mailman/listinfo/reportlab-users
.venv/lib/python3.9/site-packages/reportlab/graphics/renderPM.py:52: RenderPMError`error. |
|
Adding |
|
If you remove 3.8 from the github CI, it might pass. |
|
And let's bump to 1.6.0, and add yourself to the Contributors.rst file, please! |
|
On the CI on my fork of it, it's still failing 3.9 (See here) due to not being able to find/install I had gotten it to pass on a machine that already had |
|
So on my fork, I've got |
|
Amazing! I've had some issues myself on macOS playing with cairo, cmake, pkg-config. Will look at your changes tomorrow. Have run CI tests, and repeated on Windows after what seemed like a timeout. It worked for 3.9, but failed for PyPy which amazingly worked on macOS and Linux, but this shouldn't be a blocker. In any case great progress! But a pity that installation is getting so hard. |
pyproject.toml
Outdated
| "Operating System :: POSIX", | ||
| "Natural Language :: English", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3.8", |
|
I've added a tiny change, unrelated to cairo. We can build now, but one build on Windows takes about 15-17 minutes, and the PyPy one is failing, which I can accept and remove from the CI workflow. But I wonder if there is any faster way to install GTK3 on Windows? Else I'd opt to run only one build on Windows with Python 3.11 or 3.12 or so. We might need a little more info about installation, but we've made great progress! |
I considered just downloading and unzipping the executable from their GitHub release, although that felt brittle; would definitely be faster though!
Yes; I suppose if we're changing the builds it would make sense to add some newer Pythons, maybe just for ubuntu or some such to keep it quick? I'm not sure what your coverage requirements are/were. One other option -- and this may actually be a good one -- is that, since we're having |
|
I've tried to commit some minor CI changes, but strangely this second commit to your branch was not accepted, unlike the first, being not from a verified, anonymous owner. But that was also the case for the forst one, weird. I'll have to look into this. But we could just take 3.9 and 3.13 on macOS and Ubuntu, and 3.13 only on Windows with the current setup, and try to accelerate a Windows build later, if you're interested as I'm not of much help there. There is no hard requirements, but it might be nice to take the oldest supported version and the newest, and assume those in between are likely to work, too. Delegating more of the version switching to uv might get a little efficiency, but would also reduce some of the organizational comfort re monitoring, rerunning etc. So while it might be nice to see it work, I'm not sure the benefit is big enough. I think it would be nice to clean up this repackaging PR along these lines (toching a bit more on installation complexity), and then there can be a few more polishing touches before making a proper 1.6.0 release within a week or so. Would that work for you? In any case I'm really happy to finaly see proper grading in many of the tests! 😃 |
|
Yes, that all sounds good -- I can try to swing at cleaning all this up tomorrow or Friday! Thanks for your patience with all of this. Ohm, and re: unverified commits, that's an artifact of my working on a personal vs work machine; probably the kick in the pants I need to get the personal machine set up for verified commits... |
.github/workflows/ci-windows.yml
Outdated
| @@ -0,0 +1,55 @@ | |||
| name: Run Matrix Tests on Windows | |||
| on: [push, pull_request, workflow_dispatch] | |||
There was a problem hiding this comment.
Maybe just comment this line out, so we can merge this PR and handle the Windows CI acceleration separately?
There was a problem hiding this comment.
Hey, yes -- I'll clean this up today.
This aims to resolve deeplook#404, as well as deeplook#406, by updating the project structure and build process leveraging the `uv` tool (https://docs.astral.sh/uv/). It also drops support for Python 3.8 for a variety of reasons, including making the tests pass. Follow-up commits will fix the CI, improve documentation, etc. Note that per discussion with deeplook, this includes a "minor" version bump to 1.6.0.
README updated per new state of affairs; CONTRIBUTORS updated per my contribution per deeplook.
This commit breaks out the CI runners into different platforms to make the `cairo` installation simpler, temporarily turning off the Windows runner, per discussion, until we can figure out how to install `cairo` on that platform with anything resembling efficiency. Also, per discussion, the CI steps have been simplified to target the oldest/newest targeted Python versions, making the (fair) assumption that things should work in-between.
fa83c30 to
1b8a78b
Compare
|
Okay, cleaned up into fewer and nicer commits, took in the suggestions re: CI, and tried to add a little more documentation. |
deeplook
left a comment
There was a problem hiding this comment.
LGTM, tests are passing. Will merge tomorrow. Thanks again!
|
@delfanbaum FYI, version 1.6.0 was just released, including your changes. Thanks again!! |
This PR aims to resolve #404 and #378.
In short:
uvas a package (and library), while also adding[project.scripts]topyproject.tomlsuch that we no longer need thescripts/directory; thesvg2pdfexecutable will be installed upon installation of the wheel__init__.pyfile to thetests/directory so onuv run pytestit finds it by defaultci.yamlworkflow to useuvand the existing matrix; IMO this deprecates any need fortoxalthough I've kept that around in case folks like to use that to test locally; note that I did not update any documentation around that file, as I'm not atoxuser myself.Any feedback is, of course, welcome.
In particular, I was not hoping to work on the code much, only the organization, but it appears that the DeepSource CI is failing due to pre-existing issues. If that's a requirement for this change I'm happy to take a swing at resolving them.