-
Notifications
You must be signed in to change notification settings - Fork 6
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
Reduce the amount of dependencies #56
Comments
[pytelegrambotapi] Due to some open source protocol conflict considerations, I had to introduce it as a third party. |
[loguru] #53 Logging function, indeed we don't have a good enough logger. loguru is too bulky |
[Pillow] https://github.com/search?q=repo%3Asudoskys%2Ftelegramify-markdown%20Pillow&type=code [aiohttp] For aiohttp, almost all popular robot operation libraries use it Can you explain which scenarios require strict reduction of dependencies? |
Matplotlib and docutils were introduced as latex renderers, but experiments with latex on the client side ended in failure. |
Yes, I agree that it adds complexity, so it's up to you to decide. |
This comment was marked as outdated.
This comment was marked as outdated.
loguru is still not removed, maybe reopen? |
We should customize a simple logger. |
Will do |
- Changed `logger.warn` to `logger.warning` for better clarity. - Added exception handling for `aiohttp` import to manage missing dependencies. This enhances code readability and robustness. #56
Replaced `loguru` logger import with custom logger from `.logger` module. This change improves consistency and maintainability by centralizing logger configuration. #56
Now there should be ok |
Only a few simple one-line functions are used from
pytelegrambotapi
, it can be easily removed. Thanks to this, you can get rid of a lot of dependencies ofpytelegrambotapi
itself.docutils
andmatplotlib
don't seem to be used at all (I could be wrong).Pillow
andaiohttp
could be made optional by moving them to a separate extras likepip install telegramify-markdown[mermaid]
.I also think
loguru
should be removed, since libraries should use standard logging. The choice ofloguru
should be up to the end application, not the library. Those who want to useloguru
can do so: https://loguru.readthedocs.io/en/stable/overview.html#entirely-compatible-with-standard-logging.Thanks!
The text was updated successfully, but these errors were encountered: