-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port Dogtag to Python 3 #2039
Comments
Comment from cheimes (@tiran) at 2015-07-10 16:48:44 attachment |
Comment from mharmsen (@mharmsen) at 2015-07-14 00:06:16 Per CS/DS meeting of 07/13/2015: 10.3 |
Comment from cheimes (@tiran) at 2015-08-17 09:07:35 My patch sets 24-34 and 35-38 make pkispawn and pkidestroy compatible with Python 3.4. I still need to do much more testing before I can declare Dogtag fully compatible, though. |
Comment from cheimes (@tiran) at 2017-02-27 14:00:45 Metadata Update from @tiran:
|
Comment from rcritten (@rcritten) at 2018-02-01 09:10:25 This task is very important to the IPA project which has nearly completed its transition to python 3. |
Comment from edewata (@edewata) at 2018-02-19 20:21:48 Metadata Update from @edewata:
|
Comment from cheimes (@tiran) at 2018-02-21 15:33:02 Dogtag now supports Python 3 and can be build with Python 3 as default for all commands. I have tracked the changes and progress at http://pki.fedoraproject.org/wiki/PKI_10.6_Python_Support Relevant commits are: |
Comment from cheimes (@tiran) at 2018-02-21 15:33:03 Metadata Update from @tiran:
|
Comment from mharmsen (@mharmsen) at 2018-02-21 16:50:07 Metadata Update from @mharmsen:
|
Comment from mharmsen (@mharmsen) at 2018-06-29 20:30:55 Metadata Update from @mharmsen:
|
Comment from mharmsen (@mharmsen) at 2018-06-30 01:36:24 Metadata Update from @mharmsen:
|
Comment from mharmsen (@mharmsen) at 2018-06-30 01:37:35 Metadata Update from @mharmsen:
|
This issue was migrated from Pagure Issue #1480. Originally filed by cheimes (@tiran) on 2015-07-10 16:47:53:
Python 2 is the past, Python 3 is the future. Python 2 is in maintenance mode. All new features and improvements are happening in Python 3. Fedora is moving away from Python 2, too. There are plans to switch the Fedora 23 Server Live DVD to Python 3, https://fedoraproject.org/wiki/Changes/Python_3_as_Default
For Fedora 23 Dogtag must support Python 3 soon. Since Dogtag has to run on RHEL with Python 2.7, the code base has to be compatible with Python 2 and 3 at the same time. It makes the migration more smooth, too. Polyglot code can be archived with tools like six and restriction to latest versions 2.7 and 3.4. Python 3.4 has regained the u* text prefix.
Simple and mechanical tasks like the conversion of print statements to print functions can be automated with e.g. python-modernize http://python-modernize.readthedocs.org/ and
from __future__ import print_function
.tox
andpylint --py3k
help to ensure that code is compatible with 2 and 3.Risks
Dogtag has almost no unit tests for its Python code. The lack of automated tests is going to make it harder to find bugs. In my experience it will slow down the undertaking, too.
Dependencies
ldap::
python-ldap / no Python 3
lxml::
python-lxml / python3-lxml
nss::
python-nss / no Python 3
selinux::
libselinux-python / libselinux-python3
seobject::
policycoreutils-python / policycoreutils-python3
requests::
python-requests / python3-requests
Currently there is an ongoing discussion about the ldap and nss packages. Dogtag uses nss only for key wrapping and LDAP just with simple bind and limited searching. We might consider to replace nss with python-cryptography and ldap with a Python compatible LDAP adapter.
Patch
I have created a patch with python-modernize and some manual fixes. In order to test the patch, run:
The text was updated successfully, but these errors were encountered: