Skip to content

Commit

Permalink
Move user agent default to where it belongs
Browse files Browse the repository at this point in the history
  • Loading branch information
halcy authored and halcy committed Apr 23, 2023
1 parent f862772 commit 43ccb72
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ A note on versioning: This librarys major version will grow with the APIs
version number. Breaking changes will be indicated by a change in the minor
(or major) version number, and will generally be avoided.

v1.8.0 (in progress)
--------------------
* Replace some lambdas with list comprenehsions (thanks eumiro)
* Add `resolve` keyword to `account_search` (thanks zevaryx)
* Add support for user agent header in `create_app` (thanks jkawamoto)

v1.8.0
------
* Overall: Support level is now 3.5.5 (last before 4.0.0)
Expand Down
4 changes: 1 addition & 3 deletions mastodon/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@

from .errors import MastodonIllegalArgumentError, MastodonNetworkError, MastodonVersionError, MastodonAPIError
from .versions import _DICT_VERSION_APPLICATION
from .defaults import _DEFAULT_SCOPES, _SCOPE_SETS, _DEFAULT_TIMEOUT
from .defaults import _DEFAULT_SCOPES, _SCOPE_SETS, _DEFAULT_TIMEOUT, _DEFAULT_USER_AGENT
from .utility import parse_version_string, api_version

from .internals import Mastodon as Internals

_DEFAULT_USER_AGENT = "mastodonpy"

class Mastodon(Internals):
###
# Registering apps
Expand Down
1 change: 1 addition & 0 deletions mastodon/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
_DEFAULT_TIMEOUT = 300
_DEFAULT_STREAM_TIMEOUT = 300
_DEFAULT_STREAM_RECONNECT_WAIT_SEC = 5
_DEFAULT_USER_AGENT = "mastodonpy"
_DEFAULT_SCOPES = ['read', 'write', 'follow', 'push']
_SCOPE_SETS = {
'read': [
Expand Down

0 comments on commit 43ccb72

Please sign in to comment.