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-142145: Remove quadratic behavior in node ID cache clearing by sethmlarson · Pull Request #142146 · python/cpython

Conversation

@sethmlarson

@sethmlarson sethmlarson commented Dec 1, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Issue: Remove quadratic behavior in node ID cache clearing #142145

Sorry, something went wrong.

Uh oh!

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

All reactions
@sethmlarson @jacobtylerwalls
Remove quadratic behavior in node ID cache clearing
3d1b01b
Co-authored-by: Jacob Walls <[email protected]>
@sethmlarson sethmlarson added type-security A security issue topic-XML labels Dec 1, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Dec 1, 2025
Remove quadratic behavior in node ID cache clearing #142145
Closed
@bedevere-app bedevere-app Bot added the awaiting review label Dec 1, 2025
@sethmlarson
Add news fragment
d39b691
@gpshead gpshead added needs backport to 3.10 needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes 🔨 test-with-buildbots Test PR w/ buildbots; report in status section labels Dec 2, 2025
@bedevere-bot

bedevere-bot commented Dec 2, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @gpshead for commit d39b691 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F142146%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 2, 2025
@gpshead gpshead self-assigned this Dec 2, 2025
gpshead
gpshead approved these changes Dec 3, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Dec 3, 2025
@gpshead
gpshead merged commit 08d8e18 into python:main Dec 3, 2025
126 checks passed

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting merge label Dec 3, 2025
@miss-islington-app

miss-islington-app Bot commented Dec 3, 2025

Copy link
Copy Markdown

Thanks @sethmlarson for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11, 3.12, 3.13, 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 3, 2025
@sethmlarson @jacobtylerwalls @miss-islington
pythongh-142145: Remove quadratic behavior in node ID cache clearing (p…
fe268f9
…ythonGH-142146)

* Remove quadratic behavior in node ID cache clearing

Co-authored-by: Jacob Walls <[email protected]>

* Add news fragment

---------
(cherry picked from commit 08d8e18)

Co-authored-by: Seth Michael Larson <[email protected]>
Co-authored-by: Jacob Walls <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 3, 2025
@sethmlarson @jacobtylerwalls @miss-islington
pythongh-142145: Remove quadratic behavior in node ID cache clearing (p…
16104af
…ythonGH-142146)

* Remove quadratic behavior in node ID cache clearing

Co-authored-by: Jacob Walls <[email protected]>

* Add news fragment

---------
(cherry picked from commit 08d8e18)

Co-authored-by: Seth Michael Larson <[email protected]>
Co-authored-by: Jacob Walls <[email protected]>
@bedevere-app

bedevere-app Bot commented Dec 3, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Dec 3, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 3, 2025
@sethmlarson @jacobtylerwalls @miss-islington
pythongh-142145: Remove quadratic behavior in node ID cache clearing (p…
df996ce
…ythonGH-142146)

* Remove quadratic behavior in node ID cache clearing

Co-authored-by: Jacob Walls <[email protected]>

* Add news fragment

---------
(cherry picked from commit 08d8e18)

Co-authored-by: Seth Michael Larson <[email protected]>
Co-authored-by: Jacob Walls <[email protected]>
@bedevere-app

bedevere-app Bot commented Dec 3, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Dec 3, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 3, 2025
@sethmlarson @jacobtylerwalls @miss-islington
pythongh-142145: Remove quadratic behavior in node ID cache clearing (p…
b95c103
…ythonGH-142146)

* Remove quadratic behavior in node ID cache clearing

Co-authored-by: Jacob Walls <[email protected]>

* Add news fragment

---------
(cherry picked from commit 08d8e18)

Co-authored-by: Seth Michael Larson <[email protected]>
Co-authored-by: Jacob Walls <[email protected]>
@bedevere-app

bedevere-app Bot commented Dec 3, 2025

Copy link
Copy Markdown

GH-142211 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Dec 3, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 3, 2025
@sethmlarson @jacobtylerwalls @miss-islington
pythongh-142145: Remove quadratic behavior in node ID cache clearing (p…
f4eb9ab
…ythonGH-142146)

* Remove quadratic behavior in node ID cache clearing

Co-authored-by: Jacob Walls <[email protected]>

* Add news fragment

---------
(cherry picked from commit 08d8e18)

Co-authored-by: Seth Michael Larson <[email protected]>
Co-authored-by: Jacob Walls <[email protected]>
@bedevere-app

bedevere-app Bot commented Dec 3, 2025

Copy link
Copy Markdown

GH-142212 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Dec 3, 2025
@bedevere-app

bedevere-app Bot commented Dec 3, 2025

Copy link
Copy Markdown

GH-142213 is a backport of this pull request to the 3.10 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.10 label Dec 3, 2025
@bedevere-bot

bedevere-bot commented Dec 3, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86 Debian Installed with X 3.x (no tier) has failed when building commit 08d8e18.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1244/builds/6835) and take a look at the build logs.
  4. Check if the failure is related to this commit (08d8e18) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1244/builds/6835

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.15/test/test_annotationlib.py"�[0m, line �[35m160�[0m, in �[35mtest_nonexistent_attribute�[0m
    �[31mself.assertEqual�[0m�[1;31m(epsilon_anno, support.EqualToForwardRef("some | {obj, module}", owner=f))�[0m
    �[31m~~~~~~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m
�[1;35mAssertionError�[0m: �[35mForwardRef('some | {module, obj}', owner=[79 chars]028>) != EqualToForwardRef('some | {obj, module}',[86 chars]028>)�[0m


Traceback (most recent call last):
  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.15/test/test_annotationlib.py"�[0m, line �[35m160�[0m, in �[35mtest_nonexistent_attribute�[0m
    �[31mself.assertEqual�[0m�[1;31m(epsilon_anno, support.EqualToForwardRef("some | {obj, module}", owner=f))�[0m
    �[31m~~~~~~~~~~~~~~~~�[0m�[1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^�[0m
�[1;35mAssertionError�[0m: �[35mForwardRef('some | {module, obj}', owner=[79 chars]b80>) != EqualToForwardRef('some | {obj, module}',[86 chars]b80>)�[0m
All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented Dec 3, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora Stable Refleaks 3.x (tier-3) has failed when building commit 08d8e18.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1641/builds/1335) and take a look at the build logs.
  4. Check if the failure is related to this commit (08d8e18) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1641/builds/1335

Failed tests:

  • test_external_inspection
  • test.test_os.test_os

Failed subtests:

  • test_timerfd_poll - test.test_os.test_os.TimerfdTests.test_timerfd_poll
  • test_only_active_thread - test.test_external_inspection.TestGetStackTrace.test_only_active_thread

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_external_inspection.py", line 1647, in test_only_active_thread
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        total_gil_threads, 1, "Should have exactly one GIL holder"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 0 != 1 : Should have exactly one GIL holder


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_os/test_os.py", line 4120, in test_timerfd_poll
    self.check_timerfd_poll(False)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_os/test_os.py", line 4108, in check_timerfd_poll
    self.assertEqual(self.read_count_signaled(fd), 1)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 2 != 1
All reactions

Sorry, something went wrong.

Uh oh!

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

@sethmlarson
sethmlarson deleted the xml-node-id-cache-clearing branch December 3, 2025 18:42
gpshead pushed a commit that referenced this pull request Dec 3, 2025
@miss-islington @sethmlarson @jacobtylerwalls
[3.14] gh-142145: Remove quadratic behavior in node ID cache clearing (…
027f21e
…GH-142146) (#142209)

gh-142145: Remove quadratic behavior in node ID cache clearing (GH-142146)

* Remove quadratic behavior in node ID cache clearing



* Add news fragment

---------
(cherry picked from commit 08d8e18)

Co-authored-by: Seth Michael Larson <[email protected]>
Co-authored-by: Jacob Walls <[email protected]>
gpshead pushed a commit that referenced this pull request Dec 5, 2025
@miss-islington @sethmlarson @jacobtylerwalls
[3.13] gh-142145: Remove quadratic behavior in node ID cache clearing (…
ddcd2ac
…GH-142146) (#142210)

gh-142145: Remove quadratic behavior in node ID cache clearing (GH-142146)

* Remove quadratic behavior in node ID cache clearing



* Add news fragment

---------
(cherry picked from commit 08d8e18)

Co-authored-by: Seth Michael Larson <[email protected]>
Co-authored-by: Jacob Walls <[email protected]>
StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
@sethmlarson @jacobtylerwalls @StanFromIreland
pythongh-142145: Remove quadratic behavior in node ID cache clearing (p…
af5bc6f
…ythonGH-142146)

* Remove quadratic behavior in node ID cache clearing

Co-authored-by: Jacob Walls <[email protected]>

* Add news fragment

---------

Co-authored-by: Jacob Walls <[email protected]>
@sthibaul

sthibaul commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

Hello,

This change is breaking some software, notably OnroerendErfgoed/skosprovider#155 and https://bugs.debian.org/1122875

All reactions

Sorry, something went wrong.

Uh oh!

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

@gpshead

gpshead commented Dec 15, 2025

Copy link
Copy Markdown
Member

please raise follow on issues on the issue, not as pr comments.

All reactions

Sorry, something went wrong.

Uh oh!

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

@python python locked as resolved and limited conversation to collaborators Dec 15, 2025
gnomesysadmins pushed a commit to GNOME/pyatspi2 that referenced this pull request Dec 17, 2025
@sthibaul @mgorse
Fix creating dom nodes
76ca7ba
Python 3.13 introduced a fix
python/cpython#142146

which brought a regression
python/cpython#142754

Discussion shows that one is not supposed to use Element to create
nodes. It used to work but is not really supported. They fixed the
issue in
https://github.com/python/cpython/pull/142794/files

but better create dom nodes the proper way with doc.createElement.

collectiontest.py didn't actually need to create elements any more.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@gpshead gpshead gpshead approved these changes

Uh oh!

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

Assignees

@gpshead gpshead

Labels

topic-XML type-security A security issue

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

@sethmlarson @bedevere-bot @sthibaul @gpshead
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.