Skip to content

gh-142197: Doc: Add missing import statement in importlib.metadata overview - #142208

Merged
StanFromIreland merged 6 commits into
python:mainfrom
Yashp002:metadata
Sep 10, 2026
Merged

gh-142197: Doc: Add missing import statement in importlib.metadata overview#142208
StanFromIreland merged 6 commits into
python:mainfrom
Yashp002:metadata

Conversation

@Yashp002

@Yashp002 Yashp002 commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

Fixes #142197

Added missing from importlib.metadata import metadata import statement before the example code that uses metadata('wheel') in the overview section.

The documentation showed usage of the metadata() function without first importing it, causing a NameError when users tried to follow the example. This change ensures the example code is runnable as-is.


📚 Documentation preview 📚: https://cpython-previews--142208.org.readthedocs.build/

@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels Dec 3, 2025
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Dec 3, 2025
@Yashp002 Yashp002 changed the title Doc: Add missing import statement in importlib.metadata overview gh-142197: Doc: Add missing import statement in importlib.metadata overview Dec 3, 2025

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert unrelated changes in different files.


You can get the :ref:`metadata for a distribution <metadata>`::

>>> list(metadata('wheel')) # doctest: +SKIP

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you changing the indentation?

Comment thread Doc/library/importlib.metadata.rst Outdated
picnixz
picnixz previously requested changes Dec 6, 2025
Comment thread Doc/library/importlib.metadata.rst
@bedevere-app

bedevere-app Bot commented Dec 6, 2025

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Yashp002 and others added 2 commits December 9, 2025 21:55
Co-authored-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
@Yashp002

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again.

@bedevere-app

bedevere-app Bot commented Dec 10, 2025

Copy link
Copy Markdown

Thanks for making the requested changes!

@picnixz: please review the changes made to this pull request.

@bedevere-app
bedevere-app Bot requested a review from picnixz December 10, 2025 11:41
@Yashp002

Copy link
Copy Markdown
Contributor Author

@picnixz , just checking in, could you review my PR and let me know if there's anything more to fix?

@picnixz
picnixz disabled auto-merge March 21, 2026 13:49
@picnixz
picnixz enabled auto-merge (squash) March 21, 2026 13:49
@picnixz
picnixz disabled auto-merge March 21, 2026 13:50
@picnixz

picnixz commented Mar 21, 2026

Copy link
Copy Markdown
Member

As I am on mobile I do not trust the GH UI so I will let another core dev merge this one

@picnixz picnixz added awaiting merge needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes and removed awaiting review labels Mar 21, 2026
@github-actions

github-actions Bot commented May 3, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 3, 2026
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 30, 2026
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Jun 2, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Sep 4, 2026
@lubianat

Copy link
Copy Markdown

@picnixz should this be merged? it is simple and perhaps done? (I guess the backport is pending; @Yashp002 ?)

@picnixz

picnixz commented Sep 10, 2026

Copy link
Copy Markdown
Member

i forgot about it; backports are automatic once the PR is merged (and manual if fhere are conflicts). I am on mobile so I am going to merge this tomorrow, thanks for the reminder!

@StanFromIreland

Copy link
Copy Markdown
Member

I can merge it right now @picnixz ?

@picnixz

picnixz commented Sep 10, 2026

Copy link
Copy Markdown
Member

Yes please

@StanFromIreland
StanFromIreland merged commit f64ebfb into python:main Sep 10, 2026
38 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Sep 10, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @Yashp002 for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Sep 10, 2026

Copy link
Copy Markdown

GH-157284 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Sep 10, 2026
@bedevere-app

bedevere-app Bot commented Sep 10, 2026

Copy link
Copy Markdown

GH-157285 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Sep 10, 2026
@bedevere-app

bedevere-app Bot commented Sep 10, 2026

Copy link
Copy Markdown

GH-157286 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Sep 10, 2026
StanFromIreland pushed a commit that referenced this pull request Sep 10, 2026
…data overview (GH-142208) (#157286)

(cherry picked from commit f64ebfb)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
StanFromIreland pushed a commit that referenced this pull request Sep 10, 2026
…data overview (GH-142208) (#157285)

(cherry picked from commit f64ebfb)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news stale Stale PR or inactive for long period of time.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

import.metadata overview missing import statement

6 participants