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 TypeError at import time #18

Closed
wants to merge 2 commits into from
Closed

Commits on Jul 3, 2015

  1. Fix TypeError at import time

    Commit python/cpython@562385d introduced _METHODS_EXPECTING_BODY at module level in httplib.py. The code in `gruvi.http` failes at import time with `TypeError: unhashable type: 'set'` on python 2.7.10 which includes this commit. Ignoring _METHODS_EXPECTING_BODY in the loop fixes the error, but I'm not sure if it has any side effects. The proposed change is more an example than a real solution i think.
    
    ```
    Python 2.7.10 (default, May 28 2015, 16:39:33) 
    [GCC 4.9.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import gruvi
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "gruvi/__init__.py", line 37, in <module>
        from .http import *
      File "gruvi/http.py", line 78, in <module>
        if name.isupper() and value in http_client.responses:
    TypeError: unhashable type: 'set'
    ```
    rsommer committed Jul 3, 2015
    Configuration menu
    Copy the full SHA
    fd7da54 View commit details
    Browse the repository at this point in the history
  2. Fix using the proposed solution

    As discussed, incorporated the proposed fix from geertj.
    rsommer committed Jul 3, 2015
    Configuration menu
    Copy the full SHA
    3e22bae View commit details
    Browse the repository at this point in the history