Fix compatibility with Python 3

- Import "collections" correctly depending on the version of
Python
- Fix regex that raised deprecation warnings in Python 3
This commit is contained in:
Candice Bentéjac 2022-07-19 14:52:18 +02:00
parent 8eaef0b367
commit f2a904ac9b
2 changed files with 2 additions and 2 deletions

View file

@ -37,7 +37,7 @@ def attributeFactory(description, value, isOutput, node, root=None, parent=None)
class Attribute(BaseObject):
"""
"""
stringIsLinkRe = re.compile('^\{[A-Za-z]+[A-Za-z0-9_.]*\}$')
stringIsLinkRe = re.compile(r'^\{[A-Za-z]+[A-Za-z0-9_.]*\}$')
def __init__(self, node, attributeDesc, isOutput, root=None, parent=None):
"""

View file

@ -3,7 +3,6 @@ import logging
import math
import os
from threading import Thread
from collections import Iterable
from PySide2.QtCore import QObject, Slot, Property, Signal, QUrl, QSizeF
from PySide2.QtGui import QMatrix4x4, QMatrix3x3, QQuaternion, QVector3D, QVector2D
@ -14,6 +13,7 @@ from meshroom import multiview
from meshroom.common.qt import QObjectListModel
from meshroom.core import Version
from meshroom.core.node import Node, CompatibilityNode, Status, Position
from meshroom.core.pyCompatibility import Iterable
from meshroom.ui.graph import UIGraph
from meshroom.ui.utils import makeProperty