cerberus icon indicating copy to clipboard operation
cerberus copied to clipboard

decrease memory consumption, use importlib.metadata to get package version instead of pkg_resources.get_dictribution

Open akayunov opened this issue 4 years ago • 3 comments

pkg_resources use a lot of memory and after introducing importlib.metadata in 3.8 looks obsolete. So let's change way to get package version and get rid of pkg_resources import.

akayunov avatar Oct 05 '21 11:10 akayunov

Do we really need tests like these: cerberus/tests/test_assorted.py:23?

akayunov avatar Oct 06 '21 07:10 akayunov

thanks for bringing this up. i think this would be well covered as the test suite runs on all supported platforms.

could you please check whether the importlib_metadata object could be defined in and imported from the platform module?

you may have noticed that development has stalled for a while and it will take such to merge and release this pr.

funkyfuture avatar Oct 06 '21 09:10 funkyfuture

oh, iirc this test is covering some edge case. please try to do some research in the commit / pr / issues history.

funkyfuture avatar Oct 06 '21 10:10 funkyfuture

Is there any chance to get this merged and released? If yes, I can provide a fix for the tests in cerberus/tests/test_assorted.py.

slanzmich avatar Nov 16 '22 09:11 slanzmich

@funkyfuture sorry to bother, but can we get this merged (or variation thereof) and a new release? Thanks in advance

evelikov avatar Apr 11 '23 12:04 evelikov

solved w/ 81e2dfd6f79847e68133ce42b78dc3bb55870268

funkyfuture avatar Jul 22 '23 14:07 funkyfuture