Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leftover debug statement in serializers.structs.py #48

Closed
davidcurie opened this issue Mar 20, 2024 · 1 comment · Fixed by #49
Closed

Leftover debug statement in serializers.structs.py #48

davidcurie opened this issue Mar 20, 2024 · 1 comment · Fixed by #49

Comments

@davidcurie
Copy link

Describe the bug
A print statement appears after every invocation of a Structured serializer when run as part of a script.

To Reproduce

user@computer $ python my_serializer_unpacker_script.py
Compute num values: <structured.serializers.structs.StructSerializer object at 0x10c5e0a70> 19s 19

Expected behavior
No extra print statement on execution.

Desktop (please complete the following information):

  • OS agnostic
  • Replicated in python 3.11, 3.12

Additional context
Appears after commit 5c651ef (#47).
I suspect this is a leftover print statement from debugging efforts.

print(f'Compute num values: {st!r} {st.format} {st.size}')

@lojack5
Copy link
Owner

lojack5 commented Mar 21, 2024

Yep thanks, I noticed that myself today while working on a better typing.Self solution (recursion is making me have to fixup lots of places that assumed no recursion was happening). It was indeed from debugging (turns out the struct.Struct.__init__ wasn't being called due to how they changed things back from some weirdness in the RCs in py 3.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants