Sitelet https://web.archive.org/web/20260605074746/https://github.com/python-xlib/python-xlib/pull/223
Skip to content

Update rq.py#223

Closed
allfro wants to merge 1 commit into
python-xlib:masterfrom
allfro:patch-1
Closed

Update rq.py#223
allfro wants to merge 1 commit into
python-xlib:masterfrom
allfro:patch-1

Conversation

@allfro
Copy link
Copy Markdown
Contributor

@allfro allfro commented May 9, 2022

Fixes return type inconsistency with the pack_value for class Object.
When using an Object field embedded in a request pack_value croaks because it calls to_binary which returns a byte buffer instead of a
3-value tuple. This fix addresses the issue.

Fixes return type inconsistency with the `pack_value` for class `Object`.
When using an `Object` field embedded in a request `pack_value` croaks because it calls to_binary which returns a byte buffer instead of a
3-value tuple. This fix addresses the issue.
Comment thread Xlib/protocol/rq.py
def pack_value(self, val):
return self.type.pack_value(val)
val = self.type.pack_value(val)
return val, len(val), None
Copy link
Copy Markdown
Collaborator

@vasily-v-ryabov vasily-v-ryabov May 10, 2022 •

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better to fix pack_value implementation at line 1074 and below? Also line 911 is interesting. For this line 607 it looks reasonable to delegate this to underlying function call. So I suggest to fix the underlying functions instead. What do you think?

@vasily-v-ryabov vasily-v-ryabov mentioned this pull request Sep 12, 2022
@vasily-v-ryabov
Copy link
Copy Markdown
Collaborator

Fixed in another PR. Closing.

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 this pull request may close these issues.

2 participants