wlav / cppyy

Other
404 stars 42 forks source link

Deprecation warning when importing `cppyy` in unit tests #225

Open guitargeek opened 6 months ago

guitargeek commented 6 months ago

Reproducer:

import unittest

class TestGeek(unittest.TestCase):
    def test_geek(self):
        import cppyy

if __name__ == "__main__":
    unittest.main(verbosity=2)

Output:

test_geek (__main__.TestGeek.test_geek) /usr/lib/python3.11/site-packages/cppyy/__init__.py:313:
DeprecationWarning: pkg_resources is deprecated as an API.
See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources as pr
ok

----------------------------------------------------------------------
Ran 1 test in 0.247s

OK

I noticed this when using cppyy in my personal projects. It would be nice to fix this to free the tests from warnings!