Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

allow binary data in OAuth1Session.request #201

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

githubkusi
Copy link

In Python 2, binary data was handled just fine, because type bytes was
just a wrapper around str

>>> data = bytes(1)
>>> 'a' in data
False

In Python 3, this gives an error

>>> data = bytes(1)
>>> 'a' in data
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'str' does not support the buffer interface

Example client code: Python 3 port of
https://github.com/marekrei/smuploader

In Python 2, binary data was handled just fine, because type bytes was
just a wrapper around str

    >>> data = bytes(1)
    >>> 'a' in data
    False

In Python 3, this gives an error

    >>> data = bytes(1)
    >>> 'a' in data
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: 'str' does not support the buffer interface

Example client code: Python 3 port of
https://github.com/marekrei/smuploader
githubkusi pushed a commit to githubkusi/digikam2smugmug that referenced this pull request Jul 19, 2022
rauth upstream seems dead, use fork which includes an important fix

litl/rauth#201
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant