Opened 4 months ago
Last modified 4 months ago
#6898 new defect
Python deprecation warnings for checkrefs.py
Reported by: | Itms | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Backlog |
Component: | Build & Packages | Keywords: | simple |
Cc: | Patch: |
Description
In Python 3.12, checkrefs.py
throws the following warnings:
checkrefs.py:237: DeprecationWarning: Testing an element's truth value will raise an exception in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if entity and entity.find('VisualActor') is not None and entity.find('VisualActor').find('Actor') is not None: checkrefs.py:238: DeprecationWarning: Testing an element's truth value will raise an exception in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if entity.find('Identity'): checkrefs.py:253: DeprecationWarning: Testing an element's truth value will raise an exception in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if entity.find('Sound'): checkrefs.py:251: DeprecationWarning: Testing an element's truth value will raise an exception in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if foundation_actor: checkrefs.py:423: DeprecationWarning: Testing an element's truth value will raise an exception in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if texture:
I assume that other Python scripts suffer from this, but since this one is important for the CI and is being run in a lot of environments, it would be good to fix it.
Note:
See TracTickets
for help on using tickets.