linkedin / pyexchange

Python wrapper for Microsoft Exchange
Apache License 2.0
152 stars 98 forks source link

fix AttributeError on connectivity error. closes #38 #42

Closed deronnax closed 5 years ago

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-0.21%) to 92.18% when pulling 37dc5183424754cfe0fa0b98f208850fcefb7483 on deronnax:fix_attribute_error_on_error into 7f8c1812f4bfe4faf80fc38ef0f226061fb979bf on linkedin:master.

deronnax commented 9 years ago

Hu, it exploses on python3, don't know why. I'll investigate this quickly

catermelon commented 9 years ago

Sorry for the delay on getting back to you, lemme know if you need anything - I'm going to be out of town for the next week or so, so responses might be a bit slow. Sorry about that.

mosbasik commented 6 years ago

I'll be porting a project to Python 3 that uses this library and ran into the bug it fixes. I know it's a long shot, but I'd like to see this PR or something like it passing tests. Don't like the verify=False fix (link) very much.

Was going to try and pin down the issue this PR has with Python 3.x myself, but less than a third of the tests passed when run against master or tag 0.6 using Python 2.7.6 and 3.6.2. I guess that's probably the unpinned requirements files, given the age of the project? If anyone has an environment that passes the tests, could you post the working version numbers of both reqs files' libraries?

Haven't dug too deep and am not very pro at Python, but I found two places start looking into the PR's issue.

  1. IOError was merged into OSError starting in 3.3 (link), and requests.exceptions.RequestException subclasses IOError (link) so maybe an interface changed there?
  2. The tests that failed for 3.3 all involved an HTTPError, and request.exceptions imports urllib3.exceptions.HTTPError as BaseHTTPError (link) because it defines its own HTTPError class as well. (link) I'm not sure how aliases are handled in tracebacks so I'm not sure which of the two classes the failing tests are referring to.