Syntax Warning in framework-arduinoespressif8266

During build for esp8266 platform in VS-Code, following syntax error is reported:

/home/user/.platformio/packages/framework-arduinoespressif8266/tools/elf2bin.py:54: SyntaxWarning: invalid escape sequence '\s'
  words = re.split('\s+', line)
/home/user/.platformio/packages/framework-arduinoespressif8266/tools/elf2bin.py:73: SyntaxWarning: invalid escape sequence '\s'
  words = re.split('\s+', line)

This has been fixed in #9034, but was only merged into “master” branch. The latest release 3.1.2 is about two years old and does not yet contain this fix.

I reckon that platformio/framework-arduinoespressif8266 in the PlatformIO registry is built from this latest official release (3.1.2), and thus is missing the fix.

How to best deal with this?

Then push issue

so that a new version of Arduino-ESP8266 may be released that PlatformIO can cleanly update to. I don’t think they would do a bleeding-edge core update just to get rid of a warning message.