Skip to content

No longer supports buffer() objects where bytes are expected #343

Closed

Description

@jelmer

Previous versions of Paramiko allowed passing in buffer() objects of bytestrings when e.g. writing to a file. In the last version(s), this is no longer possible:

File "/usr/lib/python2.7/dist-packages/paramiko/file.py", line 324, in write
data = b(data)
File "/usr/lib/python2.7/dist-packages/paramiko/py3compat.py", line 43, in b
raise TypeError("Expected unicode or bytes, got %r" % s)
TypeError: Expected unicode or bytes, got <read-only buffer for 0x7fbbb3f348f0, size 5242880, offset 0 at 0x7fbbcb8599b0>

Activity

  1. andrewsomething commented on Jul 4, 2014

    @andrewsomething

    This was previously reported as #285

  2. bitprophet commented on Aug 9, 2014

    @bitprophet
    Member

    Yup, looks like dupe of #285, thanks @andrewsomething!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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