yaqwsx / KiKit

Automation tools for KiCAD
https://yaqwsx.github.io/KiKit
MIT License
1.49k stars 200 forks source link

numpy 2.0 breaks KiKit, `numpy.lib.utils` has turned into an internal implementation detail #706

Closed lethalbit closed 1 month ago

lethalbit commented 1 month ago

Prerequisites

KiKit version

1.5.1+28.ga8a1405

KiCAD version

8.0.3

Operating system

Arch Linux

Description

When trying to use KiKit on a system that has numpy 2.0.0, it will fail to load due to numpy.lib.utils being turned into a private implementation detail, having been renamed numpy.lib._utils_impl. (see numpy/numpy @ ace4445)

This causes the panelization section to fail to load taking down the rest of KiCad

Steps to Reproduce

$ python -m venv --system-site-packages .venv
$ source .venv/bin/activate
$ pip install numpy==2.0 kikit
$ python -c 'from kikit.actionPlugins import importAllPlugins; importAllPlugins()'

This will throw ModuleNotFoundError: No module named 'numpy.lib.utils' from kikit/actionPlugins/panelize.py when attempted.

yaqwsx commented 1 month ago

This should be resolved via eac56af.

stefan-misik commented 1 month ago

Hi @yaqwsx , do you plan to include this fix in a release soon? This bug is preventing kikit plugin from working on Arch Linux and there is even no up-to-date kikit-git (i.e. nightly build) package in AUR.

yaqwsx commented 1 month ago

I plan the next release to be on the horizon of 1-2 weeks. If you are in hurry, you should be able to manually update to the upstream version.