Title: gh-152502: Detect the curses mouse interface and is_* methods portably by serhiy-storchaka · Pull Request #152705 · python/cpython · GitHub
Open Graph Title: gh-152502: Detect the curses mouse interface and is_* methods portably by serhiy-storchaka · Pull Request #152705 · python/cpython
X Title: gh-152502: Detect the curses mouse interface and is_* methods portably by serhiy-storchaka · Pull Request #152705 · python/cpython
Description: The curses mouse interface (getmouse(), has_mouse(), the BUTTON* constants, window.mouse_trafo(), ...) and the window is_*() state-query methods were gated on ncurses-specific macros (NCURSES_MOUSE_VERSION, NCURSES_EXT_FUNCS), so they were dropped on other curses implementations that provide them, such as NetBSD curses and PDCurses (the latter underpins windows-curses). They are now gated on: configure capability probes, for functions that NetBSD curses provides (it defines no identifying macro, so a probe is the only way to detect it); NCURSES_EXT_FUNCS or the PDCURSES macro, for functions that only ncurses and PDCurses provide. getmouse() is probed with its X/Open getmouse(MEVENT *) signature specifically, because PDCurses declares an incompatible getmouse(void) unless built for the ncurses mouse API. PDC_NCMOUSE is now always defined so PDCurses exposes that ncurses-compatible mouse interface, which is the one this module uses, and Windows gets the whole API through the PDCURSES macro with no configure step. Validated by compiling against ncurses (plus test_curses), NetBSD curses, PDCurses with and without PDC_NCMOUSE, and the PDCurses-on-Windows path. Issue: gh-152502
Open Graph Description: The curses mouse interface (getmouse(), has_mouse(), the BUTTON* constants, window.mouse_trafo(), ...) and the window is_*() state-query methods were gated on ncurses-specific macros (NCURSES_MOUSE...
X Description: The curses mouse interface (getmouse(), has_mouse(), the BUTTON* constants, window.mouse_trafo(), ...) and the window is_*() state-query methods were gated on ncurses-specific macros (NCURSES_MOUSE...
Opengraph URL: https://github.com/python/cpython/pull/152705
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:931f38bc-a4ce-221f-a1f9-8e1c4e314136 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | ED26:34F6B9:F5939A:14B8604:6A5205DA |
| html-safe-nonce | aee518984494d8fe86fd576489736825c31a394c72940e727616512cb0c3d423 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDI2OjM0RjZCOTpGNTkzOUE6MTRCODYwNDo2QTUyMDVEQSIsInZpc2l0b3JfaWQiOiIxNzEyNjYxNzA2MTk3NTY2OTM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7c38cfc29322076718a23066addc39bc4bd42ef4fcff141a18d71b33c68dc223 |
| hovercard-subject-tag | pull_request:3965620793 |
| 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/152705/files |
| twitter:image | https://avatars.githubusercontent.com/u/3659035?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/3659035?s=400&v=4 |
| og:image:alt | The curses mouse interface (getmouse(), has_mouse(), the BUTTON* constants, window.mouse_trafo(), ...) and the window is_*() state-query methods were gated on ncurses-specific macros (NCURSES_MOUSE... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width