Bogdanp / django_dramatiq

A Django app that integrates with Dramatiq.
https://dramatiq.io
Other
331 stars 77 forks source link

Add Python 3.12 to test matrix #155

Closed knyghty closed 8 months ago

knyghty commented 8 months ago

Let me know if I missed something.

amureki commented 8 months ago

@knyghty many thanks, Tom, for the PR!

seems like setuptools is no longer preinstalled in Python 3.12: https://docs.python.org/3/whatsnew/3.12.html

I did not follow exactly what is considered as a best practice right now, but we probably could manually install it... If you feel, like it is a lot to dig into, I will try to block some time soon to finalize this.

knyghty commented 8 months ago

@amureki, I'm not an expert, but...

I believe best practice at the moment is to move to pyproject.toml and specify setuptools as a build requirement, e.g. https://github.com/pypa/sampleproject/blob/main/pyproject.toml#L150-L154

See also: https://peps.python.org/pep-0518/#build-system-table

However re-writing the project to use pyproject.toml would be a bit of work (not a huge amount, but I don't want it to stand in the way of this PR). I'm also not 100% sure if setting the build-system requirements will install them automatically or not, so the manual install may still be necessary.

So I think for this PR, it's better to manually install setuptools as you suggest, and in a follow-up, I, you, or someone else can work on the pyproject.toml migration separately. I've pushed this now, what do you think?

amureki commented 8 months ago

@knyghty I agree, pyproject.toml would be a way to go.

I'll take care of it at some point, but meanwhile your solution is 100% suitable. :+1: Many thanks for handling it!