-
Notifications
You must be signed in to change notification settings - Fork 85
Pep 518 via uv #405
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
base: main
Are you sure you want to change the base?
Pep 518 via uv #405
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. |
This commit resolves failing local tests; interested to see if it resovles the CI failures, too.
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 |
It appears that's necessary now; I am not sure about this windows solution (if nothing else: it takes forever to build), but I've verified Linux and MacOS.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can drop 3.8 here, too.
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! 😃 |
This PR aims to resolve #404 and #378.
In short:
uv
as a package (and library), while also adding[project.scripts]
topyproject.toml
such that we no longer need thescripts/
directory; thesvg2pdf
executable will be installed upon installation of the wheel__init__.py
file to thetests/
directory so onuv run pytest
it finds it by defaultci.yaml
workflow to useuv
and the existing matrix; IMO this deprecates any need fortox
although 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 atox
user 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.