Skip to content

Commit 30267d7

Browse files
author
tailor
committed
[project @ change openid.stores package to openid.store]
1 parent 6d642ea commit 30267d7

10 files changed

Lines changed: 27 additions & 26 deletions

File tree

‎openid/association.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Association(object):
99
This class represents an association between a server and a
1010
consumer. In general, users of this library will never see
1111
instances of this object. The only exception is if you implement
12-
a custom C{L{openid.stores.OpenIDStore}}.
12+
a custom C{L{openid.store.interface.OpenIDStore}}.
1313
1414
If you do implement such a store, it will need to store the values
1515
of the C{L{handle}}, C{L{secret}}, C{L{issued}}, C{L{lifetime}}, and
@@ -64,8 +64,9 @@ class Association(object):
6464
def fromExpiresIn(cls, expires_in, handle, secret, assoc_type):
6565
"""
6666
This is an alternate constructor used by the OpenID consumer
67-
library to create associations. C{L{OpenIDStore}}
68-
implementations shouldn't use this constructor.
67+
library to create associations. C{L{OpenIDStore
68+
<openid.store.interface.OpenIDStore>}} implementations
69+
shouldn't use this constructor.
6970
7071
7172
@param expires_in: This is the amount of time this association

‎openid/consumer/consumer.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
At a high level, there are two important parts in the consumer
4545
library. The first important part is this module, which contains
4646
the interface to actually use this library. The second is the
47-
C{L{openid.stores.interface}} module, which describes the
47+
C{L{openid.store.interface}} module, which describes the
4848
interface to use if you need to create a custom method for storing
4949
the state this library needs to maintain between requests.
5050
@@ -262,19 +262,19 @@ def __init__(self, store, fetcher=None, immediate=False):
262262
interface in C{L{openid.store.interface.OpenIDStore}}.
263263
Several concrete implementations are provided, to cover
264264
most common use cases. For stores backed by MySQL or
265-
SQLite, see the C{L{openid.stores.sqlstore.SQLStore}}
265+
SQLite, see the C{L{openid.store.sqlstore.SQLStore}}
266266
class and its sublcasses. For a filesystem-backed store,
267-
see the C{L{openid.stores.filestore}} module.
267+
see the C{L{openid.store.filestore}} module.
268268
269269
As a last resort, if it isn't possible for the server to
270270
store state at all, an instance of
271-
C{L{openid.stores.dumbstore.DumbStore}} can be used. This
271+
C{L{openid.store.dumbstore.DumbStore}} can be used. This
272272
should be an absolute last resort, though, as it makes the
273273
consumer vulnerable to replay attacks over the lifespan of
274274
the tokens the library creates. See C{L{impl}} for
275275
information on controlling the lifespan of those tokens.
276276
277-
@type store: C{L{openid.stores.interface.OpenIDStore}}
277+
@type store: C{L{openid.store.interface.OpenIDStore}}
278278
279279
280280
@param fetcher: This is an optional instance of

‎openid/server/server.py‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
This module documents the interface to the OpenID server library. The
33
only part of the library which has to be used and isn't documented
4-
here is the store for associations. See the C{L{openid.stores}}
4+
here is the store for associations. See the C{L{openid.store}}
55
package for more information on stores.
66
77
@@ -34,7 +34,7 @@
3434
3535
At a high level, there are two parts of the library which are
3636
important. First, there is the C{L{OpenIDServer}} class in this
37-
module. Second, there is the C{L{openid.stores}} package, which
37+
module. Second, there is the C{L{openid.store}} package, which
3838
contains information on the necessary persistent state mechanisms,
3939
and several implementations.
4040
@@ -44,14 +44,14 @@
4444
The OpenID server needs to maintain state between requests in
4545
order to function. Its mechanism for doing this is called a
4646
store. The store interface is defined in
47-
C{L{openid.stores.interface.OpenIDStore}}. Additionally, several
47+
C{L{openid.store.interface.OpenIDStore}}. Additionally, several
4848
concrete store implementations are provided, so that most sites
4949
won't need to implement a custom store. For a store backed by
5050
flat files on disk, see
51-
C{L{openid.stores.filestore.FileOpenIDStore}}. For stores based
52-
on MySQL or SQLite, see the C{L{openid.stores.sqlstore}} module.
51+
C{L{openid.store.filestore.FileOpenIDStore}}. For stores based
52+
on MySQL or SQLite, see the C{L{openid.store.sqlstore}} module.
5353
For a store using Danga's memcached caching system, see the
54-
C{L{openid.stores.memcachestore}} module.
54+
C{L{openid.store.memcachestore}} module.
5555
5656
5757
USING THIS LIBRARY
@@ -216,16 +216,16 @@ def __init__(self, server_url, store):
216216
217217
218218
@param store: This is the instance of an object implementing
219-
C{L{openid.stores.interface.OpenIDStore}} interface which
219+
C{L{openid.store.interface.OpenIDStore}} interface which
220220
the library will use for persistent storage. See the
221-
C{L{OpenIDStore<openid.stores.interface.OpenIDStore>}
221+
C{L{OpenIDStore<openid.store.interface.OpenIDStore>}}
222222
documentation for more information on stores and various
223223
implementations. Note that the store used for the server
224224
must not be a dumb-style store. It's not possible to be a
225225
functional OpenID server without persistent storage.
226226
227227
@type store: An object implementing the
228-
C{L{openid.stores.interface.OpenIDStore}} interface
228+
C{L{openid.store.interface.OpenIDStore}} interface
229229
"""
230230
from openid.server.impl import OpenIDServerImpl
231231
self.impl = OpenIDServerImpl(server_url, store)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from openid import cryptutil
2-
from openid.stores.interface import OpenIDStore
2+
from openid.store.interface import OpenIDStore
33

44
class DumbStore(OpenIDStore):
55
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def mkstemp(dir):
2424
raise RuntimeError('Failed to get temp file after 5 attempts')
2525

2626
from openid.association import Association
27-
from openid.stores.interface import OpenIDStore
27+
from openid.store.interface import OpenIDStore
2828
from openid import cryptutil, oidutil
2929

3030
filename_allowed = string.letters + string.digits + '.'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from openid import cryptutil, oidutil
22
from openid.association import Association
3-
from openid.stores.interface import OpenIDStore
3+
from openid.store.interface import OpenIDStore
44

55
NONCE_CODE = 'N'
66
ASSOC_CODE = 'A'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from openid import cryptutil
44
from openid.association import Association
5-
from openid.stores.interface import OpenIDStore
5+
from openid.store.interface import OpenIDStore
66

77
def inTxn(func):
88
def wrapped(self, *args, **kwargs):

‎test/storetest.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def testUseNonce(nonce, expected):
171171

172172
def test_filestore():
173173
print 'Testing fs'
174-
from openid.stores import filestore
174+
from openid.store import filestore
175175
import tempfile
176176
import shutil
177177
try:
@@ -191,7 +191,7 @@ def test_filestore():
191191
shutil.rmtree(temp_dir)
192192

193193
def test_sqlite():
194-
from openid.stores import sqlstore
194+
from openid.store import sqlstore
195195
try:
196196
from pysqlite2 import dbapi2 as sqlite
197197
except ImportError:
@@ -204,7 +204,7 @@ def test_sqlite():
204204
testStore(store)
205205

206206
def test_mysql():
207-
from openid.stores import sqlstore
207+
from openid.store import sqlstore
208208
try:
209209
import MySQLdb
210210
except ImportError:
@@ -248,7 +248,7 @@ def test_mysql():
248248
conn.query('DROP DATABASE %s;' % db_name)
249249

250250
def test_memcache():
251-
from openid.stores import memcachestore
251+
from openid.store import memcachestore
252252
try:
253253
import memcache
254254
except ImportError:
@@ -266,7 +266,7 @@ def test_memcache():
266266

267267
def test_dumbstore():
268268
print 'Testing dumbstore'
269-
from openid.stores import dumbstore
269+
from openid.store import dumbstore
270270
store = dumbstore.DumbStore('bad secret; do not use')
271271
testStore(store)
272272

0 commit comments

Comments
 (0)