You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The repr of a single object can be enormous.
To Reproduce
Steps to reproduce the behavior:
You can try the following script:
# This creates 10 queues each of which has 3 tags randomly chosen from a# set of 10.importrandomimportdioptra.restapi.db.modelsasmuser=m.User("name", "password", "[email protected]")
group=m.Group("groupname", user)
tags= [m.Tag(f"tag_{i}", group, user) foriinrange(10)]
queues= []
foriinrange(10):
res=m.Resource("queue", group)
queues.append(m.Queue("a queue", res, user, f"queue_{i}"))
forqueueinqueues:
queue.tags.extend(random.sample(tags, k=3))
print(repr(queues[0]))
This will repr one of the queues so created. You'll want to redirect the output to a file and wait a bit. I've run this a couple times; both times, the resulting file was over 1GB in size!
Expected behavior
A reasonably sized repr.
The text was updated successfully, but these errors were encountered:
Describe the bug
The repr of a single object can be enormous.
To Reproduce
Steps to reproduce the behavior:
You can try the following script:
This will repr one of the queues so created. You'll want to redirect the output to a file and wait a bit. I've run this a couple times; both times, the resulting file was over 1GB in size!
Expected behavior
A reasonably sized repr.
The text was updated successfully, but these errors were encountered: