Re: [QGIS-Developer] sip build err on Debian Testing?

2021-11-06 Thread Sebastian M. Ernst
Am 05.11.21 um 14:48 schrieb Sebastiaan Couwenberg: > [...] > It takes about 3 hours to build qgis on my system, and since this > failures happens at 97% it takes a lot of time to troubleshoot this issue. I am lacking time to look into this but I could offer a fast Ubuntu-20.4-based build server

Re: [QGIS-Developer] Multiprocessing

2021-08-16 Thread Sebastian M. Ernst
Hi Joao, see this earlier (March 2021) discussion on this very mailing list: https://lists.osgeo.org/pipermail/qgis-developer/2021-March/063359.html The current state-of-the-art plus examples and limitations is documented here: https://lists.osgeo.org/pipermail/qgis-developer/2021-March/063430.

Re: [QGIS-Developer] Multiprocessing QGIS

2021-03-30 Thread Sebastian M. Ernst
Hi all, Am 29.03.21 um 01:17 schrieb Nyall Dawson: > [...] So it's quite straightforward to use > multiprocessing in PyQGIS via the Qt methods and do things like > calculating intersections for different objects across multiple > threads at once without having to worry about the GIL at all... I h

Re: [QGIS-Developer] Changes in Python versions on QGIS 3.18

2021-03-26 Thread Sebastian M. Ernst
Hi Nyall, >> Until recently [2], such a constraint did not even exist [3] (other than >> a rather broad "Python 3.X"). Now, you're technically sort of supporting >> 3.7 to 3.9, although it has not been documented anywhere as far as I >> know other than in PRs and issues etc. - please correct me if

Re: [QGIS-Developer] Changes in Python versions on QGIS 3.18

2021-03-26 Thread Sebastian M. Ernst
Hi Nyall, > we have absolutely no control > over the python versions used by many QGIS users. E.g. as a Fedora > user I've had Python 3.9 for months is not it safe to say that a clear majority of the user base is running Windows where you do have full control? Besides, even in the Linux space, h

Re: [QGIS-Developer] [Qgis-user] Changes in Python versions on QGIS 3.18

2021-03-25 Thread Sebastian M. Ernst
Hi Nyall, > I'm curious -- what's the pain in a Python update? They usually have > very little harmful impact on python code. from a syntactical point of view, the language is usually only extended - here, you are right for the most part (except for younger features like the async stuff for insta

Re: [QGIS-Developer] asyncio in plugins?

2021-03-23 Thread Sebastian M. Ernst
Hi David, I suspected this much. In theory, I can move the event loop into a separate thread [1, 2] - this should allow QGIS' event loop to continue running and accepting input etc. I am *guessing* that this can be made work. Question: Has someone around here actually tried it before? Best regard

[QGIS-Developer] asyncio in plugins?

2021-03-23 Thread Sebastian M. Ernst
Hi all, has anyone made any (positive or negative) experiences with using `asyncio`-enabled [1] code in QGIS plugins? Best regards, Sebastian 1: https://docs.python.org/3/library/asyncio.html ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.

Re: [QGIS-Developer] Multiprocessing QGIS

2021-03-23 Thread Sebastian M. Ernst
Hi João, all, really interesting question. > however when i run the plugin a new instance of application is open > and give me an error. I assume that you are using `multiprocessing` [1] from Python's standard library. Its default behavior is to use process-based parallelism (as the title in the

Re: [QGIS-Developer] QGIS, DateTime and TimeZones

2020-09-09 Thread Sebastian M. Ernst
Hi all, if you're going down the path of adding support for time zone information, there is one thing that is not clear to me: If you are planning to rely on "QDateTime" (i.e. Qt) for this purpose, you're getting time zones based on UTC, but you're lacking support for UT1, i.e. leap seconds and re

Re: [QGIS-Developer] Interpretation of qgisMaximumVersion in metadata.txt

2020-08-01 Thread Sebastian M. Ernst
Hi Borys, all, > Actually it was never properly synchronized between the installer and > the repo. which adds another question ... how is the repo (i.e. QGIS-Django?) handling it? > For the installer, both lower and upper boudary are included, so it makes > more sense to set it to 3.98 rather t

[QGIS-Developer] Interpretation of qgisMaximumVersion in metadata.txt

2020-07-31 Thread Sebastian M. Ernst
Hi all, (hopefully) simple question: Is the version of QGIS indicated by `qgisMaximumVersion` in plugins' metadata assumed to be compatible? Or is it (under certain circumstances perhaps) an excluded upper boundary as in `[qgisMinimumVersion,qgisMaximumVersion)` in mathematical terms? For further

[QGIS-Developer] "atlasprint" plugin, version 3.1.0, is listed as available - download throws HTTP 404

2020-07-29 Thread Sebastian M. Ernst
Just a small find: "atlasprint" version 3.1.0 is listed as available for QGIS >= 3.0. Trying to grab it via its download URL throws HTTP 404. Verify with: wget --user-agent="QGIS" https://plugins.qgis.org/plugins/atlasprint/version/v3.1.0/download/ Excerpt from `plugins.xml`: ```

[QGIS-Developer] `package_name` parameter of `plugins.xml` broken or removed?

2020-07-29 Thread Sebastian M. Ernst
Hi all, one of the more recent updates to QGIS-Django appears to have broken the `package_name` parameter of `plugins.xml`. Before, the following query would yield a list of ALL compatible versions of "someplugin" (and nothing else): https://plugins.qgis.org/plugins/plugins.xml?package_name=some

[QGIS-Developer] Python's "optimized mode" and type checks

2020-07-15 Thread Sebastian M. Ernst
Hi all, have there ever been considerations with respect to QGIS' Python integration and Python's "optimized" mode [see 1, 2, 3]? In a nutshell, the only real-world implication of this mode is the fact the Python begins to ignore "assert" statements completely. They are not anymore executed. Unfo

Re: [QGIS-Developer] Online Q&A plus discussion session - QEP 179 (Turning Plugin Management into Actual Package Management)

2020-06-03 Thread Sebastian M. Ernst
bastian M. Ernst: > And we are online NOW. > > > Am 03.06.20 um 11:52 schrieb Sebastian M. Ernst: >> Hi all, >> >> I am going to try a public Jitsi [1] server for this occasion: >> >> URL: https://jitsi.hamburg.ccc.de/qgis_qep_179 >> Password: qep17

Re: [QGIS-Developer] Online Q&A plus discussion session - QEP 179 (Turning Plugin Management into Actual Package Management)

2020-06-03 Thread Sebastian M. Ernst
And we are online NOW. Am 03.06.20 um 11:52 schrieb Sebastian M. Ernst: > Hi all, > > I am going to try a public Jitsi [1] server for this occasion: > > URL: https://jitsi.hamburg.ccc.de/qgis_qep_179 > Password: qep179 > > Jitsi works best with browsers based on web

Re: [QGIS-Developer] Online Q&A plus discussion session - QEP 179 (Turning Plugin Management into Actual Package Management)

2020-06-03 Thread Sebastian M. Ernst
, please get in touch. Talk to you in 2 hours. Best regards, Sebastian 1: https://en.wikipedia.org/wiki/Jitsi 2: https://en.wikipedia.org/wiki/WebKit Am 02.06.20 um 18:23 schrieb Sebastian M. Ernst: > Hi all, > > there is a bit of a consensus building towards tomorrow, Wednesday, June >

Re: [QGIS-Developer] Online Q&A plus discussion session - QEP 179 (Turning Plugin Management into Actual Package Management)

2020-06-02 Thread Sebastian M. Ernst
to send an open invitation via this mailing list. Best regards, Sebastian Am 02.06.20 um 10:48 schrieb Sebastian M. Ernst: > Hi all, > > this is a friendly reminder: I am trying to organize an online > discussion session on QEP 179. If you are interested in joining, please > l

Re: [QGIS-Developer] Online Q&A plus discussion session - QEP 179 (Turning Plugin Management into Actual Package Management)

2020-06-02 Thread Sebastian M. Ernst
Hi all, this is a friendly reminder: I am trying to organize an online discussion session on QEP 179. If you are interested in joining, please let me know what times fit best. https://terminplaner4.dfn.de/wulb19ehAr8rSv9W Best regards, Sebastian Am 29.05.20 um 21:42 schrieb Sebastian M. Ernst

[QGIS-Developer] Online Q&A plus discussion session - QEP 179 (Turning Plugin Management into Actual Package Management)

2020-05-29 Thread Sebastian M. Ernst
n.de/wulb19ehAr8rSv9W Thanks & regards, Sebastian Am 21.05.20 um 21:33 schrieb Sebastian M. Ernst: > Hi all, > > please see https://github.com/qgis/QGIS-Enhancement-Proposals/issues/179 > for a proposal to add `pip` and `conda` support to QGIS, i.e. turning > the current plugin

Re: [QGIS-Developer] Python Plugins external libs

2020-05-29 Thread Sebastian M. Ernst
Hi Michał, I was waiting for any of the QGIS developers to comment on this ... A collection of common, bad approaches can be found here [1]. Bottom line: There is no clean way to do it. I recently wrote a summary of the situation and those approaches, see here [2]. I also released an official QGIS

Re: [QGIS-Developer] Profiler?

2020-05-24 Thread Sebastian M. Ernst
Hi all, > [...] > https://gitlab.com/GIS-projects/Plugin-Load-Times > [...] > > Or the newer, more Pythonic way: > >with QgsRuntimeProfiler.profile('loading something'): > # do some stuff > > I'd encourage plugin authors to use this in their plugins > initialisation

Re: [QGIS-Developer] Profiler?

2020-05-23 Thread Sebastian M. Ernst
Hi Nyall, Richard, Nathan, > Yeah! Full credit goes to Nathan Woodrow here, this panel just exposes > a profiling tool he added a while back. I did not know that. Amazing tool. >> I do have an issue with long startup times on Windows at a client >> working with a cytrix setup (though I guess it

[QGIS-Developer] New QEP: Turning Plugin Management into Actual Package Management

2020-05-21 Thread Sebastian M. Ernst
Hi all, please see https://github.com/qgis/QGIS-Enhancement-Proposals/issues/179 for a proposal to add `pip` and `conda` support to QGIS, i.e. turning the current plugin management into actual package management. https://github.com/qgis/QGIS-Enhancement-Proposals/issues/179 Following up on this

Re: [QGIS-Developer] Understanding inter-plugin dependencies and plugin loading - what can a plugin expect from a dependency?

2020-04-29 Thread Sebastian M. Ernst
Hi Alessandro, thanks for the answer! > [...] it is probably useful to distinguish two situations: > > 1. installation of a plugin that depends on another one > 2. plugin loading when QGIS application start Yes, exactly. I am interested in situation 2 and all of its associated edge cases. > Fo

Re: [QGIS-Developer] Understanding inter-plugin dependencies and plugin loading - what can a plugin expect from a dependency?

2020-04-28 Thread Sebastian M. Ernst
46 schrieb Sebastian M. Ernst: > Hi all, > > working my way through the current plugin (dependency) installer > mechanism, I have a few questions. > > Bottom line: What kind of assumptions can a plugin safely make about its > dependencies and their initialization (from QGIS&

[QGIS-Developer] Understanding inter-plugin dependencies and plugin loading - what can a plugin expect from a dependency?

2020-04-23 Thread Sebastian M. Ernst
Hi all, working my way through the current plugin (dependency) installer mechanism, I have a few questions. Bottom line: What kind of assumptions can a plugin safely make about its dependencies and their initialization (from QGIS' perspective)? Imagine two plugins: "PluginA" and "PluginB". Plugi

[QGIS-Developer] Experience with coverage.py?

2020-04-14 Thread Sebastian M. Ernst
Hi all, has someone by any chance been trying or even successfully using `coverage.py` (1) inside QGIS' Python code and/or plugins and could share some experience? For me, it works, sometimes, with plenty of edge cases ... I am basically running into all sorts of wired issues - presumably due to

[QGIS-Developer] Understanding plugin dependencies (and plugins.xml)

2020-04-12 Thread Sebastian M. Ernst
Hi all, still working on plugin management, I came across another question regarding meta data. Plugins can have "plugin dependencies" as detailed in the change log for 3.8: https://qgis.org/en/site/forusers/visualchangelog38/#feature-support-for-plugin-dependencies The name of the field in `met

Re: [QGIS-Developer] plugins.qgis.org API: Get all available versions of a plugin?

2020-04-02 Thread Sebastian M. Ernst
@FS, thanks for your reply. I already expected that I had to parse the HTML ... @all, How hard is it to patch this feature into the current infrastructure? Is it more a coding issue or a server resource issue (i.e. handling such requests)? Reading `/qgis-app/plugins/urls.py` and `/qgis-app/plug

[QGIS-Developer] plugins.qgis.org API: Get all available versions of a plugin?

2020-04-02 Thread Sebastian M. Ernst
Hi all, yet another question on plugins: `plugins.qgis.org` has an API which lists all available plugins for a specific version of QGIS. Query syntax: https://plugins.qgis.org/plugins/plugins.xml?qgis=x.y.y It appears that this API will always return information on *the latest* release of a plug

[QGIS-Developer] Boolean values vs. strings in QgsSettings and plugin meta data

2020-04-01 Thread Sebastian M. Ernst
Hi all, just seeking some clarification: There are plenty of places in QGIS where Boolean values are derived from strings or converted to strings. I have been mainly looking at the use in QgsSettings and plugin meta data. So there are a few formats ... "yes"/"no", "1"/"0", "true"/"false", "True"/

Re: [QGIS-Developer] Understanding plugin management in QGIS: Meta data fields

2020-04-01 Thread Sebastian M. Ernst
Hi Etienne, Nyall, thanks for your replies. >> Then a plugin can have or not a processing provider (not related to the >> statement before). > > Just to expand on this -- this tag was added to aid in > https://github.com/qgis/QGIS/pull/34617 , [...] Ok, this makes sense. I just tried to trace

[QGIS-Developer] Understanding plugin management in QGIS: Meta data fields

2020-03-31 Thread Sebastian M. Ernst
Hi everyone, I am still trying to wrap my head around plugin management. Looking at (Python) plugin metadata, I have a few questions. The meta data contains the fields `experimental` and `deprecated`. Having written plugins, I believe that certain versions of a plugin (but not "the entire plugin"

Re: [QGIS-Developer] Understanding plugin management in QGIS - exposing QgsPluginRegistry to Python?

2020-03-16 Thread Sebastian M. Ernst
Hi Oliver, > I'd suggest drafting a QEP already, as adding support for pip/conda > dependencies (which would be awesome !!) raises a few important > questions (for example whether we have virtualenvs or similar on all > systems, how plugins would declare their deps, how to deal with > incompatible

Re: [QGIS-Developer] Understanding plugin management in QGIS - exposing QgsPluginRegistry to Python?

2020-03-16 Thread Sebastian M. Ernst
Hi Nyall, Paolo, Alexander, Javier, > The issues we see most often stem not from any particular use of > Python, but (as Matthias has pointed out) through the nature of > Pythons weak typing and lack of compile time checks. A simple example: > if I alter the signature of a virtual method in one of

Re: [QGIS-Developer] Understanding plugin management in QGIS - exposing QgsPluginRegistry to Python?

2020-03-15 Thread Sebastian M. Ernst
Hi Matthias, > Have a look at all the issues on db manager for example. Many of them > are caused by duck-typing, interfaces not being implemented (properly) > by subclasses, pieces that have been forgotten during refactoring ... thanks for the directions, I will look into it. > I would like it

Re: [QGIS-Developer] Understanding plugin management in QGIS - exposing QgsPluginRegistry to Python?

2020-03-15 Thread Sebastian M. Ernst
Hi Borys, Nyall, Matthias, thanks all for your replies! Let me address some of the points/concerns raised. > Actually, over time we've found that the opposite is true -- the > Python code in QGIS master is the **most** work to maintain, and a > constant source of regressions. That's due to the na

[QGIS-Developer] Understanding plugin management in QGIS - exposing QgsPluginRegistry to Python?

2020-03-14 Thread Sebastian M. Ernst
Hi folks, out of curiosity I have started poking around in QGIS' code related to plugin management. It's an interesting mix of C++ and Python code. Even the plugin management GUI itself is partially C++ (the main window, QgsPluginManager[Interface], and part of its logic) and partially Python (all

[QGIS-Developer] Minimum version of Python 3?

2020-03-11 Thread Sebastian M. Ernst
Hi folks, as far as I can tell from the documentation, QGIS compiles with Python 3.X. Maybe I am overlooking something, but I have not seen a restriction such as e.g. Python 3.5 or greater for QGIS 3.12. What's the minimum Python version that should assume when writing Python code for plugins or

[QGIS-Developer] How can I determine whether the QGIS interface is completely initialized?

2019-09-09 Thread Sebastian M. Ernst
Hi all, I have a plugin that depends on the `initializationCompleted` signal from the `iface` object for initialization. It only works properly if the QGIS interface is completely initialized. Problem: My plugin can be loaded after `initializationCompleted` has been triggered, e.g. if it is insta

Re: [QGIS-Developer] How can I connect to events in a QGIS main window from a Python plugin - or: How can I trigger a function once the main window has actually been displayed?

2019-09-03 Thread Sebastian M. Ernst
schrieb Jürgen E. Fischer: > Hi Sebastian, > > On Sat, 17. Aug 2019 at 11:25:59 +0200, Sebastian M. Ernst wrote: >> in a QGIS Python plugin, I want to run a function (a single time) when >> the QGIS main window has actually been displayed / fully loaded. > > iface has a sig

[QGIS-Developer] How can I connect to events in a QGIS main window from a Python plugin - or: How can I trigger a function once the main window has actually been displayed?

2019-08-17 Thread Sebastian M. Ernst
Hi all, in a QGIS Python plugin, I want to run a function (a single time) when the QGIS main window has actually been displayed / fully loaded. `initGui` appears to run "long" before the main window is actually being displayed and ready. My only viable idea so far has been to attach an event filte

[QGIS-Developer] Canonical way to customize QGis toolbar icons within themes?

2019-04-10 Thread Sebastian M. Ernst
Hi all, I am looking for a/the canonical way to customize QGis toolbar icons (or, in general, the icons of certain actions throughout QGis), like for instance the icons for "New project" or "Open project" as part of a theme. Themes can contain icons and reference them, see for instance here: http

Re: [Qgis-developer] qgis 2.6.1 does not compile - error related to Python

2014-12-23 Thread Sebastian M. Ernst
/python2.7 -D PYTHON_INCLUDE_PATH=/usr/local/include/python2.7/ -D PYTHON_LIBRARY=/usr/local/lib/libpython2.7.so .. Regards, Sebastian Am 23.12.2014 um 18:50 schrieb Sebastian M. Ernst: > Hi all, > > I am running into some odd error related to Python while trying to > compile QGI

[Qgis-developer] qgis 2.6.1 does not compile - error related to Python

2014-12-23 Thread Sebastian M. Ernst
Hi all, I am running into some odd error related to Python while trying to compile QGIS 2.6.1 from source on Linux-x86 using GCC 4.5.0. I can only guess that I made a mistake of some sort when I compiled and installed Python 2.7.9 in parallel to my Linux distribution's original Python 2.6.5 previo