gtalarico / pyairtable

Python Api Client for Airtable
https://pyairtable.readthedocs.io
MIT License
765 stars 138 forks source link

Support `urllib3 >= 2` #251

Closed mesozoic closed 1 year ago

mesozoic commented 1 year ago

requests==2.30.0 introduced compatibility with urllib3==2.0.0, but some combination of how this library implements retrying or how it tests retrying is not compatible with changes they made in 2.0. In 1f9797f I've pinned this library to urllib3<2, but that's not going to work in the long run.

Fails are TypeError: 'Mock' object is not iterable and TypeError: expected string or bytes-like object, got 'Mock' so it's possible that it will be solvable within the test suite (rather than requiring a code change within the library).

mesozoic commented 1 year ago

Looks like they started supporting urllib3 2.0, so the simplest solution is probably pinning urllib<2 (and I confirmed the test suite passes with urllib3==1.26.15). I don't yet understand why that fixes the problem, so I'm not sure it's correct.