-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Labels
🛠 refactorchange type: refactorchange type: refactor
Description
What kind of feature are you missing? Where do you notice a shortcoming of PTB?
We currently check for sys.maxunicode whenever we parse entities:
python-telegram-bot/telegram/_message.py
Lines 3128 to 3130 in 33b677a
| # Is it a narrow build, if so we don't need to convert | |
| if sys.maxunicode == 0xFFFF: | |
| return self.text[entity.offset : entity.offset + entity.length] |
However, sys.maxunicode is guaranteed to be 0x10FFFF since Python 3.3.
We needed a check for this back when we still supported older python versions (git blame tells that this line was last touched in 2016).
So, we do not need to check for this anymore, and it can thus be dropped.
Describe the solution you'd like
Remove logic checking for sys.maxunicode.
Describe alternatives you've considered
No response
Additional context
Originally discovered in #3594 (comment).
Added benefit of improving coverage, since this wasn't covered in our tests anyway.
Metadata
Metadata
Assignees
Labels
🛠 refactorchange type: refactorchange type: refactor