| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Py3 storage/_base.py
|
| |
| |
| |
| | |
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
|\ \
| | |
| | | |
replace some iteritems with six
|
| | |
| | |
| | |
| | | |
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
|\ \ \
| | | |
| | | | |
use repr, not str
|
| |/ /
| | |
| | |
| | | |
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
|\ \ \
| | | |
| | | | |
Misc Python3 fixes
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |/ / |
|
|\ \ \
| |_|/
|/| | |
Add batch_iter to utils
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
There's a frequent idiom I noticed where an iterable is split up into a
number of chunks/batches. Unfortunately that method does not work with
iterators like dict.keys() in python3. This implementation works with
iterators.
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
|\ \
| | |
| | | |
Remove users from user directory on deactivate
|
| | | |
|
|\ \ \
| | | |
| | | | |
Replace some more comparisons with six
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
plus a bonus b"" string I missed last time
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
|\ \ \
| |_|/
|/| | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fix federation backfill bugs
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
Use iter* methods for _filter_events_for_server
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Allow overriding the server_notices user's avatar
|
| | | | |
| | | | |
| | | | |
| | | | | |
probably should have done this in the first place, like @turt2live suggested.
|
|\| | | | |
|
| |\ \ \ \
| | | | | |
| | | | | | |
Support for putting %(consent_uri)s in messages
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Make it possible to put the URI in the error message and the server notice that
get sent by the server
|
| | | | | | |
|
| |/ / / / |
|
|/ / / /
| | | |
| | | |
| | | | |
... because it's shorter.
|
|/ / / |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The pagination storage function supported not specifiying a limit on the
number of events returned. This was triggered when using the search or
context API with a limit of zero, which the storage function took to
mean not being limited.
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Add a 'has_consented' template var to consent forms
|
| | | |
| | | |
| | | |
| | | | |
fixes #3260
|
| | | |
| | | |
| | | |
| | | | |
... to reduce the risk of somebody introducing an html injection attack...
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
Delay the import of ConsentResource, so that we can get away without jinja2 if
people don't have the consent resource enabled.
Fixes #3259
|
|/ /
| |
| |
| |
| |
| | |
Returns an M_CONSENT_NOT_GIVEN error (cf
https://github.com/matrix-org/matrix-doc/issues/1252) if consent is not yet
given.
|
|\ \
| | |
| | | |
Send users a server notice about consent
|
| | |
| | |
| | |
| | |
| | | |
... and have the sync endpoints call it directly rather than obsure indirection
via PresenceHandler
|
| | |
| | |
| | |
| | | |
turns out we need to reuse this, so it's better in the config class.
|
| | |
| | |
| | |
| | |
| | | |
When a user first syncs, we will send them a server notice asking them to
consent to the privacy policy if they have not already done so.
|
| | |
| | |
| | |
| | | |
we're going to use it for the version we require too.
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Add in flight request metrics
|
| | | |
|
| | | |
|
| |/
| |
| |
| |
| | |
This tracks CPU and DB usage while requests are in flight, rather than
when we write the response.
|
|\ \
| | |
| | | |
Stop the transaction cache caching failures
|
| | |
| | |
| | |
| | | |
ONE DAY I WILL PURGE THE WORLD OF THIS EVIL
|
| |/
| |
| |
| |
| |
| | |
The transaction cache has some code which tries to stop it caching failures,
but if the callback function failed straight away, then things would happen
backwards and we'd end up with the failure stuck in the cache.
|
|/ |
|
| |
|
|\ |
|
| | |
|
|\ \
| | |
| | | |
Infrastructure for a server notices room
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Server Notices use a special room which the user can't dismiss. They are
created on demand when some other bit of the code calls send_notice.
(This doesn't actually do much yet becuse we don't call send_notice anywhere)
|
|\ \ \
| | | |
| | | | |
Fix error in handling receipts
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes an error which has been happening ever since #2158 (v0.21.0-rc1):
> TypeError: argument of type 'ObservableDeferred' is not iterable
fixes #3234
|
|\ \ \
| | | |
| | | | |
Remove unused `update_external_syncs`
|
| |/ /
| | |
| | |
| | | |
This method isn't used anywhere. Burninate it.
|
|\ \ \
| |/ /
|/| | |
Make purge_history operate on tokens
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
As we're soon going to change how topological_ordering works
|
| | | |
|
|\ \ \
| | | |
| | | | |
Move RoomCreationHandler out of synapse.handlers.Handlers
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Handlers is deprecated nowadays, so let's move this out before I add a new
dependency on it.
Also fix the docstrings on create_room.
|
|\ \ \ \
| | | | |
| | | | | |
Use stream rather depth ordering for push actions
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This simplifies things as it is, but will also allow us to change the
way we traverse topologically without having to update the way push
actions work.
|
|\ \ \ \ \
| |_|/ / /
|/| | | /
| | |_|/
| |/| | |
|
| | | | |
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
user visit data
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
The aim is to keep track of when it was last called and only query from that point in time
|
| | | |
| | | |
| | | |
| | | | |
insert incrementally through the day
|
| |\ \ \
| | | | |
| | | | |
| | | | | |
cohort_analytics
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
ConsentResource to gather policy consent from users
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Hopefully there are enough comments and docs in this that it makes sense on its
own.
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
Part user from rooms on account deactivate
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
One room at a time so we don't take out the whole server with leave
events, and restart at server restart.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This implements this very crudely: this probably isn't viable
because parting a user from all their rooms could take a long time,
and if the HS gets restarted in that time the process will be
aborted.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Set Server header in SynapseRequest
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
(instead of everywhere that writes a response. Or rather, the subset of places
which write responses where we haven't forgotten it).
This also means that we don't have to have the mysterious version_string
attribute in anything with a request handler.
Unfortunately it does mean that we have to pass the version string wherever we
instantiate a SynapseSite, which has been c&ped 150 times, but that is code
that ought to be cleaned up anyway really.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
transaction_id, destination defined twice
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is needless complexity; we might as well use the wrapper directly.
Also rename wrap_request_handler->wrap_json_request_handler.
|
| | | | |
| | | | |
| | | | |
| | | | | |
... so that it can be used on non-JSON endpoints
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The metrics are now available via the request, so this is redundant and can go
away at last.
|
| | | | |
| | | | |
| | | | |
| | | | | |
it's much neater there.
|
| | | | |
| | | | |
| | | | |
| | | | | |
less magic
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It fits quite nicely here, and opens the path to getting rid of the
"include_metrics" mess.
|
| | | | |
| | | | |
| | | | |
| | | | | |
... which is going to make it easier to move around.
|
| | | | | |
|
| |_|_|/
|/| | |
| | | |
| | | |
| | | |
| | | | |
This is useful in its own right, because server.py is full of stuff; but more
importantly, I want to do some refactoring that will cause a circular reference
as it is.
|
|\ \ \ \
| | | | |
| | | | | |
Refactor sync APIs to reuse pagination API
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The sync API often returns events in a topological rather than stream
ordering, e.g. when the user joined the room or on initial sync. When
this happens we can reuse existing pagination storage functions.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This allows calling the `get_recent_event_ids_for_room` function in more
situations.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Refactor get_recent_events_for_room return type
|
| | | | | | |
|
| | | | | | |
|
| |\ \ \ \ \
| | |/ / / /
| |/| | | |
| | | | | | |
erikj/fixup_return_pagination
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
There is no reason to return a tuple of tokens when the last token is
always the token passed as an argument. Changing it makes it consistent
with other storage APIs
|
|\ \ \ \ \ \
| | |/ / / /
| |/| | | |
| | | | | | |
erikj/remove_membership_change
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
Refactor pagination DB API to return concrete type
|
| | |/ / / / |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
Refactor recent events func to use pagination func
|
| |\ \ \ \ \ \
| | |_|_|_|/ /
| |/| | | | | |
Refactor /context to reuse pagination storage functions
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
notifications: Convert next_token to string according to the spec
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Currently the parameter is serialized as an integer.
Signed-off-by: Konstantinos Sideris <sideris.konstantin@gmail.com>
|
| | | | | | | | |
|
| |/ / / / / / |
|
| |_|_|/ / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | | |
The function is never called without a from_key, so we can remove all
the handling for that scenario.
|
| |_|/ / /
|/| | | |
| | | | |
| | | | |
| | | | | |
This makes it easier to document what is being returned by the storage
functions and what some functions expect as arguments.
|
| | | | | |
|
| |/ / /
|/| | |
| | | |
| | | | |
This also removes a cache that is unlikely to ever get hit.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|/ / / |
|
|\ \ \ |
|
| |\ \ \
| | | | |
| | | | | |
Fix logcontext leaks in rate limiter
|
| | | | | |
|
| |\ \ \ \
| | | | | |
| | | | | | |
Fix 'Unhandled Error' logs with Twisted 18.4
|
| | | | | | |
|
| |\ \ \ \ \
| | |_|/ / /
| |/| | | | |
fix http request timeout code
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This gets two arguments, not one.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
Refactor event storage to prepare for changes in state calculations
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is in preparation for using contexts that may or may not have the
current_state_ids set. This will allow us to avoid unnecessarily pulling
out state for an event on the master process when using workers.
We also add a check to see if the state groups of the old extremities
are the same as the new ones.
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Make Client-Server API return 403 for invalid token
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This closes #2602
v1auth was created to account for the differences in status code between
the v1 and v2_alpha revisions of the protocol (401 vs 403 for invalid
tokens). However since those protocols were merged, this makes the r0
version/endpoint internally inconsistent, and violates the
specification for the r0 endpoint.
This might break clients that rely on this inconsistency with the
specification. This is said to affect the legacy angular reference
client. However, I feel that restoring parity with the spec is more
important. Either way, it is critical to inform developers about this
change, in case they rely on the illegal behaviour.
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \ \ \ \
| | |_|_|/ / / /
| |/| | | | | | |
Escape label values in prometheus metrics
|
| | | | | | | | |
|
| | | | | | | | |
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Fix a class of logcontext leaks
|
| | |\| | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
So, it turns out that if you have a first `Deferred` `D1`, you can add a
callback which returns another `Deferred` `D2`, and `D2` must then complete
before any further callbacks on `D1` will execute (and later callbacks on `D1`
get the *result* of `D2` rather than `D2` itself).
So, `D1` might have `called=True` (as in, it has started running its
callbacks), but any new callbacks added to `D1` won't get run until `D2`
completes - so if you `yield D1` in an `inlineCallbacks` function, your `yield`
will 'block'.
In conclusion: some of our assumptions in `logcontext` were invalid. We need to
make sure that we don't optimise out the logcontext juggling when this
situation happens. Fortunately, it is easy to detect by checking `D1.paused`.
|
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | | |
Make FileResponder.write_to_consumer uphold the logcontext contract
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Fix incorrect reference to StringIO
|
| | |/ / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This was introduced in 4f2f5171
|
| |\ \ \ \ \ \ \
| | |/ / / / / /
| |/| | | | / /
| | | |_|_|/ /
| | |/| | | | |
|
| | | | | | |
| | | | | | |
| | | | | | | |
bump version
|
| |\| | | | |
| | |/ / / /
| |/| | | | |
|
| | |\ \ \ \ |
|
| | | |/ / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* When creating a new event, cap its depth to 2^63 - 1
* When receiving events, reject any without a sensible depth
As per https://docs.google.com/document/d/1I3fi2S-XnpO45qrpCsowZv8P8dHcNZ4fsBsbOW7KABI
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* add some doc about wtf this thing does
* pin Twisted to < 18.4
* add explicit dep on six (fixes #3089)
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
fixes #3135
Signed-off-by: Will Hunt will@half-shot.uk
|
| | | | | |
|
| |\ \ \ \
| | | | | |
| | | | | | |
remove duplicates from groups tables
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | |_|/
| | |/| |
| | | | |
| | | | |
| | | | | |
and rename inconsistently named indexes.
Based on https://github.com/matrix-org/synapse/pull/3128 - thanks @vurpo\!
|
| |\ \ \ \
| | | | | |
| | | | | | |
Remove redundant call to preserve_fn
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
submit_event_for_as doesn't return a deferred anyway, so this is pointless.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
matrix-org/rav/run_in_background_exception_handling
Trap exceptions thrown within run_in_background
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Turn any exceptions that get thrown synchronously within run_in_background into
Failures instead.
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Make event properties raise AttributeError instead
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
They raised KeyError before. I'm changing this because the code uses
hasattr() to check for the presence of a key. This worked accidentally
before, because hasattr() silences all exceptions in python 2. However,
in python3, this isn't the case anymore.
I had a look around to see if anything depended on this raising a
KeyError and I couldn't find anything. Of course, I could have simply
missed it.
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
make imports local
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
move httplib import to six
|
| | |/ / / / / / / |
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Move more xrange to six
|
| | |\ \ \ \ \ \ \ \ |
|
| | | |/ / / / / / /
| | |/| | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
plus a bonus next()
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \ \ \ \ \ \
| | |_|/ / / / / / /
| |/| | | | | | | | |
Don't yield in list comprehensions
|
| | |/ / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
I've tried to grep for more of this with no success.
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Open config file in non-bytes mode
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Nothing written into it is encoded, so it makes little sense, but it
does break in python3 the way it was before.
The variable names were adjusted to be less misleading.
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Open certificate files as bytes
|
| | |/ / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
That's what pyOpenSSL expects on python3
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \ \ \ \ \ \
| | |_|_|_|_|/ / / /
| |/| | | | | | | | |
Replace stringIO imports with six
|
| | | |/ / / / / /
| | |/| | | | | | |
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
more bytes strings
|
| | |/ / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Use run_in_background in preference to preserve_fn
|
| | | | | | | | | | |
|
| | |\ \ \ \ \ \ \ \ |
|
| | | |_|_|_|/ / / /
| | |/| | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
While I was going through uses of preserve_fn for other PRs, I converted places
which only use the wrapped function once to use run_in_background, to avoid
creating the function object.
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Construct HMAC as bytes on py3
|
| | | |_|/ / / / / /
| | |/| | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \ \ \ \ \ \
| | |/ / / / / / / /
| |/| | | | | | | | |
Use six.moves.urlparse
|
| | | |_|_|/ / / /
| | |/| | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The imports were shuffled around a bunch in py3
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \ \ \ \ \
| | | |_|/ / / / /
| | |/| | | | | | |
|
| | |\ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
reraise exceptions more carefully
|
| | | | |/ / / / /
| | | |/| | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We need to be careful (under python 2, at least) that when we reraise an
exception after doing some error handling, we actually reraise the original
exception rather than anything that might have been raised (and handled) during
the error handling.
|
| | |\ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Miscellaneous fixes to python_dependencies
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
* add some doc about wtf this thing does
* pin Twisted to < 18.4
* add explicit dep on six (fixes #3089)
|
| | |\ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Improve exception handling for background processes
|
| | | | |/ / / / / /
| | | |/| | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
There were a bunch of places where we fire off a process to happen in the
background, but don't have any exception handling on it - instead relying on
the unhandled error being logged when the relevent deferred gets
garbage-collected.
This is unsatisfactory for a number of reasons:
- logging on garbage collection is best-effort and may happen some time after
the error, if at all
- it can be hard to figure out where the error actually happened.
- it is logged as a scary CRITICAL error which (a) I always forget to grep for
and (b) it's not really CRITICAL if a background process we don't care about
fails.
So this is an attempt to add exception handling to everything we fire off into
the background.
|
| | |\ \ \ \ \ \ \ \
| | | |_|_|_|_|_|/ /
| | |/| | | | | | | |
Add missing consumeErrors to improve exception handling
|
| | | |/ / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
In general we want defer.gatherResults to consumeErrors, rather than having
exceptions hanging around and getting logged as CRITICAL unhandled errors.
|
| | |/ / / / / / |
|
| |\| | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | |_|_|/ /
| | |/| | | | |
|
| | | | | | | |
|
| | |\ \ \ \ \
| | | |/ / / /
| | |/| | | | |
Reject events which have lots of prev_events
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | |/ / /
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
... this should protect us from being dossed by people making silly events
(deliberately or otherwise)
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Twisted 16.0 doesn't have addTimeout, so let's backport it.
|
| |/ / / /
| | | | |
| | | | |
| | | | | |
This doesn't feel like a wheel we need to reinvent.
|
| |\ \ \ \
| | | | | |
| | | | | | |
Use six.itervalues in some places
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
There's more where that came from
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \
| | | | | |
| | | | | | |
add __bool__ alias to __nonzero__ methods
|
| | |/ / /
| | | | |
| | | | |
| | | | | |
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \
| | | | | |
| | | | | | |
Replace Queue with six.moves.queue
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
and a six.range change which I missed the last time
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \
| | | | | |
| | | | | | |
Use str(e) instead of e.message
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Doing this I learned e.message was pretty shortlived, added in 2.6,
they realized it was a bad idea and deprecated it in 2.7
Signed-off-by: Adrian Tschira <nota@notafile.com>
|
| |\ \ \ \
| | | | | |
| | | | | | |
Refactor ResponseCache usage
|
| | | | | | |
|