mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-24 22:27:41 -05:00
Alias "unicode" to "str" under Python 3
Follow-up to commit 23507e6124
The six way of doing this is to replace all occurences of "unicode"
with "six.text_type". However, "unicode" is non-ambiguous and
(arguably) easier to read. Also, using it makes the patches smaller,
which should help with backporting.
https://fedorahosted.org/freeipa/ticket/5623
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
1 parent
462f4a5161
commit
b2436560df
6 files changed
+27
No files matched your search
@@ -7,6 +7,8 @@ from __future__ import print_function
|
||||
import os
|
||||
import sys
|
||||
|
||||
import six
|
||||
|
||||
from ipapython.dn import DN
|
||||
from ipapython.install import common, core
|
||||
from ipapython.install.core import Knob
|
||||
@@ -14,6 +16,9 @@ from ipalib.util import validate_domain_name
|
||||
from ipaserver.install import bindinstance
|
||||
from ipapython.ipautil import check_zone_overlap
|
||||
|
||||
if six.PY3:
|
||||
unicode = str
|
||||
|
||||
VALID_SUBJECT_ATTRS = ['st', 'o', 'ou', 'dnqualifier', 'c',
|
||||
'serialnumber', 'l', 'title', 'sn', 'givenname',
|
||||
'initials', 'generationqualifier', 'dc', 'mail',
|
||||
|
||||
@@ -15,6 +15,8 @@ import socket
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
import six
|
||||
|
||||
from ipapython import ipaldap, ipautil, sysrestore
|
||||
from ipapython.dn import DN
|
||||
from ipapython.install.common import step
|
||||
@@ -40,6 +42,9 @@ from binascii import hexlify
|
||||
|
||||
from .common import BaseServer
|
||||
|
||||
if six.PY3:
|
||||
unicode = str
|
||||
|
||||
DIRMAN_DN = DN(('cn', 'directory manager'))
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ import os
|
||||
import pytest
|
||||
import tempfile
|
||||
|
||||
import six
|
||||
|
||||
from ipalib import api, errors
|
||||
from ipatests.util import (
|
||||
prepare_config, unlock_principal_password, change_principal)
|
||||
@@ -16,6 +18,9 @@ from ipatests.test_xmlrpc.tracker.caacl_plugin import CAACLTracker
|
||||
|
||||
from ipapython.ipautil import run
|
||||
|
||||
if six.PY3:
|
||||
unicode = str
|
||||
|
||||
BASE_DIR = os.path.dirname(__file__)
|
||||
|
||||
SMIME_PROFILE_TEMPLATE = os.path.join(BASE_DIR, 'data/smime.cfg.tmpl')
|
||||
|
||||
@@ -10,12 +10,15 @@ Test the `ipalib.plugins.certprofile` module.
|
||||
import os
|
||||
|
||||
import pytest
|
||||
import six
|
||||
|
||||
from ipalib import api, errors
|
||||
from ipatests.util import prepare_config
|
||||
from ipatests.test_xmlrpc.xmlrpc_test import XMLRPC_test, raises_exact
|
||||
from ipatests.test_xmlrpc.tracker.certprofile_plugin import CertprofileTracker
|
||||
|
||||
if six.PY3:
|
||||
unicode = str
|
||||
|
||||
IPA_CERT_SUBJ_BASE = (
|
||||
api.Command.config_show()
|
||||
|
||||
@@ -5,12 +5,16 @@
|
||||
|
||||
import os
|
||||
|
||||
import six
|
||||
|
||||
from ipapython.dn import DN
|
||||
from ipatests.test_xmlrpc.tracker.base import Tracker
|
||||
from ipatests.test_xmlrpc import objectclasses
|
||||
from ipatests.util import assert_deepequal
|
||||
|
||||
if six.PY3:
|
||||
unicode = str
|
||||
|
||||
|
||||
class CertprofileTracker(Tracker):
|
||||
"""Tracker class for certprofile plugin.
|
||||
|
||||
@@ -5,12 +5,17 @@
|
||||
from ipalib import api, errors
|
||||
from ipapython.dn import DN
|
||||
|
||||
import six
|
||||
|
||||
from ipatests.util import assert_deepequal, get_group_dn, get_user_dn
|
||||
from ipatests.test_xmlrpc import objectclasses
|
||||
from ipatests.test_xmlrpc.xmlrpc_test import (
|
||||
fuzzy_digits, fuzzy_uuid, raises_exact)
|
||||
from ipatests.test_xmlrpc.tracker.base import Tracker
|
||||
|
||||
if six.PY3:
|
||||
unicode = str
|
||||
|
||||
|
||||
class UserTracker(Tracker):
|
||||
""" Class for host plugin like tests """
|
||||
|
||||
Reference in new issue
Block a user