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

Telegram Namespace Conflict #207

Open
minusmagis opened this issue Jul 31, 2021 · 3 comments
Open

Telegram Namespace Conflict #207

minusmagis opened this issue Jul 31, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@minusmagis
Copy link

Hi Alexander,

First of all I would like to thank you and contgratulate you for your work, it works wondefully.

However I have encountered a major issue when trying to use your library alongside the python-telegram-bot library, since you use the same namespace, i.e 'telegram'.

A workaround I have found is to simply change the namespace of your library to a diferent name (telegram_simple) to prevent such incompatibilities, and it seems to work (see my modified code here).

I basically cloned your repo and modified all the necessary imports and folders from telegram to telegram_simple and it seems to work nicely.

I leave you with the code so that, if you want, you make this change to improve compatibility, since I've seen some issues #195 #120 #110 which seem to have trouble with this rather broad 'telegram' name and maybe something a little bit more specific would cause less confusion.

Thanks again for the nice work

Best

minus

@alexander-akhmetov alexander-akhmetov added the enhancement New feature or request label Nov 25, 2021
@alexander-akhmetov
Copy link
Owner

Thank you for the feedback! Yes, there were several issues with that. Choosing telegram probably wasn't the best decision. But changing the namespace might break some external code. I'll leave this issue open, we might need some transitioning period if/when this change is implemented.

@Nikita2305
Copy link

Nikita2305 commented Feb 14, 2023

Had some problems with modified code above, so created new version as a fork. Thank you for non-blocking feature. I've no idea why this is so dumb in current well-known libraries.

UPD: also I've implemented there method add_any_update_handler to handle any type of update.

@selankon
Copy link

selankon commented Dec 14, 2023

Hey!

Same problem here, if the @Nikita2305 is working properly, why don't create a PR? I can help testing

On production systems will be better if we can install the updated package from pip :)

Thanks to both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants