Title: gh-94808: Cover `PyObject_PyBytes` case with custom `__bytes__` method by sobolevn · Pull Request #96610 · python/cpython · GitHub
Open Graph Title: gh-94808: Cover `PyObject_PyBytes` case with custom `__bytes__` method by sobolevn · Pull Request #96610 · python/cpython
X Title: gh-94808: Cover `PyObject_PyBytes` case with custom `__bytes__` method by sobolevn · Pull Request #96610 · python/cpython
Description: There were two options: Add a new _testcapimodule.c function to test PyObject_PyBytes directly. But, there's already pyobject_bytes_from_null which only covers NULL case. So, it is somewhat covered Add a test for some call that uses PyObject_Bytes, like int_from_bytes_impl. In this case we not only test C-API itself, but also do something useful for the end implementation (in this case int.from_bytes) So, I went with 2. Probably it is still possible to add a new _testcapimodule.c function in the next PR. Issue: gh-94808
Open Graph Description: There were two options: Add a new _testcapimodule.c function to test PyObject_PyBytes directly. But, there's already pyobject_bytes_from_null which only covers NULL case. So, it is somewhat co...
X Description: There were two options: Add a new _testcapimodule.c function to test PyObject_PyBytes directly. But, there's already pyobject_bytes_from_null which only covers NULL case. So, it is somewha...
Opengraph URL: https://github.com/python/cpython/pull/96610
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:81665240-d48f-d116-cfb8-eb90d95b28e8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E052:8A288:74BAD8:9DFA4D:6969B8DC |
| html-safe-nonce | 77766e05e3a15d84be748f3481c070641ba577a07df02ec191a2ea3230d19c60 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDUyOjhBMjg4Ojc0QkFEODo5REZBNEQ6Njk2OUI4REMiLCJ2aXNpdG9yX2lkIjoiMzM3NzAwMDY1NjIzOTQ0MjE0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 45101410e90f6a4e9e9ba6d6a09deb5eedd8c55188e1259f5eff896723f1c867 |
| hovercard-subject-tag | pull_request:1047247895 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/cpython/pull/96610/files |
| twitter:image | https://avatars.githubusercontent.com/u/4660275?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4660275?s=400&v=4 |
| og:image:alt | There were two options: Add a new _testcapimodule.c function to test PyObject_PyBytes directly. But, there's already pyobject_bytes_from_null which only covers NULL case. So, it is somewhat co... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width