Skip to content

Add forwarding msgpack packer and unpacker to call function #190

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

Closed
wants to merge 1 commit into from

Conversation

ObjatieGroba
Copy link

@ObjatieGroba ObjatieGroba commented Mar 10, 2021

Reason:

For response tuple containing strings and bytes python3 falls with utf-8 decoding exception.
For set encoding=None user should decode string manually after call.

Usage:

tnt.call("echo", ("str", b"bytes"), msgpack_unpacker=msgpack.Unpacker())

@DifferentialOrange DifferentialOrange self-assigned this Mar 30, 2022
@LeonidVas LeonidVas added the teamE label Oct 5, 2022
DifferentialOrange added a commit that referenced this pull request Nov 30, 2022
After this patch, user may pass `packer_factory` and `unpacker_factory`
options to a connection. They will be used instead of the default ones.
`packer_factory` is expected to be a function with the only one
parameter: connection object, which returns a new msgpack.Packer object.
`unpacker_factory` is expected to be a function with the only one
parameter: connection object, which returns a new msgpack.Unpacker
object. `packer_factory` supersedes `encoding` option.
`unpacker_factory` supersedes `encoding` and `use_list` options. User
may implement `encoding` and `use_list` support in its custom packer or
unpacker if they wish so. User may refer to request submodule
`packer_factory` and response submodule `unpacker_factory` as an example
(these factories are used by default.)

Closes #145, #190, #191
DifferentialOrange added a commit that referenced this pull request Nov 30, 2022
After this patch, user may pass `packer_factory` and `unpacker_factory`
options to a connection. They will be used instead of the default ones.
`packer_factory` is expected to be a function with the only one
parameter: connection object, which returns a new msgpack.Packer object.
`unpacker_factory` is expected to be a function with the only one
parameter: connection object, which returns a new msgpack.Unpacker
object. `packer_factory` supersedes `encoding` option.
`unpacker_factory` supersedes `encoding` and `use_list` options. User
may implement `encoding` and `use_list` support in its custom packer or
unpacker if they wish so. User may refer to request submodule
`packer_factory` and response submodule `unpacker_factory` as an example
(these factories are used by default.)

Closes #145, #190, #191
DifferentialOrange added a commit that referenced this pull request Nov 30, 2022
After this patch, user may pass `packer_factory` and `unpacker_factory`
options to a connection. They will be used instead of the default ones.
`packer_factory` is expected to be a function with the only one
parameter: connection object, which returns a new msgpack.Packer object.
`unpacker_factory` is expected to be a function with the only one
parameter: connection object, which returns a new msgpack.Unpacker
object. `packer_factory` supersedes `encoding` option.
`unpacker_factory` supersedes `encoding` and `use_list` options. User
may implement `encoding` and `use_list` support in its custom packer or
unpacker if they wish so. User may refer to request submodule
`packer_factory` and response submodule `unpacker_factory` as an example
(these factories are used by default.)

Closes #145, #190, #191
DifferentialOrange added a commit that referenced this pull request Dec 1, 2022
After this patch, user may pass `packer_factory` and `unpacker_factory`
options to a connection. They will be used instead of the default ones.
`packer_factory` is expected to be a function with the only one
parameter: connection object, which returns a new msgpack.Packer object.
`unpacker_factory` is expected to be a function with the only one
parameter: connection object, which returns a new msgpack.Unpacker
object. `packer_factory` supersedes `encoding` option.
`unpacker_factory` supersedes `encoding` and `use_list` options. User
may implement `encoding` and `use_list` support in its custom packer or
unpacker if they wish so. User may refer to request submodule
`packer_factory` and response submodule `unpacker_factory` as an example
(these factories are used by default.)

Closes #145, #190, #191
DifferentialOrange added a commit that referenced this pull request Dec 1, 2022
After this patch, user may pass `packer_factory` and `unpacker_factory`
options to a connection. They will be used instead of the default ones.
`packer_factory` is expected to be a function with the only one
parameter: connection object, which returns a new msgpack.Packer object.
`unpacker_factory` is expected to be a function with the only one
parameter: connection object, which returns a new msgpack.Unpacker
object. `packer_factory` supersedes `encoding` option.
`unpacker_factory` supersedes `encoding` and `use_list` options. User
may implement `encoding` and `use_list` support in its custom packer or
unpacker if they wish so. User may refer to request submodule
`packer_factory` and response submodule `unpacker_factory` as an example
(these factories are used by default.)

Closes #145, #190, #191
DifferentialOrange added a commit that referenced this pull request Dec 1, 2022
After this patch, user may pass `packer_factory` and `unpacker_factory`
options to a connection. They will be used instead of the default ones.
`packer_factory` is expected to be a function with the only one
parameter: connection object, which returns a new msgpack.Packer object.
`unpacker_factory` is expected to be a function with the only one
parameter: connection object, which returns a new msgpack.Unpacker
object. `packer_factory` supersedes `encoding` option.
`unpacker_factory` supersedes `encoding` and `use_list` options. User
may implement `encoding` and `use_list` support in its custom packer or
unpacker if they wish so. User may refer to request submodule
`packer_factory` and response submodule `unpacker_factory` as an example
(these factories are used by default.)

Closes #145, #190, #191
@DifferentialOrange
Copy link
Member

Solved by #268

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.

3 participants