Skip to content

allow binary data in OAuth1Session.request #201

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant