Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest to loosen the dependency on telepot #11

Open
Agnes-U opened this issue Jul 31, 2022 · 0 comments
Open

Suggest to loosen the dependency on telepot #11

Agnes-U opened this issue Jul 31, 2022 · 0 comments

Comments

@Agnes-U
Copy link

Agnes-U commented Jul 31, 2022

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

May I pull a request to further 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?



We also give our detailed analysis as follows for your reference:

Your project PyLadiesBot directly uses 9 APIs from package telepot.

telepot.__init__.Bot.setWebhook, telepot.namedtuple._create_class, telepot.__init__.Bot.sendMessage, telepot.namedtuple._create_class, telepot.__init__.Bot.kickChatMember, telepot.__init__.Bot.message_loop, telepot.__init__.glance, telepot.__init__.Bot.__init__, telepot.__init__.Bot.answerCallbackQuery

Beginning from the 9 APIs above, 38 functions are then indirectly called, including 24 telepot's internal APIs and 14 outsider APIs. The specific call graph is listed as follows (neglecting some repeated function occurrences).

[/Dayof/PyLadiesBot]
+--telepot.__init__.Bot.setWebhook
+--telepot.namedtuple._create_class
|      +--collections.namedtuple
|      +--warnings.warn
|      +--collections.OrderedDict
+--telepot.__init__.Bot.sendMessage
+--telepot.__init__.Bot.kickChatMember
+--telepot.__init__.Bot.message_loop
+--telepot.__init__.glance
+--telepot.__init__.Bot.__init__
+--telepot.__init__.Bot.answerCallbackQuery

We scan telepot's versions and observe that during its evolution between any version from [10.4] and 10.3, 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: 10.3(original) 10.4
['telepot.aio.__init__.Bot']

As for other packages, the APIs of collections, warnings, queue, Queue, traceback, time, json, threading and os 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==10.3" to "telepot>=10.3,<=10.4". This will improve the applicability of PyLadiesBot and reduce the possibility of any further dependency conflict with other projects.

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

No branches or pull requests

1 participant