red-hat-storage / ocs-ci

https://ocs-ci.readthedocs.io/en/latest/
MIT License
108 stars 166 forks source link

Suggest to loosen the dependency on funcy #6702

Closed Agnes-U closed 1 year ago

Agnes-U commented 1 year ago

Hi, your project ocs-ci requires "funcy==1.14" in its dependency. After analyzing the source code, we found that some other versions of funcy can also be suitable without affecting your project, i.e., funcy 1.11, 1.12, 1.13, 1.15, 1.16, 1.17. Therefore, we suggest to loosen the dependency on funcy from "funcy==1.14" to "funcy>=1.11,<=1.17" to avoid any possible conflict for importing more packages or for downstream projects that may use ocs-ci.

May I pull a request to loosen the dependency on funcy?

By the way, could you please tell us whether such dependency analysis may be potentially helpful for maintaining dependencies easier during your development?



For your reference, here are details in our analysis.

Your project ocs-ci(commit id: b37e8ef875c6f812daee6a94d27dc89f6e97e8ed) directly uses 1 APIs from package funcy.

funcy.funcs.compose

From which, 1 functions are then indirectly called, including 0 funcy's internal APIs and 1 outsider APIs, as follows (neglecting some repeated function occurrences).

[/red-hat-storage/ocs-ci]
+--funcy.funcs.compose
|      +--functools.reduce

We scan funcy's versions among [1.11, 1.12, 1.13, 1.15, 1.16, 1.17] and 1.14, the changing functions (diffs being listed below) have none intersection with any function or API we mentioned above (either directly or indirectly called by this project).

diff: 1.14(original) 1.11
['funcy.flow.nullcontext.__exit__', 'funcy.decorators.decorator', 'funcy.objects.cached_readonly', 'funcy.flow.nullcontext', 'funcy.flow.retry', 'funcy.objects.wrap_prop', 'funcy.flow.nullcontext.__init__', 'funcy.flow.nullcontext.__enter__', 'funcy.flow.wrap_with', 'funcy.objects.cached_readonly.__set__', 'funcy.decorators.make_decorator']

diff: 1.14(original) 1.12
['funcy.flow.nullcontext.__exit__', 'funcy.flow.nullcontext', 'funcy.flow.retry', 'funcy.objects.wrap_prop', 'funcy.flow.nullcontext.__init__', 'funcy.flow.nullcontext.__enter__', 'funcy.flow.wrap_with']

diff: 1.14(original) 1.13
['funcy.flow.nullcontext.__exit__', 'funcy.compat.nullcontext.__enter__', 'funcy.flow.nullcontext', 'funcy.flow.retry', 'funcy.objects.wrap_prop', 'funcy.flow.nullcontext.__init__', 'funcy.compat.nullcontext.__init__', 'funcy.flow.nullcontext.__enter__', 'funcy.flow.wrap_with', 'funcy.compat.nullcontext.__exit__', 'funcy.compat.nullcontext']

diff: 1.14(original) 1.15
['funcy.seqs.map', 'funcy.seqs.lfilter', 'funcy.seqs.lmap', 'funcy.seqs.filter', 'funcy.calc.cache', 'funcy.funcs.rpartial', 'funcy.colls._factory', 'funcy.flow.raiser', 'funcy.objects.LazyObject']

diff: 1.14(original) 1.16
['funcy.colls.has_path', 'funcy.calc.CacheMemory.__setitem__', 'funcy.seqs.lmap', 'funcy.decorators.has_1pos_and_kwonly', 'funcy.calc.CacheMemory.expire', 'funcy.calc.memoize', 'funcy.calc.SkipMemoization', 'funcy.flow.throttle', 'funcy.flow.raiser', 'funcy.calc.CacheMemory', 'funcy._inspect.get_spec', 'funcy.objects.LazyObject', 'funcy.seqs.map', 'funcy.decorators.decorator', 'funcy.calc.CacheMemory.clear', 'funcy.seqs.lfilter', 'funcy.flow._ensure_exceptable', 'funcy.flow.reraise', 'funcy.funcs.rpartial', 'funcy.funcs.curry', 'funcy.decorators.has_single_arg', 'funcy.calc.CacheMemory.__init__', 'funcy.calc._memory_decorator', 'funcy.seqs.filter', 'funcy.funcs.autocurry', 'funcy.calc.SkipMemory', 'funcy.calc.CacheMemory.__getitem__', 'funcy.calc.cache', 'funcy.colls._factory', 'funcy.flow._is_exception_type', 'funcy.funcs.rcurry']

diff: 1.14(original) 1.17
['funcy.colls.has_path', 'funcy.calc.CacheMemory.__setitem__', 'funcy.colls.zip_values', 'funcy.decorators.Call.__str__', 'funcy.seqs.lmap', 'funcy.colls.zip_dicts', 'funcy.decorators.has_1pos_and_kwonly', 'funcy.calc.CacheMemory.expire', 'funcy.calc.memoize', 'funcy.calc.SkipMemoization', 'funcy.flow.throttle', 'funcy.flow.raiser', 'funcy.calc.CacheMemory', 'funcy._inspect.get_spec', 'funcy.objects.LazyObject', 'funcy._inspect._sig_to_spec', 'funcy.seqs.map', 'funcy.decorators.decorator', 'funcy.calc.CacheMemory.clear', 'funcy.seqs.lfilter', 'funcy.flow._ensure_exceptable', 'funcy.flow.reraise', 'funcy.funcs.rpartial', 'funcy.funcs.curry', 'funcy.decorators.has_single_arg', 'funcy.calc.CacheMemory.__init__', 'funcy.flow.limit_error_rate', 'funcy.calc._memory_decorator', 'funcy.seqs.filter', 'funcy.funcs.autocurry', 'funcy.decorators.Call', 'funcy.calc.SkipMemory', 'funcy.calc.CacheMemory.__getitem__', 'funcy.colls.del_in', 'funcy.decorators.Call.__repr__', 'funcy.calc.cache', 'funcy.colls._factory', 'funcy.flow._is_exception_type', 'funcy.funcs.rcurry']

As for other packages, the APIs of @outside_package_name are called by funcy in the call graph and the dependencies on these packages also stay the same in our suggested versions, thus avoiding any outside conflict.

Therefore, we believe that it is quite safe to loose your dependency on funcy from "funcy==1.14" to "funcy>=1.11,<=1.17". This will improve the applicability of ocs-ci and reduce the possibility of any further dependency conflict with other projects/packages.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs.

github-actions[bot] commented 1 year ago

This issue has been automatically closed due to inactivity. Please re-open if this still requires investigation.