René's URL Explorer Experiment


Title: Make the package typed: ship py.typed, annotate the public API, type-check in CI by PetrHeinz · Pull Request #52 · logtail/logtail-python · GitHub

Open Graph Title: Make the package typed: ship py.typed, annotate the public API, type-check in CI by PetrHeinz · Pull Request #52 · logtail/logtail-python

X Title: Make the package typed: ship py.typed, annotate the public API, type-check in CI by PetrHeinz · Pull Request #52 · logtail/logtail-python

Description: Supersedes #29 by @RubenVanEldik, whose two substantive commits are cherry-picked here with credit; its Python version bumps are long since covered by master and were dropped. Two people asked for this on that PR: without a py.typed marker, mypy refuses to import logtail in strictly checked projects. The first two commits are the original PR rebased onto master. The third commit makes it actually work and finishes the job: py.typed moves from the repository root into logtail/ and setup.py lists it in package_data. At the root it was never packaged, so an installed 0.4.1 with that PR merged would still have been untyped. Verified on the built wheel and sdist. Every function in the package is annotated. Marking a package typed without annotations turns the old "missing stubs" error into Any everywhere and, under --strict, into "call to untyped function" errors at each call site, so the public surface (LogtailHandler, LogtailContext, LogtailFormatter, logtail.rq.Worker) and the internals now carry real signatures. mypy runs as its own typecheck job on the latest Python with disallow_untyped_defs, instead of inside every tox environment. types-requests and msgpack-types join the test requirements; types-setuptools was dropped since mypy only checks logtail/. LogtailContext.__exit__ returns None instead of the context object. It only ever returned that when there was no exception to swallow, so nothing changes at runtime, and mypy rightly refuses a bool-typed __exit__ that never returns True. Merge order note: this touches uploader.py, flusher.py and handler.py, so it should go in after #49 and #51 and will need a trivial rebase then. Making the package typed is a visible change for downstream type checkers, so it belongs in a minor release. 🤖 Generated with Claude Code

Open Graph Description: Supersedes #29 by @RubenVanEldik, whose two substantive commits are cherry-picked here with credit; its Python version bumps are long since covered by master and were dropped. Two people asked for ...

X Description: Supersedes #29 by @RubenVanEldik, whose two substantive commits are cherry-picked here with credit; its Python version bumps are long since covered by master and were dropped. Two people asked for ...

Opengraph URL: https://github.com/logtail/logtail-python/pull/52

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:6fc51459-3151-571b-de61-0d46894f5605
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8EAC:1189F5:12EDD6:192721:6AFBB050
html-safe-nonceabc5d300002f1648f0c51e80ec308ca6c36322a0f61e042c474c489892dd1b5d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUFDOjExODlGNToxMkVERDY6MTkyNzIxOjZBRkJCMDUwIiwidmlzaXRvcl9pZCI6Ijc5NjAwNjY4NjgwNTg1MDEyMDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmace0dbbf705f54aa08d320b6e41ed8ae6076edf0ed095366bd984454c1919ae04a
hovercard-subject-tagpull_request:4638342718
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/logtail/logtail-python/pull/52/files
twitter:imagehttps://avatars.githubusercontent.com/u/10008612?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/10008612?s=400&v=4
og:image:altSupersedes #29 by @RubenVanEldik, whose two substantive commits are cherry-picked here with credit; its Python version bumps are long since covered by master and were dropped. Two people asked for ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonee25fbd830d3e6ad0e8935c105cf4fdc70c593dffcd27bb45b790ae4fece5ea55
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/logtail/logtail-python git https://github.com/logtail/logtail-python.git
octolytics-dimension-user_id78922349
octolytics-dimension-user_loginlogtail
octolytics-dimension-repository_id351343852
octolytics-dimension-repository_nwologtail/logtail-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id351343852
octolytics-dimension-repository_network_root_nwologtail/logtail-python
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
release08c8f17f9d27054a108b8b6254e405de0151f660
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/logtail/logtail-python/pull/52/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flogtail%2Flogtail-python%2Fpull%2F52%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flogtail%2Flogtail-python%2Fpull%2F52%2Ffiles
Sign uphttps://github.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=logtail%2Flogtail-python
Reloadhttps://github.com/logtail/logtail-python/pull/52/files
Reloadhttps://github.com/logtail/logtail-python/pull/52/files
Reloadhttps://github.com/logtail/logtail-python/pull/52/files
logtailhttps://github.com/logtail
logtail-pythonhttps://github.com/logtail/logtail-python
Codehttps://github.com/logtail/logtail-python
Issues1 (1)https://github.com/logtail/logtail-python/issues
Pull requestshttps://github.com/logtail/logtail-python/pulls
Actionshttps://github.com/logtail/logtail-python/actions
Security and qualityhttps://github.com/logtail/logtail-python/security
Insightshttps://github.com/logtail/logtail-python/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Flogtail%2Flogtail-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Flogtail%2Flogtail-python%2Fissues%2Fnew%2Fchoose
PetrHeinzhttps://github.com/PetrHeinz
masterhttps://github.com/logtail/logtail-python/tree/master
claude/typed-packagehttps://github.com/logtail/logtail-python/tree/claude/typed-package
Conversation 0 https://github.com/logtail/logtail-python/pull/52
Commits 6 https://github.com/logtail/logtail-python/pull/52/commits
Checks 17 https://github.com/logtail/logtail-python/pull/52/checks
Files changed https://github.com/logtail/logtail-python/pull/52/files
Please reload this pagehttps://github.com/logtail/logtail-python/pull/52/files
Make the package typed: ship py.typed, annotate the public API, type-check in CI https://github.com/logtail/logtail-python/pull/52/files#top
Show all changes 6 commits https://github.com/logtail/logtail-python/pull/52/files
7d263b0 Add typing Oct 23, 2024 https://github.com/logtail/logtail-python/pull/52/commits/7d263b0d2271947003907a2191d5589e11a3320e
9c46735 Add types-requests Oct 23, 2024 https://github.com/logtail/logtail-python/pull/52/commits/9c46735e8457ca37f90803e5d510e0093cd1485d
9465de0 Ship py.typed inside the package, annotate the public API and type-ch… PetrHeinz Sep 25, 2026 https://github.com/logtail/logtail-python/pull/52/commits/9465de016730e9e236fc5e260fdc95f4a8d540c4
38dbfca Merge remote-tracking branch 'origin/master' into claude/typed-package PetrHeinz Sep 25, 2026 https://github.com/logtail/logtail-python/pull/52/commits/38dbfcad0aedf402d09e34c97c2a5d01b2e0a139
4907731 Accept what the runtime accepts: level names and requests-style timeouts PetrHeinz Sep 25, 2026 https://github.com/logtail/logtail-python/pull/52/commits/49077316ff33f3a78ab335413658bdd9350fa62b
82fc1b4 Merge remote-tracking branch 'origin/master' into claude/typed-package PetrHeinz Sep 25, 2026 https://github.com/logtail/logtail-python/pull/52/commits/82fc1b4da34e530e96c40d8b870e424e2d40a18d
Clear filters https://github.com/logtail/logtail-python/pull/52/files
Please reload this pagehttps://github.com/logtail/logtail-python/pull/52/files
Please reload this pagehttps://github.com/logtail/logtail-python/pull/52/files
main.yml https://github.com/logtail/logtail-python/pull/52/files#diff-7829468e86c1cc5d5133195b5cb48e1ff6c75e3e9203777f6b2e379d9e4882b3
.gitignore https://github.com/logtail/logtail-python/pull/52/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
compat.py https://github.com/logtail/logtail-python/pull/52/files#diff-343a756a49290a3626ddd5526ad8ff67d0d13035ba750ca59d34bf21591b1e2c
flusher.py https://github.com/logtail/logtail-python/pull/52/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
formatter.py https://github.com/logtail/logtail-python/pull/52/files#diff-27d2d2bce35dfb0f44edb943f11761f719908d320773a134b102c4af053e8503
frame.py https://github.com/logtail/logtail-python/pull/52/files#diff-056e9cfaf9df4837ea71184cf2acff84a477ab072296fad312090d6c33d29c78
handler.py https://github.com/logtail/logtail-python/pull/52/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
helpers.py https://github.com/logtail/logtail-python/pull/52/files#diff-ad7b437affeb5f580a1bde8ff4c1050f87507f027d8fbe5c68f8b50cbba335dd
py.typed https://github.com/logtail/logtail-python/pull/52/files#diff-26f1e85a3575572ac861b5df24bcffe15bb04baa5937c28dc5c6a9654c2323fc
rq.py https://github.com/logtail/logtail-python/pull/52/files#diff-6853e85077bcb937df2cb2ffcdbc02189f3b8927fe7bc356eefdcc78c94f3f27
uploader.py https://github.com/logtail/logtail-python/pull/52/files#diff-c8fe6cf0a3eb9eb4e3f542d9e85697297d1ab58b4555b4391ce2a691d3e5bb51
mypy.ini https://github.com/logtail/logtail-python/pull/52/files#diff-6f2d4ba9ca9a357d31014946667b7bed1bfdbc6d2530afc77778fa0a36bee457
setup.py https://github.com/logtail/logtail-python/pull/52/files#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7
test-requirements.txt https://github.com/logtail/logtail-python/pull/52/files#diff-fac4c6890301d4de5c3f4266837803d5240c84a3d8b6c735bbc6a64c39d2f94e
.github/workflows/main.ymlhttps://github.com/logtail/logtail-python/pull/52/files#diff-7829468e86c1cc5d5133195b5cb48e1ff6c75e3e9203777f6b2e379d9e4882b3
View file https://github.com/logtail/logtail-python/blob/82fc1b4da34e530e96c40d8b870e424e2d40a18d/.github/workflows/main.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/logtail/logtail-python/pull/52/{{ revealButtonHref }}
https://github.com/logtail/logtail-python/pull/52/files#diff-7829468e86c1cc5d5133195b5cb48e1ff6c75e3e9203777f6b2e379d9e4882b3
.gitignorehttps://github.com/logtail/logtail-python/pull/52/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
View file https://github.com/logtail/logtail-python/blob/82fc1b4da34e530e96c40d8b870e424e2d40a18d/.gitignore
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/logtail/logtail-python/pull/52/{{ revealButtonHref }}
https://github.com/logtail/logtail-python/pull/52/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
https://github.com/logtail/logtail-python/pull/52/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
logtail/compat.pyhttps://github.com/logtail/logtail-python/pull/52/files#diff-343a756a49290a3626ddd5526ad8ff67d0d13035ba750ca59d34bf21591b1e2c
View file https://github.com/logtail/logtail-python/blob/82fc1b4da34e530e96c40d8b870e424e2d40a18d/logtail/compat.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/logtail/logtail-python/pull/52/{{ revealButtonHref }}
https://github.com/logtail/logtail-python/pull/52/files#diff-343a756a49290a3626ddd5526ad8ff67d0d13035ba750ca59d34bf21591b1e2c
logtail/flusher.pyhttps://github.com/logtail/logtail-python/pull/52/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
View file https://github.com/logtail/logtail-python/blob/82fc1b4da34e530e96c40d8b870e424e2d40a18d/logtail/flusher.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/logtail/logtail-python/pull/52/{{ revealButtonHref }}
https://github.com/logtail/logtail-python/pull/52/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/52/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/52/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/52/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/52/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/52/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/52/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
https://github.com/logtail/logtail-python/pull/52/files#diff-8a07bff24d8cc7c814a976f4c2db795ba1fff25f57eb18f3dd5203c2e77ef533
logtail/formatter.pyhttps://github.com/logtail/logtail-python/pull/52/files#diff-27d2d2bce35dfb0f44edb943f11761f719908d320773a134b102c4af053e8503
View file https://github.com/logtail/logtail-python/blob/82fc1b4da34e530e96c40d8b870e424e2d40a18d/logtail/formatter.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/logtail/logtail-python/pull/52/{{ revealButtonHref }}
https://github.com/logtail/logtail-python/pull/52/files#diff-27d2d2bce35dfb0f44edb943f11761f719908d320773a134b102c4af053e8503
https://github.com/logtail/logtail-python/pull/52/files#diff-27d2d2bce35dfb0f44edb943f11761f719908d320773a134b102c4af053e8503
logtail/frame.pyhttps://github.com/logtail/logtail-python/pull/52/files#diff-056e9cfaf9df4837ea71184cf2acff84a477ab072296fad312090d6c33d29c78
View file https://github.com/logtail/logtail-python/blob/82fc1b4da34e530e96c40d8b870e424e2d40a18d/logtail/frame.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/logtail/logtail-python/pull/52/{{ revealButtonHref }}
https://github.com/logtail/logtail-python/pull/52/files#diff-056e9cfaf9df4837ea71184cf2acff84a477ab072296fad312090d6c33d29c78
https://github.com/logtail/logtail-python/pull/52/files#diff-056e9cfaf9df4837ea71184cf2acff84a477ab072296fad312090d6c33d29c78
https://github.com/logtail/logtail-python/pull/52/files#diff-056e9cfaf9df4837ea71184cf2acff84a477ab072296fad312090d6c33d29c78
https://github.com/logtail/logtail-python/pull/52/files#diff-056e9cfaf9df4837ea71184cf2acff84a477ab072296fad312090d6c33d29c78
https://github.com/logtail/logtail-python/pull/52/files#diff-056e9cfaf9df4837ea71184cf2acff84a477ab072296fad312090d6c33d29c78
https://github.com/logtail/logtail-python/pull/52/files#diff-056e9cfaf9df4837ea71184cf2acff84a477ab072296fad312090d6c33d29c78
logtail/handler.pyhttps://github.com/logtail/logtail-python/pull/52/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
View file https://github.com/logtail/logtail-python/blob/82fc1b4da34e530e96c40d8b870e424e2d40a18d/logtail/handler.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/logtail/logtail-python/pull/52/{{ revealButtonHref }}
https://github.com/logtail/logtail-python/pull/52/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
https://github.com/logtail/logtail-python/pull/52/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
https://github.com/logtail/logtail-python/pull/52/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
https://github.com/logtail/logtail-python/pull/52/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
https://github.com/logtail/logtail-python/pull/52/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
https://github.com/logtail/logtail-python/pull/52/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
https://github.com/logtail/logtail-python/pull/52/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
https://github.com/logtail/logtail-python/pull/52/files#diff-a9b0950e5b1ec28ff945c773b108d8b4b6617bfdbee33319a137ec929317e2cd
Please reload this pagehttps://github.com/logtail/logtail-python/pull/52/files
Please reload this pagehttps://github.com/logtail/logtail-python/pull/52/files
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.