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 #5

Open
Agnes-U opened this issue Nov 23, 2022 · 0 comments
Open

Suggest to loosen the dependency on telepot #5

Agnes-U opened this issue Nov 23, 2022 · 0 comments

Comments

@Agnes-U
Copy link

Agnes-U commented Nov 23, 2022

Hi, your project IndianStockTracker requires "telepot==12.6" 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 12.1, 12.2, 12.3, 12.4, 12.5, 12.7. Therefore, we suggest to loosen the dependency on telepot from "telepot==12.6" to "telepot>=12.1,<=12.7" to avoid any possible conflict for importing more packages or for downstream projects that may use IndianStockTracker.

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 IndianStockTracker(commit id: 725882b) directly uses 4 APIs from package telepot.

telepot.loop.MessageLoop.__init__, telepot.__init__.glance, telepot.__init__.Bot.sendMessage, telepot.__init__.Bot.__init__

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

[/pratiksampat/IndianStockTracker]
+--telepot.loop.MessageLoop.__init__
|      +--telepot.loop._infer_handler_function
|      |      +--telepot.flavor_router
+--telepot.__init__.glance
+--telepot.__init__.Bot.sendMessage
+--telepot.__init__.Bot.__init__

We scan telepot's versions among [12.1, 12.2, 12.3, 12.4, 12.5, 12.7] and 12.6, 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: 12.6(original) 12.1
['telepot.__init__.Bot.addStickerToSet', 'telepot.aio.__init__.Bot.setStickerPositionInSet', 'telepot.aio.__init__.Bot.getStickerSet', 'telepot.text.apply_entities_as_html', 'telepot.api.set_proxy', 'telepot.loop.GetUpdatesLoop', 'telepot.__init__.Bot', 'telepot.__init__.Bot.deleteStickerFromSet', 'telepot.exception.BadHTTPResponse.__unicode__', 'telepot.aio.__init__.Bot.createNewStickerSet', 'telepot.aio.api.set_proxy', 'telepot.__init__.Bot.editMessageLiveLocation', 'telepot.helper.Sender', 'telepot.helper.Editor', 'telepot.__init__.Bot.setStickerPositionInSet', 'telepot.__init__.Bot.sendSticker', 'telepot.aio.loop.GetUpdatesLoop', 'telepot.__init__.Bot.sendMediaGroup', 'telepot.__init__.Bot.sendVoice', 'telepot.__init__.Bot.sendVideo', 'telepot.exception.BadHTTPResponse.__str__', 'telepot.aio.loop.MessageLoop.cancel', 'telepot.aio.api.download', 'telepot.helper.Administrator', 'telepot.__init__.Bot.sendInvoice', 'telepot.__init__.Bot.sendLocation', 'telepot.text._apply_entities', 'telepot.aio.__init__.Bot.addStickerToSet', 'telepot.helper.Editor.__init__', 'telepot.text.apply_entities_as_markdown', 'telepot.__init__.Bot.deleteChatStickerSet', 'telepot.namedtuple.StickerArray', 'telepot.aio.__init__.Bot.sendMediaGroup', 'telepot.aio.loop.MessageLoop.__init__', 'telepot.exception.BadHTTPResponse', 'telepot.__init__.Bot.editMessageCaption', 'telepot.aio.loop.MessageLoop', 'telepot.aio.api._close_pools', 'telepot.namedtuple._Message', 'telepot.aio.__init__.Bot.deleteChatStickerSet', 'telepot.aio.__init__.Bot.deleteStickerFromSet', 'telepot.__init__._split_input_media_array', 'telepot.__init__.Bot.sendAudio', 'telepot.helper.Administrator.__init__', 'telepot.aio.__init__.Bot', 'telepot.loop.MessageLoop', 'telepot.aio.api._proxy_kwargs', 'telepot.__init__.Bot.sendPhoto', 'telepot.loop.MessageLoop.run_forever', 'telepot.__init__.Bot.createNewStickerSet', 'telepot.loop.GetUpdatesLoop.run_forever', 'telepot.__init__.Bot.sendDocument', 'telepot.helper.Sender.__init__', 'telepot.aio.__init__.Bot.uploadStickerFile', 'telepot.aio.__init__.Bot.setChatStickerSet', 'telepot.__init__.Bot.getStickerSet', 'telepot.__init__.Bot.setChatStickerSet', 'telepot.aio.__init__.Bot.stopMessageLiveLocation', 'telepot.__init__.Bot.uploadStickerFile', 'telepot.aio.__init__.Bot.editMessageLiveLocation', 'telepot.__init__.Bot.stopMessageLiveLocation']

diff: 12.6(original) 12.2
['telepot.text.apply_entities_as_html', 'telepot.api.set_proxy', 'telepot.loop.GetUpdatesLoop', 'telepot.__init__.Bot', 'telepot.exception.BadHTTPResponse.__unicode__', 'telepot.aio.api.set_proxy', 'telepot.__init__.Bot.editMessageLiveLocation', 'telepot.helper.Sender', 'telepot.helper.Editor', 'telepot.aio.loop.GetUpdatesLoop', 'telepot.__init__.Bot.sendMediaGroup', 'telepot.__init__.Bot.sendVoice', 'telepot.__init__.Bot.sendVideo', 'telepot.exception.BadHTTPResponse.__str__', 'telepot.aio.api.download', 'telepot.helper.Administrator', 'telepot.__init__.Bot.sendInvoice', 'telepot.__init__.Bot.sendLocation', 'telepot.text._apply_entities', 'telepot.helper.Editor.__init__', 'telepot.text.apply_entities_as_markdown', 'telepot.__init__.Bot.deleteChatStickerSet', 'telepot.aio.__init__.Bot.sendMediaGroup', 'telepot.exception.BadHTTPResponse', 'telepot.__init__.Bot.editMessageCaption', 'telepot.namedtuple._Message', 'telepot.aio.__init__.Bot.deleteChatStickerSet', 'telepot.__init__._split_input_media_array', 'telepot.__init__.Bot.sendAudio', 'telepot.helper.Administrator.__init__', 'telepot.aio.__init__.Bot', 'telepot.loop.MessageLoop', 'telepot.aio.api._proxy_kwargs', 'telepot.__init__.Bot.sendPhoto', 'telepot.loop.MessageLoop.run_forever', 'telepot.loop.GetUpdatesLoop.run_forever', 'telepot.__init__.Bot.sendDocument', 'telepot.helper.Sender.__init__', 'telepot.aio.__init__.Bot.setChatStickerSet', 'telepot.__init__.Bot.setChatStickerSet', 'telepot.aio.__init__.Bot.stopMessageLiveLocation', 'telepot.aio.__init__.Bot.editMessageLiveLocation', 'telepot.__init__.Bot.stopMessageLiveLocation']

diff: 12.6(original) 12.3
['telepot.api.set_proxy', 'telepot.loop.GetUpdatesLoop', 'telepot.__init__.Bot', 'telepot.exception.BadHTTPResponse.__unicode__', 'telepot.aio.api.set_proxy', 'telepot.__init__.Bot.editMessageLiveLocation', 'telepot.helper.Sender', 'telepot.helper.Editor', 'telepot.aio.loop.GetUpdatesLoop', 'telepot.__init__.Bot.sendMediaGroup', 'telepot.__init__.Bot.sendVoice', 'telepot.__init__.Bot.sendVideo', 'telepot.exception.BadHTTPResponse.__str__', 'telepot.aio.api.download', 'telepot.helper.Administrator', 'telepot.__init__.Bot.sendInvoice', 'telepot.__init__.Bot.sendLocation', 'telepot.helper.Editor.__init__', 'telepot.__init__.Bot.deleteChatStickerSet', 'telepot.aio.__init__.Bot.sendMediaGroup', 'telepot.exception.BadHTTPResponse', 'telepot.__init__.Bot.editMessageCaption', 'telepot.aio.__init__.Bot.deleteChatStickerSet', 'telepot.__init__._split_input_media_array', 'telepot.__init__.Bot.sendAudio', 'telepot.helper.Administrator.__init__', 'telepot.aio.__init__.Bot', 'telepot.loop.MessageLoop', 'telepot.aio.api._proxy_kwargs', 'telepot.__init__.Bot.sendPhoto', 'telepot.loop.MessageLoop.run_forever', 'telepot.loop.GetUpdatesLoop.run_forever', 'telepot.__init__.Bot.sendDocument', 'telepot.helper.Sender.__init__', 'telepot.aio.__init__.Bot.setChatStickerSet', 'telepot.__init__.Bot.setChatStickerSet', 'telepot.aio.__init__.Bot.stopMessageLiveLocation', 'telepot.aio.__init__.Bot.editMessageLiveLocation', 'telepot.__init__.Bot.stopMessageLiveLocation']

diff: 12.6(original) 12.4
['telepot.aio.__init__.Bot.sendMediaGroup', 'telepot.aio.__init__.Bot', 'telepot.api.set_proxy', 'telepot.aio.api._proxy_kwargs', 'telepot.__init__.Bot', 'telepot.__init__.Bot.sendPhoto', 'telepot.__init__.Bot.sendMediaGroup', 'telepot.__init__.Bot.sendVoice', 'telepot.__init__.Bot.sendVideo', 'telepot.__init__.Bot.sendDocument', 'telepot.__init__.Bot.editMessageCaption', 'telepot.helper.Sender.__init__', 'telepot.aio.api.download', 'telepot.helper.Sender', 'telepot.__init__.Bot.sendInvoice', 'telepot.__init__._split_input_media_array', 'telepot.__init__.Bot.sendAudio']

diff: 12.6(original) 12.5
['telepot.aio.__init__.Bot', 'telepot.__init__.Bot.sendPhoto', 'telepot.aio.api._proxy_kwargs', 'telepot.__init__.Bot', 'telepot.__init__.Bot.sendVoice', 'telepot.__init__.Bot.sendVideo', 'telepot.__init__.Bot.sendDocument', 'telepot.__init__.Bot.editMessageCaption', 'telepot.aio.api.download', 'telepot.__init__.Bot.sendAudio']

diff: 12.6(original) 12.7
['telepot.aio.api._close_pools']

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==12.6" to "telepot>=12.1,<=12.7". This will improve the applicability of IndianStockTracker and reduce the possibility of any further dependency conflict with other projects/packages.

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