Hi,
I found that our Django vector provider written in Python does not
work anymore with QGIS 3.12.2
and Python 3.7.

I found that the problem is in QgsAbstractFeatureSource
implementation, this does not work anymore:

def getFeatures(self, request):
    return QgsFeatureIterator(MyFeatureIterator(self))

It works if I keep reference to either MyFeatureIterator or
QgsFeatureIterator, both work:

def getFeatures(self, request):
    self.iterator = MyFeatureIterator(self)
    return QgsFeatureIterator(self.iterator )

def getFeatures(self, request):
    self.iterator = QgsFeatureIterator(MyFeatureIterator(self))
    return self.iterator

Any idea why it is not working and how to implement it without keeping
reference to every new iterator?

Provider source code: https://github.com/MPASolutions/django-provider

Radim
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to