Skip to content

FYI type for Python2 strings unserialization changed with 2.1.0 #267

@fschulze

Description

@fschulze

I don't think many people will care, as this only happens with some very specific settings, but I thought I report it anyway. I noticed because in devpi-server I wrote my own un-/serializer implementation for performance reasons and the tests still compared to the execnet implementation. Afaik Python2 strings were never used in devpi-server databases and the new implementation is in use since 6.2.0 released August 2021.

With pre 2.1.0:

from execnet.gateway_base import Unserializer
from devpi_server.fileutil import BytesIO
Unserializer(BytesIO(b'M\x00\x00\x00\x01aQ'), strconfig=(False, False)).load(versioned=False)
b'a'

With 2.1.0:

from execnet.gateway_base import Unserializer
from devpi_server.fileutil import BytesIO
Unserializer(BytesIO(b'M\x00\x00\x00\x01aQ'), strconfig=(False, False)).load(versioned=False)
'a'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions