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/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:2bb84f70-0244-82c2-4ac9-e90096077ad2 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | E588:64491:1F5495:2B8356:696A64F8 |
| html-safe-nonce | 4f9b664e5bb85e37e63b9e11cb69d8f0469764f58ab9fad19c37e5d35edf3c4c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTg4OjY0NDkxOjFGNTQ5NToyQjgzNTY6Njk2QTY0RjgiLCJ2aXNpdG9yX2lkIjoiNjc3NjY1MDc4MjA5MTE0MjM5MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9dca6a252e5c0b68193a1b9caf7b7686704f1adf086da365ccc6c8d77e1352b0 |
| hovercard-subject-tag | pull_request:1307231403 |
| 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/python/cpython/pull/103407/checks |
| 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 | 9b7735a184970dd9333b2cbe036c8f3c0a9108c64aaa93827c5a64fc70993392 |
| turbo-cache-control | no-preview |
| 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 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 | 87cbd411c2982752221b5751d583a515b23bf5fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width