Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix AttributeError when the brotli module is installed #1572

Merged
merged 1 commit into from
Apr 22, 2019

Commits on Apr 22, 2019

  1. Fix AttributeError when the brotli module is installed

    The recent addition of Brotli support is broken, since it uses an
    incorrect spelling of `brotli.error`, resulting in:
    
        Python 2.7.16 (default, Mar  8 2019, 14:51:39)
        [GCC 8.2.0] on linux2
        Type "help", "copyright", "credits" or "license" for more information.
        >>> import urllib3.response
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
          File "site-packages/urllib3/__init__.py", line 7, in <module>
            from .connectionpool import (
          File "site-packages/urllib3/connectionpool.py", line 37, in <module>
            from .response import HTTPResponse
          File "site-packages/urllib3/response.py", line 144, in <module>
            class HTTPResponse(io.IOBase):
          File "site-packages/urllib3/response.py", line 344, in HTTPResponse
            DECODER_ERROR_CLASSES += (brotli.Error,)
        AttributeError: 'module' object has no attribute 'Error'
    elprans committed Apr 22, 2019
    Configuration menu
    Copy the full SHA
    c2787a5 View commit details
    Browse the repository at this point in the history