rdegges / django-twilio

A simple library for building twilio-powered Django webapps.
http://django-twilio.rtfd.org/
The Unlicense
327 stars 111 forks source link

Fix `py_minor_version` check in setup.py #241

Closed calebsyring closed 7 months ago

calebsyring commented 7 months ago

Fix for bug introduced in https://github.com/rdegges/django-twilio/pull/240

The in operator preceded the walrus operator resulting in the comparison being True >= 10 and still pinning the Django version to <5 regardless of python version. The parentheses added fix this problem, and I used the minor attribute instead of index for readability.

The build didn't catch this because the installation of django-twilio came after the installation of django at the specified version, which was uninstalling django and reinstalling a compatible version. I rearranged the build so that this problem is demonstrated when it occurs.

calebsyring commented 7 months ago

@jheld the build will now show the dependency conflict in the logs and make sure that the django version specified by the matrix overrides the one in setup.py. It won't actually fail the build in the case of a conflict, though (see below). I think something like a bash script checking the output of pip check might be necessary for that (which seems overkill to me). Let me know if you think that's essential.

image

jheld commented 7 months ago

released a1 to PyPI