Title: Fixed crash in Python 3.15.0a6 by tleonhardt · Pull Request #1604 · python-cmd2/cmd2 · GitHub
Open Graph Title: Fixed crash in Python 3.15.0a6 by tleonhardt · Pull Request #1604 · python-cmd2/cmd2
X Title: Fixed crash in Python 3.15.0a6 by tleonhardt · Pull Request #1604 · python-cmd2/cmd2
Description: The crash was caused by changes in the argparse internal API in Python 3.15, specifically in how it handles colorization and formatter initialization. Changes Made: Add testing for Python 3.15-dev: Start testing on Python 3.15 pre-release versions, currently 3.15.0a6 Cmd2HelpFormatter._set_color: Added an override for the _set_color method to handle the new file keyword argument introduced in Python 3.15. It uses a try-except block to fall back to the older signature if the underlying RichHelpFormatter (from rich-argparse) does not yet support the new keyword argument. Cmd2ArgumentParser._get_formatter: Updated the _get_formatter method to accept **kwargs and pass them to the superclass. This is necessary because Python 3.15's argparse now passes a file argument to this method in several places (e.g., print_usage). TextGroup.__init__: Updated the type hint for the formatter_creator parameter from Callable[[], Cmd2HelpFormatter] to Callable[..., Cmd2HelpFormatter] to remain consistent with the updated _get_formatter signature. string_utils.common_prefix function added as a replacement for os.path.commonprefix which is deprecated in Python 3.15. Closes #1603
Open Graph Description: The crash was caused by changes in the argparse internal API in Python 3.15, specifically in how it handles colorization and formatter initialization. Changes Made: Add testing for Python 3.15-de...
X Description: The crash was caused by changes in the argparse internal API in Python 3.15, specifically in how it handles colorization and formatter initialization. Changes Made: Add testing for Python 3.15-de...
Opengraph URL: https://github.com/python-cmd2/cmd2/pull/1604
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3ee040b3-c06f-0d28-8a2d-d600d9ed6007 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8BA4:3FF0AC:105537B:166A767:6A4DD9A5 |
| html-safe-nonce | 0cac0107b377e745e3d2d125922279f4b80db2682ae85e3a5f71629a5c317b66 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QkE0OjNGRjBBQzoxMDU1MzdCOjE2NkE3Njc6NkE0REQ5QTUiLCJ2aXNpdG9yX2lkIjoiMjQxNjk3Mzk4ODQwNjA5MDE0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0c8354211bc4d6c3281b8cd57210f42273e1c9eb3eb239a922809e302d033846 |
| hovercard-subject-tag | pull_request:3368237487 |
| 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-cmd2/cmd2/pull/1604/files |
| twitter:image | https://avatars.githubusercontent.com/u/2812720?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/2812720?s=400&v=4 |
| og:image:alt | The crash was caused by changes in the argparse internal API in Python 3.15, specifically in how it handles colorization and formatter initialization. Changes Made: Add testing for Python 3.15-de... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python-cmd2/cmd2 git https://github.com/python-cmd2/cmd2.git |
| octolytics-dimension-user_id | 17161025 |
| octolytics-dimension-user_login | python-cmd2 |
| octolytics-dimension-repository_id | 51442999 |
| octolytics-dimension-repository_nwo | python-cmd2/cmd2 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 51442999 |
| octolytics-dimension-repository_network_root_nwo | python-cmd2/cmd2 |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width