The documented API for DELETE /api/v1/users/me/subscriptions is that
principals should be omitted to remove a subscription for the calling
user. A call with principals=[] should have a different meaning, but
a server bug currently conflates this with a call omitting principals.
Avoid relying on this bug.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
The username doesn't include the Matrix homeserver domain name, while
the mxid does. Since we change the usage of the old "username" to
include the domain, it is incorrect to remain saying it as "username."
According to the `setuptools` docs, once `include_package_data=True`
is passed to `setup()`, it will only include package data specified
in `MANIFEST.in`, and will ignore the `package_data` argument passed
to `setup()`. Therefore, `py.typed` was not included in our latest
PyPI release 0.8.1.
Since we specify all of our package data in the `MANIFEST.in` file
already, it makes more sense to include mention `py.typed` there so
that it is included in the expected fashion.
See https://github.com/pypa/setuptools/issues/1461 for background.
Fixes#732.
As part of supporting the change in zulip/zulip#18409, we add a
conditional to send the old/buggy format only to servers with feature
levels indicating they don't support the modern version.
To make sure that the API bindings is backward compatible with
older versions of zulip server that uses functions with different
signatures, we use a hack to replace the Client class with a
legacy-compatible version of it.
Without universal_newlines=True or text=True, subprocess.check_output
returns bytes, not str, so it makes no sense to compare its return to
"true". But upstream Git’s behavior only depends on the filename, not
whether the repository is bare; emulate this more closely.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
We uses `pyupgrade --py3-plus` to automatically replace all occurence
of `Text`. But manual fix is required to remove the unused imports. Note
that with this configuration pyupgrade also convert string literals to
.format(...) style, which is manually not included in the commit as well.
In zulip/zulip@3947b0c80a, we replaced
the legacy endpoint to use the term "linkifier" instead of
"filter" and to return the data in a dictionary format.
None of the official clients currently actually use this
endpoint.
- Added `**kwargs` typed `object` in the definition of
`Client.call_on_each_*` .
- Replaced `**kwargs` type from `Any` to `object` in the
definition of `Client.register`.
Fixes part of #647
The mirror has some chance of running on Python 3 now, once the
python-zephyr patch is rebased on 0.2.1, though it’s untested.
Signed-off-by: Anders Kaseorg <anders@zulip.com>