0001-middleware-use-non-deprecated-current_thread-64459.patch
hobo/middleware/utils.py | ||
---|---|---|
7 | 7 |
collection = {} |
8 | 8 | |
9 | 9 |
def process_request(self, request): |
10 |
StoreRequestMiddleware.collection[threading.currentThread()] = request
|
|
10 |
StoreRequestMiddleware.collection[threading.current_thread()] = request
|
|
11 | 11 | |
12 | 12 |
def process_response(self, request, response): |
13 |
StoreRequestMiddleware.collection.pop(threading.currentThread(), None)
|
|
13 |
StoreRequestMiddleware.collection.pop(threading.current_thread(), None)
|
|
14 | 14 |
return response |
15 | 15 | |
16 | 16 |
@classmethod |
17 | 17 |
def get_request(cls): |
18 |
return cls.collection.get(threading.currentThread()) |
|
18 |
return cls.collection.get(threading.current_thread()) |
|
19 |
- |