Title: Omit warning prefix in "Bad git executable" message by EliahKagan · Pull Request #1816 · gitpython-developers/GitPython · GitHub
Open Graph Title: Omit warning prefix in "Bad git executable" message by EliahKagan · Pull Request #1816 · gitpython-developers/GitPython
X Title: Omit warning prefix in "Bad git executable" message by EliahKagan · Pull Request #1816 · gitpython-developers/GitPython
Description: This builds on the changes in #1815 by omitting the WARNING: prefix from the message itself that is produced when GIT_PYTHON_REFRESH is set to warn or a synonym (such as w or log) and the initial refresh performed at import time fails. This is the change suggested in #1815 (comment). When logging is not configured, this changes what we see when the initial refresh fails: -WARNING: Bad git executable. +Bad git executable. This may be considered slightly worse than before, but the advantage is that it doesn't print something that looks like a severity (or a redundancy) when logging is configured. For example, with common logging configuration such as by logging.basicConfig(), we get this improvement: -CRITICAL:git.cmd:WARNING: Bad git executable. +CRITICAL:git.cmd:Bad git executable. This also makes some improvements to the tests. Besides updating them for the changed message (3250313), it: Test that the GitCommandNotFound exception raised when attempting a git operation, when the command in Git.GIT_PYTHON_GIT_EXECUTABLE does not exist but was set directly (rather than through the environment variable or an explicit call to one of the refresh functions), has an expected command attribute value (85ef145). This case has been under test for a long time, but the test had not checked that attribute. Reorder switch the order of that and an adjacent test so the tests of behavior that directly involves GIT_PYTHON_GIT_EXECUTABLE are all together (also in 85ef145). Use Git consistently in test_git.py, instead of using Git in some places and type(self.git) in others. See db36174 for the rationale. Change a call like _logger.warning("%s", X) to _logger.warning(X) in test_index.py, because GitPython uses the latter in all the other places where they would be equivalent. See 4b86993 for details. (This is relevant to this PR because 5faf621 adds another such call.)
Open Graph Description: This builds on the changes in #1815 by omitting the WARNING: prefix from the message itself that is produced when GIT_PYTHON_REFRESH is set to warn or a synonym (such as w or log) and the initial ...
X Description: This builds on the changes in #1815 by omitting the WARNING: prefix from the message itself that is produced when GIT_PYTHON_REFRESH is set to warn or a synonym (such as w or log) and the initial ...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1816
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:541825b0-cfa5-b5d3-062c-1df693ac1dd6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CD76:E3A3B:1B7218:24E8DA:69696696 |
| html-safe-nonce | 468edf3a3347156daeeb34014cbff8dc96b26a0df283ba70b3353bbe3854df30 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDc2OkUzQTNCOjFCNzIxODoyNEU4REE6Njk2OTY2OTYiLCJ2aXNpdG9yX2lkIjoiODE5NzgxOTkwMjMwMzIzMzY4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0e2fbbfb223a219efd40eee90f5aab0b022651303f09df8393b4e331b2daf74b |
| hovercard-subject-tag | pull_request:1713209837 |
| 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/gitpython-developers/GitPython/pull/1816/files |
| 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 | This builds on the changes in #1815 by omitting the WARNING: prefix from the message itself that is produced when GIT_PYTHON_REFRESH is set to warn or a synonym (such as w or log) and the initial ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ec4d88fbe7ed62446d90b0a6d8e6db4248a8f8b8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width