Skip to content

Drop pkg_resources and nose; migrate to modern Python 3.12 stack#46

Open
SarthakYadav wants to merge 1 commit intoDCASE-REPO:masterfrom
SarthakYadav:master
Open

Drop pkg_resources and nose; migrate to modern Python 3.12 stack#46
SarthakYadav wants to merge 1 commit intoDCASE-REPO:masterfrom
SarthakYadav:master

Conversation

@SarthakYadav
Copy link
Copy Markdown

@SarthakYadav SarthakYadav commented Mar 21, 2026

Reference Issue

N/A

What does this implement/fix? Explain your changes.

  • replace runtime pkg_resources usage with importlib.metadata/resources + packaging
  • keep public utility entry points compatible (check_installation/check_pkg_resources/Example paths)
  • migrate tests from nose to pytest and update test config/docs/deps
  • fix Python 3.12/runtime API drift (scipy windows, pyparsing, msgpack, random.shuffle, rtU mode)
  • preserve msgpack serialization compatibility via fallback loading paths
  • add/update minimum dependency versions required by new code paths

Any other comments?

This PR is motivated by issues I experienced yesterday in a new python environment, when dcase_util import suddenly stopped working with the error pkg_resource not found.

On digging, I found that this is due to the pkg_resource API being deprecated from the latest setuptools. While pinning setuptools to versions <81 works as a workaround, in the long term, it didn't seem like the correct fix. dcase_util is a crucial dependency in my workflow, so I decided to try and fix it. All tests are passing.

Full disclosure: a large part of the changes was made using AI. I manually verified that tests were not relaxed to "make things work".

- replace runtime pkg_resources usage with importlib.metadata/resources + packaging
- keep public utility entry points compatible (check_installation/check_pkg_resources/Example paths)
- migrate tests from nose to pytest and update test config/docs/deps
- fix Python 3.12/runtime API drift (scipy windows, pyparsing, msgpack, random.shuffle, rtU mode)
- preserve msgpack serialization compatibility via fallback loading paths
- add/update minimum dependency versions required by new code paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant