Title: Clear up imports policy · Issue #2468 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: Clear up imports policy · Issue #2468 · python-telegram-bot/python-telegram-bot
X Title: Clear up imports policy · Issue #2468 · python-telegram-bot/python-telegram-bot
Description: We're currently not very consistent regarding what we make available directly via telegram.__init__ and what we don't. Some examples: from telegram.error only TelegramError is available via telegram.__init__, but no of the other classes ...
Open Graph Description: We're currently not very consistent regarding what we make available directly via telegram.__init__ and what we don't. Some examples: from telegram.error only TelegramError is available via telegra...
X Description: We're currently not very consistent regarding what we make available directly via telegram.__init__ and what we don't. Some examples: from telegram.error only TelegramError is available via...
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/2468
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Clear up imports policy","articleBody":"We're currently not very consistent regarding what we make available directly via `telegram.__init__` and what we don't. Some examples:\r\n\r\n* from `telegram.error` only `TelegramError` is available via `telegram.__init__`, but no of the other classes\r\n* from `telegram.constants` only some few constants are available.\r\n* `TelegramDeprecationWarning` is not available (see also #2467)\r\n* the helper methods from `utils.helper` that are actually there to be used by users and not exclusively by PTB itself (e.g. `escape_markdown`, `mention_user_*`) are not available\r\n\r\nIMO we should try to make a clear policy for this. IMHO it should be clear that all API-classes are directly available through `telgeram`. All the things mentioned above are from … lets call them \"auxiliary modules\". For these I basically see two options:\r\n\r\n1. Make all of that available directly through `telegram`\r\n2. Make none of it available through `telegram`. In this case I'd vote to at least move the above mentioned helper methods directly to `telegram.utils` and spare the user the `.helpers`, especially as users are in general not to be concerned with the other contents of `utils`.\r\n\r\nCase 2 would be breaking & in that case we should wait until v14.\r\nIn any case I would aim to document the import policy somewhere … probably just at the index of the docs.\r\nI'm slightly in favor of 2. What do the other @python-telegram-bot/developers think?","author":{"url":"https://github.com/Bibo-Joshi","@type":"Person","name":"Bibo-Joshi"},"datePublished":"2021-04-13T16:03:14Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/2468"}
| 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:adde09f1-183d-18af-e1b7-39d4e58aa4cf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 889C:937F2:83854D:ACECE4:6B0255E3 |
| html-safe-nonce | 56bcf2c8a6a6bdd594c8be10e24b7cbaa34a09a587ce0a7e1df6f2660cf5efec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODlDOjkzN0YyOjgzODU0RDpBQ0VDRTQ6NkIwMjU1RTMiLCJ2aXNpdG9yX2lkIjoiNDI5NjI2Nzk5NDI4MTE3MDQwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e9242321e35704d1e6caf4a7924e839d1fd2f3f9731b92bca4cd627ae00f47e2 |
| hovercard-subject-tag | issue:857109168 |
| 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/2468/issue_layout |
| twitter:image | https://opengraph.githubassets.com/53dcae88168e535bca0729acd974c25dc9bcb5361a5ab99320bc42e1528bb3b5/python-telegram-bot/python-telegram-bot/issues/2468 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/53dcae88168e535bca0729acd974c25dc9bcb5361a5ab99320bc42e1528bb3b5/python-telegram-bot/python-telegram-bot/issues/2468 |
| og:image:alt | We're currently not very consistent regarding what we make available directly via telegram.__init__ and what we don't. Some examples: from telegram.error only TelegramError is available via telegra... |
| 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