Python telegram bot showing urllib3 upstream warning message

I’m getting a warning when starting my telegram bot and not sure how to fix it

Every time I launch my telegram bot script, this warning message shows up in the console:

/usr/local/lib/python3.7/dist-packages/python_telegram_bot-12.4.2-py3.7.egg/telegram/utils/request.py:47: UserWarning: python-telegram-bot is using upstream urllib3. This is allowed but not supported by python-telegram-bot maintainers.

The bot seems to work fine but I keep seeing this warning. Is this something I should be worried about? How can I get rid of this message or should I just ignore it?

Any help would be great, thanks!

i wldn’t worry too much! the warning’s just a heads up, not a problem. ur bot’s workin fine, just means they’re using the upstream urllib3. should be ok, just keep an eye out for future updates!

The warning you’re seeing arises because python-telegram-bot recommends using a specific version of urllib3 for optimal compatibility, rather than the standard version. I’ve encountered this issue while hosting my own bots. While it won’t hinder your bot’s performance, it’s an indication that compatibility issues could arise in the future. To address this, consider downgrading urllib3 to a compatible version or updating python-telegram-bot to the latest release. Checking your requirements.txt can help ensure everything is aligned. In my experience, my bots continued to function properly despite this warning, so it’s more of an advisory note than a critical error.

This warning’s been around forever - it’s just a maintenance notice, nothing critical. I’ve run multiple production bots with this exact warning for months without problems. The python-telegram-bot library works fine with standard urllib3, they just don’t officially support it, hence the disclaimer. You can safely ignore it unless you actually hit functionality issues. If it bugs you, suppress it with Python’s warnings module, but that’s optional since it won’t affect your bot.