Qubes and Python 3?

180 views
Skip to first unread message

Jeremias E.

unread,
Jun 9, 2016, 4:17:42 PM6/9/16
to qubes-devel
Hello,

Qubes OS uses a lot of python, but why did you decide to use python2 in 2010 and the following years?
Python3 was already available.

Is there any plan to port Qubes OS tools etc. to Pyhton 3 in the future?

Best regards
  J. Eppler

Marek Marczykowski-Górecki

unread,
Jun 9, 2016, 5:05:48 PM6/9/16
to Jeremias E., qubes-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Thu, Jun 09, 2016 at 01:17:42PM -0700, Jeremias E. wrote:
> Hello,
>
> Qubes OS uses a lot of python, but why did you decide to use python2 in
> 2010 and the following years?
> Python3 was already available.

In 2010 python3 wasn't widely supported in different libraries and also
a lot of libraries wasn't packaged for python3.

> Is there any plan to port Qubes OS tools etc. to Pyhton 3 in the future?

Yes there is such plan for Qubes 4.x.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXWdolAAoJENuP0xzK19csFwEH/jGcKwZlrBhFtbMutaN47K3P
Zbncy8Y+qjMt08RHdcHXHKznd+f4cHz5YJsGFquqqA9QaZBqPtahr1CvBbghgtce
xOTL1J38X3bnus1FD9ChewQ7hw0LlNTFNCGRc7jyEjSmg/EWja5+TQuzJWV1KsM/
0mBUO9m3l2BdpaGCq2WrCXgAHsy2vUwIxT5mXN4EIlADkTnRwqKT56Ob556XvZE5
2+04lB3nQ8fLFkzmCNfURwBhR7QoINdH0uSMbhLsAXM1R1mOrGOEgFjfyjz+j5c3
b2NVmskofU5uftsrlOglcEHDqhQXhzD6rGwdjAvIPZGqHSpU6OosKnqviO/8l88=
=8MuN
-----END PGP SIGNATURE-----

Achim Patzner

unread,
Jun 10, 2016, 3:20:07 AM6/10/16
to qubes...@googlegroups.com
Am 09.06.2016 um 23:05 schrieb Marek Marczykowski-Górecki:
> On Thu, Jun 09, 2016 at 01:17:42PM -0700, Jeremias E. wrote:
> > Is there any plan to port Qubes OS tools etc. to Pyhton 3 in the future?
> Yes there is such plan for Qubes 4.x.

Shouldn't the correct answer sound like "you're welcome to participate
in doing so"? 8-)


Achim


Jeremias E.

unread,
Jun 11, 2016, 9:17:54 AM6/11/16
to qubes-devel, j.ep...@openmailbox.org
Hello Marek,



> Is there any plan to port Qubes OS tools etc. to Pyhton 3 in the future?

Yes there is such plan for Qubes 4.x.

How does the plan look like? What is your roadmap for achieving this?

Do you consider to port or to rewrite qvm-tools?

Marek Marczykowski-Górecki

unread,
Jun 11, 2016, 9:26:31 AM6/11/16
to Jeremias E., qubes-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Most of python code will be/is rewritten in Qubes 4.0. It isn't
compatible with python 3 yet, but we're working on it.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXXBF/AAoJENuP0xzK19csTo0IAIPRHsqi3GHoOQCzv55txjVe
8TS7REIQu8OBSbhqZZZ+AUvY1xwEVnv3FD+JuVa86Ai3AdYe08TgNNNSNtgB5byF
zhyeCyJjWKz+yaUkMHceG1Vmg0Qig23KxnEpSaNl7Ko/AQWs0MEsqKnWYfMrli0j
R9amQ02Ut9yzw4U1QVaHAJ4fQTESvkZPevjpVVs8aVZhJq83qhz8gXawg/HNqF+L
N0qvNLcp1YPBhF9t1/FIGANPgv2CY3yjKSfu6YMMl4AoHptvcbfinLY1JUQB0z35
BMvJXHbRoINhlJfq0DfLaoLxVfceXZ/YghTNyxnsUPmlz3v4bDIZu/KqZYTxgRk=
=YK3Y
-----END PGP SIGNATURE-----

Jeremias E.

unread,
Jun 11, 2016, 9:40:15 AM6/11/16
to qubes-devel, j.ep...@openmailbox.org


On Saturday, June 11, 2016 at 8:26:31 AM UTC-5, Marek Marczykowski-Górecki wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sat, Jun 11, 2016 at 06:17:54AM -0700, Jeremias E. wrote:
> Hello Marek,
>
>
> > > Is there any plan to port Qubes OS tools etc. to Pyhton 3 in the future?
> >
> > Yes there is such plan for Qubes 4.x.
> >
> > How does the plan look like? What is your roadmap for achieving this?
>
> Do you consider to port or to rewrite qvm-tools?

Most of python code will be/is rewritten in Qubes 4.0. It isn't
compatible with python 3 yet, but we're working on it.

Is there anything the community could help with? Testing, porting or rewriting?
What is about documentation for API's, tools etc.?

When I was writing the Bug Report Tool I observed that many qvm-tools implement the same functionality something like
is_vm_running or does_vm_exist etc. are functions which could be placed in a module and imported by each tool.

In the case of the Bug Report Tool it would be possible to remove approx. 30% of the code by using such a module.

What is your opinion on that?

Marek Marczykowski-Górecki

unread,
Jun 11, 2016, 10:01:41 AM6/11/16
to Jeremias E., qubes-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

It is already done in Qubes 4.0 :)

Generally, development branch is here:
https://github.com/woju/qubes-core-admin/

And example tools:
https://github.com/woju/qubes-core-admin/blob/core3-devel/qubes/tools/qvm_run.py
https://github.com/woju/qubes-core-admin/blob/core3-devel/qubes/tools/qvm_pause.py

Currently some basic functionalities are missing / not completed, but
once those basics will be implemented, we'd love community help with
testing and finishing non-essential functionalities. I'd estimate it may
be available somehow next month.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXXBm9AAoJENuP0xzK19csrwwH/Aioyruz9D7xovToF7cR809j
/smRSn5ntwR9EaGvMm5VCs2OHy42dsGM+1PQzGGf2Iy/86jQwOyBTTGTe/oo2pUc
n5LoWdamxm9mqmgLapCQRycPAt2vhyLraQ2at1IqQHwUzaqb4ao+mIAh6nMJy11R
gDKbbr7YXWHzQFk2xeBlJGKW7WV+JxS9GWp1Hu5f3W6pxYpGiebfXKT2l+3thEew
zpPAcLCkcQflIhPcffb9cN/VzyG0EPt1vnt3WphpIca0XOxxMBoUWn8DzAVAUtot
ye2s03j/PvVQDDQaAeqb5ANrvLQZGllq5ESf67HoNrq8ZX8U7bZnvcgUgC5bs2s=
=rQqr
-----END PGP SIGNATURE-----

Jeremias E.

unread,
Jun 11, 2016, 10:53:04 AM6/11/16
to qubes-devel, j.ep...@openmailbox.org
Hello Marek,

thanks for the clarification.

Is there any specific reason to write:

parser = qubes.tools.QubesArgumentParser

outside of the main or any other function?

Otherwise the descision to name the module qubes and not qubes.qubes as well as the QubesArgumentParser is a good idea.

Your documentation is really nice.

The qubes.vm package contains most of the functions which are used by many VM's:
https://qubes-core-admin.readthedocs.io/en/latest/qubes-vm/qubesvm.html

Just for clarification does the new Qubes core version support python 3 or is it written in python 3?

Best regards
  J. Eppler

Marek Marczykowski-Górecki

unread,
Jun 11, 2016, 1:33:25 PM6/11/16
to Jeremias E., qubes-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sat, Jun 11, 2016 at 07:53:04AM -0700, Jeremias E. wrote:
> Hello Marek,
>
> thanks for the clarification.
>
> Is there any specific reason to write:
>
> parser = qubes.tools.QubesArgumentParser
>
> outside of the main or any other function?

This is used to generate man pages based on this parser:
http://qubes-core-admin.readthedocs.io/en/latest/manpages/qvm-run.html

> Otherwise the descision to name the module qubes and not qubes.qubes as
> well as the QubesArgumentParser is a good idea.
>
> Your documentation is really nice.
>
> The qubes.vm package contains most of the functions which are used by many
> VM's:
> https://qubes-core-admin.readthedocs.io/en/latest/qubes-vm/qubesvm.html
>
> Just for clarification does the new Qubes core version support python 3 or
> is it written in python 3?

It is currently developed in python 2.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXXEtdAAoJENuP0xzK19cs7sMH/jPQSIacRPQ1uydOrmvd1FLU
be5jjMlZVDUU+gHXZ42NoJHl6NS8sGtUiNxyMd4VdHcCwm61zT3XCpGXVyMNQxOI
8CGHJ8aUULh7kHkRP1gUBo9DG8/GKtfNnkM6g2nNlsMFnG0V6hMKa/0K4VlwKRLR
7jYSELKGpyV1jjwMxXiPmhKZeslVGKpm9wML25yEphiQ73kG9oUD2MhDowHwUWGJ
NOuZD0x4pVa8Ar50SnzBZdYpWF2eqATA0qw6HAXa4SYoBALU0PvBbtXHu6n5FDLo
Oa48TfxC7itKnM+8phVSv57fMSCGR0HNgPYqBZpZYB8fdMG4YIXGHRxupPlK9WU=
=+99J
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages