qgis / pyqgis-api-docs-builder

Sphinx project to build python API documentation for QGIS
https://qgis.org/pyqgis/master/
GNU General Public License v2.0
86 stars 31 forks source link

"Deprecated since version" without a version number #174

Closed agiudiceandrea closed 2 months ago

agiudiceandrea commented 2 months ago

In some case, like https://qgis.org/pyqgis/3.38/core/QgsAnnotation.html#qgis.core.QgsAnnotation.setFrameSize an incorrect phrase is displayed: Deprecated since version use: setFrameSizeMm() instead

image

While this is due to the fact that in https://github.com/qgis/QGIS/blob/2215a8c5dfacfdaf68e8643113a7f44961022660/src/core/annotations/qgsannotation.h#L192-L198 and in https://github.com/qgis/QGIS/blob/2215a8c5dfacfdaf68e8643113a7f44961022660/python/core/auto_generated/annotations/qgsannotation.sip.in#L185-L194 the QGIS version since which the method was deprecated is not indicated, anyway I think in such cases the since version part of the phrase should be omitted and the phrase should be something like Deprecated, use: setFrameSizeMm() instead or Deprecated. Use: setFrameSizeMm() instead.

nyalldawson commented 2 months ago

We could potentially just do a bulk update to add "4.0" after "\deprecated" everywhere. And then add a check to enforce proper version numbers when something new is marked deprecated.

Also https://github.com/qgis/QGIS/pull/58546 fixes some similar issues with the non deprecated since tag

agiudiceandrea commented 2 months ago

It seems to me also "\deprecated" with a version number generates an in correct phrase in PyQGIS doc, e.g.:

Deprecated since version QGIS: 3.38 use the method with a QMetaType.Type argument instead

agiudiceandrea commented 1 month ago

@nyalldawson it looks like the PyQGIS docs have still the incorrect Deprecated since version use and Deprecated since version QGIS: 3.38 use phrases in the pages https://qgis.org/pyqgis/master/core/QgsAnnotation.html#qgis.core.QgsAnnotation.setFrameSize and https://qgis.org/pyqgis/master/core/QgsField.html#qgis.core.QgsField.setSubType already reported, although the PyQGIS docs are "Last updated on 00:15 Sep 08, 2024".

nyalldawson commented 1 month ago

@agiudiceandrea we've gotta wait, they only update < weekly

agiudiceandrea commented 1 month ago

The PyQGIS page docs reports: "Last updated on 00:15 Sep 08, 2024."

nyalldawson commented 1 month ago

That's when it last ran the docs build, but the qgis build they built against is older 😂