GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-149571: Make Element.itertext consistent for Comment and ProcessingInstruction by hardiksingh5864 · Pull Request #149714 · python/cpython

Conversation

@hardiksingh5864

@hardiksingh5864 hardiksingh5864 commented May 12, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

This fixes a behavior mismatch between the pure-Python and C implementations of xml.etree.ElementTree.Element.itertext()
Added regression coverage in Lib/test/test_xml_etree.py

  • Issue: Element.itertext() works differently in C and Python implementations #149571

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hardiksingh5864
Element.itertext() consistent fix
c4c1b6e
@bedevere-app

bedevere-app Bot commented May 12, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@python-cla-bot

python-cla-bot Bot commented May 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot mentioned this pull request May 12, 2026
Element.itertext() works differently in C and Python implementations #149571
Closed
@bedevere-app bedevere-app Bot added the awaiting review label May 12, 2026
hardiksingh5864 and others added 2 commits May 12, 2026 14:59
@hardiksingh5864
Add news fragment for pythongh-149571
6c97311
@hardiksingh5864
Merge branch 'main' into feature/bug
066801d
StanFromIreland
StanFromIreland requested changes May 12, 2026
View reviewed changes

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

It seems you ran a linter, causing a massive diff. Please revert the unrelated changes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting changes and removed awaiting review labels May 12, 2026
@bedevere-app

bedevere-app Bot commented May 12, 2026

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hardiksingh5864 added 3 commits May 13, 2026 01:05
@hardiksingh5864
pythongh-149571: Make Element.itertext consistent for Comment and Pro…
2dfd433
…cessingInstruction
@hardiksingh5864
pythongh-149571: Remove the linter issue
7c8cb36
@hardiksingh5864
pythongh-149571: Fixing the Ci failure
5df8ef0
@hardiksingh5864

hardiksingh5864 commented May 12, 2026

Copy link
Copy Markdown
Author

It seems you ran a linter, causing a massive diff. Please revert the unrelated changes.

It seems you ran a linter, causing a massive diff. Please revert the unrelated changes.

I have made the requested changes; please review again

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting change review and removed awaiting changes labels May 12, 2026
@bedevere-app

bedevere-app Bot commented May 12, 2026

Copy link
Copy Markdown

Thanks for making the requested changes!

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app
bedevere-app Bot requested a review from StanFromIreland May 12, 2026 20:11
@hardiksingh5864

hardiksingh5864 commented May 13, 2026

Copy link
Copy Markdown
Author

@StanFromIreland please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland
StanFromIreland requested a review from serhiy-storchaka May 13, 2026 19:46
@StanFromIreland

StanFromIreland commented May 13, 2026

Copy link
Copy Markdown
Member

Sorry I'm not an expert in these modules, I requested Serhiy.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@serhiy-storchaka

serhiy-storchaka commented May 14, 2026

Copy link
Copy Markdown
Member

Don't rush. First we need to decide which behavior is more desirable.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hardiksingh5864

hardiksingh5864 commented May 14, 2026

Copy link
Copy Markdown
Author

Don't rush. First we need to decide which behavior is more desirable.

I’ll hold off on working on a fix until the expected behavior is clearer. Once confirmed about the desired behavior please share that to me as well

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@scoder

scoder commented May 16, 2026

Copy link
Copy Markdown
Contributor

First we need to decide which behavior is more desirable.

Comments and PIs should not contribute to the text returned by .itertext(). Comments are literally meant to add notes to the document that do not contribute to the document's processed content. It makes no sense to bother users with it. If they really want them to be included, it's easy to write an iterator that does include them, easier than excluding them, really. The built-in tool behaviour should follow the normal case of excluding them.

serhiy-storchaka reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@serhiy-storchaka

serhiy-storchaka commented May 17, 2026

Copy link
Copy Markdown
Member

It was decided to move in opposite direction.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@serhiy-storchaka serhiy-storchaka closed this May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@StanFromIreland StanFromIreland Awaiting requested review from StanFromIreland
@serhiy-storchaka serhiy-storchaka Awaiting requested review from serhiy-storchaka

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting change review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@hardiksingh5864 @StanFromIreland @serhiy-storchaka @scoder
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.