Skip to content

Commit 3724894

Browse files
committed
Tidy up docs and turn warnings into errors
Signed-off-by: Jordan Borean <[email protected]>
1 parent 2bccab4 commit 3724894

30 files changed

+538
-392
lines changed

Diff for: README.txt

+4
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,14 @@ Extensions
143143

144144
In addition to RFC 2743/2744, Python-GSSAPI also has support for:
145145

146+
* RFC 4178 (GSS-API Negotiation Mechanism)
147+
146148
* RFC 5587 (Extended GSS Mechanism Inquiry APIs)
147149

148150
* RFC 5588 (GSS-API Extension for Storing Delegated Credentials)
149151

152+
* RFC 5801 (GSS-API SASL Extensions)
153+
150154
* (Additional) Credential Store Extension
151155

152156
* Services4User

Diff for: docs/source/_static/.keep

Whitespace-only changes.

Diff for: docs/source/gssapi.raw.rst

+42
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,34 @@ The following is a list of GSSAPI extensions supported by the low-level API.
7777
be compiled, and will simply not be available in the :mod:`gssapi.raw`
7878
namespace.
7979

80+
:rfc:`4178` (GSS-API Negotiation Mechanism)
81+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82+
83+
.. automodule:: gssapi.raw.ext_rfc4178
84+
:members:
85+
:undoc-members:
86+
87+
:rfc:`5587` (GSS-API Extension for Mech Attributes)
88+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89+
90+
.. automodule:: gssapi.raw.ext_rfc5587
91+
:members:
92+
:undoc-members:
93+
8094
:rfc:`5588` (GSS-API Extension for Storing Delegated Credentials)
8195
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8296

8397
.. automodule:: gssapi.raw.ext_rfc5588
8498
:members:
8599
:undoc-members:
86100

101+
:rfc:`5801` (GSS-API SASL Extensions)
102+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103+
104+
.. automodule:: gssapi.raw.ext_rfc5801
105+
:members:
106+
:undoc-members:
107+
87108
Credential Store Extensions
88109
~~~~~~~~~~~~~~~~~~~~~~~~~~~
89110

@@ -127,6 +148,13 @@ IOV MIC Extensions
127148
:members:
128149
:undoc-members:
129150

151+
Global Grid Forum (GGF) Extensions
152+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153+
154+
.. automodule:: gssapi.raw.ext_ggf
155+
:members:
156+
:undoc-members:
157+
130158
Services4User Extensions
131159
~~~~~~~~~~~~~~~~~~~~~~~~
132160

@@ -145,6 +173,20 @@ Acquiring Credentials With a Password Extensions
145173
:members:
146174
:undoc-members:
147175

176+
Other Extensions
177+
~~~~~~~~~~~~~~~~
178+
179+
.. automodule:: gssapi.raw.ext_set_cred_opt
180+
:members:
181+
:undoc-members:
182+
183+
Results
184+
-------
185+
186+
.. automodule:: gssapi.raw.named_tuples
187+
:members:
188+
:undoc-members:
189+
148190
Exceptions
149191
----------
150192

Diff for: gssapi/creds.py

+33-32
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ class Credentials(rcreds.Creds):
3737
:meth:`acquire` method.
3838
3939
Raises:
40-
BadMechanismError
41-
BadNameTypeError
42-
BadNameError
43-
ExpiredCredentialsError
44-
MissingCredentialsError
40+
~gssapi.exceptions.BadMechanismError
41+
~gssapi.exceptions.BadNameTypeError
42+
~gssapi.exceptions.BadNameError
43+
~gssapi.exceptions.ExpiredCredentialsError
44+
~gssapi.exceptions.MissingCredentialsError
4545
"""
4646

4747
__slots__ = ()
@@ -108,8 +108,8 @@ def acquire(cls, name=None, lifetime=None, mechs=None, usage='both',
108108
extension.
109109
110110
Args:
111-
name (Name): the name associated with the credentials,
112-
or None for the default name
111+
name (~gssapi.names.Name): the name associated with the
112+
credentials, or None for the default name
113113
lifetime (int): the desired lifetime of the credentials, or None
114114
for indefinite
115115
mechs (list): the desired :class:`MechType` OIDs to be used
@@ -125,11 +125,11 @@ def acquire(cls, name=None, lifetime=None, mechs=None, usage='both',
125125
them
126126
127127
Raises:
128-
BadMechanismError
129-
BadNameTypeError
130-
BadNameError
131-
ExpiredCredentialsError
132-
MissingCredentialsError
128+
~gssapi.exceptions.BadMechanismError
129+
~gssapi.exceptions.BadNameTypeError
130+
~gssapi.exceptions.BadNameError
131+
~gssapi.exceptions.ExpiredCredentialsError
132+
~gssapi.exceptions.MissingCredentialsError
133133
"""
134134

135135
if store is None:
@@ -166,7 +166,7 @@ def store(self, store=None, usage='both', mech=None,
166166
or None for the default store.
167167
usage (str): the usage to store the credentials with -- either
168168
'both', 'initiate', or 'accept'
169-
mech (OID): the :class:`MechType` to associate with the
169+
mech (~gssapi.OID): the :class:`MechType` to associate with the
170170
stored credentials
171171
overwrite (bool): whether or not to overwrite existing credentials
172172
stored with the same name, etc
@@ -177,11 +177,11 @@ def store(self, store=None, usage='both', mech=None,
177177
StoreCredResult: the results of the credential storing operation
178178
179179
Raises:
180-
GSSError
181-
ExpiredCredentialsError
182-
MissingCredentialsError
183-
OperationUnavailableError
184-
DuplicateCredentialsElementError
180+
~gssapi.exceptions.GSSError
181+
~gssapi.exceptions.ExpiredCredentialsError
182+
~gssapi.exceptions.MissingCredentialsError
183+
~gssapi.exceptions.OperationUnavailableError
184+
~gssapi.exceptions.DuplicateCredentialsElementError
185185
"""
186186

187187
if store is None:
@@ -212,7 +212,7 @@ def impersonate(self, name=None, lifetime=None, mechs=None,
212212
:requires-ext:`s4u`
213213
214214
Args:
215-
name (Name): the name to impersonate
215+
name (~gssapi.names.Name): the name to impersonate
216216
lifetime (int): the desired lifetime of the new credentials,
217217
or None for indefinite
218218
mechs (list): the desired :class:`MechType` OIDs for the new
@@ -251,9 +251,9 @@ def inquire(self, name=True, lifetime=True, usage=True, mechs=True):
251251
with None used when the corresponding argument was False
252252
253253
Raises:
254-
MissingCredentialsError
255-
InvalidCredentialsError
256-
ExpiredCredentialsError
254+
~gssapi.exceptions.MissingCredentialsError
255+
~gssapi.exceptions.InvalidCredentialsError
256+
~gssapi.exceptions.ExpiredCredentialsError
257257
"""
258258

259259
res = rcreds.inquire_cred(self, name, lifetime, usage, mechs)
@@ -274,7 +274,8 @@ def inquire_by_mech(self, mech, name=True, init_lifetime=True,
274274
about them.
275275
276276
Args:
277-
mech (OID): the mechanism for which to retrive the information
277+
mech (~gssapi.OID): the mechanism for which to retrive the
278+
information
278279
name (bool): get the name associated with the credentials
279280
init_lifetime (bool): get the remaining initiate lifetime for
280281
the credentials
@@ -327,10 +328,10 @@ def add(self, name, mech, usage='both',
327328
`impersonator` argument.
328329
329330
Args:
330-
name (Name): the name associated with the
331-
credentials
332-
mech (OID): the desired :class:`MechType` to be used with the
331+
name (~gssapi.names.Name): the name associated with the
333332
credentials
333+
mech (~gssapi.OID): the desired :class:`MechType` to be used with
334+
the credentials
334335
usage (str): the usage for the credentials -- either 'both',
335336
'initiate', or 'accept'
336337
init_lifetime (int): the desired initiate lifetime of the
@@ -349,12 +350,12 @@ def add(self, name, mech, usage='both',
349350
and the newly acquired ones.
350351
351352
Raises:
352-
BadMechanismError
353-
BadNameTypeError
354-
BadNameError
355-
DuplicateCredentialsElementError
356-
ExpiredCredentialsError
357-
MissingCredentialsError
353+
~gssapi.exceptions.BadMechanismError
354+
~gssapi.exceptions.BadNameTypeError
355+
~gssapi.exceptions.BadNameError
356+
~gssapi.exceptions.DuplicateCredentialsElementError
357+
~gssapi.exceptions.ExpiredCredentialsError
358+
~gssapi.exceptions.MissingCredentialsError
358359
"""
359360

360361
if store is not None and impersonator is not None:

Diff for: gssapi/mechs.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ def from_name(cls, name=None):
121121
Get a generator of mechanisms that may be able to process the name
122122
123123
Args:
124-
name (Name): a name to inquire about
124+
name (~gssapi.names.Name): a name to inquire about
125125
126126
Returns:
127127
[Mechanism]: a set of mechanisms which support this name
128128
129129
Raises:
130-
GSSError
130+
~gssapi.exceptions.GSSError
131131
"""
132132
return (cls(mech) for mech in rmisc.inquire_mechs_for_name(name))
133133

@@ -143,7 +143,7 @@ def from_sasl_name(cls, name=None):
143143
Mechanism: the desired mechanism
144144
145145
Raises:
146-
GSSError
146+
~gssapi.exceptions.GSSError
147147
148148
:requires-ext:`rfc5801`
149149
"""
@@ -173,7 +173,7 @@ def from_attrs(cls, desired_attrs=None, except_attrs=None,
173173
[Mechanism]: A set of mechanisms having the desired features.
174174
175175
Raises:
176-
GSSError
176+
~gssapi.exceptions.GSSError
177177
178178
:requires-ext:`rfc5587`
179179
"""

Diff for: gssapi/names.py

+14-14
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ def __init__(self, base=None, name_type=None, token=None, composite=False):
9191
name type.
9292
9393
Raises:
94-
BadNameTypeError
95-
BadNameError
96-
BadMechanismError
94+
~gssapi.exceptions.BadNameTypeError
95+
~gssapi.exceptions.BadNameError
96+
~gssapi.exceptions.BadMechanismError
9797
"""
9898

9999
if rname_rfc6680 is not None:
@@ -137,14 +137,14 @@ def display_as(self, name_type):
137137
:requires-ext:`rfc6680`
138138
139139
Args:
140-
name_type (OID): the :class:`NameType` to use to display the given
141-
name
140+
name_type (~gssapi.OID): the :class:`NameType` to use to display
141+
the given name
142142
143143
Returns:
144144
str: the displayed name
145145
146146
Raises:
147-
OperationUnavailableError
147+
~gssapi.exceptions.OperationUnavailableError
148148
"""
149149

150150
if rname_rfc6680 is None:
@@ -189,9 +189,9 @@ def export(self, composite=False):
189189
bytes: the exported name in token form
190190
191191
Raises:
192-
MechanismNameRequiredError
193-
BadNameTypeError
194-
BadNameError
192+
~gssapi.exceptions.MechanismNameRequiredError
193+
~gssapi.exceptions.BadNameTypeError
194+
~gssapi.exceptions.BadNameError
195195
"""
196196

197197
if composite:
@@ -211,15 +211,15 @@ def canonicalize(self, mech):
211211
to the given mechanism.
212212
213213
Args:
214-
mech (OID): the :class:`MechType` to use
214+
mech (~gssapi.OID): the :class:`MechType` to use
215215
216216
Returns:
217217
Name: the canonicalized name
218218
219219
Raises:
220-
BadMechanismError
221-
BadNameTypeError
222-
BadNameError
220+
~gssapi.exceptions.BadMechanismError
221+
~gssapi.exceptions.BadNameTypeError
222+
~gssapi.exceptions.BadNameError
223223
"""
224224

225225
return type(self)(rname.canonicalize_name(self, mech))
@@ -249,7 +249,7 @@ def _inquire(self, **kwargs):
249249
fields set to None
250250
251251
Raises:
252-
GSSError
252+
~gssapi.exceptions.GSSError
253253
"""
254254

255255
if rname_rfc6680 is None:

Diff for: gssapi/raw/chan_bindings.pyx

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ cdef class ChannelBindings:
2222
acceptor_address=None, application_data=None):
2323
"""
2424
Args:
25-
initiator_address_type (AddressType): the initiator address type
25+
initiator_address_type (~gssapi.AddressType): the initiator address
26+
type
2627
initiator_address (bytes): the initiator address
27-
acceptor_address_type (AddressType): the acceptor address type
28+
acceptor_address_type (~gssapi.AddressType): the acceptor address
29+
type
2830
acceptor_address (bytes): the acceptor address
2931
application_data (bytes): additional application-specific data
3032
"""

0 commit comments

Comments
 (0)