synapse-product/synapse
Matthew Hodgson f131bf8d3e don't mix unicode strings with utf8-in-byte-strings
otherwise we explode with:

```
Traceback (most recent call last):
  File /usr/lib/python2.7/logging/handlers.py, line 78, in emit
    logging.FileHandler.emit(self, record)
  File /usr/lib/python2.7/logging/__init__.py, line 950, in emit
    StreamHandler.emit(self, record)
  File /usr/lib/python2.7/logging/__init__.py, line 887, in emit
    self.handleError(record)
  File /usr/lib/python2.7/logging/__init__.py, line 810, in handleError
    None, sys.stderr)
  File /usr/lib/python2.7/traceback.py, line 124, in print_exception
    _print(file, 'Traceback (most recent call last):')
  File /usr/lib/python2.7/traceback.py, line 13, in _print
    file.write(str+terminator)
  File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_io.py, line 170, in write
    self.log.emit(self.level, format=u{log_io}, log_io=line)
  File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_logger.py, line 144, in emit
    self.observer(event)
  File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_observer.py, line 136, in __call__
    errorLogger = self._errorLoggerForObserver(brokenObserver)
  File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_observer.py, line 156, in _errorLoggerForObserver
    if obs is not observer
  File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_observer.py, line 81, in __init__
    self.log = Logger(observer=self)
  File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_logger.py, line 64, in __init__
    namespace = self._namespaceFromCallingContext()
  File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/logger/_logger.py, line 42, in _namespaceFromCallingContext
    return currentframe(2).f_globals[__name__]
  File /home/matrix/.synapse/local/lib/python2.7/site-packages/twisted/python/compat.py, line 93, in currentframe
    for x in range(n + 1):
RuntimeError: maximum recursion depth exceeded while calling a Python object
Logged from file site.py, line 129
  File /usr/lib/python2.7/logging/__init__.py, line 859, in emit
    msg = self.format(record)
  File /usr/lib/python2.7/logging/__init__.py, line 732, in format
    return fmt.format(record)
  File /usr/lib/python2.7/logging/__init__.py, line 471, in format
    record.message = record.getMessage()
  File /usr/lib/python2.7/logging/__init__.py, line 335, in getMessage
    msg = msg % self.args
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4: ordinal not in range(128)
Logged from file site.py, line 129
```

...where the logger apparently recurses whilst trying to log the error, hitting the
maximum recursion depth and killing everything badly.
2018-07-01 05:08:58 +01:00
..
api add ip_range_whitelist parameter to limit where ASes can connect from 2018-06-28 20:32:00 +01:00
app Write a clear restart indicator in logs 2018-06-20 15:33:14 +01:00
appservice add ip_range_whitelist parameter to limit where ASes can connect from 2018-06-28 20:32:00 +01:00
config fix tests 2018-06-28 20:56:07 +01:00
crypto Attempt to be more performant on PyPy (#3462) 2018-06-28 14:49:57 +01:00
events Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy (#3307) 2018-05-31 19:03:47 +10:00
federation Merge pull request #3456 from matrix-org/hawkowl/federation-prevevent-checking 2018-06-29 13:55:02 +01:00
groups Replace some more comparisons with six 2018-05-19 17:56:31 +02:00
handlers Merge pull request #3456 from matrix-org/hawkowl/federation-prevevent-checking 2018-06-29 13:55:02 +01:00
http don't mix unicode strings with utf8-in-byte-strings 2018-07-01 05:08:58 +01:00
metrics Attempt to be more performant on PyPy (#3462) 2018-06-28 14:49:57 +01:00
module_api Delete devices in various logout situations 2017-11-29 16:44:35 +00:00
push Remove all global reactor imports & pass it around explicitly (#3424) 2018-06-25 14:08:28 +01:00
replication Attempt to be more performant on PyPy (#3462) 2018-06-28 14:49:57 +01:00
rest Attempt to be more performant on PyPy (#3462) 2018-06-28 14:49:57 +01:00
server_notices Avoid sending consent notice to guest users 2018-05-25 11:36:43 +01:00
static/client Updates to fallback CAS login to do new token login 2015-11-06 09:57:17 +00:00
storage Attempt to be more performant on PyPy (#3462) 2018-06-28 14:49:57 +01:00
streams replace 'except:' with 'except Exception:' 2017-10-23 15:52:32 +01:00
util Attempt to be more performant on PyPy (#3462) 2018-06-28 14:49:57 +01:00
__init__.py v0.31.2 2018-06-14 16:24:32 +01:00
event_auth.py Make default state_default 50 2018-06-14 12:38:09 +01:00
notifier.py Pass around the reactor explicitly (#3385) 2018-06-22 09:37:10 +01:00
python_dependencies.py Add missing dependency on attr 2018-06-06 17:12:41 +01:00
server.py Pass around the reactor explicitly (#3385) 2018-06-22 09:37:10 +01:00
server.pyi Send users a server notice about consent 2018-05-22 11:54:51 +01:00
state.py fix idiotic typo in state res 2018-06-11 14:43:55 +01:00
types.py In DomainSpecificString, override __repr__ in addition to __str__ 2018-04-10 11:35:29 +02:00
visibility.py Revert "Revert "Merge pull request #3431 from matrix-org/rav/erasure_visibility"" 2018-06-25 13:42:55 +01:00