Mastodon.py 2.2.1__tar.gz → 2.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (489) hide show
  1. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/CHANGELOG.rst +8 -0
  2. {mastodon_py-2.2.1 → mastodon_py-2.2.2/Mastodon.py.egg-info}/PKG-INFO +4 -1
  3. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/Mastodon.py.egg-info/SOURCES.txt +1 -0
  4. {mastodon_py-2.2.1/Mastodon.py.egg-info → mastodon_py-2.2.2}/PKG-INFO +4 -1
  5. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/README.rst +3 -0
  6. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/07_timelines.rst +1 -0
  7. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/conf.py +1 -1
  8. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/Mastodon.py +1 -1
  9. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/authentication.py +5 -1
  10. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/instance.py +10 -2
  11. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/internals.py +59 -3
  12. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/search.py +14 -10
  13. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/streaming_endpoints.py +17 -2
  14. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/timeline.py +36 -1
  15. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/utility.py +13 -12
  16. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/pyproject.toml +1 -1
  17. mastodon_py-2.2.2/tests/cassettes/test_account.yaml +120 -0
  18. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_block_unblock.yaml +33 -33
  19. mastodon_py-2.2.1/tests/cassettes/test_account_pin_unpin.yaml → mastodon_py-2.2.2/tests/cassettes/test_account_endorse_unendorse.yaml +87 -87
  20. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_familiar_followers.yaml +80 -80
  21. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_follow_unfollow.yaml +34 -34
  22. mastodon_py-2.2.1/tests/cassettes/test_account_following.yaml → mastodon_py-2.2.2/tests/cassettes/test_account_followers.yaml +18 -18
  23. mastodon_py-2.2.1/tests/cassettes/test_account_followers.yaml → mastodon_py-2.2.2/tests/cassettes/test_account_following.yaml +18 -18
  24. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_lookup.yaml +44 -44
  25. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_mute_unmute.yaml +64 -61
  26. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_notes.yaml +22 -22
  27. mastodon_py-2.2.1/tests/cassettes/test_account_endorse_unendorse.yaml → mastodon_py-2.2.2/tests/cassettes/test_account_pin_unpin.yaml +87 -87
  28. mastodon_py-2.2.2/tests/cassettes/test_account_pinned.yaml +525 -0
  29. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_relationships.yaml +22 -22
  30. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_remove_from_followers.yaml +92 -92
  31. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_search.yaml +59 -59
  32. mastodon_py-2.2.2/tests/cassettes/test_account_update_credentials.yaml +2093 -0
  33. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_update_credentials_no_avatar.yaml +22 -22
  34. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_update_credentials_no_header.yaml +22 -22
  35. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_update_credentials_quote_policy.yaml +40 -39
  36. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_update_credentials_source_and_privacy.yaml +14 -14
  37. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_account_update_credentials_too_many_fields.yaml +7 -7
  38. mastodon_py-2.2.2/tests/cassettes/test_accounts.yaml +179 -0
  39. mastodon_py-2.2.2/tests/cassettes/test_admin_accounts.yaml +184 -0
  40. mastodon_py-2.2.2/tests/cassettes/test_admin_accounts_v1.yaml +184 -0
  41. mastodon_py-2.2.2/tests/cassettes/test_admin_accounts_v2.yaml +241 -0
  42. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_admin_canonical_email_block.yaml +96 -96
  43. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_admin_domain_blocks.yaml +52 -52
  44. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_admin_email_domain_blocks.yaml +40 -40
  45. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_admin_ip_blocks.yaml +57 -57
  46. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_admin_moderation.yaml +271 -269
  47. mastodon_py-2.2.2/tests/cassettes/test_admin_reports.yaml +824 -0
  48. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_admin_stats.yaml +24 -24
  49. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_admin_trends.yaml +28 -28
  50. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_app_account_create.yaml +41 -41
  51. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_app_account_create_invalid.yaml +29 -29
  52. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_app_verify_credentials.yaml +9 -9
  53. mastodon_py-2.2.2/tests/cassettes/test_attribute_access.yaml +134 -0
  54. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_auth_request_url.yaml +18 -18
  55. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_blocks.yaml +7 -7
  56. mastodon_py-2.2.2/tests/cassettes/test_bookmarks.yaml +452 -0
  57. mastodon_py-2.2.2/tests/cassettes/test_conversations.yaml +394 -0
  58. mastodon_py-2.2.2/tests/cassettes/test_date_hook.yaml +134 -0
  59. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_directory.yaml +10 -10
  60. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_domain_block_unblock.yaml +15 -15
  61. mastodon_py-2.2.1/tests/cassettes/test_follow_requests.yaml → mastodon_py-2.2.2/tests/cassettes/test_domain_blocks.yaml +8 -8
  62. mastodon_py-2.2.1/tests/cassettes/test_instance_rules.yaml → mastodon_py-2.2.2/tests/cassettes/test_emoji.yaml +8 -8
  63. mastodon_py-2.2.1/tests/cassettes/test_domain_blocks.yaml → mastodon_py-2.2.2/tests/cassettes/test_favourites.yaml +7 -7
  64. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_featured_tags.yaml +51 -51
  65. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_featured_tags_2.yaml +57 -57
  66. mastodon_py-2.2.2/tests/cassettes/test_fetch_next_previous.yaml +1653 -0
  67. mastodon_py-2.2.2/tests/cassettes/test_fetch_next_previous_after_persist.yaml +1653 -0
  68. mastodon_py-2.2.2/tests/cassettes/test_fetch_next_previous_from_pagination_info.yaml +1653 -0
  69. mastodon_py-2.2.2/tests/cassettes/test_fetch_remaining.yaml +4334 -0
  70. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_follow_request_authorize.yaml +60 -60
  71. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_follow_request_reject.yaml +47 -47
  72. mastodon_py-2.2.1/tests/cassettes/test_favourites.yaml → mastodon_py-2.2.2/tests/cassettes/test_follow_requests.yaml +7 -7
  73. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_follow_suggestions.yaml +21 -21
  74. mastodon_py-2.2.2/tests/cassettes/test_follow_with_notify_reblog.yaml +645 -0
  75. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_followed_hashtags.yaml +52 -52
  76. mastodon_py-2.2.2/tests/cassettes/test_get_pagination_info.yaml +1487 -0
  77. mastodon_py-2.2.2/tests/cassettes/test_grouped_notification_pagination.yaml +1630 -0
  78. mastodon_py-2.2.2/tests/cassettes/test_grouped_notifications.yaml +580 -0
  79. mastodon_py-2.2.2/tests/cassettes/test_hashtag_tl.yaml +263 -0
  80. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_health.yaml +6 -6
  81. mastodon_py-2.2.2/tests/cassettes/test_home_tl.yaml +237 -0
  82. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_home_tl_anonymous_throws.yaml +7 -7
  83. mastodon_py-2.2.2/tests/cassettes/test_id_hook.yaml +134 -0
  84. mastodon_py-2.2.2/tests/cassettes/test_id_hook_in_reply_to.yaml +266 -0
  85. mastodon_py-2.2.2/tests/cassettes/test_id_hook_within_reblog.yaml +269 -0
  86. mastodon_py-2.2.2/tests/cassettes/test_instance.yaml +66 -0
  87. mastodon_py-2.2.2/tests/cassettes/test_instance_activity.yaml +63 -0
  88. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_instance_domain_blocks.yaml +6 -6
  89. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_instance_extended_description.yaml +8 -8
  90. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_instance_languages.yaml +40 -34
  91. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_instance_peers.yaml +23 -23
  92. mastodon_py-2.2.1/tests/cassettes/test_emoji.yaml → mastodon_py-2.2.2/tests/cassettes/test_instance_rules.yaml +9 -9
  93. mastodon_py-2.2.1/tests/cassettes/test_stream_healthy.yaml → mastodon_py-2.2.2/tests/cassettes/test_instance_v1.yaml +13 -49
  94. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_lang_for_errors.yaml +14 -13
  95. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_list_add_remove_account.yaml +132 -132
  96. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_list_by_account.yaml +64 -64
  97. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_list_create.yaml +21 -21
  98. mastodon_py-2.2.2/tests/cassettes/test_list_timeline.yaml +589 -0
  99. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_list_update.yaml +43 -43
  100. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_log_in_none.yaml +9 -9
  101. mastodon_py-2.2.2/tests/cassettes/test_markers.yaml +257 -0
  102. mastodon_py-2.2.2/tests/cassettes/test_media_post[False].yaml +35756 -0
  103. mastodon_py-2.2.2/tests/cassettes/test_media_post[True].yaml +35760 -0
  104. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_media_post_file.yaml +15 -15
  105. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_media_post_multiple.yaml +94 -214
  106. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_media_post_pathlib.yaml +15 -15
  107. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_media_update.yaml +36 -36
  108. mastodon_py-2.2.2/tests/cassettes/test_min_max_id.yaml +382 -0
  109. mastodon_py-2.2.2/tests/cassettes/test_min_max_id_datetimes.yaml +258 -0
  110. mastodon_py-2.2.2/tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl +0 -0
  111. mastodon_py-2.2.2/tests/cassettes/test_mutes.yaml +62 -0
  112. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_nodeinfo.yaml +17 -17
  113. mastodon_py-2.2.2/tests/cassettes/test_notification_requests_accept.yaml +1556 -0
  114. mastodon_py-2.2.2/tests/cassettes/test_notifications.yaml +381 -0
  115. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_notifications_clear.yaml +7 -7
  116. mastodon_py-2.2.2/tests/cassettes/test_notifications_dismiss.yaml +260 -0
  117. mastodon_py-2.2.2/tests/cassettes/test_notifications_exclude_and_types.yaml +383 -0
  118. mastodon_py-2.2.2/tests/cassettes/test_notifications_exclude_types.yaml +192 -0
  119. mastodon_py-2.2.2/tests/cassettes/test_notifications_mentions_only.yaml +261 -0
  120. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_notifications_policy.yaml +31 -31
  121. mastodon_py-2.2.2/tests/cassettes/test_notifications_types.yaml +320 -0
  122. mastodon_py-2.2.2/tests/cassettes/test_pagination_iterator.yaml +4697 -0
  123. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_poll_illegal_vote.yaml +27 -27
  124. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_polls.yaml +60 -60
  125. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_preferences.yaml +7 -7
  126. mastodon_py-2.2.2/tests/cassettes/test_public_tl.yaml +358 -0
  127. mastodon_py-2.2.2/tests/cassettes/test_public_tl_anonymous.yaml +273 -0
  128. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_push_delete.yaml +26 -26
  129. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_push_set.yaml +20 -20
  130. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_push_set_all_events.yaml +11 -11
  131. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_push_update.yaml +53 -53
  132. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_push_update_all_events.yaml +20 -20
  133. mastodon_py-2.2.2/tests/cassettes/test_report.yaml +263 -0
  134. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_scheduled_status.yaml +54 -54
  135. mastodon_py-2.2.2/tests/cassettes/test_scheduled_status_datetimeobjects.pkl +0 -0
  136. mastodon_py-2.2.2/tests/cassettes/test_search.yaml +185 -0
  137. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_server_time.yaml +33 -33
  138. mastodon_py-2.2.2/tests/cassettes/test_server_time_datetimeobjects.pkl +0 -0
  139. mastodon_py-2.2.2/tests/cassettes/test_status.yaml +196 -0
  140. mastodon_py-2.2.2/tests/cassettes/test_status_card.yaml +204 -0
  141. mastodon_py-2.2.2/tests/cassettes/test_status_context.yaml +193 -0
  142. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_status_delete_media.yaml +126 -112
  143. mastodon_py-2.2.2/tests/cassettes/test_status_edit.yaml +374 -0
  144. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_status_empty.yaml +8 -8
  145. mastodon_py-2.2.2/tests/cassettes/test_status_fav_unfav.yaml +263 -0
  146. mastodon_py-2.2.2/tests/cassettes/test_status_favourited_by.yaml +263 -0
  147. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_status_missing.yaml +9 -9
  148. mastodon_py-2.2.2/tests/cassettes/test_status_mute_unmute.yaml +264 -0
  149. mastodon_py-2.2.2/tests/cassettes/test_status_pin_unpin.yaml +264 -0
  150. mastodon_py-2.2.2/tests/cassettes/test_status_post[Content warning-None].yaml +136 -0
  151. mastodon_py-2.2.2/tests/cassettes/test_status_post[Content warning-direct].yaml +136 -0
  152. mastodon_py-2.2.2/tests/cassettes/test_status_post[Content warning-private].yaml +136 -0
  153. mastodon_py-2.2.2/tests/cassettes/test_status_post[Content warning-public].yaml +136 -0
  154. mastodon_py-2.2.2/tests/cassettes/test_status_post[Content warning-unlisted].yaml +136 -0
  155. mastodon_py-2.2.2/tests/cassettes/test_status_post[None-None].yaml +134 -0
  156. mastodon_py-2.2.2/tests/cassettes/test_status_post[None-direct].yaml +134 -0
  157. mastodon_py-2.2.2/tests/cassettes/test_status_post[None-private].yaml +134 -0
  158. mastodon_py-2.2.2/tests/cassettes/test_status_post[None-public].yaml +134 -0
  159. mastodon_py-2.2.2/tests/cassettes/test_status_post[None-unlisted].yaml +134 -0
  160. mastodon_py-2.2.2/tests/cassettes/test_status_post_with_quote.yaml +276 -0
  161. mastodon_py-2.2.2/tests/cassettes/test_status_post_with_quote_approval_policy.yaml +202 -0
  162. mastodon_py-2.2.2/tests/cassettes/test_status_quote_approval_visibility.yaml +597 -0
  163. mastodon_py-2.2.2/tests/cassettes/test_status_quote_revoke.yaml +348 -0
  164. mastodon_py-2.2.2/tests/cassettes/test_status_quotes.yaml +193 -0
  165. mastodon_py-2.2.2/tests/cassettes/test_status_reblog_unreblog.yaml +267 -0
  166. mastodon_py-2.2.2/tests/cassettes/test_status_reblog_visibility.yaml +338 -0
  167. mastodon_py-2.2.2/tests/cassettes/test_status_reblogged_by.yaml +453 -0
  168. mastodon_py-2.2.2/tests/cassettes/test_status_reply.yaml +322 -0
  169. mastodon_py-2.2.2/tests/cassettes/test_status_reply_with_quote.yaml +476 -0
  170. mastodon_py-2.2.2/tests/cassettes/test_status_translate.yaml +195 -0
  171. mastodon_py-2.2.2/tests/cassettes/test_status_update_quote_approval_policy.yaml +206 -0
  172. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_status_update_with_media_edit.yaml +78 -77
  173. mastodon_py-2.2.2/tests/cassettes/test_stream_direct.yaml +438 -0
  174. mastodon_py-2.2.2/tests/cassettes/test_stream_healthy.yaml +163 -0
  175. mastodon_py-2.2.2/tests/cassettes/test_stream_user_direct.yaml +859 -0
  176. mastodon_py-2.2.2/tests/cassettes/test_stream_user_local.yaml +364 -0
  177. mastodon_py-2.2.2/tests/cassettes/test_suggested_tags.yaml +196 -0
  178. mastodon_py-2.2.2/tests/cassettes/test_timeline_disabled.yaml +1311 -0
  179. mastodon_py-2.2.2/tests/cassettes/test_timeline_link_fails.yaml +123 -0
  180. mastodon_py-2.2.2/tests/cassettes/test_toot.yaml +134 -0
  181. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_translation_languages.yaml +8 -8
  182. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_trending_links.yaml +6 -6
  183. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_trending_statuses.yaml +7 -7
  184. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_trending_tags.yaml +13 -13
  185. mastodon_py-2.2.2/tests/cassettes/test_unauthed_home_tl_throws.yaml +192 -0
  186. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_v2_filters_keywords.yaml +67 -67
  187. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes/test_v2_filters_statuses.yaml +90 -90
  188. mastodon_py-2.2.2/tests/cassettes/test_verify_credentials.yaml +120 -0
  189. mastodon_py-2.2.2/tests/cassettes/test_verify_version.yaml +129 -0
  190. mastodon_py-2.2.2/tests/cassettes_special/test_scheduled_status_long_datetimeobjects.pkl +0 -0
  191. mastodon_py-2.2.2/tests/cassettes_special/test_scheduled_status_long_part1.yaml +130 -0
  192. mastodon_py-2.2.2/tests/cassettes_special/test_scheduled_status_long_part2.yaml +92 -0
  193. mastodon_py-2.2.2/tests/cassettes_special/test_scheduled_status_long_text.pkl +0 -0
  194. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_account.py +12 -6
  195. mastodon_py-2.2.2/tests/test_constructor.py +184 -0
  196. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_entities.py +24 -6
  197. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_instance.py +7 -1
  198. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_status.py +8 -2
  199. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_streaming.py +41 -21
  200. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_timeline.py +52 -2
  201. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_trends.py +0 -1
  202. mastodon_py-2.2.1/tests/cassettes/test_account.yaml +0 -120
  203. mastodon_py-2.2.1/tests/cassettes/test_account_pinned.yaml +0 -525
  204. mastodon_py-2.2.1/tests/cassettes/test_account_update_credentials.yaml +0 -2093
  205. mastodon_py-2.2.1/tests/cassettes/test_accounts.yaml +0 -179
  206. mastodon_py-2.2.1/tests/cassettes/test_admin_accounts.yaml +0 -184
  207. mastodon_py-2.2.1/tests/cassettes/test_admin_accounts_v1.yaml +0 -184
  208. mastodon_py-2.2.1/tests/cassettes/test_admin_accounts_v2.yaml +0 -241
  209. mastodon_py-2.2.1/tests/cassettes/test_admin_reports.yaml +0 -824
  210. mastodon_py-2.2.1/tests/cassettes/test_attribute_access.yaml +0 -134
  211. mastodon_py-2.2.1/tests/cassettes/test_bookmarks.yaml +0 -452
  212. mastodon_py-2.2.1/tests/cassettes/test_conversations.yaml +0 -400
  213. mastodon_py-2.2.1/tests/cassettes/test_date_hook.yaml +0 -134
  214. mastodon_py-2.2.1/tests/cassettes/test_fetch_next_previous.yaml +0 -1653
  215. mastodon_py-2.2.1/tests/cassettes/test_fetch_next_previous_after_persist.yaml +0 -1653
  216. mastodon_py-2.2.1/tests/cassettes/test_fetch_next_previous_from_pagination_info.yaml +0 -1653
  217. mastodon_py-2.2.1/tests/cassettes/test_fetch_remaining.yaml +0 -4270
  218. mastodon_py-2.2.1/tests/cassettes/test_follow_with_notify_reblog.yaml +0 -677
  219. mastodon_py-2.2.1/tests/cassettes/test_get_pagination_info.yaml +0 -1487
  220. mastodon_py-2.2.1/tests/cassettes/test_grouped_notification_pagination.yaml +0 -1630
  221. mastodon_py-2.2.1/tests/cassettes/test_grouped_notifications.yaml +0 -580
  222. mastodon_py-2.2.1/tests/cassettes/test_hashtag_tl.yaml +0 -199
  223. mastodon_py-2.2.1/tests/cassettes/test_home_tl.yaml +0 -268
  224. mastodon_py-2.2.1/tests/cassettes/test_id_hook.yaml +0 -134
  225. mastodon_py-2.2.1/tests/cassettes/test_id_hook_in_reply_to.yaml +0 -266
  226. mastodon_py-2.2.1/tests/cassettes/test_id_hook_within_reblog.yaml +0 -269
  227. mastodon_py-2.2.1/tests/cassettes/test_instance.yaml +0 -63
  228. mastodon_py-2.2.1/tests/cassettes/test_instance_activity.yaml +0 -63
  229. mastodon_py-2.2.1/tests/cassettes/test_instance_v1.yaml +0 -65
  230. mastodon_py-2.2.1/tests/cassettes/test_list_timeline.yaml +0 -576
  231. mastodon_py-2.2.1/tests/cassettes/test_markers.yaml +0 -257
  232. mastodon_py-2.2.1/tests/cassettes/test_media_post[False].yaml +0 -35755
  233. mastodon_py-2.2.1/tests/cassettes/test_media_post[True].yaml +0 -35759
  234. mastodon_py-2.2.1/tests/cassettes/test_min_max_id.yaml +0 -382
  235. mastodon_py-2.2.1/tests/cassettes/test_min_max_id_datetimes.yaml +0 -258
  236. mastodon_py-2.2.1/tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl +0 -0
  237. mastodon_py-2.2.1/tests/cassettes/test_mutes.yaml +0 -63
  238. mastodon_py-2.2.1/tests/cassettes/test_notification_requests_accept.yaml +0 -1555
  239. mastodon_py-2.2.1/tests/cassettes/test_notifications.yaml +0 -385
  240. mastodon_py-2.2.1/tests/cassettes/test_notifications_dismiss.yaml +0 -262
  241. mastodon_py-2.2.1/tests/cassettes/test_notifications_exclude_and_types.yaml +0 -386
  242. mastodon_py-2.2.1/tests/cassettes/test_notifications_exclude_types.yaml +0 -193
  243. mastodon_py-2.2.1/tests/cassettes/test_notifications_mentions_only.yaml +0 -264
  244. mastodon_py-2.2.1/tests/cassettes/test_notifications_types.yaml +0 -323
  245. mastodon_py-2.2.1/tests/cassettes/test_pagination_iterator.yaml +0 -4633
  246. mastodon_py-2.2.1/tests/cassettes/test_public_tl.yaml +0 -306
  247. mastodon_py-2.2.1/tests/cassettes/test_public_tl_anonymous.yaml +0 -218
  248. mastodon_py-2.2.1/tests/cassettes/test_report.yaml +0 -263
  249. mastodon_py-2.2.1/tests/cassettes/test_scheduled_status_datetimeobjects.pkl +0 -0
  250. mastodon_py-2.2.1/tests/cassettes/test_search.yaml +0 -185
  251. mastodon_py-2.2.1/tests/cassettes/test_server_time_datetimeobjects.pkl +0 -0
  252. mastodon_py-2.2.1/tests/cassettes/test_status.yaml +0 -196
  253. mastodon_py-2.2.1/tests/cassettes/test_status_card.yaml +0 -198
  254. mastodon_py-2.2.1/tests/cassettes/test_status_context.yaml +0 -193
  255. mastodon_py-2.2.1/tests/cassettes/test_status_edit.yaml +0 -376
  256. mastodon_py-2.2.1/tests/cassettes/test_status_fav_unfav.yaml +0 -263
  257. mastodon_py-2.2.1/tests/cassettes/test_status_favourited_by.yaml +0 -263
  258. mastodon_py-2.2.1/tests/cassettes/test_status_mute_unmute.yaml +0 -264
  259. mastodon_py-2.2.1/tests/cassettes/test_status_pin_unpin.yaml +0 -264
  260. mastodon_py-2.2.1/tests/cassettes/test_status_post[Content warning-None].yaml +0 -136
  261. mastodon_py-2.2.1/tests/cassettes/test_status_post[Content warning-direct].yaml +0 -136
  262. mastodon_py-2.2.1/tests/cassettes/test_status_post[Content warning-private].yaml +0 -136
  263. mastodon_py-2.2.1/tests/cassettes/test_status_post[Content warning-public].yaml +0 -136
  264. mastodon_py-2.2.1/tests/cassettes/test_status_post[Content warning-unlisted].yaml +0 -136
  265. mastodon_py-2.2.1/tests/cassettes/test_status_post[None-None].yaml +0 -134
  266. mastodon_py-2.2.1/tests/cassettes/test_status_post[None-direct].yaml +0 -134
  267. mastodon_py-2.2.1/tests/cassettes/test_status_post[None-private].yaml +0 -134
  268. mastodon_py-2.2.1/tests/cassettes/test_status_post[None-public].yaml +0 -134
  269. mastodon_py-2.2.1/tests/cassettes/test_status_post[None-unlisted].yaml +0 -134
  270. mastodon_py-2.2.1/tests/cassettes/test_status_post_with_quote.yaml +0 -276
  271. mastodon_py-2.2.1/tests/cassettes/test_status_post_with_quote_approval_policy.yaml +0 -201
  272. mastodon_py-2.2.1/tests/cassettes/test_status_quote_approval_visibility.yaml +0 -602
  273. mastodon_py-2.2.1/tests/cassettes/test_status_quote_revoke.yaml +0 -347
  274. mastodon_py-2.2.1/tests/cassettes/test_status_quotes.yaml +0 -193
  275. mastodon_py-2.2.1/tests/cassettes/test_status_reblog_unreblog.yaml +0 -267
  276. mastodon_py-2.2.1/tests/cassettes/test_status_reblog_visibility.yaml +0 -338
  277. mastodon_py-2.2.1/tests/cassettes/test_status_reblogged_by.yaml +0 -453
  278. mastodon_py-2.2.1/tests/cassettes/test_status_reply.yaml +0 -323
  279. mastodon_py-2.2.1/tests/cassettes/test_status_reply_with_quote.yaml +0 -457
  280. mastodon_py-2.2.1/tests/cassettes/test_status_translate.yaml +0 -195
  281. mastodon_py-2.2.1/tests/cassettes/test_status_update_quote_approval_policy.yaml +0 -205
  282. mastodon_py-2.2.1/tests/cassettes/test_stream_direct.yaml +0 -374
  283. mastodon_py-2.2.1/tests/cassettes/test_stream_user_direct.yaml +0 -859
  284. mastodon_py-2.2.1/tests/cassettes/test_stream_user_local.yaml +0 -366
  285. mastodon_py-2.2.1/tests/cassettes/test_suggested_tags.yaml +0 -196
  286. mastodon_py-2.2.1/tests/cassettes/test_timeline_link_fails.yaml +0 -59
  287. mastodon_py-2.2.1/tests/cassettes/test_toot.yaml +0 -134
  288. mastodon_py-2.2.1/tests/cassettes/test_unauthed_home_tl_throws.yaml +0 -192
  289. mastodon_py-2.2.1/tests/cassettes/test_verify_credentials.yaml +0 -120
  290. mastodon_py-2.2.1/tests/cassettes/test_verify_version.yaml +0 -374
  291. mastodon_py-2.2.1/tests/cassettes_special/test_scheduled_status_long_datetimeobjects.pkl +0 -0
  292. mastodon_py-2.2.1/tests/cassettes_special/test_scheduled_status_long_part1.yaml +0 -133
  293. mastodon_py-2.2.1/tests/cassettes_special/test_scheduled_status_long_part2.yaml +0 -73
  294. mastodon_py-2.2.1/tests/cassettes_special/test_scheduled_status_long_text.pkl +0 -0
  295. mastodon_py-2.2.1/tests/test_constructor.py +0 -48
  296. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/LICENSE +0 -0
  297. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/MANIFEST.in +0 -0
  298. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/Mastodon.py.egg-info/dependency_links.txt +0 -0
  299. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/Mastodon.py.egg-info/requires.txt +0 -0
  300. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/Mastodon.py.egg-info/top_level.txt +0 -0
  301. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/01_general.rst +0 -0
  302. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/02_return_values.rst +0 -0
  303. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/03_errors.rst +0 -0
  304. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/04_auth.rst +0 -0
  305. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/05_statuses.rst +0 -0
  306. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/06_accounts.rst +0 -0
  307. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/08_instances.rst +0 -0
  308. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/09_notifications.rst +0 -0
  309. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/10_streaming.rst +0 -0
  310. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/11_misc.rst +0 -0
  311. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/12_utilities.rst +0 -0
  312. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/13_admin.rst +0 -0
  313. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/14_contributing.rst +0 -0
  314. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/15_everything.rst +0 -0
  315. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/Makefile +0 -0
  316. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/index.rst +0 -0
  317. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/docs/update_everything_page.sh +0 -0
  318. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/__init__.py +0 -0
  319. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/_url_regex.py +0 -0
  320. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/accounts.py +0 -0
  321. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/admin.py +0 -0
  322. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/async_refresh.py +0 -0
  323. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/compat.py +0 -0
  324. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/conversations.py +0 -0
  325. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/defaults.py +0 -0
  326. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/endorsements.py +0 -0
  327. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/errors.py +0 -0
  328. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/favourites.py +0 -0
  329. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/filters.py +0 -0
  330. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/hashtags.py +0 -0
  331. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/lists.py +0 -0
  332. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/media.py +0 -0
  333. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/notifications.py +0 -0
  334. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/polls.py +0 -0
  335. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/preferences.py +0 -0
  336. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/push.py +0 -0
  337. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/py.typed +0 -0
  338. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/relationships.py +0 -0
  339. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/reports.py +0 -0
  340. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/return_types.py +0 -0
  341. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/statuses.py +0 -0
  342. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/streaming.py +0 -0
  343. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/suggestions.py +0 -0
  344. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/trends.py +0 -0
  345. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/types_base.py +0 -0
  346. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/mastodon/versions.py +0 -0
  347. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/setup.cfg +0 -0
  348. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/setup.py +0 -0
  349. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/README.markdown +0 -0
  350. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/__init__.py +0 -0
  351. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/amewatson.jpg +0 -0
  352. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_account.yaml +0 -0
  353. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_accountcreationerror.yaml +0 -0
  354. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_accountcreationerrordetails.yaml +0 -0
  355. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_accountcreationerrordetailsfield.yaml +0 -0
  356. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_accountfield.yaml +0 -0
  357. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_activity.yaml +0 -0
  358. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_announcement.yaml +0 -0
  359. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_application.yaml +0 -0
  360. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_context.yaml +0 -0
  361. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_conversation.yaml +0 -0
  362. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_credentialaccountsource.yaml +0 -0
  363. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_customemoji.yaml +0 -0
  364. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_domainblock.yaml +0 -0
  365. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_extendeddescription.yaml +0 -0
  366. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_familiarfollowers.yaml +0 -0
  367. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_featuredtag.yaml +0 -0
  368. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_filter.yaml +0 -0
  369. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_filterkeyword.yaml +0 -0
  370. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_filterresult.yaml +0 -0
  371. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_filterstatus.yaml +0 -0
  372. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_filterv2.yaml +0 -0
  373. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_groupednotificationsresults.yaml +0 -0
  374. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instance.yaml +0 -0
  375. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instanceaccountconfiguration.yaml +0 -0
  376. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instanceconfiguration.yaml +0 -0
  377. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instanceconfigurationv2.yaml +0 -0
  378. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instancecontact.yaml +0 -0
  379. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instanceicon.yaml +0 -0
  380. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instancemediaconfiguration.yaml +0 -0
  381. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instancepollconfiguration.yaml +0 -0
  382. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instanceregistrations.yaml +0 -0
  383. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instancestatistics.yaml +0 -0
  384. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instancestatusconfiguration.yaml +0 -0
  385. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instancethumbnail.yaml +0 -0
  386. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instancethumbnailversions.yaml +0 -0
  387. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instancetimelinesaccessconfiguration.yaml +0 -0
  388. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instancetimelinesaccessfeedconfiguration.yaml +0 -0
  389. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instancetranslationconfiguration.yaml +0 -0
  390. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instanceurls.yaml +0 -0
  391. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instanceurlsv2.yaml +0 -0
  392. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instanceusage.yaml +0 -0
  393. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instanceusageusers.yaml +0 -0
  394. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instancev2.yaml +0 -0
  395. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_instancevapidkey.yaml +0 -0
  396. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_marker.yaml +0 -0
  397. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_mediaattachment.yaml +0 -0
  398. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_mediaattachmentaudiometadata.yaml +0 -0
  399. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_mediaattachmentcolors.yaml +0 -0
  400. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_mediaattachmentfocuspoint.yaml +0 -0
  401. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_mediaattachmentimagemetadata.yaml +0 -0
  402. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_mediaattachmentmetadatacontainer.yaml +0 -0
  403. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_mediaattachmentvideometadata.yaml +0 -0
  404. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_nodeinfo.yaml +0 -0
  405. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_nodeinfometadata.yaml +0 -0
  406. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_nodeinfoservices.yaml +0 -0
  407. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_nodeinfosoftware.yaml +0 -0
  408. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_nodeinfousage.yaml +0 -0
  409. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_nodeinfousageusers.yaml +0 -0
  410. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_notification.yaml +0 -0
  411. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_notificationgroup.yaml +0 -0
  412. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_notificationpolicy.yaml +0 -0
  413. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_notificationpolicysummary.yaml +0 -0
  414. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_oauthserverinfo.yaml +0 -0
  415. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_oauthuserinfo.yaml +0 -0
  416. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_partialaccountwithavatar.yaml +0 -0
  417. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_poll.yaml +0 -0
  418. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_polloption.yaml +0 -0
  419. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_preferences.yaml +0 -0
  420. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_previewcard.yaml +0 -0
  421. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_previewcardauthor.yaml +0 -0
  422. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_quote.yaml +0 -0
  423. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_quoteapproval.yaml +0 -0
  424. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_reaction.yaml +0 -0
  425. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_relationship.yaml +0 -0
  426. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_role.yaml +0 -0
  427. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_rule.yaml +0 -0
  428. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_ruletranslation.yaml +0 -0
  429. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_scheduledstatus.yaml +0 -0
  430. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_scheduledstatusparams.yaml +0 -0
  431. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_searchv2.yaml +0 -0
  432. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_shallowquote.yaml +0 -0
  433. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_status.yaml +0 -0
  434. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_statusedit.yaml +0 -0
  435. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_statusmention.yaml +0 -0
  436. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_statussource.yaml +0 -0
  437. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_suggestion.yaml +0 -0
  438. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_supportedlocale.yaml +0 -0
  439. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_tag.yaml +0 -0
  440. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_taghistory.yaml +0 -0
  441. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_termsofservice.yaml +0 -0
  442. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_trendinglinkhistory.yaml +0 -0
  443. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_unreadnotificationscount.yaml +0 -0
  444. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_userlist.yaml +0 -0
  445. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_webpushsubscription.yaml +0 -0
  446. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_entity_tests/test_entity_webpushsubscriptionalerts.yaml +0 -0
  447. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_old_pagination/test_fetch_next_previous.yaml +0 -0
  448. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_old_pagination/test_fetch_next_previous_from_pagination_info.yaml +0 -0
  449. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_pre_2_9_2/test_notifications_dismiss.yaml +0 -0
  450. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_pre_2_9_2/test_search.yaml +0 -0
  451. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_pre_2_9_2/test_status_card.yaml +0 -0
  452. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_pre_4_0_0/test_filter_clientside.yaml +0 -0
  453. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_pre_4_0_0/test_filter_create.yaml +0 -0
  454. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_pre_4_0_0/test_filter_serverside.yaml +0 -0
  455. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_pre_4_0_0/test_filter_update.yaml +0 -0
  456. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_pre_4_0_0/test_media_post.yaml +0 -0
  457. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_pre_4_4_0/test_log_in_password.yaml +0 -0
  458. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_pre_4_4_0/test_log_in_password_incorrect.yaml +0 -0
  459. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_pre_4_4_0/test_log_in_password_to_file.yaml +0 -0
  460. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/cassettes_pre_4_4_0/test_zzz_revoke.yaml +0 -0
  461. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/conftest.py +0 -0
  462. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/image.jpg +0 -0
  463. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/run_mastodon_for_tests.sh +0 -0
  464. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/setup.sql +0 -0
  465. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_admin.py +0 -0
  466. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_async_refresh.py +0 -0
  467. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_auth.py +0 -0
  468. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_blurhash.py +0 -0
  469. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_bookmarks.py +0 -0
  470. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_create_app.py +0 -0
  471. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_domain_blocks.py +0 -0
  472. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_errors.py +0 -0
  473. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_filters.py +0 -0
  474. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_follow_requests.py +0 -0
  475. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_hooks.py +0 -0
  476. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_lists.py +0 -0
  477. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_markers.py +0 -0
  478. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_media.py +0 -0
  479. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_notifications.py +0 -0
  480. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_pagination.py +0 -0
  481. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_polls.py +0 -0
  482. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_push.py +0 -0
  483. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_quotes.py +0 -0
  484. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_reports.py +0 -0
  485. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_search.py +0 -0
  486. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_status_length.py +0 -0
  487. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_types_base.py +0 -0
  488. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/test_zzz_revoke.py +0 -0
  489. {mastodon_py-2.2.1 → mastodon_py-2.2.2}/tests/video.mp4 +0 -0
@@ -2,6 +2,14 @@ A note on versioning: This librarys major version will grow with the APIs
2
2
  version number. Breaking changes will be indicated by a change in the minor
3
3
  (or major) version number, and will generally be avoided.
4
4
 
5
+ v2.2.2
6
+ -------
7
+ * Improve instance information caching
8
+ * Add a function to check whether a given timeline is available on an instance (Thanks @pdeitel for the report that triggered this)
9
+ * Add warnings when a user tries to access the stream for a deprecated timeline (Thanks @pdeitel for the report that triggered this)
10
+ * Add missing `limit` parameter for `search` (Thanks @Vitexus)
11
+ * Various small fixes and improvements to testing
12
+
5
13
  v2.2.1
6
14
  ------
7
15
  * Updated citation information to match the new JOSS publication (Thanks @dataspider and @professornaite for reviewing and @danielskatz for editing)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Mastodon.py
3
- Version: 2.2.1
3
+ Version: 2.2.2
4
4
  Summary: Python wrapper for the Mastodon API
5
5
  Author-email: Lorenz Diener <lorenzd+mastodonpypypi@gmail.com>
6
6
  License: MIT
@@ -107,6 +107,9 @@ If you use Mastodon.py as part of your research, please review and cite the foll
107
107
 
108
108
  Diener et al., (2026). Mastodon.py: A Python library for the Mastodon API. *Journal of Open Source Software*, 11(120), 8946, https://doi.org/10.21105/joss.08946
109
109
 
110
+ .. image:: https://joss.theoj.org/papers/10.21105/joss.08946/status.svg
111
+ :target: https://doi.org/10.21105/joss.08946
112
+
110
113
  Acknowledgements
111
114
  ----------------
112
115
  Mastodon.py contains work by a large amount of contributors, many of which have
@@ -266,6 +266,7 @@ tests/cassettes/test_stream_healthy.yaml
266
266
  tests/cassettes/test_stream_user_direct.yaml
267
267
  tests/cassettes/test_stream_user_local.yaml
268
268
  tests/cassettes/test_suggested_tags.yaml
269
+ tests/cassettes/test_timeline_disabled.yaml
269
270
  tests/cassettes/test_timeline_link_fails.yaml
270
271
  tests/cassettes/test_toot.yaml
271
272
  tests/cassettes/test_translation_languages.yaml
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Mastodon.py
3
- Version: 2.2.1
3
+ Version: 2.2.2
4
4
  Summary: Python wrapper for the Mastodon API
5
5
  Author-email: Lorenz Diener <lorenzd+mastodonpypypi@gmail.com>
6
6
  License: MIT
@@ -107,6 +107,9 @@ If you use Mastodon.py as part of your research, please review and cite the foll
107
107
 
108
108
  Diener et al., (2026). Mastodon.py: A Python library for the Mastodon API. *Journal of Open Source Software*, 11(120), 8946, https://doi.org/10.21105/joss.08946
109
109
 
110
+ .. image:: https://joss.theoj.org/papers/10.21105/joss.08946/status.svg
111
+ :target: https://doi.org/10.21105/joss.08946
112
+
110
113
  Acknowledgements
111
114
  ----------------
112
115
  Mastodon.py contains work by a large amount of contributors, many of which have
@@ -56,6 +56,9 @@ If you use Mastodon.py as part of your research, please review and cite the foll
56
56
 
57
57
  Diener et al., (2026). Mastodon.py: A Python library for the Mastodon API. *Journal of Open Source Software*, 11(120), 8946, https://doi.org/10.21105/joss.08946
58
58
 
59
+ .. image:: https://joss.theoj.org/papers/10.21105/joss.08946/status.svg
60
+ :target: https://doi.org/10.21105/joss.08946
61
+
59
62
  Acknowledgements
60
63
  ----------------
61
64
  Mastodon.py contains work by a large amount of contributors, many of which have
@@ -11,6 +11,7 @@ access is allowed even when not authenticated if the instance admin has enabled
11
11
 
12
12
  .. _timeline():
13
13
  .. automethod:: Mastodon.timeline
14
+ .. automethod:: Mastodon.timeline_is_available
14
15
  .. automethod:: Mastodon.timeline_home
15
16
  .. automethod:: Mastodon.timeline_local
16
17
  .. _timeline_public():
@@ -68,7 +68,7 @@ author = u'Lorenz Diener'
68
68
  # The short X.Y version.
69
69
  version = u'2.2'
70
70
  # The full version, including alpha/beta/rc tags.
71
- release = u'2.2.1'
71
+ release = u'2.2.2'
72
72
 
73
73
  # The language for content autogenerated by Sphinx. Refer to documentation
74
74
  # for a list of supported languages.
@@ -74,7 +74,7 @@ class Mastodon(MastoUtility, MastoAuthentication, MastoAccounts, MastoInstance,
74
74
  """
75
75
  # Support level
76
76
  __SUPPORTED_MASTODON_VERSION = "4.5.8"
77
- __MASTODON_PY_VERSION = "2.2.1"
77
+ __MASTODON_PY_VERSION = "2.2.2"
78
78
 
79
79
  @staticmethod
80
80
  def get_supported_version() -> str:
@@ -254,8 +254,10 @@ class Mastodon(Internals):
254
254
  self.__version_check_tried = True
255
255
  self.__version_check_worked = True
256
256
 
257
- # Cached version check
257
+ # Cached version/instance checks
258
258
  self.__streaming_base = None
259
+ self.__instance_v1_cache = None
260
+ self.__instance_v2_cache = None
259
261
 
260
262
  # Versioning
261
263
  if mastodon_version is None and self.version_check_mode != 'none':
@@ -277,6 +279,8 @@ class Mastodon(Internals):
277
279
  self.__version_check_worked = None
278
280
  self.__version_check_tried = False
279
281
  self.__streaming_base = None
282
+ self.__instance_v1_cache = None
283
+ self.__instance_v2_cache = None
280
284
 
281
285
  def auth_request_url(self, client_id: Optional[Union[str, PurePath]] = None, redirect_uris: str = "urn:ietf:wg:oauth:2.0:oob",
282
286
  scopes: List[str] =_DEFAULT_SCOPES, force_login: bool = False, state: Optional[str] = None,
@@ -28,16 +28,20 @@ class Mastodon(Internals):
28
28
  instance = self.__api_request('GET', '/api/v1/instance/', override_type=Instance)
29
29
  return instance
30
30
 
31
- def __instance(self) -> Instance:
31
+ def __instance(self, cached: bool = False) -> Instance:
32
32
  """
33
33
  Internal, non-version-checking helper that does the same as instance_v1()
34
34
 
35
35
  Silences the deprecation warnning, we are careful about fallbacks anywhere this is used.
36
36
  If you are using this, this is your notice to do that.
37
37
  """
38
+ if cached and self.__instance_v1_cache is not None:
39
+ return self.__instance_v1_cache
40
+
38
41
  with warnings.catch_warnings():
39
42
  warnings.simplefilter("ignore", category=MastodonDeprecationWarning)
40
43
  instance = self.__api_request('GET', '/api/v1/instance/', override_type=Instance)
44
+ self.__instance_v1_cache = instance
41
45
  return instance
42
46
 
43
47
  @api_version("4.0.0", "4.0.0")
@@ -49,11 +53,15 @@ class Mastodon(Internals):
49
53
  """
50
54
  return self.__api_request('GET', '/api/v2/instance/')
51
55
 
52
- def __instance_v2(self) -> InstanceV2:
56
+ def __instance_v2(self, cached: bool = False) -> InstanceV2:
53
57
  """
54
58
  Internal, non-version-checking helper that does the same as instance_v2()
55
59
  """
60
+ if cached and self.__instance_v2_cache is not None:
61
+ return self.__instance_v2_cache
62
+
56
63
  instance = self.__api_request('GET', '/api/v2/instance/', override_type=InstanceV2)
64
+ self.__instance_v2_cache = instance
57
65
  return instance
58
66
 
59
67
  @api_version("1.1.0", "4.0.0")
@@ -19,7 +19,7 @@ import warnings
19
19
  from mastodon.versions import parse_version_string
20
20
  from mastodon.errors import MastodonNetworkError, MastodonIllegalArgumentError, MastodonRatelimitError, MastodonNotFoundError, \
21
21
  MastodonUnauthorizedError, MastodonInternalServerError, MastodonBadGatewayError, MastodonServiceUnavailableError, \
22
- MastodonGatewayTimeoutError, MastodonServerError, MastodonAPIError, MastodonMalformedEventError, MastodonDeprecationWarning
22
+ MastodonGatewayTimeoutError, MastodonServerError, MastodonAPIError, MastodonMalformedEventError, MastodonDeprecationWarning, MastodonWarning
23
23
  from mastodon.compat import urlparse, magic, PurePath, Path
24
24
  from mastodon.defaults import _DEFAULT_STREAM_TIMEOUT, _DEFAULT_STREAM_RECONNECT_WAIT_SEC
25
25
  from mastodon.return_types import AttribAccessDict, PaginatableList, try_cast_recurse
@@ -27,8 +27,55 @@ from mastodon.return_types import *
27
27
 
28
28
  ###
29
29
  # Internal helpers, dragons probably
30
+ # timeline_is_available is exported and can be used, it is here for import circularity reasons
30
31
  ###
31
32
  class Mastodon():
33
+ def timeline_is_available(self, timeline: str = "public", local: bool = False, remote: bool = False,
34
+ with_auth: bool = False, fail_hard: bool = False) -> bool:
35
+ """
36
+ Determine whether a given public timeline feed variant is available on this instance.
37
+
38
+ Supported parameter values are as in `timeline()`.
39
+
40
+ Set `with_auth` to True to return True for timelines that require login, not just fully public ones.
41
+ Set `fail_hard` to True to raise an exception if we fail to determine availability, instead of silently returning True.
42
+ """
43
+ timeline_to_feed_key = {
44
+ "public": "live_feeds",
45
+ "hashtag": "hashtag_feeds",
46
+ "trending_links": "trending_link_feeds",
47
+ }
48
+ if timeline not in timeline_to_feed_key:
49
+ if fail_hard:
50
+ raise MastodonIllegalArgumentError(f"Unknown timeline: {timeline}")
51
+ return True
52
+ feed_key = timeline_to_feed_key[timeline]
53
+
54
+ valid_values = ("public")
55
+ if with_auth:
56
+ valid_values = ("authenticated", "public")
57
+
58
+ try:
59
+ instance_v2_info = self.__instance_v2(cached=True)
60
+
61
+ timelines_access = instance_v2_info["configuration"]["timelines_access"]
62
+ feed_config = timelines_access[feed_key]
63
+ local_available = feed_config["local"] in valid_values
64
+ remote_available = feed_config["remote"] in valid_values
65
+
66
+ if local and remote:
67
+ return local_available and remote_available
68
+ elif local:
69
+ return local_available
70
+ elif remote:
71
+ return remote_available
72
+ else:
73
+ return local_available or remote_available
74
+ except Exception as e:
75
+ if fail_hard:
76
+ raise MastodonAPIError(f"Failed to determine timeline availability for '{timeline}'.") from e
77
+ return True
78
+
32
79
  def __datetime_to_epoch(self, date_time: datetime) -> float:
33
80
  """
34
81
  Converts a python datetime to unix epoch, accounting for
@@ -395,16 +442,22 @@ class Mastodon():
395
442
  """
396
443
  if self.__streaming_base is not None:
397
444
  return self.__streaming_base
445
+
446
+ if not self.timeline_is_available("public", with_auth=self.access_token is not None, fail_hard=False):
447
+ warnings.warn(
448
+ "Public timeline appears to be unavailable on this instance for the current auth context; streaming may fail.",
449
+ MastodonWarning
450
+ )
398
451
 
399
452
  # Try to support implementations that have no v1 endpoint (Sharkey does this)
400
453
  streaming_api_url = None
401
454
  try:
402
- instance = self.__instance()
455
+ instance = self.__instance(cached=True)
403
456
  if "streaming_api" in instance["urls"]:
404
457
  streaming_api_url = instance["urls"]["streaming_api"]
405
458
  except:
406
459
  try:
407
- streaming_api_url = self.__instance_v2().configuration.urls.streaming
460
+ streaming_api_url = self.__instance_v2(cached=True).configuration.urls.streaming
408
461
  except:
409
462
  pass
410
463
 
@@ -417,12 +470,15 @@ class Mastodon():
417
470
  elif parse.scheme == 'ws':
418
471
  url = "http://" + parse.netloc
419
472
  else:
473
+ if parse.scheme in ('http', 'https'):
474
+ url = parse.scheme + "://" + parse.netloc
420
475
  raise MastodonAPIError(
421
476
  f"Could not parse streaming api location returned from server: {streaming_api_url}."
422
477
  )
423
478
  else:
424
479
  url = self.api_base_url
425
480
  assert not url is None
481
+ self.__streaming_base = url
426
482
  return url
427
483
 
428
484
  def __stream(self, endpoint, listener, params={}, run_async=False, timeout=_DEFAULT_STREAM_TIMEOUT, reconnect_async=False, reconnect_async_wait_sec=_DEFAULT_STREAM_RECONNECT_WAIT_SEC):
@@ -21,10 +21,10 @@ class Mastodon(Internals):
21
21
  raise MastodonVersionError("Advanced search parameters require Mastodon 2.8.0+")
22
22
 
23
23
  @api_version("1.1.0", "2.8.0")
24
- def search(self, q: str, resolve: bool = True, result_type: Optional[str] = None,
25
- account_id: Optional[Union[Account, IdType]] = None, offset: Optional[int] = None,
26
- min_id: Optional[IdType] = None, max_id: Optional[IdType] = None,
27
- exclude_unreviewed: bool = True) -> Union[Search, SearchV2]:
24
+ def search(self, q: str, resolve: bool = True, result_type: Optional[str] = None,
25
+ account_id: Optional[Union[Account, IdType]] = None, offset: Optional[int] = None,
26
+ min_id: Optional[IdType] = None, max_id: Optional[IdType] = None,
27
+ exclude_unreviewed: bool = True, limit: Optional[int] = None) -> Union[Search, SearchV2]:
28
28
  """
29
29
  Fetch matching hashtags, accounts and statuses. Will perform webfinger
30
30
  lookups if resolve is True. Full-text search is only enabled if
@@ -42,6 +42,10 @@ class Mastodon(Internals):
42
42
  those that have been reviewed by moderators. It is on by default. When using the
43
43
  v1 search API (pre 2.4.1), it is ignored.
44
44
 
45
+ `limit` caps the number of results returned per category (accounts, statuses
46
+ and hashtags). It is only forwarded to the server when using the v2 search API
47
+ (pre 2.4.1 does not support it and it is silently ignored on search_v1).
48
+
45
49
  Will use search_v1 (no tags in return values) on Mastodon versions before
46
50
  2.4.1), search_v2 otherwise. Parameters other than resolve are only available
47
51
  on Mastodon 2.8.0 or above - this function will throw a MastodonVersionError
@@ -49,7 +53,7 @@ class Mastodon(Internals):
49
53
  number will be used for this to avoid uneccesary requests.
50
54
  """
51
55
  if self.verify_minimum_version("2.4.1", cached=True):
52
- return self.search_v2(q, resolve=resolve, result_type=result_type, account_id=account_id, offset=offset, min_id=min_id, max_id=max_id, exclude_unreviewed=exclude_unreviewed)
56
+ return self.search_v2(q, resolve=resolve, result_type=result_type, account_id=account_id, offset=offset, min_id=min_id, max_id=max_id, exclude_unreviewed=exclude_unreviewed, limit=limit)
53
57
  else:
54
58
  self.__ensure_search_params_acceptable(account_id, offset, min_id, max_id)
55
59
  return self.search_v1(q, resolve=resolve)
@@ -68,12 +72,12 @@ class Mastodon(Internals):
68
72
  return self.__api_request('GET', '/api/v1/search', params)
69
73
 
70
74
  @api_version("2.4.1", "2.8.0")
71
- def search_v2(self, q, resolve: bool = True, result_type: Optional[str] = None,
72
- account_id: Optional[Union[Account, IdType]] = None, offset: Optional[int] = None,
73
- min_id: Optional[IdType] = None, max_id: Optional[IdType] = None,
74
- exclude_unreviewed: bool = True) -> SearchV2:
75
+ def search_v2(self, q, resolve: bool = True, result_type: Optional[str] = None,
76
+ account_id: Optional[Union[Account, IdType]] = None, offset: Optional[int] = None,
77
+ min_id: Optional[IdType] = None, max_id: Optional[IdType] = None,
78
+ exclude_unreviewed: bool = True, limit: Optional[int] = None) -> SearchV2:
75
79
  """
76
- Identical to `search_v1()`, except in that it returns tags as objects,
80
+ Identical to `search_v1()`, except in that it returns tags as objects,
77
81
  has more parameters, and resolves by default.
78
82
 
79
83
  For more details documentation, please see `search()`
@@ -1,6 +1,8 @@
1
- # relationships.py - endpoints for user and domain blocks and mutes as well as follow requests
1
+ # streaming_endpoints.py - endpoints for getting streaming data using the HTTP SSE streaming API
2
2
 
3
- from mastodon.errors import MastodonIllegalArgumentError
3
+ import warnings
4
+
5
+ from mastodon.errors import MastodonIllegalArgumentError, MastodonWarning
4
6
  from mastodon.defaults import _DEFAULT_STREAM_TIMEOUT, _DEFAULT_STREAM_RECONNECT_WAIT_SEC
5
7
  from mastodon.utility import api_version
6
8
 
@@ -27,6 +29,12 @@ class Mastodon(Internals):
27
29
  Set `local` to True to only get local statuses.
28
30
  Set `remote` to True to only get remote statuses.
29
31
  """
32
+ if not self.timeline_is_available("public", local=local, remote=remote, with_auth=self.access_token is not None, fail_hard=False):
33
+ warnings.warn(
34
+ "Public stream appears to be unavailable on this instance for the current auth context.",
35
+ MastodonWarning
36
+ )
37
+
30
38
  base = '/api/v1/streaming/public'
31
39
  if local:
32
40
  base += '/local'
@@ -56,6 +64,13 @@ class Mastodon(Internals):
56
64
  """
57
65
  if tag.startswith("#"):
58
66
  raise MastodonIllegalArgumentError("Tag parameter should omit leading #")
67
+
68
+ if not self.timeline_is_available("hashtag", local=local, with_auth=self.access_token is not None, fail_hard=False):
69
+ warnings.warn(
70
+ "Hashtag stream appears to be unavailable on this instance for the current auth context.",
71
+ MastodonWarning
72
+ )
73
+
59
74
  base = '/api/v1/streaming/hashtag'
60
75
  if local:
61
76
  base += '/local'
@@ -1,6 +1,8 @@
1
1
  # timeline.py - endpoints for reading various different timelines
2
2
 
3
- from mastodon.errors import MastodonIllegalArgumentError, MastodonNotFoundError
3
+ import warnings
4
+
5
+ from mastodon.errors import MastodonIllegalArgumentError, MastodonNotFoundError, MastodonWarning
4
6
  from mastodon.utility import api_version
5
7
 
6
8
  from mastodon.internals import Mastodon as Internals
@@ -29,6 +31,38 @@ class Mastodon(Internals):
29
31
 
30
32
  See <https://docs.joinmastodon.org/methods/timelines/> for a description of the parameters.
31
33
  """
34
+ check_timeline = None
35
+ check_local = local
36
+ check_remote = remote
37
+
38
+ if timeline == "public":
39
+ check_timeline = "public"
40
+ elif timeline == "local":
41
+ check_timeline = "public"
42
+ check_local = True
43
+ check_remote = False
44
+ elif timeline.startswith("tag/"):
45
+ check_timeline = "hashtag"
46
+ elif timeline.startswith("link"):
47
+ check_timeline = "trending_links"
48
+
49
+ if check_timeline is not None:
50
+ available = self.timeline_is_available(check_timeline,
51
+ local=check_local,
52
+ remote=check_remote,
53
+ with_auth=self.access_token is not None,
54
+ fail_hard=False,
55
+ )
56
+ if not available:
57
+ warnings.warn(
58
+ f"Timeline '{timeline}' appears to be unavailable on this instance for the current auth context.",
59
+ MastodonWarning
60
+ )
61
+ del available
62
+ del check_timeline
63
+ del check_local
64
+ del check_remote
65
+
32
66
  params_initial = locals()
33
67
 
34
68
  if not local:
@@ -40,6 +74,7 @@ class Mastodon(Internals):
40
74
  if not only_media:
41
75
  del params_initial['only_media']
42
76
 
77
+
43
78
  if timeline == "local":
44
79
  timeline = "public"
45
80
  params_initial['local'] = True
@@ -31,43 +31,44 @@ class Mastodon(Internals):
31
31
  """
32
32
  self.lang = lang
33
33
 
34
- def retrieve_mastodon_version(self) -> str:
34
+ def retrieve_mastodon_version(self, fail_hard=False) -> str:
35
35
  """
36
36
  Determine installed Mastodon version and set major, minor and patch (not including RC info) accordingly.
37
37
 
38
38
  Returns the version string, possibly including rc info.
39
39
  """
40
40
  try:
41
- version_str = self.__normalize_version_string(
42
- self.__instance()["version"])
41
+ version_str = self.__normalize_version_string(self.__instance(cached=True)["version"])
43
42
  self.__version_check_worked = True
44
43
  except Exception as e:
44
+ if fail_hard:
45
+ raise MastodonVersionError("Failed to retrieve Mastodon version") from e
45
46
  # instance() was added in 1.1.0, so our best guess is 1.0.0.
46
47
  version_str = "1.0.0"
47
48
  self.__version_check_worked = False
48
- self.mastodon_major, self.mastodon_minor, self.mastodon_patch = parse_version_string(
49
- version_str)
49
+ self.mastodon_major, self.mastodon_minor, self.mastodon_patch = parse_version_string(version_str)
50
50
 
51
51
  # If the instance has an API version, we store that as well.
52
52
  # If we have a version >= 4.3.0 but no API version, we throw a warning that this is a Weird Implementation,
53
53
  # which might help with adoption of the API versioning or at least give us a better picture of how it is going.
54
54
  found_api_version = False
55
55
  try:
56
- instance_v2_info = self.__instance_v2()
57
- if "api_versions" in instance_v2_info and instance_v2_info["api_versions"]:
56
+ instance_v2_info = self.__instance_v2(cached=True)
57
+ if instance_v2_info and "api_versions" in instance_v2_info and instance_v2_info["api_versions"]:
58
58
  if "mastodon" in instance_v2_info["api_versions"]:
59
59
  self.mastodon_api_version = int(
60
60
  instance_v2_info["api_versions"]["mastodon"])
61
61
  found_api_version = True
62
- except MastodonNotFoundError:
63
- pass
64
- except MastodonVersionError:
62
+ except Exception as e:
63
+ # Not the worlds most important issue if this fails,
64
+ # so we silently eat it, unless requested not to
65
+ if fail_hard:
66
+ raise MastodonVersionError("Failed to retrieve Mastodon version") from e
65
67
  pass
66
68
 
67
69
  self.__version_check_tried = True
68
70
  if not found_api_version and self.verify_minimum_version("4.3.0", cached=True):
69
- warnings.warn(
70
- "Mastodon version is detected as >= 4.3.0, but no API version found. Please report this.")
71
+ warnings.warn("Mastodon version is detected as >= 4.3.0, but no API version found. Please report this.")
71
72
  return version_str
72
73
 
73
74
  def verify_minimum_version(self, version_str: str, cached: bool = False) -> bool:
@@ -4,7 +4,7 @@ build-backend= "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "Mastodon.py"
7
- version = "2.2.1"
7
+ version = "2.2.2"
8
8
  description = "Python wrapper for the Mastodon API"
9
9
  readme = "README.rst"
10
10
  authors = [
@@ -0,0 +1,120 @@
1
+ interactions:
2
+ - request:
3
+ body: null
4
+ headers:
5
+ Accept:
6
+ - '*/*'
7
+ Accept-Encoding:
8
+ - gzip, deflate, br
9
+ Authorization:
10
+ - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
11
+ Connection:
12
+ - keep-alive
13
+ User-Agent:
14
+ - tests/v311
15
+ method: GET
16
+ uri: http://localhost:3000/api/v1/accounts/verify_credentials
17
+ response:
18
+ body:
19
+ string: '{"id":"117020457910412882","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":true,"bot":false,"discoverable":null,"indexable":false,"group":false,"created_at":"2026-08-01T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test","uri":"http://localhost:3000/ap/users/117020457910412882","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","avatar_description":"","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","header_description":"","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":"2026-08-01","hide_collections":null,"show_media":true,"show_media_replies":true,"show_featured":true,"noindex":false,"feature_approval":{"automatic":[],"manual":[],"current_user":"denied"},"source":{"privacy":"public","sensitive":false,"language":null,"note":"","fields":[],"follow_requests_count":0,"hide_collections":null,"discoverable":null,"indexable":false,"attribution_domains":[],"quote_policy":"public"},"emojis":[],"roles":[],"fields":[],"role":{"id":"-99","name":"","permissions":"65536","color":"","highlighted":false,"collection_limit":10}}'
20
+ headers:
21
+ cache-control:
22
+ - private, no-store
23
+ content-length:
24
+ - '1271'
25
+ content-security-policy:
26
+ - default-src 'none'; frame-ancestors 'none'; form-action 'none'
27
+ content-type:
28
+ - application/json; charset=utf-8
29
+ etag:
30
+ - W/"a7699fb6b65496c5231cec6ec20144b1"
31
+ referrer-policy:
32
+ - strict-origin-when-cross-origin
33
+ server-timing:
34
+ - cache_read.active_support;dur=0.05, sql.active_record;dur=2.13, cache_generate.active_support;dur=2.29,
35
+ cache_write.active_support;dur=0.12, instantiation.active_record;dur=0.22,
36
+ start_processing.action_controller;dur=0.00, render.active_model_serializers;dur=4.95,
37
+ process_action.action_controller;dur=12.41
38
+ vary:
39
+ - Authorization, Origin
40
+ x-content-type-options:
41
+ - nosniff
42
+ x-frame-options:
43
+ - SAMEORIGIN
44
+ x-permitted-cross-domain-policies:
45
+ - none
46
+ x-ratelimit-limit:
47
+ - '300'
48
+ x-ratelimit-remaining:
49
+ - '299'
50
+ x-ratelimit-reset:
51
+ - '2026-08-01T13:50:00.037659Z'
52
+ x-request-id:
53
+ - 6ec58778-e737-4ccb-9a99-5a3f12313eed
54
+ x-runtime:
55
+ - '0.072670'
56
+ x-xss-protection:
57
+ - '0'
58
+ status:
59
+ code: 200
60
+ message: OK
61
+ - request:
62
+ body: null
63
+ headers:
64
+ Accept:
65
+ - '*/*'
66
+ Accept-Encoding:
67
+ - gzip, deflate, br
68
+ Authorization:
69
+ - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
70
+ Connection:
71
+ - keep-alive
72
+ User-Agent:
73
+ - tests/v311
74
+ method: GET
75
+ uri: http://localhost:3000/api/v1/accounts/117020457910412882
76
+ response:
77
+ body:
78
+ string: '{"id":"117020457910412882","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":true,"bot":false,"discoverable":null,"indexable":false,"group":false,"created_at":"2026-08-01T00:00:00.000Z","note":"","url":"http://localhost:3000/@mastodonpy_test","uri":"http://localhost:3000/ap/users/117020457910412882","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","avatar_description":"","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","header_description":"","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":"2026-08-01","hide_collections":null,"show_media":true,"show_media_replies":true,"show_featured":true,"noindex":false,"feature_approval":{"automatic":[],"manual":[],"current_user":"denied"},"emojis":[],"roles":[],"fields":[]}'
79
+ headers:
80
+ cache-control:
81
+ - private, no-store
82
+ content-length:
83
+ - '943'
84
+ content-security-policy:
85
+ - default-src 'none'; frame-ancestors 'none'; form-action 'none'
86
+ content-type:
87
+ - application/json; charset=utf-8
88
+ etag:
89
+ - W/"a3d0c38dd21cf8ec4f387bcc547b7f43"
90
+ referrer-policy:
91
+ - strict-origin-when-cross-origin
92
+ server-timing:
93
+ - cache_read.active_support;dur=0.05, sql.active_record;dur=12.41, cache_generate.active_support;dur=10.02,
94
+ cache_write.active_support;dur=0.14, instantiation.active_record;dur=0.25,
95
+ start_processing.action_controller;dur=0.00, render.active_model_serializers;dur=3.85,
96
+ process_action.action_controller;dur=12.39
97
+ vary:
98
+ - Authorization, Origin
99
+ x-content-type-options:
100
+ - nosniff
101
+ x-frame-options:
102
+ - SAMEORIGIN
103
+ x-permitted-cross-domain-policies:
104
+ - none
105
+ x-ratelimit-limit:
106
+ - '300'
107
+ x-ratelimit-remaining:
108
+ - '299'
109
+ x-ratelimit-reset:
110
+ - '2026-08-01T13:50:00.104512Z'
111
+ x-request-id:
112
+ - db9da276-f4cf-4fc5-940b-d7cff360472c
113
+ x-runtime:
114
+ - '0.036413'
115
+ x-xss-protection:
116
+ - '0'
117
+ status:
118
+ code: 200
119
+ message: OK
120
+ version: 1