René's URL Explorer Experiment


Title: Add `__all__` in git.exc by EliahKagan · Pull Request #1719 · gitpython-developers/GitPython · GitHub

Open Graph Title: Add `__all__` in git.exc by EliahKagan · Pull Request #1719 · gitpython-developers/GitPython

X Title: Add `__all__` in git.exc by EliahKagan · Pull Request #1719 · gitpython-developers/GitPython

Description: Fixes #1718 This adds __all__ in git.exc, and adjusts __init__.py imports. The git.exc module imports exceptions from gitdb.exc to republish them, as well as defining its own (also for use from outside). But because it did not define __all__, the intent for the exceptions it imported was unclear, since names that are introduced by imports and not present in __all__ are not generally considered public, even when __all__ is absent and a * import would reimport them. This rectifies that by adding __all__ and listing both imported and newly introduced exceptions explicitly in it. Although this strictly expands which names are public under typical conventions, it strictly contracts which names are imported by a * import, because the presence of __all__ suppresses names not listed in it from being imported that way. However, because under typical conventions those other names are not considered public, and they were not even weakly documented as public, this should be okay. (Even though this is not a breaking change, in that code it would break would already technically be broken... if it turns out that it is common to wrongly rely on the availability of those names, then this may need to be revisited and slightly modified.) This brings the readily identified public interface of git.exc in line with what is weakly implied (and intended) by its docstring. This also modifies __init__.py accordingly: The top-level git module has for some time used a * import on git.exc, causing the extra names originally meant as implementation details to be included. Because its own __all__ was dynamically generated until c862845, #1659 also added 8edc53b to retain the formerly present names in __all__. So the change here imports those names from the modules that deliberately provide them, to preserve compatibility.

Open Graph Description: Fixes #1718 This adds __all__ in git.exc, and adjusts __init__.py imports. The git.exc module imports exceptions from gitdb.exc to republish them, as well as defining its own (also for use from out...

X Description: Fixes #1718 This adds __all__ in git.exc, and adjusts __init__.py imports. The git.exc module imports exceptions from gitdb.exc to republish them, as well as defining its own (also for use from out...

Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1719

X: @github

direct link

Domain: togithub.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:6371d456-cb38-5f3c-afd3-0cdc248c3bba
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8228:1A2FF2:2825CCC:37DBE99:69694CE4
html-safe-nonce75beb11b11235d69e29cc130dbcb38543d80e4ad7def3f0df2d44a7955f34edf
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjI4OjFBMkZGMjoyODI1Q0NDOjM3REJFOTk6Njk2OTRDRTQiLCJ2aXNpdG9yX2lkIjoiNTkzOTkyNjQzMDcwNDc5NTg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaca85287452aee1e9c6fedc8fef87e60e5b97e1b67982b2c5289c5e1af07e7b00d
hovercard-subject-tagpull_request:1566192496
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/gitpython-developers/GitPython/pull/1719/files
twitter:imagehttps://avatars.githubusercontent.com/u/1771172?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1771172?s=400&v=4
og:image:altFixes #1718 This adds __all__ in git.exc, and adjusts __init__.py imports. The git.exc module imports exceptions from gitdb.exc to republish them, as well as defining its own (also for use from out...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git
octolytics-dimension-user_id503709
octolytics-dimension-user_logingitpython-developers
octolytics-dimension-repository_id1126087
octolytics-dimension-repository_nwogitpython-developers/GitPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1126087
octolytics-dimension-repository_network_root_nwogitpython-developers/GitPython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released69ac0477df0f87da03b8b06cebd187012d7a930
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://togithub.com/gitpython-developers/GitPython/pull/1719/files#start-of-content
https://togithub.com/
Sign in https://togithub.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F1719%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://togithub.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F1719%2Ffiles
Sign up https://togithub.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=gitpython-developers%2FGitPython
Reloadhttps://togithub.com/gitpython-developers/GitPython/pull/1719/files
Reloadhttps://togithub.com/gitpython-developers/GitPython/pull/1719/files
Reloadhttps://togithub.com/gitpython-developers/GitPython/pull/1719/files
gitpython-developers https://togithub.com/gitpython-developers
GitPythonhttps://togithub.com/gitpython-developers/GitPython
Please reload this pagehttps://togithub.com/gitpython-developers/GitPython/pull/1719/files
Notifications https://togithub.com/login?return_to=%2Fgitpython-developers%2FGitPython
Fork 964 https://togithub.com/login?return_to=%2Fgitpython-developers%2FGitPython
Star 5k https://togithub.com/login?return_to=%2Fgitpython-developers%2FGitPython
Code https://togithub.com/gitpython-developers/GitPython
Issues 169 https://togithub.com/gitpython-developers/GitPython/issues
Pull requests 8 https://togithub.com/gitpython-developers/GitPython/pulls
Discussions https://togithub.com/gitpython-developers/GitPython/discussions
Actions https://togithub.com/gitpython-developers/GitPython/actions
Security Uh oh! There was an error while loading. Please reload this page. https://togithub.com/gitpython-developers/GitPython/security
Please reload this pagehttps://togithub.com/gitpython-developers/GitPython/pull/1719/files
Insights https://togithub.com/gitpython-developers/GitPython/pulse
Code https://togithub.com/gitpython-developers/GitPython
Issues https://togithub.com/gitpython-developers/GitPython/issues
Pull requests https://togithub.com/gitpython-developers/GitPython/pulls
Discussions https://togithub.com/gitpython-developers/GitPython/discussions
Actions https://togithub.com/gitpython-developers/GitPython/actions
Security https://togithub.com/gitpython-developers/GitPython/security
Insights https://togithub.com/gitpython-developers/GitPython/pulse
Sign up for GitHub https://togithub.com/signup?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://togithub.com/login?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
Byronhttps://togithub.com/Byron
gitpython-developers:mainhttps://togithub.com/gitpython-developers/GitPython/tree/main
EliahKagan:static-allhttps://togithub.com/EliahKagan/GitPython/tree/static-all
Conversation 4 https://togithub.com/gitpython-developers/GitPython/pull/1719
Commits 3 https://togithub.com/gitpython-developers/GitPython/pull/1719/commits
Checks 0 https://togithub.com/gitpython-developers/GitPython/pull/1719/checks
Files changed 3 https://togithub.com/gitpython-developers/GitPython/pull/1719/files
Add __all__ in git.exc https://togithub.com/gitpython-developers/GitPython/pull/1719/files#top
Show all changes 3 commits https://togithub.com/gitpython-developers/GitPython/pull/1719/files
8197e90 Remove now-unused import in top-level __init__.py EliahKagan Oct 20, 2023 https://togithub.com/gitpython-developers/GitPython/pull/1719/commits/8197e9043f26a88168dc3227c4fbb0ec64ef42f9
7545b80 Add __all__ in git.exc, adjust __init__.py imports EliahKagan Oct 20, 2023 https://togithub.com/gitpython-developers/GitPython/pull/1719/commits/7545b802d811128ac367a47b794917f2f678836b
2af3679 Remove `@UnusedImport` from an import that is used EliahKagan Oct 20, 2023 https://togithub.com/gitpython-developers/GitPython/pull/1719/commits/2af36792db870c6336b52d3c8aa3d19c0b2fe9c4
Clear filters https://togithub.com/gitpython-developers/GitPython/pull/1719/files
Please reload this pagehttps://togithub.com/gitpython-developers/GitPython/pull/1719/files
Please reload this pagehttps://togithub.com/gitpython-developers/GitPython/pull/1719/files
__init__.py https://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-6789dd4ae9fe98745671baf3f0e86d8ead5505232e6ecb26a3760ca10c636c63
db.py https://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-2c464f9c2a67eaec11758bfe4d275393bd7478c9315028ee3f158cf8587e5fb2
exc.py https://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-1eee00ab107f6bfb1dedb97cf16cbd369028c3382cd80deb8e0c902fff9536b0
git/__init__.pyhttps://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-6789dd4ae9fe98745671baf3f0e86d8ead5505232e6ecb26a3760ca10c636c63
View file https://togithub.com/EliahKagan/GitPython/blob/2af36792db870c6336b52d3c8aa3d19c0b2fe9c4/git/__init__.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://togithub.com/gitpython-developers/GitPython/pull/1719/{{ revealButtonHref }}
https://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-6789dd4ae9fe98745671baf3f0e86d8ead5505232e6ecb26a3760ca10c636c63
https://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-6789dd4ae9fe98745671baf3f0e86d8ead5505232e6ecb26a3760ca10c636c63
https://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-6789dd4ae9fe98745671baf3f0e86d8ead5505232e6ecb26a3760ca10c636c63
https://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-6789dd4ae9fe98745671baf3f0e86d8ead5505232e6ecb26a3760ca10c636c63
https://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-6789dd4ae9fe98745671baf3f0e86d8ead5505232e6ecb26a3760ca10c636c63
git/db.pyhttps://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-2c464f9c2a67eaec11758bfe4d275393bd7478c9315028ee3f158cf8587e5fb2
View file https://togithub.com/EliahKagan/GitPython/blob/2af36792db870c6336b52d3c8aa3d19c0b2fe9c4/git/db.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://togithub.com/gitpython-developers/GitPython/pull/1719/{{ revealButtonHref }}
https://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-2c464f9c2a67eaec11758bfe4d275393bd7478c9315028ee3f158cf8587e5fb2
git/exc.pyhttps://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-1eee00ab107f6bfb1dedb97cf16cbd369028c3382cd80deb8e0c902fff9536b0
View file https://togithub.com/EliahKagan/GitPython/blob/2af36792db870c6336b52d3c8aa3d19c0b2fe9c4/git/exc.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://togithub.com/gitpython-developers/GitPython/pull/1719/{{ revealButtonHref }}
https://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-1eee00ab107f6bfb1dedb97cf16cbd369028c3382cd80deb8e0c902fff9536b0
Please reload this pagehttps://togithub.com/gitpython-developers/GitPython/pull/1719/files
Please reload this pagehttps://togithub.com/gitpython-developers/GitPython/pull/1719/files
https://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-1eee00ab107f6bfb1dedb97cf16cbd369028c3382cd80deb8e0c902fff9536b0
https://togithub.com/gitpython-developers/GitPython/pull/1719/files#diff-1eee00ab107f6bfb1dedb97cf16cbd369028c3382cd80deb8e0c902fff9536b0
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.