-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
File to reproduce:
# example.py
import q
x = 'a' * 81
q.q(x)Steps to reproduce:
$ python3.12 -m venv .venv
$ source .venv/bin/activate
$ pip install q
Collecting q
Using cached q-2.7-py2.py3-none-any.whl.metadata (811 bytes)
Using cached q-2.7-py2.py3-none-any.whl (10 kB)
Installing collected packages: q
Successfully installed q-2.7
$ python3.12 example.py
Traceback (most recent call last):
File "/private/var/folders/lp/1yl_g9ls2_g3l2tkmb6fpg0h0000gn/T/tmp.Jf4R2cEjpE/example.py", line 3, in <module>
q.q(x)
File "/private/var/folders/lp/1yl_g9ls2_g3l2tkmb6fpg0h0000gn/T/tmp.Jf4R2cEjpE/.venv/lib/python3.12/site-packages/q.py", line 357, in __call__
self.show(info.function, args, labels)
File "/private/var/folders/lp/1yl_g9ls2_g3l2tkmb6fpg0h0000gn/T/tmp.Jf4R2cEjpE/.venv/lib/python3.12/site-packages/q.py", line 272, in show
for label, repr in zip(labels, reprs):
File "/private/var/folders/lp/1yl_g9ls2_g3l2tkmb6fpg0h0000gn/T/tmp.Jf4R2cEjpE/.venv/lib/python3.12/site-packages/q.py", line 229, in safe_repr
path = self.OUTPUT_PATH + '%08d.txt' % self.random.randrange(1e8)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/random.py", line 301, in randrange
istart = _index(start)
^^^^^^^^^^^^^
TypeError: 'float' object cannot be interpreted as an integerThis is because randrange changed in Python 3.12, and it no longer converts non-integers to integers automatically.
This was fixed in q over a year ago (b8b7a7e) but the fix was never released to PyPI.
Could we get a release with the fix please?
lgatellier, daisylb, Olen, phillashworth, felixfontein and 1 more
Metadata
Metadata
Assignees
Labels
No labels