enzet / map-machine

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

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

Open cskau opened 11 months ago

cskau commented 11 months 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