osmcode / pyosmium

Python bindings for libosmium
https://osmcode.org/pyosmium
BSD 2-Clause "Simplified" License
318 stars 65 forks source link

fix two python 3.12 deprecation warnings #264

Closed mtmail closed 3 months ago

mtmail commented 3 months ago

Deals with two warnings Python 3.12 prints

DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled
for removal in a future version. Use timezone-aware objects to represent datetimes
in UTC: datetime.datetime.now(datetime.UTC).
 SyntaxWarning: invalid escape sequence '\s'
  return re.sub("\s\s+" , " ", s)