Title: Deprecate compat.is_
Open Graph Title: Deprecate compat.is_
X Title: Deprecate compat.is_
Description: Fixes #1731
Major changes:
Remove all uses of is_win and is_posix in git/ and test/, replacing them with os.name == "nt" and os.name == "posix", respectively.
Fix is_darwin by changing it to use sys.platform instead of os.name which is never "darwin".
Add a comment in the git.compat module above the definitions of is_win, is_posix, and is_darwin stating that they are deprecated and recommending that os.name (or, where applicable, sys.platform) be used directly instead for clarity (and sometimes accuracy).
There were no uses of is_darwin to be replaced. Although it had been used at one time, the last reference to it appears to have been removed in 4545762 (#1295).
This doesn't emit a DeprecationWarning when those attributes are accessed from the git.compat module. (That might be valuable thing to do in the future, if the git.compat module is to remain non-deprecated overall. See discussion in #1731.)
Two related less consequential changes are also included:
Improve ordering and grouping of imports, in modules where they were already being changed as a result of no longer needing to import is_
Open Graph Description: Fixes #1731 Major changes: Remove all uses of is_win and is_posix in git/ and test/, replacing them with os.name == "nt" and os.name == "posix", respectively. Fix is_darwin by ...
X Description: Fixes #1731 Major changes: Remove all uses of is_win and is_posix in git/ and test/, replacing them with os.name == "nt" and os.name == "posix", respectively. F...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1732
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:42bd6d14-a142-86d1-05e6-923c2e1ba337 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 9FE0:105DC6:D3E59E:119F6BB:69684FED |
| html-safe-nonce | d969b4aecc0f1b1eabd2e9bc15271b9c2c09b76588be04015c1d9e2f34639428 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkUwOjEwNURDNjpEM0U1OUU6MTE5RjZCQjo2OTY4NEZFRCIsInZpc2l0b3JfaWQiOiI3MDU3NTk0NTAxNDExOTE3ODA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e5fe081f345dee3ead562ab55e86ef6e4f7abc9a839326ace7473bea619cb1df |
| hovercard-subject-tag | pull_request:1587206693 |
| 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/gitpython-developers/GitPython/pull/1732/checks |
| twitter:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| og:image:alt | Fixes #1731 Major changes: Remove all uses of is_win and is_posix in git/ and test/, replacing them with os.name == "nt" and os.name == "posix", respectively. Fix is_darwin by ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f16c57f41ed243e5b4dfe9b9bcd6828bd83080b1b6dbb4ff239bbe9745f12e0c |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| 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 | cfa7062cc6d4fe8fcb156bd33f4c97bd3b2470af |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width