Title: [BUG] ptb hardpins dependencies, causing problems for sub-dependencies · Issue #2758 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: [BUG] ptb hardpins dependencies, causing problems for sub-dependencies · Issue #2758 · python-telegram-bot/python-telegram-bot
X Title: [BUG] ptb hardpins dependencies, causing problems for sub-dependencies · Issue #2758 · python-telegram-bot/python-telegram-bot
Description: Steps to Reproduce Create a project with ptb and cachetools (for example) in requirements requirements.txt python-telegram-bot==13.7 cachetools==4.2.4 install that project pip install -r requirements.txt Collecting cachetools==4.2.4 Down...
Open Graph Description: Steps to Reproduce Create a project with ptb and cachetools (for example) in requirements requirements.txt python-telegram-bot==13.7 cachetools==4.2.4 install that project pip install -r requiremen...
X Description: Steps to Reproduce Create a project with ptb and cachetools (for example) in requirements requirements.txt python-telegram-bot==13.7 cachetools==4.2.4 install that project pip install -r requiremen...
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/2758
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] ptb hardpins dependencies, causing problems for sub-dependencies","articleBody":"### Steps to Reproduce\r\n\r\nCreate a project with ptb and cachetools (for example) in requirements\r\n\r\n`requirements.txt`\r\n```\r\npython-telegram-bot==13.7\r\ncachetools==4.2.4\r\n```\r\ninstall that project \r\n\r\n`pip install -r requirements.txt`\r\n\r\n```\r\nCollecting cachetools==4.2.4\r\n Downloading cachetools-4.2.4-py3-none-any.whl (10 kB)\r\nERROR: Cannot install cachetools==4.2.4 and python-telegram-bot==13.7 because these package versions have conflicting dependencies.\r\n```\r\n\r\nThe proposed workaround from https://github.com/python-telegram-bot/python-telegram-bot/pull/2757#issuecomment-955209372 does **NOT** work with uptodate pip versions, and fails with the following approach.\r\n\r\n```\r\npip install cachetools==4.2.4 -U\r\nCollecting cachetools==4.2.4\r\n Using cached cachetools-4.2.4-py3-none-any.whl (10 kB)\r\nInstalling collected packages: cachetools\r\n Attempting uninstall: cachetools\r\n Found existing installation: cachetools 4.2.2\r\n Uninstalling cachetools-4.2.2:\r\n Successfully uninstalled cachetools-4.2.2\r\nERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\r\npython-telegram-bot 13.7 requires cachetools==4.2.2, but you have cachetools 4.2.4 which is incompatible.\r\n``` \r\n\r\n### Expected behaviour\r\n\r\nInstallation would not fail.\r\n\r\nA library should not hard-pin install-dependencies (in `setup.py`) but instead use range-pinning.\r\n\r\nHard-pinned dependencies should only be used in `requirements.txt` - but not in setup.py - preventing other projects from updating.\r\nto avoid unexpected failures, it's best-practice to range-pin dependencies, preventing major updates without proper testing, which ptb fails to do.\r\n\r\n### Actual behaviour\r\n\r\nInstallation fails\r\n\r\n### Operating System\r\n\r\nnot relevant\r\nuptodate pip version\r\n\r\n\r\n### other\r\n\r\nI've attempted a fix in #2757 - but one of the maintainers decided to rather try and discuss the issue away than fixing this, therefore i'm now asking this as issue, and i consider this a breaking bug (it breaks updates of dependent modules).\r\n\r\nI'd expect a fix for this for both 13.x (minor version update) and 14.0 versions - as this can have security implications (you're preventing updating to a more uptodate version).","author":{"url":"https://github.com/xmatthias","@type":"Person","name":"xmatthias"},"datePublished":"2021-10-30T15:30:03Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/2758"}
| 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:9e76f373-b483-8574-dcec-db0626e30ac5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C290:A950:AE8EDD:E3E39F:6B026CD0 |
| html-safe-nonce | 420b482450610858f275843460307a6cecd0aff0efdac0331e18efb60e20640b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjkwOkE5NTA6QUU4RUREOkUzRTM5Rjo2QjAyNkNEMCIsInZpc2l0b3JfaWQiOiI2MTIxMDEwNzE4NTc0ODAwMDgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 462962690d94e35a985b9dae72a5545e9c1dd38b6971a1d076a6a95d7a80afea |
| hovercard-subject-tag | issue:1040226992 |
| 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/2758/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1937ea169be80a55b08a45433a92781bc246d5253fbded8acb3aa9dfc0db7bdb/python-telegram-bot/python-telegram-bot/issues/2758 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1937ea169be80a55b08a45433a92781bc246d5253fbded8acb3aa9dfc0db7bdb/python-telegram-bot/python-telegram-bot/issues/2758 |
| og:image:alt | Steps to Reproduce Create a project with ptb and cachetools (for example) in requirements requirements.txt python-telegram-bot==13.7 cachetools==4.2.4 install that project pip install -r requiremen... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | xmatthias |
| 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