enzet / map-machine

Python renderer for OpenStreetMap with custom icons intended to display as many map features as possible
MIT License
515 stars 34 forks source link

fix: Makes fields a keyword arg for urllib3 v1 and v2 compatibility. #157

Open cskau opened 1 year ago

cskau commented 1 year ago

This fixes an incompatibility between using urllib3 v1 and v2, due breaking changes to the request(..) method's signature:

urllib3 v1:

request(method, url, fields=None, headers=None, **urlopen_kw)

urllib3 v2:

request(method, url, body=None, fields=None, headers=None, json=None, **urlopen_kw)

Aside: To avoid similar issues due to breaking changes in dependencies, the requirements.txt files should probably be updated to have versions with both lower and upper bounds: urllib3>=1.25.6 -> urllib3>=1.25.6,<2.0.0