mypaint / mypaint

MyPaint is a simple drawing and painting program that works well with Wacom-style graphics tablets.
https://mypaint.app
GNU General Public License v2.0
2.7k stars 386 forks source link

Fix exporting brushes with mtime 0 #1255

Closed jtojnar closed 2 months ago

jtojnar commented 3 months ago

On NixOS, exporting a brush group by pressing “Export as Zipped Brushset” action in its properties fails with:

ValueError: ZIP does not support timestamps before 1980

The gui.brushmanager.BrushManager.export_group doctest fails with the same error.

This is because Nix forces mtime of package files to 0 (1970-01-01) to ensure the build outputs are consistently reproducible.

Let’s disable strict timestamps to clamp the out-of-range timestamps to ZIP epoch. That argument was actually introduced in Python 3.8 because of reproducible builds: https://bugs.python.org/issue34097

This raises minimum version of Python to 3.8.