terricain / sanic-json-logging

JSON Logging for Sanic
Apache License 2.0
10 stars 4 forks source link

Package crashes on Sanic versions greater than 19.12.0 #98

Closed DavidBord closed 4 years ago

DavidBord commented 4 years ago

You can also notice the error on the auto closed pull requests: "Scheduled weekly dependency update for week 20-26" (an example: https://travis-ci.com/github/terrycain/sanic-json-logging/builds/174516490)

` tests/test_basic.py::test_json_access_logging_no_ua Exception occurred while handling uri: 'http://127.0.0.1:53599/test_get'

Traceback (most recent call last):

File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/sanic/app.py", line 907, in handle_request

request, request_name=name

File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/sanic/app.py", line 1265, in _run_request_middleware

response = await response

File "/home/travis/build/terrycain/sanic-json-logging/sanic_json_logging/init.py", line 41, in log_json_pre

request['req_id'] = req_id

TypeError: 'Request' object does not support item assignment `

terricain commented 4 years ago

Thanks, yeah I don't give this repo as much attention as it should get. I'll have a look, it seems they've changed the interface of the request object.

terricain commented 4 years ago

Version 3.2.0 is out that should fix this.