Title: gh-103406: Modernize pos-only arguments usage in `test_signature` by sobolevn · Pull Request #103407 · python/cpython · GitHub
Open Graph Title: gh-103406: Modernize pos-only arguments usage in `test_signature` by sobolevn · Pull Request #103407 · python/cpython
X Title: gh-103406: Modernize pos-only arguments usage in `test_signature` by sobolevn · Pull Request #103407 · python/cpython
Description: We can be sure that these .__signature__ manipulations are safe to removed, because: Tests do pass now Places where .replace calls are required by the test logic (for example, when testing Signature and Parameter subclasses or invalid states) are not touched .__signature__ change is tested here: cpython/Lib/test/test_inspect.py Lines 1045 to 1051 in ecad802 def test_getfullargspec_signature_attr(self): def test(): pass spam_param = inspect.Parameter('spam', inspect.Parameter.POSITIONAL_ONLY) test.__signature__ = inspect.Signature(parameters=(spam_param,)) self.assertFullArgSpecEquals(test, ['spam']) Now, / is used where it must be used. Issue: gh-103406
Open Graph Description: We can be sure that these .__signature__ manipulations are safe to removed, because: Tests do pass now Places where .replace calls are required by the test logic (for example, when testing Signatu...
X Description: We can be sure that these .__signature__ manipulations are safe to removed, because: Tests do pass now Places where .replace calls are required by the test logic (for example, when testing Signatu...
Opengraph URL: https://github.com/python/cpython/pull/103407
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:32ae0764-52dc-4393-6e7a-3a14fc831149 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8176:189C33:C6F2E:108E36:696AD462 |
| html-safe-nonce | ff01704660214e11d8909dacdd51eec45c783e54962fe7e47a91585f27a4407f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTc2OjE4OUMzMzpDNkYyRToxMDhFMzY6Njk2QUQ0NjIiLCJ2aXNpdG9yX2lkIjoiODUzMTgxNTgyMjE2ODYwOTg5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 28ffca7b57e838f6001032174014ddccad9241211fa39c0483bb2eb31bfecf9a |
| hovercard-subject-tag | pull_request:1307231403 |
| 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/103407/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 | We can be sure that these .__signature__ manipulations are safe to removed, because: Tests do pass now Places where .replace calls are required by the test logic (for example, when testing Signatu... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c785f4ce187e9e7331257791b36ddee01625bb8e292a9b4fe2c16d4c006abf5d |
| 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 | c718a376fcf780eb22089171adb84a543f660bf7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width