René's URL Explorer Experiment


Title: `importlib.metadata.version(None)` returns arbitrary version number · Issue #93259 · python/cpython · GitHub

Open Graph Title: `importlib.metadata.version(None)` returns arbitrary version number · Issue #93259 · python/cpython

X Title: `importlib.metadata.version(None)` returns arbitrary version number · Issue #93259 · python/cpython

Description: The version() function of the importlib.metadata package returns an arbitrary version number when called with None. There's no documentation on what the return value means. I would have expected one of the following instead: raise an err...

Open Graph Description: The version() function of the importlib.metadata package returns an arbitrary version number when called with None. There's no documentation on what the return value means. I would have expected on...

X Description: The version() function of the importlib.metadata package returns an arbitrary version number when called with None. There's no documentation on what the return value means. I would have expecte...

Opengraph URL: https://github.com/python/cpython/issues/93259

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`importlib.metadata.version(None)` returns arbitrary version number","articleBody":"The `version()` function of the `importlib.metadata` package returns an arbitrary version number when called with `None`. There's no documentation on what the return value means.\r\n\r\nI would have expected one of the following instead:\r\n- raise an error saying that the `distribution_name` parameter cannot be `None`, or\r\n- explain what the return value means in the [relevant documentation](https://docs.python.org/3.10/library/importlib.metadata.html#version).\r\n\r\nThe current behaviour is confusing as one could think, for example, that the return value is the version of the project/package they call it from.\r\n\r\n```\r\n\u003e\u003e\u003e import sys\r\n\u003e\u003e\u003e print(sys.version)\r\n3.10.0 (tags/v3.10.0:b494f59, Oct  4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)]\r\n\u003e\u003e\u003e import importlib.metadata\r\n\u003e\u003e\u003e importlib.metadata.version(None)\r\n'21.2.3'\r\n```\r\n\r\nI looks like the return value is the version of an arbitrary package installed in the Python virtual environment. Calling the function repeatedly seems to give the same value, but installing a new package can cause the return value to change.\r\n\r\n**System information**\r\n\r\n- CPython versions tested on: 3.10.0\r\n- Operating system and architecture: Windows 10 Enterprise (64-bit operating system, x64-based processor)\r\n","author":{"url":"https://github.com/peterzahemszky","@type":"Person","name":"peterzahemszky"},"datePublished":"2022-05-26T14:28:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/93259/cpython/issues/93259"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:53e1bc46-7d22-7a8c-605b-e916898d1df0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDA54:2253BD:79920:AAC53:696A6A00
html-safe-nonce25a31bd6447dad55c95382f7959c0b9f4009c0b4858093adfd6a3981bfa21500
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTU0OjIyNTNCRDo3OTkyMDpBQUM1Mzo2OTZBNkEwMCIsInZpc2l0b3JfaWQiOiI0ODgyMjQ3NTc5NDk2NzcwMDQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac312e986bb345883a8d20ef43f48f38753f1ef07f8aee5db8731938957f966229
hovercard-subject-tagissue:1249646560
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/cpython/93259/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2ccab08be22257863c2a77410876db12a1ca04316e4315638a1e447d3c4fa2a7/python/cpython/issues/93259
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2ccab08be22257863c2a77410876db12a1ca04316e4315638a1e447d3c4fa2a7/python/cpython/issues/93259
og:image:altThe version() function of the importlib.metadata package returns an arbitrary version number when called with None. There's no documentation on what the return value means. I would have expected on...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepeterzahemszky
hostnamegithub.com
expected-hostnamegithub.com
None6fea32d5b7276b841b7a803796d9715bc6cfb31ed549fdf9de2948ac25d12ba6
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
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
releasef2d9f6432a5a115ec709295ae70623f33bb80aee
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/93259#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F93259
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://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F93259
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/93259
Reloadhttps://github.com/python/cpython/issues/93259
Reloadhttps://github.com/python/cpython/issues/93259
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/93259
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/issues/93259
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/93259
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/93259
python/importlib_metadata#391https://github.com/python/importlib_metadata/pull/391
importlib.metadata.version(None) returns arbitrary version numberhttps://github.com/python/cpython/issues/93259#top
python/importlib_metadata#391https://github.com/python/importlib_metadata/pull/391
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/peterzahemszky
https://github.com/peterzahemszky
peterzahemszkyhttps://github.com/peterzahemszky
on May 26, 2022https://github.com/python/cpython/issues/93259#issue-1249646560
relevant documentationhttps://docs.python.org/3.10/library/importlib.metadata.html#version
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
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.