Closed daxie117 closed 7 months ago
Thank you for the swift bug report.
Ah, 32-bit Python. That brings back memories. The fix should be trivial (what could possibly go wrong hard-coding a value for infinity?!) but I'll probably wait a day to see if anything else has broken before releasing a 4.2.1.
Now I just have to work out how to get the CI to target a 32-bit Python....
This should now be fixed in 4.2.1. although I couldn't find a way to add the test on 32-bit Python to the CI, so strictly speaking I haven't tested the fix actually works...
We are running into an error upon import, error trace pasted below:
https://github.com/scott-griffiths/bitstring/blame/main/bitstring/dtypes.py#L230 traced it down to this line when the module attempts to calculate allowed sizes. It works fine on 64 bit python, but the generator expression here:
https://github.com/scott-griffiths/bitstring/blame/main/bitstring/dtypes.py#L231
self.value = range(value[0], infinity, step)
causes the length of
self.value
to exceed the max ssize_t (presumably 4 bytes).