Skip to content

Commit 8cd2806

Browse files
committed
Make GSSError use the built-in metaclass syntax
Cython supports using the Python 3 syntax for setting metaclasses (even in Python 2), and is able to optimize when it is used.
1 parent 0606aaa commit 8cd2806

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

gssapi/raw/misc.pyx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ GSSAPI="BASE" # This ensures that a full module is generated by Cython
22

33
import locale # for decoding error messages
44

5-
import six
6-
75
from gssapi.raw.cython_types cimport *
86
from gssapi.raw.cython_converters cimport c_create_oid_set
97
from gssapi.raw.names cimport Name
@@ -218,8 +216,7 @@ class GSSErrorRegistry(type):
218216

219217
# NB(directxman12): this needs to be here (and not in another file)
220218
# so that display_status can use it
221-
@six.add_metaclass(GSSErrorRegistry)
222-
class GSSError(Exception):
219+
class GSSError(Exception, metaclass=GSSErrorRegistry):
223220
"""
224221
GSSAPI Error
225222

0 commit comments

Comments
 (0)