René's URL Explorer Experiment


Title: Loosen some types to avoid pain in real-life situations by ilevkivskyi · Pull Request #4870 · python/typeshed · GitHub

Open Graph Title: Loosen some types to avoid pain in real-life situations by ilevkivskyi · Pull Request #4870 · python/typeshed

X Title: Loosen some types to avoid pain in real-life situations by ilevkivskyi · Pull Request #4870 · python/typeshed

Description: In this diff: Loosen set.__[i]sub__() to allow typical use cases (that work at runtime). Namely, allow removing unicode from a set of str, and allow removing optional values from non-optional sets. Avoid using union return types in cryptography deserialization functions. Tune SupportsItems so that dict implements it on Python 2. About the first item, I think mypy should support the overloads on generic self-types (see https://mypy.readthedocs.io/en/stable/more_types.html#restricted-methods-in-generic-classes), but I am not sure about other type-checkers. cc @JukkaL

Open Graph Description: In this diff: Loosen set.__[i]sub__() to allow typical use cases (that work at runtime). Namely, allow removing unicode from a set of str, and allow removing optional values from non-optional sets...

X Description: In this diff: Loosen set.__[i]sub__() to allow typical use cases (that work at runtime). Namely, allow removing unicode from a set of str, and allow removing optional values from non-optional sets...

Opengraph URL: https://github.com/python/typeshed/pull/4870

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files/:range(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a1245c7a-8c46-9808-163c-efafaa0e3d6c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBC6A:17A025:3695672:4899840:6A6558AB
html-safe-nonce914952ca09d27066de176703fcc9eb874e79a273fea8ca390e2d12f5015f0881
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzZBOjE3QTAyNTozNjk1NjcyOjQ4OTk4NDA6NkE2NTU4QUIiLCJ2aXNpdG9yX2lkIjoiNzMzNjk3MTUzMTUyOTMyMDExIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb8e268a97d5197da72b1889f3a64a892ac7441980cae719bbea680d04cda74a1
hovercard-subject-tagpull_request:546556822
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/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69
twitter:imagehttps://avatars.githubusercontent.com/u/12005495?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/12005495?s=400&v=4
og:image:altIn this diff: Loosen set.__[i]sub__() to allow typical use cases (that work at runtime). Namely, allow removing unicode from a set of str, and allow removing optional values from non-optional sets...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/typeshed git https://github.com/python/typeshed.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id31696383
octolytics-dimension-repository_nwopython/typeshed
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31696383
octolytics-dimension-repository_network_root_nwopython/typeshed
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
release309153364422b3c499922d1a2a6404910a58ed8e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F4870%2Ffiles%2F1864edcf6da31c1e023f1fb556e0b47671299a69
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F4870%2Ffiles%2F1864edcf6da31c1e023f1fb556e0b47671299a69
Sign up https://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=python%2Ftypeshed
Reloadhttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69
Reloadhttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69
Reloadhttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69
Please reload this pagehttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69
python https://github.com/python
typeshedhttps://github.com/python/typeshed
Please reload this pagehttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69
Notifications https://github.com/login?return_to=%2Fpython%2Ftypeshed
Fork 2.1k https://github.com/login?return_to=%2Fpython%2Ftypeshed
Star 5.1k https://github.com/login?return_to=%2Fpython%2Ftypeshed
Code https://github.com/python/typeshed
Issues 217 https://github.com/python/typeshed/issues
Pull requests 141 https://github.com/python/typeshed/pulls
Actions https://github.com/python/typeshed/actions
Security and quality 0 https://github.com/python/typeshed/security
Insights https://github.com/python/typeshed/pulse
Code https://github.com/python/typeshed
Issues https://github.com/python/typeshed/issues
Pull requests https://github.com/python/typeshed/pulls
Actions https://github.com/python/typeshed/actions
Security and quality https://github.com/python/typeshed/security
Insights https://github.com/python/typeshed/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Ftypeshed%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Ftypeshed%2Fissues%2Fnew%2Fchoose
ilevkivskyihttps://github.com/ilevkivskyi
python:masterhttps://github.com/python/typeshed/tree/master
ilevkivskyi:some-fixeshttps://github.com/ilevkivskyi/typeshed/tree/some-fixes
Conversation 5 https://github.com/python/typeshed/pull/4870
Commits 2 https://github.com/python/typeshed/pull/4870/commits
Checks 0 https://github.com/python/typeshed/pull/4870/checks
Files changed https://github.com/python/typeshed/pull/4870/files
Please reload this pagehttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69
Loosen some types to avoid pain in real-life situations https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#top
Show all changes 2 commits https://github.com/python/typeshed/pull/4870/files
1864edc Loosen some types to avoid pain in real-life situations Dec 29, 2020 https://github.com/python/typeshed/pull/4870/commits/1864edcf6da31c1e023f1fb556e0b47671299a69
e6c635f Work around/ignore some errors Dec 29, 2020 https://github.com/python/typeshed/pull/4870/commits/e6c635f197541d3eedcecc4aa1393d5f5b422c0a
Clear filters https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69
Please reload this pagehttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69
Please reload this pagehttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69
__builtin__.pyi https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-1d779f57c4a031bf6683d708babcda1f1e1bc38fc30e63e87c3451827a870a30
builtins.pyi https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-196cf72b2c2e2ff35261c6c3d749e4ab7f2c152ab57850ea396d95b3575c3234
__init__.pyi https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-d88d19d07ffe6d8ae1093f03b378b27a69e98d56779649a70537bdd407d3e6a3
builtins.pyi https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-239dc3791974e4efcfcdfde98af36512ab98aa1e43230a91b636a3c49a9121ba
__init__.pyi https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-b09a148013edb1ec2a8af887892e78de3ebf0eaae753dfd95ce46d7b2c9264b8
stdlib/2/__builtin__.pyihttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-1d779f57c4a031bf6683d708babcda1f1e1bc38fc30e63e87c3451827a870a30
View file https://github.com/ilevkivskyi/typeshed/blob/1864edcf6da31c1e023f1fb556e0b47671299a69/stdlib/2/__builtin__.pyi
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/4870/files/{{ revealButtonHref }}
https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-1d779f57c4a031bf6683d708babcda1f1e1bc38fc30e63e87c3451827a870a30
https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-1d779f57c4a031bf6683d708babcda1f1e1bc38fc30e63e87c3451827a870a30
stdlib/2/builtins.pyihttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-196cf72b2c2e2ff35261c6c3d749e4ab7f2c152ab57850ea396d95b3575c3234
View file https://github.com/ilevkivskyi/typeshed/blob/1864edcf6da31c1e023f1fb556e0b47671299a69/stdlib/2/builtins.pyi
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/4870/files/{{ revealButtonHref }}
https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-196cf72b2c2e2ff35261c6c3d749e4ab7f2c152ab57850ea396d95b3575c3234
https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-196cf72b2c2e2ff35261c6c3d749e4ab7f2c152ab57850ea396d95b3575c3234
stdlib/2and3/_typeshed/__init__.pyihttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-d88d19d07ffe6d8ae1093f03b378b27a69e98d56779649a70537bdd407d3e6a3
View file https://github.com/ilevkivskyi/typeshed/blob/1864edcf6da31c1e023f1fb556e0b47671299a69/stdlib/2and3/_typeshed/__init__.pyi
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/4870/files/{{ revealButtonHref }}
https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-d88d19d07ffe6d8ae1093f03b378b27a69e98d56779649a70537bdd407d3e6a3
https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-d88d19d07ffe6d8ae1093f03b378b27a69e98d56779649a70537bdd407d3e6a3
stdlib/3/builtins.pyihttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-239dc3791974e4efcfcdfde98af36512ab98aa1e43230a91b636a3c49a9121ba
View file https://github.com/ilevkivskyi/typeshed/blob/1864edcf6da31c1e023f1fb556e0b47671299a69/stdlib/3/builtins.pyi
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/4870/files/{{ revealButtonHref }}
https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-239dc3791974e4efcfcdfde98af36512ab98aa1e43230a91b636a3c49a9121ba
https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-239dc3791974e4efcfcdfde98af36512ab98aa1e43230a91b636a3c49a9121ba
third_party/2and3/cryptography/hazmat/primitives/serialization/__init__.pyihttps://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-b09a148013edb1ec2a8af887892e78de3ebf0eaae753dfd95ce46d7b2c9264b8
View file https://github.com/ilevkivskyi/typeshed/blob/1864edcf6da31c1e023f1fb556e0b47671299a69/third_party/2and3/cryptography/hazmat/primitives/serialization/__init__.pyi
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/4870/files/{{ revealButtonHref }}
https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-b09a148013edb1ec2a8af887892e78de3ebf0eaae753dfd95ce46d7b2c9264b8
https://github.com/python/typeshed/pull/4870/files/1864edcf6da31c1e023f1fb556e0b47671299a69#diff-b09a148013edb1ec2a8af887892e78de3ebf0eaae753dfd95ce46d7b2c9264b8
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.