Fix _pre_setup_ran_eagerly on Django 5.0 and 5.1 - #1304
Conversation
|
Im confused, why are we supporting 5.1/5.0? Support was dropped 8+ months ago
|
|
Because it is a single line change and it makes live of many opensource projects that rely on |
|
While I agree with the sentiment, my main concern is that this sets a bad precedent. You now have a line of code living there that will likely be forgotten about until someone stumbles across it three years from now and asks, “Is it safe to remove this yet?” More broadly, what’s the right lifecycle for a workaround like this? If the maintainer of the upstream package has already deemed the affected version outdated and unsupported, how long should we continue carrying a fix for it on our side? At some point, we risk accumulating compatibility code with no clear criteria for when it should be removed. |
|
@kingbuzzman You are right, this is just a small courtesy. For the risk of accumulating code, I modified @sobolevn PR slightly to make it conditional on an explicit django.VERSION check, which we occasionally check for and remove old stuff. But the bigger thing is that pytest-django didn't really provide a nice way for users who support older Django versions to get a compatible pytest-django version. For that reason, I added in the latest version the BTW, Django just changes to annual releases and all releases from now on will be LTS. That will simplify things a bit (no more support "gaps"). https://www.djangoproject.com/weblog/2026/aug/10/annual-release-cycle/ |

Closes #1303
Locally I double checked that:
Falseis the correct default, withTrueI get errors like