MazinLab / MKIDCore

Core Tools
GNU General Public License v3.0
4 stars 0 forks source link

Remove deprecated package `pkg_resources` #9

Open ld-cd opened 2 months ago

ld-cd commented 2 months ago

pkg_resources has been deprecated in favor of importlib.resources which is in the python standard library. It is unclear to me if this is still used, my interaction has been with the default.yml management code which is all archeological (the file was removed 6 years ago): https://github.com/MazinLab/MKIDCore/commits/main/default.yml

Evaluate if and where we still use it (it may be used for the instrument keysets), remove any uses for files that no longer exist and replace the uses that are still relevant with importlib.resources

nzivkov commented 2 months ago

Pkg_resources is primarily used in the testing scripts in mkidpipeline and mkidcore. In theory the pipeline can run without these but it will introduce a host of unchecked errors so I think it's necessary to keep them. Most of the functionality from importlib.resources that can replace pkg_resources requires python 3.9 or greater. I attempted an update to 3.12 and the runtime was very long so we may have to use 3.10 or 3.11.

ld-cd commented 2 months ago

It can be used in 3.8 via the package on pypi (see https://github.com/amaranth-lang/amaranth/blob/main/pyproject.toml#L18) when you say the runtime was quite long do you mean the install time?

ld-cd commented 2 months ago

Given that we've dropped support for 3.8 and 3.9 anyways this should be more straightforward now, @nzivkov do you want to assign this to one of the undergrads?