Title: version 6.0.0 change of making Distribution an abstract class breaks some projects · Issue #422 · python/importlib_metadata · GitHub
Open Graph Title: version 6.0.0 change of making Distribution an abstract class breaks some projects · Issue #422 · python/importlib_metadata
X Title: version 6.0.0 change of making Distribution an abstract class breaks some projects · Issue #422 · python/importlib_metadata
Description: Hello, As stated in the changelog: #419: Declared Distribution as an abstract class, enforcing definition of abstract methods in instantiated subclasses. It's no longer possible to instantiate a Distribution or any subclasses unless they...
Open Graph Description: Hello, As stated in the changelog: #419: Declared Distribution as an abstract class, enforcing definition of abstract methods in instantiated subclasses. It's no longer possible to instantiate a Di...
X Description: Hello, As stated in the changelog: #419: Declared Distribution as an abstract class, enforcing definition of abstract methods in instantiated subclasses. It's no longer possible to instantiate ...
Opengraph URL: https://github.com/python/importlib_metadata/issues/422
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"version 6.0.0 change of making Distribution an abstract class breaks some projects","articleBody":"Hello,\r\n\r\nAs stated in the changelog:\r\n\r\n> #419: Declared Distribution as an abstract class, enforcing definition of abstract methods in instantiated subclasses. It's no longer possible to instantiate a Distribution or any subclasses unless they define the abstract methods.\r\n> \r\n> Please comment in the issue if this change breaks any projects. This change will likely be rolled back if it causes significant disruption.\r\n\r\nThis change indeed breaks at least 2 projects (logilab.common and pytest-capture-deprecated-warnings). Both those projects are using importlib_metadata this way:\r\n\r\n```python\r\n{x.metadata[\"Name\"].lower(): x.metadata[\"Version\"] for x in importlib_metadata.Distribution().discover()}\r\n```\r\n\r\n(this might not be the best way to use this lib)\r\n\r\nWhile not having to use the 2 required methods:\r\n\r\n> TypeError: Can't instantiate abstract class Distribution with abstract methods locate_file, read_text\r\n\r\nThose projects aren't very big in the python ecosystem and I'm the process of fixing them (by creating a subclass with the required methods) but since the changelog is asking for a report here it is.\r\n\r\nCheers and thx for your work :heart: ","author":{"url":"https://github.com/Psycojoker","@type":"Person","name":"Psycojoker"},"datePublished":"2023-01-04T21:48:40Z","url":"https://github.com/python/importlib_metadata/issues/422"}
| 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:099c606d-acea-b6db-9449-81d1b883c1b2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D348:2A02D3:DB0CF:12F907:6B0080CC |
| html-safe-nonce | aa4e8e7162c34e8b4269c56d5f71e635ff87c2a44545c0e0706666061a7d5949 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzQ4OjJBMDJEMzpEQjBDRjoxMkY5MDc6NkIwMDgwQ0MiLCJ2aXNpdG9yX2lkIjoiNjIyMjI0OTg4Mzc4OTcyMTgwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cbc6f0a73e7e3e525382b4e944e858669eb5c6cbe0c2f35f0d60a9730a441b99 |
| hovercard-subject-tag | issue:1519621547 |
| 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/importlib_metadata/422/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a582fad9a4fa0744742c1f2525a1fe81cefc6a4567e4e072eddd8bacea11fa2a/python/importlib_metadata/issues/422 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a582fad9a4fa0744742c1f2525a1fe81cefc6a4567e4e072eddd8bacea11fa2a/python/importlib_metadata/issues/422 |
| og:image:alt | Hello, As stated in the changelog: #419: Declared Distribution as an abstract class, enforcing definition of abstract methods in instantiated subclasses. It's no longer possible to instantiate a Di... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Psycojoker |
| hostname | github.com |
| expected-hostname | github.com |
| None | 82c186f13e104004ab7bdb779f3195e59dd38bfde531aaa74b76470fc2462b83 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/importlib_metadata git https://github.com/python/importlib_metadata.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 306448340 |
| octolytics-dimension-repository_nwo | python/importlib_metadata |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 306448340 |
| octolytics-dimension-repository_network_root_nwo | python/importlib_metadata |
| 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 | d1bc2aa1939001689f5ce935982c10a6138f745c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width