Title: Further clear up imports policy: Private modules · Issue #2680 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: Further clear up imports policy: Private modules · Issue #2680 · python-telegram-bot/python-telegram-bot
X Title: Further clear up imports policy: Private modules · Issue #2680 · python-telegram-bot/python-telegram-bot
Description: We have made you a wrapper you can't refuse. Contribute to python-telegram-bot/python-telegram-bot development by creating an account on GitHub.
Open Graph Description: We have made you a wrapper you can't refuse. Contribute to python-telegram-bot/python-telegram-bot development by creating an account on GitHub.
X Description: We have made you a wrapper you can't refuse. Contribute to python-telegram-bot/python-telegram-bot development by creating an account on GitHub.
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Further clear up imports policy: Private modules","articleBody":"#### Is your feature request related to a problem? Please describe.\r\nCurrently all the modules like `telegram.{message, chat, user, …}` look like they are public. However, we don't consider them to be part of the public API and they should not be treated as such by the user. The only thing that we guarantee to work is `from telegram import Message, Chat, User, …` and *not* `from telegram.message import Message`.\r\n\r\n#### Describe the solution you'd like\r\nRename all the private modules with a leading underscore, i.e. all files that contain classes that are imported in the `__init__`.\r\nThis is in accordance with [PEP8](https://www.python.org/dev/peps/pep-0008/#public-and-internal-interfaces): \r\n\r\n> Even with `__all__` set appropriately, internal interfaces (packages, modules, classes, functions, attributes or other names) should still be prefixed with a single leading underscore.\r\n\r\nthis should also be done for the `telegram.ext` package except for the module `telegram.ext.filters`. The packages `telegram(.ext).utils` should also be renamed to `telegram(.ext)._utils` and dropped from the documentation - unless this leads to pre-commit complaining about importing private packages. If it does, we'll have to re-evaluate.\r\n\r\n#### Additional context\r\n* This can be seen as extension of #2468 \r\n* A PR for #2573 will likely introduce a new module. Depending on which issue get's resolved by a PR first, the other one will have to adapt to the changes.","author":{"url":"https://github.com/Bibo-Joshi","@type":"Person","name":"Bibo-Joshi"},"datePublished":"2021-09-30T14:56:07Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/2680"}
| 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 | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:866f761d-9116-3ffb-42c8-5bcd596f2183 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 80D2:9E08E:1BB48A6:2291BA0:6B0279BA |
| html-safe-nonce | ad0be2d72005f35f2e3a2bc7d894819ae6e9822ff65ca83e6f0ce60d14e54661 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEQyOjlFMDhFOjFCQjQ4QTY6MjI5MUJBMDo2QjAyNzlCQSIsInZpc2l0b3JfaWQiOiI1MDQxNjcwMDkxMTcxODU0Nzc4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9d78d4c9aab30e6c2e4fa4b961aee13ab0938ddfe40f7064a0ddd428851ae592 |
| hovercard-subject-tag | repository:38696925 |
| 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/python-telegram-bot/python-telegram-bot/issues/2680 |
| twitter:image | https://opengraph.githubassets.com/5393ec57538849bb0cc6331553beb3e47db3148a3a6906c59994692df4f32d94/python-telegram-bot/python-telegram-bot |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5393ec57538849bb0cc6331553beb3e47db3148a3a6906c59994692df4f32d94/python-telegram-bot/python-telegram-bot |
| og:image:alt | We have made you a wrapper you can't refuse. Contribute to python-telegram-bot/python-telegram-bot development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-cache |
| 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