Skip to content

gh-82665 Mention that HTMLParser.handle_starttag value can be None#134312

Merged
ezio-melotti merged 5 commits intopython:mainfrom
Fearless-Badger:main
Apr 27, 2026
Merged

gh-82665 Mention that HTMLParser.handle_starttag value can be None#134312
ezio-melotti merged 5 commits intopython:mainfrom
Fearless-Badger:main

Conversation

@Fearless-Badger
Copy link
Copy Markdown
Contributor

@Fearless-Badger Fearless-Badger commented May 20, 2025

This change adds documentation that specifies the behavior of HTMLParser.handle_starttag when a boolean attribute is parsed.

Since there is no value for the standard "key - value" format, "None" is placed into the tuple as the corresponding value for the boolean attribute.


📚 Documentation preview 📚: https://cpython-previews--134312.org.readthedocs.build/en/134312/library/html.parser.html

@python-cla-bot
Copy link
Copy Markdown

python-cla-bot Bot commented May 20, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

This comment was marked as outdated.

@emmatyping emmatyping added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels May 20, 2025
Comment thread Doc/library/html.parser.rst Outdated
@github-actions
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 Apr 25, 2026
Comment thread Doc/library/html.parser.rst Outdated
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Comment thread Doc/library/html.parser.rst Outdated
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. 👍

I really like the new example. Because <input> has many boolean attributes and because <script> has its own quirks unrelated to the example.

@ezio-melotti ezio-melotti self-assigned this Apr 26, 2026
@ezio-melotti ezio-melotti removed the stale Stale PR or inactive for long period of time. label Apr 26, 2026
@ezio-melotti ezio-melotti merged commit 804c213 into python:main Apr 27, 2026
36 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Apr 27, 2026
@miss-islington-app
Copy link
Copy Markdown

Thanks @Fearless-Badger for the PR, and @ezio-melotti for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented Apr 27, 2026

GH-149037 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 Apr 27, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented Apr 27, 2026

GH-149038 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 Apr 27, 2026
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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants