opengisch / pum

Postgres Upgrades Manager
GNU General Public License v2.0
30 stars 7 forks source link

correct min Python version #53

Closed 3nids closed 5 years ago

3nids commented 5 years ago

since merge of #50, it uses enum.IntFlag, introduced in Python 3.6 this sounds an acceptable number to me, the worst is that we drop Ubuntu 16.04 (Xenial) support, but hey, it's 3 years old, and there is a new LTS since. Also Travis supports higher version of Python on Xenial.

marioba commented 5 years ago

@3nids Personally for me it is not a problem to increase the Python's requirements. You know much better than me about projects that use pum (qwat, qgep, ...?) and you can say better than me if it can create problems. @m-kuhn do you have another opinion?

m-kuhn commented 5 years ago

OSGeo4W comes with Python 3.7, we target QGIS 3.4 which is delivered with this version. All good for me.

3nids commented 5 years ago

ok, thanks. I will re-release last one so it has the correct Python version requirements.

elemoine commented 5 years ago

@3nids @marioba @m-kuhn we want to use Pum on a Debian Jessie server which just has Python 3.4. And this change causes us trouble. Would you reconsider the use enum.IntFlag for compatibility with Python 3 < 3.6?

3nids commented 5 years ago

I wouldn't mind, but I don't think the changes are easily adaptable to 3.4?

elemoine commented 5 years ago

Can't we just use a regular class rather than inheriting from IntFlag?

class DeltaType:
    PRE = 1
    POST = 2

    PYTHON = 4
    SQL = 8

    PRE_PYTHON = PRE | PYTHON
    PRE_SQL = PRE | SQL

    POST_PYTHON = POST | PYTHON
    POST_SQL = POST | SQL

That would not make a big difference in this case, would it?