[QGIS-Developer] Changes in Python versions on QGIS 3.18
Pedro Camargo
c at margo.co
Thu Mar 25 15:06:20 PDT 2021
Hi Sebastian & Nyall,
It is clear that Sebastian knows a LOT more about the issues at hand than I ever will, but I think it is worthwhile to expand on the particular issues I have found regarding AequilibraE.
1. The most important functionalities of the software depend on a compiled extension that the user is asked to download after the plugin is installed, and the workflow for that dependency is still not up for Python 3.9 ( I was not aware of the rush for changing versions), and a quick look revealed deeper problems, probably related to C runtimes (I will need to ask a friend's help to solve that)
2. A few other features depend on the user augmenting the QGIS Python environment with other libraries (ORTools and openmatrix, which depends on PyTables), and some of these libraries are still not available for Python 3.9.
In a nutshell, I think Sebastian's suggestion for an upgrade policy is really helpful, as it gives us a reference to work with.
Cheers,
Pedro
---- On Fri, 26 Mar 2021 05:00:02 +1000 <qgis-developer-request at lists.osgeo.org> wrote ----
> Send QGIS-Developer mailing list submissions to
> qgis-developer at lists.osgeo.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.osgeo.org/mailman/listinfo/qgis-developer
> or, via email, send a message with subject or body 'help' to
> qgis-developer-request at lists.osgeo.org
>
> You can reach the person managing the list at
> qgis-developer-owner at lists.osgeo.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of QGIS-Developer digest..."
>
>
> Today's Topics:
>
> 1. Re: [Qgis-user] Changes in Python versions on QGIS 3.18
> (Sebastian M. Ernst)
> 2. Automating Python scripts or models (Mirco Becker)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 25 Mar 2021 12:59:28 +0100
> From: "Sebastian M. Ernst" <ernst at pleiszenburg.de>
> To: Nyall Dawson <nyall.dawson at gmail.com>
> Cc: qgis-developer <qgis-developer at lists.osgeo.org>
> Subject: Re: [QGIS-Developer] [Qgis-user] Changes in Python versions
> on QGIS 3.18
> Message-ID: <7032578d-8631-d1a1-9fc4-919b73b0b41f at pleiszenburg.de>
> Content-Type: text/plain; charset=utf-8
>
> 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 instance). However, there are always edge-cases
> in terms of behavior-changes in the interpreter, unfortunately.
>
> >From a standard-library point of view, more and more depredations from
> the earlier 3.x-days are now gradually being removed while many more
> features have recently been added to the list of deprecations. Just for
> example, 3.8 and 3.9:
>
> https://docs.python.org/3.9/whatsnew/3.8.html#api-and-feature-removals
> https://docs.python.org/3.9/whatsnew/3.9.html#removed
>
> It's not a lot of stuff, but, from experience, it always requires proper
> testing and minor fixes. Besides, there is always "this one dependency"
> which has issues and is not fixed in time.
>
> Things become a little more problematic when you are relying on the
> interpreter's internals in one way of another. Every version sees
> significant changes in its C API. If QGIS did not have any issues with
> that recently, then you are lucky. Beyond that, every version -
> especially recent ones - introduce a lot of changes at the byte-code
> level. If you are, just as an example, relying on packages like `numba`,
> which is becoming more and more common, then those byte-code-level
> changes simply mean that you are unable to move to a younger version of
> Python for quite a bit of time. As of today, strictly speaking, Python
> 3.9 has only been a "stable" option for many users for the past 9 days:
>
> https://github.com/numba/numba/issues/6345
> https://github.com/numba/numba/releases/tag/0.53.0
>
> A clear Python upgrade policy for QGIS would be really helpful, allowing
> developers to adjust their workflow accordingly. PEP 602 has recently
> introduced clear rules for Python itself, i.e. an annual schedule. It
> should be feasible to come up with a simple set of rules when QGIS
> (and/or OSGeo4W for that matter) switches to a new version of Python.
>
> https://www.python.org/dev/peps/pep-0602/
>
> Best regards,
> Sebastian
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 25 Mar 2021 18:34:46 +0100
> From: Mirco Becker <Mirco32 at gmx.de>
> To: qgis-developer at lists.osgeo.org
> Subject: [QGIS-Developer] Automating Python scripts or models
> Message-ID:
> <trinity-f8a2b901-a480-4dbf-9ce4-da8784715854-1616693686365 at msvc-mesg-gmx125>
>
> Content-Type: text/plain; charset="us-ascii"
>
> An HTML attachment was scrubbed...
> URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210325/377c4682/attachment-0001.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> ------------------------------
>
> End of QGIS-Developer Digest, Vol 185, Issue 56
> ***********************************************
>
More information about the QGIS-Developer
mailing list