py-repl creating duplicate ids
Checklist
- [X] I added a descriptive title
- [X] I searched for other issues and couldn't find a solution or duplication
- [X] I already searched in Google and didn't find any good information or help
What happened?
Within generated DOM elements, the py-repl element creates duplicate ids.
Note: my-repl-2 is denoted 2 times

This is causing this test to fail: pytest tests/integration/test_zz_examples.py::TestExamples::test_repl
What browsers are you seeing the problem on? (if applicable)
Firefox, Chrome, Safari, Microsoft Edge
Console info
No response
Additional Context
No response
On it :)
@marimeireles
note that PR #881 changed the way IDs are generated, now we use py-internal-X, where X is 0, 1, 2, 3, ...
https://github.com/pyscript/pyscript/blob/f9194cc833eb938800f1184574e474bca209dd2d/pyscriptjs/src/utils.ts#L41-L45
I think that the bug is still present because I did't change the py-repl logic, but it should make debugging simpler.
Also, I just started another branch to merge base.ts and pyrepl.ts together. So it might make more sense to wait for it to be completed before hunting the bug.
The bug isn't there. It was in the way we write elements, was hard to find because I didn't introduce it 😅 (and I thought I did) But yeah, let's discuss on the PR :)
This was fixed by Antonio's PR actually, before I landed mine! Fixing a different bug, that also happened to fix this behavior. As an extra step to remove all of these nested ids I have https://github.com/pyscript/pyscript/pull/912 on the way.