Demoniware icon indicating copy to clipboard operation
Demoniware copied to clipboard

Suggest to loosen the dependency on telepot

Open Agnes-U opened this issue 3 years ago • 0 comments

Hi, your project Demoniware requires "telepot==9.1" in its dependency. After analyzing the source code, we found that some other versions of telepot can also be suitable without affecting your project, i.e., telepot 9.0. Therefore, we suggest to loosen the dependency on telepot from "telepot==9.1" to "telepot>=9.0,<=9.1" to avoid any possible conflict for importing more packages or for downstream projects that may use Demoniware.

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

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 Demoniware(commit id: bf2a031c7d881e76606ac8bc165f0acbf72b97dc) directly uses 3 APIs from package telepot.

telepot.__init__.glance, telepot.exception.TelegramError.__init__, telepot.__init__.Bot.__init__

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

[/mthbernardes/Demoniware]
+--telepot.__init__.glance
+--telepot.exception.TelegramError.__init__
+--telepot.__init__.Bot.__init__

We scan telepot's versions among [9.0] and 9.1, 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: 9.1(original) 9.0
['telepot.delegate.include_callback_query_chat_id', 'telepot.delegate.intercept_callback_query_origin', 'telepot.delegate.pave_callback_query_origin_map']

As for other packages, the APIs of @outside_package_name are called by telepot 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 telepot from "telepot==9.1" to "telepot>=9.0,<=9.1". This will improve the applicability of Demoniware and reduce the possibility of any further dependency conflict with other projects/packages.

Agnes-U avatar Nov 15 '22 13:11 Agnes-U