Title: [BUG] `(Ext)Bot._insert_defaults` edits objects in-place · Issue #3305 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: [BUG] `(Ext)Bot._insert_defaults` edits objects in-place · Issue #3305 · python-telegram-bot/python-telegram-bot
X Title: [BUG] `(Ext)Bot._insert_defaults` edits objects in-place · Issue #3305 · python-telegram-bot/python-telegram-bot
Description: Steps to Reproduce create an InputMediaPhoto with a HTML-Caption use it in a send_media_group call of a bot without Defaults use it in a send_media_group call of a bot with Defaults.parse_mode Expected behaviour in step 3., the html mark...
Open Graph Description: Steps to Reproduce create an InputMediaPhoto with a HTML-Caption use it in a send_media_group call of a bot without Defaults use it in a send_media_group call of a bot with Defaults.parse_mode Expe...
X Description: Steps to Reproduce create an InputMediaPhoto with a HTML-Caption use it in a send_media_group call of a bot without Defaults use it in a send_media_group call of a bot with Defaults.parse_mode Expe...
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/3305
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] `(Ext)Bot._insert_defaults` edits objects in-place","articleBody":"### Steps to Reproduce\n\n1. create an `InputMediaPhoto` with a HTML-Caption\r\n2. use it in a `send_media_group` call of a bot without `Defaults`\r\n3. use it in a `send_media_group` call of a bot with `Defaults.parse_mode`\r\n\n\n### Expected behaviour\n\nin step 3., the html markup is parsed by TG\n\n### Actual behaviour\n\nit's not.\n\n### Operating System\n\nAny\n\n### Version of Python, python-telegram-bot & dependencies\n\n```shell\nPTB v20\n```\n\n\n### Relevant log output\n\n_No response_\n\n### Additional Context\n\nThis is due to `_insert_defaults` doing something like `media.parse_mode = None`. Instead it should create a copy of `media` and set the parse mode on the copy.\r\n\r\nThis issue surfaced in #3295 (https://github.com/python-telegram-bot/python-telegram-bot/pull/3295#discussion_r1002723820) and was also teased in #3249.","author":{"url":"https://github.com/Bibo-Joshi","@type":"Person","name":"Bibo-Joshi"},"datePublished":"2022-10-23T16:11:38Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/3305"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:102d499b-2174-4611-2794-e40e7b900d74 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AFFE:16AB79:466139E:5946980:6B023EFB |
| html-safe-nonce | 366fc15a614f1acac7cc0b5d7707ef91d1f86fea96b97de82b374531ed05f490 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkZFOjE2QUI3OTo0NjYxMzlFOjU5NDY5ODA6NkIwMjNFRkIiLCJ2aXNpdG9yX2lkIjoiMTM2Mzg3NTcwOTk3Nzc3MTc3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 848d7bfef136432a475606ca73b357e52449ac51aedc4c84e3118779b20ec88e |
| hovercard-subject-tag | issue:1419843910 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-telegram-bot/python-telegram-bot/3305/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cc43f59ab133bca2ceb33ffd14f6545b308f260b871f321b770779cdab45402b/python-telegram-bot/python-telegram-bot/issues/3305 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cc43f59ab133bca2ceb33ffd14f6545b308f260b871f321b770779cdab45402b/python-telegram-bot/python-telegram-bot/issues/3305 |
| og:image:alt | Steps to Reproduce create an InputMediaPhoto with a HTML-Caption use it in a send_media_group call of a bot without Defaults use it in a send_media_group call of a bot with Defaults.parse_mode Expe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Bibo-Joshi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-telegram-bot/python-telegram-bot git https://github.com/python-telegram-bot/python-telegram-bot.git |
| octolytics-dimension-user_id | 16178365 |
| octolytics-dimension-user_login | python-telegram-bot |
| octolytics-dimension-repository_id | 38696925 |
| octolytics-dimension-repository_nwo | python-telegram-bot/python-telegram-bot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38696925 |
| octolytics-dimension-repository_network_root_nwo | python-telegram-bot/python-telegram-bot |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width