Skip to content

TypeError can't concat memoryview to bytearray #303

@jaraco

Description

@jaraco

Attempting to run pip on Jython 2.7.1, I run into the error reported in pypa/pip#5296.

Traceback points at msgpack as the culprit. Here's the tail of it:

  File "/usr/local/Cellar/jython/2.7.1/libexec/Lib/site-packages/pip/_vendor/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/Cellar/jython/2.7.1/libexec/Lib/site-packages/pip/_vendor/cachecontrol/adapter.py", line 42, in send
    cached_response = self.controller.cached_request(request)
  File "/usr/local/Cellar/jython/2.7.1/libexec/Lib/site-packages/pip/_vendor/cachecontrol/adapter.py", line 42, in send
    cached_response = self.controller.cached_request(request)
  File "/usr/local/Cellar/jython/2.7.1/libexec/Lib/site-packages/pip/_vendor/cachecontrol/controller.py", line 137, in cached_request
    resp = self.serializer.loads(request, cache_data)
  File "/usr/local/Cellar/jython/2.7.1/libexec/Lib/site-packages/pip/_vendor/cachecontrol/serialize.py", line 98, in loads
    return getattr(self, "_loads_v{0}".format(ver))(request, data)
  File "/usr/local/Cellar/jython/2.7.1/libexec/Lib/site-packages/pip/_vendor/cachecontrol/serialize.py", line 98, in loads
    return getattr(self, "_loads_v{0}".format(ver))(request, data)
  File "/usr/local/Cellar/jython/2.7.1/libexec/Lib/site-packages/pip/_vendor/cachecontrol/serialize.py", line 190, in _loads_v4
    cached = msgpack.loads(data, encoding='utf-8')
  File "/usr/local/Cellar/jython/2.7.1/libexec/Lib/site-packages/pip/_vendor/cachecontrol/serialize.py", line 190, in _loads_v4
    cached = msgpack.loads(data, encoding='utf-8')
  File "/usr/local/Cellar/jython/2.7.1/libexec/Lib/site-packages/pip/_vendor/msgpack/fallback.py", line 119, in unpackb
    unpacker.feed(packed)
  File "/usr/local/Cellar/jython/2.7.1/libexec/Lib/site-packages/pip/_vendor/msgpack/fallback.py", line 298, in feed
    self._buffer += view
TypeError: can't concat memoryview to bytearray

It would be nice to see this fixed, as jython is hobbled without a working pip.

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