Can not save files when using latest Python Version 3.8

Description of the Problem, or Question?

Can not save files when using latest Python Version 3.8
Deprecated “clock” function was removed in Python 3.8: What’s New In Python 3.8 — Python 3.12.2 documentation

Current Workaround: downgrade Python 3 or use Python 2

MyPaint version:

Latest alpha Version / master

Operating System + Version:

Arch Linux 64bit / Openbox

Please Tell Us How to Reproduce the Problem in Steps.

Build Mypaint with Python 3.8 and try to save a file in Mypaint

Error Log:

Traceback (most recent call last):
  File "/usr/local/lib/mypaint/gui/filehandling.py", line 1141, in save_cb
    self.save_as_cb(action)
  File "/usr/local/lib/mypaint/gui/filehandling.py", line 1159, in save_as_cb
    self.save_as_dialog(
  File "/usr/local/lib/mypaint/gui/filehandling.py", line 1234, in save_as_dialog
    save_method_reference(filename, **options)
  File "/usr/local/lib/mypaint/gui/filehandling.py", line 907, in save_file
    thumbnail_pixbuf = self._save_doc_to_file(
  File "/usr/local/lib/mypaint/gui/filehandling.py", line 982, in _save_doc_to_file
    thumbnail_pixbuf = ioui.call(doc.model.save, filename, **options)
  File "/usr/local/lib/mypaint/gui/widgets.py", line 182, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/lib/mypaint/gui/filehandling.py", line 313, in call
    self._start_time = time.clock()
AttributeError: module 'time' has no attribute 'clock'