Python dependencies + CentOS 6

Cornielius,

We’re having trouble upgrading from 1.5x to 2.3 in CentOS 6. What are the
python dependencies for 2.3?

Thanks,

Kris Lou
@Kris_Lou

This breaks PI for CentOS 6, which has support for another 5 years!

Well, my personal preference is to utilize repos whenever possible, but
there’s obviously exceptions. I suppose the first question is, what
version(s) of Python are most compatible?

Kris Lou
@Kris_LouOn Tue, Jun 16, 2015 at 4:41 PM, Cornelius Kölbel < cornelius.koelbel@netknights.it> wrote:

Hi Kris,

I am really not sure if it will run with python 2.6!

So it does not like api/policy.py:523:

# combine static and dynamic policies
keys = static_pol.keys() + dynamic_pol.keys()
pol = {k: dict(static_pol.get(k, {}).items()
               + dynamic_pol.get(k, {}).items()) for k in keys}

We could however combine the two dictionaries in another way, but
I am not sure if there would be other locations it would break.
It is not actively tested with python 2.6

(Honestly I had bad conscience because it did not run under python3)

So what do you suggest?

Kind regards
Cornelius

Am Dienstag, den 16.06.2015, 16:29 -0700 schrieb Kris Lou:

We get this when running pi-manage.py under Python 2.6, CentOS 6+:

/opt/privacyIDEA2/lib/python2.6/site-packages/cryptography/init.py:25:
DeprecationWarning: Python 2.6 is no longer supported by the Python core
team, please upgrade your Python.

DeprecationWarning
Traceback (most recent call last):
File “/opt/privacyIDEA2/bin/pi-manage.py”, line 40, in
from privacyidea.app import create_app
File
"/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/app.py",
line 27, in
from privacyidea.api.system import system_blueprint
File

“/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/api/system.py”,
line 66, in

from .policy import policy_blueprint

File

“/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/api/policy.py”,
line 523

+ dynamic_pol.get(k, {}).items()) for k in keys}
                                    ^

SyntaxError: invalid syntax

No problems with Python 2.7, but upgrading Python is not fun.

Kris Lou
@Kris_Lou

On Tue, Jun 16, 2015 at 4:07 PM, Cornelius Kölbel cornelius.koelbel@netknights.it wrote:
Hi Kris,

    please note, that you need to run the database migration when
    upgrading
    from 1.5 to 2.3.
    The database migration will migrate the token table. It will
    not
    reliably migrate the configuration table, since the
    configuration was
    split from one single flat table to a more sophisticated
    database
    structure. I.e. you might need to recreate your resolver and
    realm.

    The dependencies are denoted in the requirements.txt file.

https://github.com/privacyidea/privacyidea/blob/master/requirements.txt

    Kind regards
    Cornelius


    Am Dienstag, den 16.06.2015, 15:29 -0700 schrieb Kris Lou:
    > Cornielius,
    >
    >
    > We're having trouble upgrading from 1.5x to 2.3 in CentOS 6.
    What are
    > the python dependencies for 2.3?
    >
    >
    > Thanks,
    >
    > Kris Lou
    > @Kris_Lou

    > --
    > You received this message because you are subscribed to the
    Google
    > Groups "privacyidea" group.
    > To unsubscribe from this group and stop receiving emails
    from it, send
    > an email to privacyidea+unsubscribe@googlegroups.com.
    > To post to this group, send email to
    privacyidea@googlegroups.com.
    > To view this discussion on the web visit
    >

https://groups.google.com/d/msgid/privacyidea/CAGyTNKHLgz5bcRMdurCPQoFg%2B9_GjQdyLzvCEoiA8SMdYhA_3g%40mail.gmail.com
.

    > For more options, visit https://groups.google.com/d/optout.

    --
    Cornelius Kölbel
    cornelius.koelbel@netknights.it
    +49 151 2960 1417

    NetKnights GmbH
    http://www.netknights.it
    Landgraf-Karl-Str. 19, 34131 Kassel, Germany
    Tel: +49 561 3166797, Fax: +49 561 3166798

    Amtsgericht Kassel, HRB 16405
    Geschäftsführer: Cornelius Kölbel


    --
    You received this message because you are subscribed to the
    Google Groups "privacyidea" group.
    To unsubscribe from this group and stop receiving emails from
    it, send an email to privacyidea+unsubscribe@googlegroups.com.
    To post to this group, send email to
    privacyidea@googlegroups.com.
    To view this discussion on the web visit

https://groups.google.com/d/msgid/privacyidea/1434496023.4385.14.camel%40puckel
.

    For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google
Groups “privacyidea” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/privacyidea/CAGyTNKEGD9b3rEZURSU9Rcc_H6iLerj8-w1L8QTrCbmFTKkdtA%40mail.gmail.com
.

For more options, visit https://groups.google.com/d/optout.


Cornelius Kölbel
cornelius.koelbel@netknights.it
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel


You received this message because you are subscribed to the Google Groups
"privacyidea" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/privacyidea/1434498070.4385.17.camel%40puckel
.
For more options, visit https://groups.google.com/d/optout.

Hi Kris,

please note, that you need to run the database migration when upgrading
from 1.5 to 2.3.
The database migration will migrate the token table. It will not
reliably migrate the configuration table, since the configuration was
split from one single flat table to a more sophisticated database
structure. I.e. you might need to recreate your resolver and realm.

The dependencies are denoted in the requirements.txt file.

Kind regards
CorneliusAm Dienstag, den 16.06.2015, 15:29 -0700 schrieb Kris Lou:

Cornielius,

We’re having trouble upgrading from 1.5x to 2.3 in CentOS 6. What are
the python dependencies for 2.3?

Thanks,

Kris Lou
klou@themusiclink.net

You received this message because you are subscribed to the Google
Groups “privacyidea” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/privacyidea/CAGyTNKHLgz5bcRMdurCPQoFg%2B9_GjQdyLzvCEoiA8SMdYhA_3g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Cornelius Kölbel
@cornelinux
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel

signature.asc (819 Bytes)

We get this when running pi-manage.py under Python 2.6, CentOS 6+:

/opt/privacyIDEA2/lib/python2.6/site-packages/cryptography/init.py:25:
DeprecationWarning: Python 2.6 is no longer supported by the Python core
team, please upgrade your Python.
DeprecationWarning
Traceback (most recent call last):
File “/opt/privacyIDEA2/bin/pi-manage.py”, line 40, in
from privacyidea.app import create_app
File “/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/app.py”,
line 27, in
from privacyidea.api.system import system_blueprint
File
"/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/api/system.py",
line 66, in
from .policy import policy_blueprint
File
"/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/api/policy.py",
line 523
+ dynamic_pol.get(k, {}).items()) for k in keys}
^
SyntaxError: invalid syntax

No problems with Python 2.7, but upgrading Python is not fun.

Kris Lou
@Kris_LouOn Tue, Jun 16, 2015 at 4:07 PM, Cornelius Kölbel < cornelius.koelbel@netknights.it> wrote:

Hi Kris,

please note, that you need to run the database migration when upgrading
from 1.5 to 2.3.
The database migration will migrate the token table. It will not
reliably migrate the configuration table, since the configuration was
split from one single flat table to a more sophisticated database
structure. I.e. you might need to recreate your resolver and realm.

The dependencies are denoted in the requirements.txt file.
https://github.com/privacyidea/privacyidea/blob/master/requirements.txt

Kind regards
Cornelius

Am Dienstag, den 16.06.2015, 15:29 -0700 schrieb Kris Lou:

Cornielius,

We’re having trouble upgrading from 1.5x to 2.3 in CentOS 6. What are
the python dependencies for 2.3?

Thanks,

Kris Lou
@Kris_Lou

You received this message because you are subscribed to the Google
Groups “privacyidea” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/privacyidea/CAGyTNKHLgz5bcRMdurCPQoFg%2B9_GjQdyLzvCEoiA8SMdYhA_3g%40mail.gmail.com
.

For more options, visit https://groups.google.com/d/optout.


Cornelius Kölbel
cornelius.koelbel@netknights.it
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel


You received this message because you are subscribed to the Google Groups
"privacyidea" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/privacyidea/1434496023.4385.14.camel%40puckel
.
For more options, visit https://groups.google.com/d/optout.

Hi Kris,

I am really not sure if it will run with python 2.6!

So it does not like api/policy.py:523:

# combine static and dynamic policies
keys = static_pol.keys() + dynamic_pol.keys()
pol = {k: dict(static_pol.get(k, {}).items()
               + dynamic_pol.get(k, {}).items()) for k in keys}

We could however combine the two dictionaries in another way, but
I am not sure if there would be other locations it would break.
It is not actively tested with python 2.6

(Honestly I had bad conscience because it did not run under python3)

So what do you suggest?

Kind regards
CorneliusAm Dienstag, den 16.06.2015, 16:29 -0700 schrieb Kris Lou:

We get this when running pi-manage.py under Python 2.6, CentOS 6+:

/opt/privacyIDEA2/lib/python2.6/site-packages/cryptography/init.py:25: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python.
DeprecationWarning
Traceback (most recent call last):
File “/opt/privacyIDEA2/bin/pi-manage.py”, line 40, in
from privacyidea.app import create_app
File
“/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/app.py”,
line 27, in
from privacyidea.api.system import system_blueprint
File
“/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/api/system.py”, line 66, in
from .policy import policy_blueprint
File
“/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/api/policy.py”, line 523
+ dynamic_pol.get(k, {}).items()) for k in keys}
^
SyntaxError: invalid syntax

No problems with Python 2.7, but upgrading Python is not fun.

Kris Lou
klou@themusiclink.net

On Tue, Jun 16, 2015 at 4:07 PM, Cornelius Kölbel <@cornelinux> wrote:
Hi Kris,

    please note, that you need to run the database migration when
    upgrading
    from 1.5 to 2.3.
    The database migration will migrate the token table. It will
    not
    reliably migrate the configuration table, since the
    configuration was
    split from one single flat table to a more sophisticated
    database
    structure. I.e. you might need to recreate your resolver and
    realm.
    
    The dependencies are denoted in the requirements.txt file.
    https://github.com/privacyidea/privacyidea/blob/master/requirements.txt
    
    Kind regards
    Cornelius
    
    
    Am Dienstag, den 16.06.2015, 15:29 -0700 schrieb Kris Lou:
    > Cornielius,
    >
    >
    > We're having trouble upgrading from 1.5x to 2.3 in CentOS 6.
    What are
    > the python dependencies for 2.3?
    >
    >
    > Thanks,
    >
    > Kris Lou
    > klou@themusiclink.net
    
    > --
    > You received this message because you are subscribed to the
    Google
    > Groups "privacyidea" group.
    > To unsubscribe from this group and stop receiving emails
    from it, send
    > an email to privacyidea+unsubscribe@googlegroups.com.
    > To post to this group, send email to
    privacyidea@googlegroups.com.
    > To view this discussion on the web visit
    >
    https://groups.google.com/d/msgid/privacyidea/CAGyTNKHLgz5bcRMdurCPQoFg%2B9_GjQdyLzvCEoiA8SMdYhA_3g%40mail.gmail.com.
    > For more options, visit https://groups.google.com/d/optout.
    
    --
    Cornelius Kölbel
    @cornelinux
    +49 151 2960 1417
    
    NetKnights GmbH
    http://www.netknights.it
    Landgraf-Karl-Str. 19, 34131 Kassel, Germany
    Tel: +49 561 3166797, Fax: +49 561 3166798
    
    Amtsgericht Kassel, HRB 16405
    Geschäftsführer: Cornelius Kölbel
    
    
    --
    You received this message because you are subscribed to the
    Google Groups "privacyidea" group.
    To unsubscribe from this group and stop receiving emails from
    it, send an email to privacyidea+unsubscribe@googlegroups.com.
    To post to this group, send email to
    privacyidea@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/privacyidea/1434496023.4385.14.camel%40puckel.
    For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google
Groups “privacyidea” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/privacyidea/CAGyTNKEGD9b3rEZURSU9Rcc_H6iLerj8-w1L8QTrCbmFTKkdtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Cornelius Kölbel
@cornelinux
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel

signature.asc (819 Bytes)

Hi Kris,

privacyIDEA definitively does not run with python 2.6.
The change from 1.5 to 2.0 was a major rewrite and the decision was made
for a more modern and reliable design, which came with some
dependencies, so that 2.6 can not be supported anymore, easily.

I know, that it runs on 2.7.3, 2.7.6 and 2.7.9. So take it, that it runs
with 2.7.x

It is correct, that CentOS has up to 10 years of support of one
release. This is the main idea behind CentOS.

This is not the idea behind privacyIDEA.
I understand that in certain cases having a longer support is necessary.
(You probably could get BUGFIXING for privacyIDEA 1.5 for ten years,
too)
But this can not be assured by such an open source project. And again
this is not the main scope of this project.

And this is why there is professional Support available, to cover all
those needs.
https://netknights.it/en/leistungen/support/

Nevertheless, you might take a look at pythonbrew, install 2.7 in a
local directory and create a virtualenv with 2.7.

Kind regards
CorneliusAm Dienstag, den 16.06.2015, 16:54 -0700 schrieb Kris Lou:

This breaks PI for CentOS 6, which has support for another 5 years!

Well, my personal preference is to utilize repos whenever possible,
but there’s obviously exceptions. I suppose the first question is,
what version(s) of Python are most compatible?

Kris Lou
klou@themusiclink.net

On Tue, Jun 16, 2015 at 4:41 PM, Cornelius Kölbel <@cornelinux> wrote:
Hi Kris,

    I am really not sure if it will run with python 2.6!
    
    So it does not like api/policy.py:523:
    
        # combine static and dynamic policies
        keys = static_pol.keys() + dynamic_pol.keys()
        pol = {k: dict(static_pol.get(k, {}).items()
                       + dynamic_pol.get(k, {}).items()) for k in
    keys}
    
    We could however combine the two dictionaries in another way,
    but
    I am not sure if there would be other locations it would
    break.
    It is not actively tested with python 2.6
    
    (Honestly I had bad conscience because it did not run under
    python3)
    
    So what do you suggest?
    
    Kind regards
    Cornelius 
    
    Am Dienstag, den 16.06.2015, 16:29 -0700 schrieb Kris Lou:
    > We get this when running pi-manage.py under Python 2.6,
    CentOS 6+:
    >
    >
    > /opt/privacyIDEA2/lib/python2.6/site-packages/cryptography/__init__.py:25: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python.
    >   DeprecationWarning
    > Traceback (most recent call last):
    >   File "/opt/privacyIDEA2/bin/pi-manage.py", line 40, in
    <module>
    >     from privacyidea.app import create_app
    >   File
    >
    "/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/app.py",
    > line 27, in <module>
    >     from privacyidea.api.system import system_blueprint
    >   File
    >
    "/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/api/system.py", line 66, in <module>
    >     from .policy import policy_blueprint
    >   File
    >
    "/opt/privacyIDEA2/lib/python2.6/site-packages/privacyidea/api/policy.py", line 523
    >     + dynamic_pol.get(k, {}).items()) for k in keys}
    >                                         ^
    > SyntaxError: invalid syntax
    >
    >
    > No problems with Python 2.7, but upgrading Python is not
    fun.
    >
    >
    > Kris Lou
    > klou@themusiclink.net
    >
    > On Tue, Jun 16, 2015 at 4:07 PM, Cornelius Kölbel <@cornelinux> wrote:
    >         Hi Kris,
    >
    >         please note, that you need to run the database
    migration when
    >         upgrading
    >         from 1.5 to 2.3.
    >         The database migration will migrate the token table.
    It will
    >         not
    >         reliably migrate the configuration table, since the
    >         configuration was
    >         split from one single flat table to a more
    sophisticated
    >         database
    >         structure. I.e. you might need to recreate your
    resolver and
    >         realm.
    >
    >         The dependencies are denoted in the requirements.txt
    file.
    >
     https://github.com/privacyidea/privacyidea/blob/master/requirements.txt
    >
    >         Kind regards
    >         Cornelius
    >
    >
    >         Am Dienstag, den 16.06.2015, 15:29 -0700 schrieb
    Kris Lou:
    >         > Cornielius,
    >         >
    >         >
    >         > We're having trouble upgrading from 1.5x to 2.3 in
    CentOS 6.
    >         What are
    >         > the python dependencies for 2.3?
    >         >
    >         >
    >         > Thanks,
    >         >
    >         > Kris Lou
    >         > klou@themusiclink.net
    >
    >         > --
    >         > You received this message because you are
    subscribed to the
    >         Google
    >         > Groups "privacyidea" group.
    >         > To unsubscribe from this group and stop receiving
    emails
    >         from it, send
    >         > an email to privacyidea
    +unsubscribe@googlegroups.com.
    >         > To post to this group, send email to
    >         privacyidea@googlegroups.com.
    >         > To view this discussion on the web visit
    >         >
    >
     https://groups.google.com/d/msgid/privacyidea/CAGyTNKHLgz5bcRMdurCPQoFg%2B9_GjQdyLzvCEoiA8SMdYhA_3g%40mail.gmail.com.
    >         > For more options, visit
    https://groups.google.com/d/optout.
    >
    >         --
    >         Cornelius Kölbel
    >         @cornelinux
    >         +49 151 2960 1417
    >
    >         NetKnights GmbH
    >         http://www.netknights.it
    >         Landgraf-Karl-Str. 19, 34131 Kassel, Germany
    >         Tel: +49 561 3166797, Fax: +49 561 3166798
    >
    >         Amtsgericht Kassel, HRB 16405
    >         Geschäftsführer: Cornelius Kölbel
    >
    >
    >         --
    >         You received this message because you are subscribed
    to the
    >         Google Groups "privacyidea" group.
    >         To unsubscribe from this group and stop receiving
    emails from
    >         it, send an email to privacyidea
    +unsubscribe@googlegroups.com.
    >         To post to this group, send email to
    >         privacyidea@googlegroups.com.
    >         To view this discussion on the web visit
    >
     https://groups.google.com/d/msgid/privacyidea/1434496023.4385.14.camel%40puckel.
    >         For more options, visit
    https://groups.google.com/d/optout.
    >
    >
    > --
    > You received this message because you are subscribed to the
    Google
    > Groups "privacyidea" group.
    > To unsubscribe from this group and stop receiving emails
    from it, send
    > an email to privacyidea+unsubscribe@googlegroups.com.
    > To post to this group, send email to
    privacyidea@googlegroups.com.
    > To view this discussion on the web visit
    
    >
    https://groups.google.com/d/msgid/privacyidea/CAGyTNKEGD9b3rEZURSU9Rcc_H6iLerj8-w1L8QTrCbmFTKkdtA%40mail.gmail.com.
    > For more options, visit https://groups.google.com/d/optout.
    
    --
    Cornelius Kölbel
    @cornelinux
    +49 151 2960 1417
    
    NetKnights GmbH
    http://www.netknights.it
    Landgraf-Karl-Str. 19, 34131 Kassel, Germany
    Tel: +49 561 3166797, Fax: +49 561 3166798
    
    Amtsgericht Kassel, HRB 16405
    Geschäftsführer: Cornelius Kölbel
    
    
    --
    You received this message because you are subscribed to the
    Google Groups "privacyidea" group.
    To unsubscribe from this group and stop receiving emails from
    it, send an email to privacyidea+unsubscribe@googlegroups.com.
    To post to this group, send email to
    privacyidea@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/privacyidea/1434498070.4385.17.camel%40puckel. 
    For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google
Groups “privacyidea” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/privacyidea/CAGyTNKEJKUDundiJCuXV12jw30o0N%3D6SVyQSWk-nfCjysDEvRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Cornelius Kölbel
@cornelinux
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel


Cornelius Kölbel
@cornelinux
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel

signature.asc (819 Bytes)