Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uic.py inconsistencies and logic errors #464

Open
StSav012 opened this issue Oct 27, 2023 · 0 comments
Open

uic.py inconsistencies and logic errors #464

StSav012 opened this issue Oct 27, 2023 · 0 comments
Labels
Milestone

Comments

@StSav012
Copy link
Contributor

I do see that uic.py somehow got corrupted, and no test reveals it.

See this line:

raise NoCustomWidget(

There is no NoCustomWidget defined there.

Moreover, PyCharm just screams with warnings there. That is, if something fails within lines

qtpy/qtpy/uic.py

Lines 82 to 99 in b3b222a

from xml.etree.ElementTree import Element
from pyside2uic import compileUi
# Patch UIParser as xml.etree.Elementree.Element.getiterator
# was deprecated since Python 3.2 and removed in Python 3.9
# https://docs.python.org/3.9/whatsnew/3.9.html#removed
from pyside2uic.uiparser import UIParser
class ElemPatched(Element):
def getiterator(self, *args, **kwargs):
return self.iter(*args, **kwargs)
def readResources(self, elem):
return self._readResources(ElemPatched(elem))
UIParser._readResources = UIParser.readResources
UIParser.readResources = readResources

compileUi might never be imported, although used later.

It isn't the part of QtPy that I use, and not what I'm interested in.

@dalthviz dalthviz added this to the v2.4.2 milestone Nov 1, 2023
@dalthviz dalthviz changed the title What is NoCustomWidget in uic.py? uic.py inconsistencies and logic errors Nov 1, 2023
@ccordoba12 ccordoba12 modified the milestones: v2.4.2, v2.4.3 Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants