René's URL Explorer Experiment


Title: [2.7] urlparse.urlparse should use AnyStr, but can't due to NamedTuple · Issue #236 · python/typeshed · GitHub

Open Graph Title: [2.7] urlparse.urlparse should use AnyStr, but can't due to NamedTuple · Issue #236 · python/typeshed

X Title: [2.7] urlparse.urlparse should use AnyStr, but can't due to NamedTuple · Issue #236 · python/typeshed

Description: Fair chance I'm doing something wrong here, any pointers? (env3) michael@dan:~/schema_salad$ make mypy MYPYPATH=typeshed/2.7 mypy --py2 --disallow-untyped-calls schema_salad Traceback (most recent call last): File "/home/michael/src/mypy...

Open Graph Description: Fair chance I'm doing something wrong here, any pointers? (env3) michael@dan:~/schema_salad$ make mypy MYPYPATH=typeshed/2.7 mypy --py2 --disallow-untyped-calls schema_salad Traceback (most recent ...

X Description: Fair chance I'm doing something wrong here, any pointers? (env3) michael@dan:~/schema_salad$ make mypy MYPYPATH=typeshed/2.7 mypy --py2 --disallow-untyped-calls schema_salad Traceback (most rec...

Opengraph URL: https://github.com/python/typeshed/issues/236

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[2.7] urlparse.urlparse should use AnyStr, but can't due to NamedTuple","articleBody":"Fair chance I'm doing something wrong here, any pointers?\n\n``` shell\n(env3) michael@dan:~/schema_salad$ make mypy\nMYPYPATH=typeshed/2.7 mypy --py2 --disallow-untyped-calls schema_salad\nTraceback (most recent call last):\n  File \"/home/michael/src/mypy/env3/bin/mypy\", line 6, in \u003cmodule>\n    main(__file__)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/main.py\", line 54, in main\n    res = type_check_only(sources, bin_dir, options)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/main.py\", line 102, in type_check_only\n    python_path=options.python_path)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/build.py\", line 209, in build\n    dispatch(sources, manager)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/build.py\", line 1325, in dispatch\n    process_graph(graph, manager)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/build.py\", line 1456, in process_graph\n    process_stale_scc(graph, scc)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/build.py\", line 1482, in process_stale_scc\n    graph[id].semantic_analysis()\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/build.py\", line 1292, in semantic_analysis\n    self.manager.semantic_analyzer.visit_file(self.tree, self.xpath)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/semanal.py\", line 246, in visit_file\n    self.accept(d)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/semanal.py\", line 2251, in accept\n    node.accept(self)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/nodes.py\", line 650, in accept\n    return visitor.visit_class_def(self)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/semanal.py\", line 561, in visit_class_def\n    defn.defs.accept(self)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/nodes.py\", line 715, in accept\n    return visitor.visit_block(self)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/semanal.py\", line 1012, in visit_block\n    self.accept(s)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/semanal.py\", line 2251, in accept\n    node.accept(self)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/nodes.py\", line 462, in accept\n    return visitor.visit_func_def(self)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/semanal.py\", line 316, in visit_func_def\n    self.analyze_function(defn)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/semanal.py\", line 468, in analyze_function\n    defn.type = self.anal_type(defn.type)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/semanal.py\", line 1037, in anal_type\n    return t.accept(a)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/types.py\", line 496, in accept\n    return visitor.visit_callable_type(self)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/typeanal.py\", line 180, in visit_callable_type\n    return t.copy_modified(arg_types=self.anal_array(t.arg_types),\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/typeanal.py\", line 247, in anal_array\n    res.append(t.accept(self))\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/types.py\", line 637, in accept\n    return visitor.visit_tuple_type(self)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/typeanal.py\", line 194, in visit_tuple_type\n    return TupleType(self.anal_array(t.items), fallback, t.line)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/typeanal.py\", line 247, in anal_array\n    res.append(t.accept(self))\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/types.py\", line 340, in accept\n    return visitor.visit_type_var(self)\n  File \"/home/michael/src/mypy/env3/lib/python3.5/site-packages/mypy/typeanal.py\", line 177, in visit_type_var\n    raise RuntimeError('TypeVarType is already analyzed')\nRuntimeError: TypeVarType is already analyzed\n```\n\n``` diff\ndiff --git a/typeshed/2.7/urlparse.pyi b/typeshed/2.7/urlparse.pyi\nindex ee2e4c2..b7862c7 100644\n--- a/typeshed/2.7/urlparse.pyi\n+++ b/typeshed/2.7/urlparse.pyi\n@@ -1,6 +1,6 @@\n # Stubs for urlparse (Python 2)\n\n-from typing import Dict, List, NamedTuple, Tuple, Sequence, Union, overload\n+from typing import AnyStr, Dict, Generic, List, NamedTuple, Tuple, Sequence, Union, overload\n\n uses_relative = []  # type: List[str]\n uses_netloc = []  # type: List[str]\n@@ -24,9 +24,9 @@ class ResultMixin(object):\n     def port(self) -> int: ...\n\n class SplitResult(NamedTuple('SplitResult', [\n-        ('scheme', str), ('netloc', str), ('path', str), ('query', str), ('fragment', str)\n-    ]), ResultMixin):\n-    def geturl(self) -> str: ...\n+        ('scheme', AnyStr), ('netloc', AnyStr), ('path', AnyStr), ('query', AnyStr), ('fragment', AnyStr)\n+    ]), ResultMixin, Generic[AnyStr]):\n+    def geturl(self) -> AnyStr: ...\n\n class ParseResult(NamedTuple('ParseResult', [\n         ('scheme', str), ('netloc', str), ('path', str), ('params', str), ('query', str),\n@@ -35,7 +35,7 @@ class ParseResult(NamedTuple('ParseResult', [\n     def geturl(self) -> str: ...\n\n def urlparse(url: Union[str, unicode], scheme: str = ..., allow_fragments: bool = ...) -> ParseResult: ...\n-def urlsplit(url: Union[str, unicode], scheme: str = ..., allow_fragments: bool = ...) -> SplitResult: ...\n+def urlsplit(url: AnyStr, scheme: str = ..., allow_fragments: bool = ...) -> SplitResult[AnyStr]: ...\n @overload\n def urlunparse(data: Tuple[str, str, str, str, str, str]) -> str: ...\n @overload\n```\n","author":{"url":"https://github.com/mr-c","@type":"Person","name":"mr-c"},"datePublished":"2016-06-01T12:23:45Z","url":"https://github.com/python/typeshed/issues/236"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0ccf3706-22db-02d9-9024-2a4ac8a02534
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8754:15E5F9:21058DF:2CF2815:6B002472
html-safe-nonce7b4f4ae60f5e42340b0a3e48258be923dc521c761ba50a801bf62475fc12bf4c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzU0OjE1RTVGOToyMTA1OERGOjJDRjI4MTU6NkIwMDI0NzIiLCJ2aXNpdG9yX2lkIjoiMTEzNzE0MDgyMTU5ODkzODIyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac851b19fab5eba62354598d8a2bdb79f7b529530bf6057220985a155485114145
hovercard-subject-tagissue:157893559
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/typeshed/236/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ca1e2427c71e46fa2c6cdd5ec3e5273e7fea2824c2e9cb960331302c4a089f8f/python/typeshed/issues/236
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ca1e2427c71e46fa2c6cdd5ec3e5273e7fea2824c2e9cb960331302c4a089f8f/python/typeshed/issues/236
og:image:altFair chance I'm doing something wrong here, any pointers? (env3) michael@dan:~/schema_salad$ make mypy MYPYPATH=typeshed/2.7 mypy --py2 --disallow-untyped-calls schema_salad Traceback (most recent ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemr-c
hostnamegithub.com
expected-hostnamegithub.com
None4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release44c658b24abf00491fb7ae5f56d42c9f38cbeab2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/typeshed/issues/236#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fissues%2F236
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%2Fpython%2Ftypeshed%2Fissues%2F236
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Ftypeshed
Reloadhttps://github.com/python/typeshed/issues/236
Reloadhttps://github.com/python/typeshed/issues/236
Reloadhttps://github.com/python/typeshed/issues/236
pythonhttps://github.com/python
typeshedhttps://github.com/python/typeshed
Codehttps://github.com/python/typeshed
Issues196 (196)https://github.com/python/typeshed/issues
Pull requests251 (251)https://github.com/python/typeshed/pulls
Actionshttps://github.com/python/typeshed/actions
Security and qualityhttps://github.com/python/typeshed/security
Insightshttps://github.com/python/typeshed/insights
https://github.com/python/typeshed
New issuehttps://github.com/login?return_to=https://github.com/python/typeshed/issues/236
New issuehttps://github.com/login?return_to=https://github.com/python/typeshed/issues/236
[2.7] urlparse.urlparse should use AnyStr, but can't due to NamedTuplehttps://github.com/python/typeshed/issues/236#top
https://github.com/mr-c
mr-chttps://github.com/mr-c
on Jun 1, 2016https://github.com/python/typeshed/issues/236#issue-157893559
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Jun 3, 2016https://github.com/python/typeshed/issues/236#issuecomment-223694440
https://github.com/mr-c
mr-chttps://github.com/mr-c
on Jun 4, 2016https://github.com/python/typeshed/issues/236#issuecomment-223747826
@gvanrossumhttps://github.com/gvanrossum
https://github.com/common-workflow-language/schema_salad/blob/master/typeshed/2.7https://github.com/common-workflow-language/schema_salad/blob/master/typeshed/2.7
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Jun 4, 2016https://github.com/python/typeshed/issues/236#issuecomment-223782740
https://github.com/gnprice
gnpricehttps://github.com/gnprice
on Jun 8, 2016https://github.com/python/typeshed/issues/236#issuecomment-224752115
@mr-chttps://github.com/mr-c
python/mypy#1682https://github.com/python/mypy/issues/1682
https://github.com/mr-c
mr-chttps://github.com/mr-c
on Jun 9, 2016https://github.com/python/typeshed/issues/236#issuecomment-224843919
@gvanrossumhttps://github.com/gvanrossum
@gnpricehttps://github.com/gnprice
mr-chttps://github.com/mr-c
completedhttps://github.com/python/typeshed/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 9, 2016https://github.com/python/typeshed/issues/236#event-686987863
hswong3ihttps://github.com/hswong3i
on May 25, 2025https://github.com/python/typeshed/issues/236#event-17803768874
Allow typing_extensions.Protocol and typing.Protocol to mix (python#237)https://github.com/alvistack/python-typeshed/commit/f9b83a235d28bf83f484520eb499e596e73fe45a
python#237https://github.com/python/typeshed/pull/237
https://docs.github.com/articles/closing-issues-via-commit-messages
f9b83a2https://github.com/alvistack/python-typeshed/commit/f9b83a235d28bf83f484520eb499e596e73fe45a
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/typeshed/issues/236
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/typeshed/issues/236
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.