python-arq / arq

Fast job queuing and RPC in python with asyncio and redis.
https://arq-docs.helpmanual.io/
MIT License
2.09k stars 172 forks source link

Support for redis > 5.0.x in pyproject.toml? #458

Closed epicwhale closed 1 week ago

epicwhale commented 3 months ago

my codebase depends on redis ^5.0.1 and I'm unable to use the latest version of arq with it redis = {extras = ["hiredis"], version = "^5.0.1"}

Because no versions of arq match >0.26.0,<0.27.0
 and arq (0.26.0) depends on redis[hiredis] (>=4.2.0,<5), arq (>=0.26.0,<0.27.0) requires redis[hiredis] (>=4.2.0,<5).
So, because ... depends on both redis[hiredis] (^5.0.1) and arq (^0.26.0), version solving failed.

Any chance the version pinning can support updates to the 5.0.x track rather than locking to 5.0.0?

Another comment on github requesting this for a slightly different reason: https://github.com/samuelcolvin/arq/issues/441#issuecomment-2069248955

nsteinmetz commented 2 months ago

It seems that with 0.26 release, the <5 was added:

dependencies = [
    'redis[hiredis]>=4.2.0,<5',
    [...]
]

whereas 0.25 was:

dependencies = [
    'redis[hiredis]>=4.2.0',
     [...]
]

So I was also surprised to have a conflict this morning when I tried to upgrade from 0.25 to 0.26 !

d-qoi commented 2 months ago

Yeah, I'll third wanting this dependency changed! The dependency check for <5 also limits us to redis versions under 7, locking us out of the toys included in 7.2 or 7.4.

nsteinmetz commented 2 months ago

@d-qoi the 5 is the version of the redis-py library, not a requirement on the redis server.

You can use redis-py 5.x with Redis 7.x

But in your case, maybe redis-py 4.x has some limitations regarding Redis 7.x - in this case, you can start with arq 0.25 to bypass the issue (no issue with the combo arq 0.25/redis-py 5.0.x since 5.0.x upgrade last summer - even if first 5.0.x versions had some issues on async side but it's fixed for a while)