Title: Listener.stop() method breaks API since declared abstract · Issue #1770 · hardbyte/python-can · GitHub
Open Graph Title: Listener.stop() method breaks API since declared abstract · Issue #1770 · hardbyte/python-can
X Title: Listener.stop() method breaks API since declared abstract · Issue #1770 · hardbyte/python-can
Description: In #1724, the can.listener.Listener.stop() method was decorated as an @abstractmethod, without any further explanation. This seems to work alright within the python-can codebase, but other dependent projects will get in trouble if they d...
Open Graph Description: In #1724, the can.listener.Listener.stop() method was decorated as an @abstractmethod, without any further explanation. This seems to work alright within the python-can codebase, but other dependen...
X Description: In #1724, the can.listener.Listener.stop() method was decorated as an @abstractmethod, without any further explanation. This seems to work alright within the python-can codebase, but other dependen...
Opengraph URL: https://github.com/hardbyte/python-can/issues/1770
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Listener.stop() method breaks API since declared abstract","articleBody":"In #1724, the `can.listener.Listener.stop()` method was decorated as an `@abstractmethod`, without any further explanation. This seems to work alright within the python-can codebase, but other dependent projects will get in trouble if they don't implement that method on derived classes. At the very least should this API change be documented prominently.\r\n\r\nThis actually causes trouble with e.g. https://github.com/christiansandberg/canopen/, see https://github.com/christiansandberg/canopen/blob/713f005af8a6787a4ff54a26f55fa6736f86abaf/canopen/network.py#L346\r\n\r\n### Expected behavior\r\nThis API change should be clearly documented OR reverted, going back to the empty default implementation.\r\n\r\n### Additional context\r\n\r\nOS and version: Linux Ubuntu 22.04\r\nPython version: 3.11.6\r\npython-can version: v4.3.1-16-g7dba4490 (current main branch)\r\npython-can interface/s (if applicable): does not matter\r\n\r\n\u003cdetails\u003e\u003csummary\u003eExample script to reproduce\u003c/summary\u003e\r\n\r\n```python\r\nimport can\r\n\r\nclass MessageListener(can.Listener):\r\n\r\n def on_message_received(self, msg):\r\n pass\r\n\r\nMessageListener()\r\n# TypeError: Can't instantiate abstract class MessageListener with abstract method stop\r\n```\r\n\u003c/details\u003e\r\n","author":{"url":"https://github.com/acolomb","@type":"Person","name":"acolomb"},"datePublished":"2024-04-24T10:39:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1770/python-can/issues/1770"}
| 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:3028424a-cfd9-49f0-8c76-34c793ae28ba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC84:37843A:B12D99:EDEBA2:6A5EFA1A |
| html-safe-nonce | 982248ebbfb3c837fa3cb1d401138d5843b0c90b642c7461ec0690e47b87039d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzg0OjM3ODQzQTpCMTJEOTk6RURFQkEyOjZBNUVGQTFBIiwidmlzaXRvcl9pZCI6Ijg3NTU2NTI1MDk1ODE2MzgxNzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1e56567d920698f6ecbb7d5d85e3f411ebf3393b72d830c1200ee879a9c9c574 |
| hovercard-subject-tag | issue:2260980046 |
| 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/hardbyte/python-can/1770/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2e361f800418b275b3be472b71da6f98ae22f730a31d2fda20ea6a579d695aa3/hardbyte/python-can/issues/1770 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2e361f800418b275b3be472b71da6f98ae22f730a31d2fda20ea6a579d695aa3/hardbyte/python-can/issues/1770 |
| og:image:alt | In #1724, the can.listener.Listener.stop() method was decorated as an @abstractmethod, without any further explanation. This seems to work alright within the python-can codebase, but other dependen... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | acolomb |
| hostname | github.com |
| expected-hostname | github.com |
| None | 82d0004a35927bdb00c652a57f456c55aa0eda4ade1bc7956d7510fdea6e454b |
| turbo-cache-control | no-preview |
| go-import | github.com/hardbyte/python-can git https://github.com/hardbyte/python-can.git |
| octolytics-dimension-user_id | 855189 |
| octolytics-dimension-user_login | hardbyte |
| octolytics-dimension-repository_id | 69090889 |
| octolytics-dimension-repository_nwo | hardbyte/python-can |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 69090889 |
| octolytics-dimension-repository_network_root_nwo | hardbyte/python-can |
| 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 | f5d264313b1054309be1fe75046ee018a1b29197 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width