Page MenuHomePhabricator

User-agent missing on eventsteams
Closed, ResolvedPublic

Description

Starting 2 hours ago my eventstreams started to fail with http status 403 and the message

Please set a user-agent and respect our robot policy https://w.wiki/4wJS. See also T400119.

I have submitted a change to gerrit that sets a valid user-agent as default.

Details

Event Timeline

DerIch27 renamed this task from User agend missing on eventsteams to User-agent missing on eventsteams.Aug 25 2025, 12:38 PM
DerIch27 triaged this task as High priority.
This comment was removed by DerIch27.

Change #1181717 had a related patch set uploaded (by DerIch27; author: DerIch27):

[pywikibot/core@master] add user-agent header to eventstream requests

https://gerrit.wikimedia.org/r/1181717

I just realized that the header argument will be passed through to the stream so users can work around like this

stream = eventstreams.EventStreams(streams='recentchange', headers={'User-Agent': ...})

meaning this tasks priority is not as high as I thought but I still believe we should follow our own policies by default or at least change the documentation in a way that our example won't get blocked when used outside of toolforge

Change #1181717 merged by JJMC89:

[pywikibot/core@master] add user-agent header to eventstream requests

https://gerrit.wikimedia.org/r/1181717

JJMC89 assigned this task to DerIch27.
JJMC89 removed a project: Patch-For-Review.