persist-queue
persist-queue copied to clipboard
[Regression] Can no longer retrieve None without raw=True
trafficstars
It used to work with a previous version, but doesn't work anymore.
None can still be put inside, but getting it out (without raw) will get stuck ie here.
Not sure what would be best, there are couple options:
- Use an exception instead of "special return values" to signal no object
- Use an unique object internally in place of
None, ieNO_OBJECT = object() - Add
raw=Falsetoputand raise an warning whenNoneinside unless it is set (to notify developers) - Leave as is and hope developers notice this API change and find out to use
rawby themselves
I personally prefer not adding the None into the queue since the None itself may cause other issue inside the queue implementation.