Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ required: a missing or blank one, one over 255 characters after trimming, or
one that is not a string, raises `ValueError`. So does a value that is not a
string for `base_url`, `application`, `key` or `install_id=`, naming the
argument, whether or not the client ends up enabled, so a settings file that
turns `version: 1.4` into a number is caught at startup. Every event the
turns `version: 1.4` into a number is caught at startup. An empty value of
another type (`0`, `False`, `[]`) is taken as no value, as it was before
that check: no key, no installation ID, or `"<argument> is required"` for the
three positional arguments. Every event the
client sends — `startup`, `command`,
anything else — carries it as the tag `version`, so every event can be tied
to a release, not just `startup`. An event that passes its own `version` tag
Expand Down
4 changes: 3 additions & 1 deletion trace_client/trace_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ def __init__(self, base_url: str, application: str, version: str, *, key: Option
A value that is not a string for ``base_url``, ``application``,
``version``, ``key`` or ``install_id`` is a :class:`ValueError` naming
the argument, even on a client that would be disabled: a settings
file that reads ``version: 1.4`` as a number should say so."""
file that reads ``version: 1.4`` as a number should say so. An empty
one (``0``, ``False``, ``[]``) still means no value, as it did before
that check: no key, no ID, or "<argument> is required"."""
for argument, given in (("base_url", base_url), ("application", application), ("version", version),
("key", key), ("install_id", install_id)):
if given and not isinstance(given, str):
Expand Down
Loading