antonmyronyuk / vbot Goto Github PK
View Code? Open in Web Editor NEWHandy bots backend
Handy bots backend
Hi, your project vbot requires "aiogram==2.16" in its dependency. After analyzing the source code, we found that the following versions of aiogram can also be suitable without affecting your project, i.e., aiogram 2.17, 2.17.1. Therefore, we suggest to loosen the dependency on aiogram from "aiogram==2.16" to "aiogram>=2.16,<=2.17.1" to avoid any possible conflict for importing more packages or for downstream projects that may use vbot.
May I pull a request to further loosen the dependency on aiogram?
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 vbot directly uses 7 APIs from package aiogram.
aiogram.dispatcher.dispatcher.Dispatcher.message_handler, aiogram.dispatcher.dispatcher.Dispatcher.__init__, aiogram.types.message.Message.__init__, aiogram.utils.mixins.ContextInstanceMixin.set_current, aiogram.utils.mixins.ContextInstanceMixin.set_current, aiogram.bot.bot.Bot.__init__, aiogram.dispatcher.webhook.WebhookRequestHandler.__init__
Beginning from the 7 APIs above, 24 functions are then indirectly called, including 16 aiogram's internal APIs and 8 outsider APIs. The specific call graph is listed as follows (neglecting some repeated function occurrences).
[/antonmyronyuk/vbot]
+--aiogram.dispatcher.dispatcher.Dispatcher.message_handler
| +--aiogram.dispatcher.dispatcher.Dispatcher.register_message_handler
| | +--aiogram.dispatcher.handler.Handler.register
| | | +--aiogram.dispatcher.handler._get_spec
| | | | +--inspect.getfullargspec
| | | +--aiogram.dispatcher.filters.filters.get_filters_spec
| | | | +--aiogram.dispatcher.filters.filters.get_filter_spec
| | | | | +--inspect.getfullargspec
| | | | | +--inspect.isawaitable
| | | | | +--inspect.iscoroutinefunction
| | | | | +--aiogram.dispatcher.handler.FilterObj.__init__
| | | +--aiogram.dispatcher.handler.Handler.HandlerObj.__init__
| | +--aiogram.dispatcher.dispatcher.Dispatcher._wrap_async_task
| | | +--aiogram.dispatcher.dispatcher.Dispatcher.async_task
| | | | +--asyncio.create_task
| | | | +--functools.wraps
+--aiogram.dispatcher.dispatcher.Dispatcher.__init__
| +--aiogram.dispatcher.storage.DisabledStorage.__init__
| +--aiogram.dispatcher.filters.factory.FiltersFactory.__init__
| +--aiogram.dispatcher.handler.Handler.__init__
| +--aiogram.dispatcher.middlewares.MiddlewareManager.__init__
| +--aiogram.dispatcher.handler.Handler.register
| +--aiogram.dispatcher.dispatcher.Dispatcher._setup_filters
+--aiogram.types.message.Message.__init__
+--aiogram.utils.mixins.ContextInstanceMixin.set_current
+--aiogram.bot.bot.Bot.__init__
| +--aiogram.bot.base.BaseBot.__init__
| | +--aiogram.bot.api.check_token
| | | +--aiogram.utils.exceptions.ValidationError.__init__
| | | | +--aiogram.utils.exceptions.TelegramAPIError.__init__
| | | | | +--aiogram.utils.exceptions._clean_message
| | +--ssl.create_default_context
| | +--certifi.where
| | +--aiohttp_socks.utils.parse_proxy_url
+--aiogram.dispatcher.webhook.WebhookRequestHandler.__init__
We scan aiogram's versions and observe that during its evolution between any version from [2.17, 2.17.1] and 2.16, 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: 2.16(original) 2.17
['aiogram.bot.bot.Bot.ban_chat_sender_chat', 'aiogram.bot.api.Methods', 'aiogram.dispatcher.storage.FSMContextProxy.update', 'aiogram.dispatcher.webhook.WebhookRequestHandler', 'aiogram.types.chat.Chat', 'aiogram.types.message.Message', 'aiogram.utils.helper.HelperMode', 'aiogram.bot.bot.Bot.unban_chat_sender_chat', 'aiogram.types.chat.Chat.ban_sender_chat', 'aiogram.types.chat.Chat.unban_sender_chat', 'aiogram.bot.bot.Bot', 'aiogram.dispatcher.storage.FSMContextProxy', 'aiogram.types.fields.ListField', 'aiogram.types.fields.DateTimeField', 'aiogram.utils.helper.HelperMode._snake_case']
diff: 2.16(original) 2.17.1
['aiogram.bot.bot.Bot.ban_chat_sender_chat', 'aiogram.bot.api.Methods', 'aiogram.dispatcher.storage.FSMContextProxy.update', 'aiogram.dispatcher.webhook.WebhookRequestHandler', 'aiogram.types.chat.Chat', 'aiogram.types.message.Message', 'aiogram.utils.helper.HelperMode', 'aiogram.bot.bot.Bot.unban_chat_sender_chat', 'aiogram.types.chat.Chat.ban_sender_chat', 'aiogram.types.chat.Chat.unban_sender_chat', 'aiogram.bot.bot.Bot', 'aiogram.utils.deprecated.removed_argument', 'aiogram.dispatcher.storage.FSMContextProxy', 'aiogram.types.fields.ListField', 'aiogram.types.fields.DateTimeField', 'aiogram.utils.helper.HelperMode._snake_case']
As for other packages, the APIs of ssl, certifi, aiohttp_socks, inspect, asyncio and functools are called by aiogram 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 aiogram from "aiogram==2.16" to "aiogram>=2.16,<=2.17.1". This will improve the applicability of vbot and reduce the possibility of any further dependency conflict with other projects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.