Title: Remove test dependency on sumtypes library by EliahKagan · Pull Request #1798 · gitpython-developers/GitPython · GitHub
Open Graph Title: Remove test dependency on sumtypes library by EliahKagan · Pull Request #1798 · gitpython-developers/GitPython
X Title: Remove test dependency on sumtypes library by EliahKagan · Pull Request #1798 · gitpython-developers/GitPython
Description: Fixes #1797 The WinBashStatus class in test_index.py, introduced in #1745, had used the sumtypes library to express the various cases relevant to xfail markings and troubleshooting and, where applicable, to express some associated debugging information. This includes the Inapplicable case, so sumtypes was used on all systems, not just Windows, which also usefully allowed the other cases to be inspected dynamically on any system, and allowed xfail markings to be written without excess complexity. However, that only used a small fragment of sumtypes functionality, which can be expressed with only minor inelegance with explicit data classes. This pull request makes that change and removes sumtypes as a test dependency. Because the sumtypes dependency was apparently causing problems for downstream maintainers (per #1797), I believe this change is justified. I believe the small inelegance of less compact definitions, and of the case classes not having an inheritance relationship to WinBashStatus itself, are the only disadvantages of this changed approach. The actual logic, stored information, and available debugging information is the same, fully useful reprs are still produced, no code change is needed in any of the markings that use WinBashStatus, and the class is still defined on all systems. Nonetheless I have retested the cases locally (since only two of them occur on CI), verifying that they still work and that the same debugging information remains available.
Open Graph Description: Fixes #1797 The WinBashStatus class in test_index.py, introduced in #1745, had used the sumtypes library to express the various cases relevant to xfail markings and troubleshooting and, where appli...
X Description: Fixes #1797 The WinBashStatus class in test_index.py, introduced in #1745, had used the sumtypes library to express the various cases relevant to xfail markings and troubleshooting and, where appli...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1798
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:8c0a28c2-e433-ed51-e4f7-3a3440b582a9 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | A31E:17C3B9:13105BF:1A7070C:6968AF9B |
| html-safe-nonce | c00e19cd16755fa56ac0c7e7f70007d3c984f8f45e0f5c161fd37a2c1a7c0343 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzFFOjE3QzNCOToxMzEwNUJGOjFBNzA3MEM6Njk2OEFGOUIiLCJ2aXNpdG9yX2lkIjoiNzExOTM5Njc3MDEwODk3NzA1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7d18f54b913136e08890650408b09f4c38028198574b2e9c8807cf440529a422 |
| hovercard-subject-tag | pull_request:1675281767 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/gitpython-developers/GitPython/pull/1798/checks |
| twitter:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| og:image:alt | Fixes #1797 The WinBashStatus class in test_index.py, introduced in #1745, had used the sumtypes library to express the various cases relevant to xfail markings and troubleshooting and, where appli... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fdc7c66bd36a6c12eb8e771e806db863266e573fc299e77f27505a768d4f8a98 |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3223a6503d318917691422cdadfbe16cd8fb21e5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width