Re: [Wikitech-l] Post to a talk page without knowing whether it'sold-style or Flow
On 06/03/2015 08:07 AM, This, that and the other wrote: Thanks for thinking of tools like Twinkle! I wonder why this couldn't be implemented directly as an API action, though. We considered this (https://phabricator.wikimedia.org/T59989) and decided against it. Since the internals are different (Flow posts are fully versioned, but they are not 'pages' at the MW core level), we were concerned that the shim would be leaky (responses would be kinda sorta right, but not when you did something deeper, and error responses would probably be even wronger). So there is of course a public documented API (https://www.mediawiki.org/w/api.php?action=helpmodules=flow%20new-topic) for creating new Flow topics, but it is not the same API as for posting sections (nor is there a shim). That would probably be helpful to bots and non-JS-based tools, as well as to Twinkle itself (since we use our own XML-based MediaWiki API wrapper for consistent error handling and user experience). For bots, Alexander Jones is working on https://phabricator.wikimedia.org/T67119 to add Flow support to Pywikibot (John Vandenberg and I are mentoring). Not all bots use Pywikibot, but that should lead the way and other library and bot developers can learn from the solutions implemented there. No one has an obligation to use MessagePoster. There are other ways to solve the problem (basically, check the content model of the target page then do what you want). For many developers, I think MessagePoster will be pretty simple. For Twinkle, you'll have to decide whether it can fit into your architecture. Best, Matt Flaschen ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] API BREAKING CHANGE: Default continuation mode for action=query will change at the end of this month
I know about the phab ticket, but I'm glad you referenced it because I found this: (Anomie): I think feature flags to *select new behavior* and *a good deprecation process* will take care of most things that actually need improvement, to the point where we can do per-module versioning on an ad hoc basis rather than trying to force it everywhere. IOW, why don't we continue w/ this feature flagging approach, which seems like a decent way to version APIs and prevent breaking backwards compatibility? On Thu, Jun 4, 2015 at 1:05 PM, Legoktm legoktm.wikipe...@gmail.com wrote: On 06/04/2015 09:45 AM, Brian Gerstle wrote: While it is (a little bit) nicer for new developers, they'll just burned (along with all the other current API users) when you change the defaults. What I'm trying to say is, changing the default seems like more work for more people with very little benefit. This is why https://developer.github.com/v3/ people https://www.reddit.com/dev/api version https://stripe.com/docs/api#charge_object APIs https://developer.linkedin.com/docs/rest-api. I'd recommend reading https://phabricator.wikimedia.org/T41592, which contains a pretty good rationale of why we currently don't version the API. -- Legoktm ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l -- EN Wikipedia user page: https://en.wikipedia.org/wiki/User:Brian.gerstle IRC: bgerstle ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] API BREAKING CHANGE: Default continuation mode for action=query will change at the end of this month
On Thu, Jun 4, 2015 at 1:59 PM, Brian Gerstle bgers...@wikimedia.org wrote: IOW, why don't we continue w/ this feature flagging approach, which seems like a decent way to version APIs and prevent breaking backwards compatibility? That's basically what this is, except it's named rawcontinue and applies as a boolean to just the continuation format rather than something like queryversion. But we'd still have the issue where changing the default version (or making the version parameter non-optional) is necessary here, otherwise the default version would be stuck at 1. -- Brad Jorsch (Anomie) Software Engineer Wikimedia Foundation ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] API BREAKING CHANGE: Default continuation mode for action=query will change at the end of this month
Just found the deprecation process document https://www.mediawiki.org/wiki/Requests_for_comment/API_roadmap, specifically: 1. If not already present, a request parameter will be added to specifically request the old behavior. 2. The change will be announced: - A message will be sent to the mediawiki-api-announce http://lists.wikimedia.org/pipermail/mediawiki-api-announce/ mailing list. - Deprecation warnings will be output when neither the select-new-version nor the select-old-version flags are used. Logs will also be made. 3. *After a suitable timeframe, the new version will become the default.* 4. *Any flag to select the new version explicitly may at some point be removed, leading to unrecognized parameter warnings.* My argument is that step #3 is unnecessary and #4 needs clarification in that IMO APIs should only be removed when they are no longer supported, otherwise you're just creating busy work for yourself and the clients. On Thu, Jun 4, 2015 at 1:59 PM, Brian Gerstle bgers...@wikimedia.org wrote: I know about the phab ticket, but I'm glad you referenced it because I found this: (Anomie): I think feature flags to *select new behavior* and *a good deprecation process* will take care of most things that actually need improvement, to the point where we can do per-module versioning on an ad hoc basis rather than trying to force it everywhere. IOW, why don't we continue w/ this feature flagging approach, which seems like a decent way to version APIs and prevent breaking backwards compatibility? On Thu, Jun 4, 2015 at 1:05 PM, Legoktm legoktm.wikipe...@gmail.com wrote: On 06/04/2015 09:45 AM, Brian Gerstle wrote: While it is (a little bit) nicer for new developers, they'll just burned (along with all the other current API users) when you change the defaults. What I'm trying to say is, changing the default seems like more work for more people with very little benefit. This is why https://developer.github.com/v3/ people https://www.reddit.com/dev/api version https://stripe.com/docs/api#charge_object APIs https://developer.linkedin.com/docs/rest-api. I'd recommend reading https://phabricator.wikimedia.org/T41592, which contains a pretty good rationale of why we currently don't version the API. -- Legoktm ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l -- EN Wikipedia user page: https://en.wikipedia.org/wiki/User:Brian.gerstle IRC: bgerstle -- EN Wikipedia user page: https://en.wikipedia.org/wiki/User:Brian.gerstle IRC: bgerstle ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] API BREAKING CHANGE: Default continuation mode for action=query will change at the end of this month
Sorry, guess I'm also calling #1 into question, since the old behavior should have already been the default or selectable by its own flag/parameter/URL-path-component/content-type/whatever. On Thu, Jun 4, 2015 at 2:08 PM, Brian Gerstle bgers...@wikimedia.org wrote: Just found the deprecation process document https://www.mediawiki.org/wiki/Requests_for_comment/API_roadmap, specifically: 1. If not already present, a request parameter will be added to specifically request the old behavior. 2. The change will be announced: - A message will be sent to the mediawiki-api-announce http://lists.wikimedia.org/pipermail/mediawiki-api-announce/ mailing list. - Deprecation warnings will be output when neither the select-new-version nor the select-old-version flags are used. Logs will also be made. 3. *After a suitable timeframe, the new version will become the default.* 4. *Any flag to select the new version explicitly may at some point be removed, leading to unrecognized parameter warnings.* My argument is that step #3 is unnecessary and #4 needs clarification in that IMO APIs should only be removed when they are no longer supported, otherwise you're just creating busy work for yourself and the clients. On Thu, Jun 4, 2015 at 1:59 PM, Brian Gerstle bgers...@wikimedia.org wrote: I know about the phab ticket, but I'm glad you referenced it because I found this: (Anomie): I think feature flags to *select new behavior* and *a good deprecation process* will take care of most things that actually need improvement, to the point where we can do per-module versioning on an ad hoc basis rather than trying to force it everywhere. IOW, why don't we continue w/ this feature flagging approach, which seems like a decent way to version APIs and prevent breaking backwards compatibility? On Thu, Jun 4, 2015 at 1:05 PM, Legoktm legoktm.wikipe...@gmail.com wrote: On 06/04/2015 09:45 AM, Brian Gerstle wrote: While it is (a little bit) nicer for new developers, they'll just burned (along with all the other current API users) when you change the defaults. What I'm trying to say is, changing the default seems like more work for more people with very little benefit. This is why https://developer.github.com/v3/ people https://www.reddit.com/dev/api version https://stripe.com/docs/api#charge_object APIs https://developer.linkedin.com/docs/rest-api. I'd recommend reading https://phabricator.wikimedia.org/T41592, which contains a pretty good rationale of why we currently don't version the API. -- Legoktm ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l -- EN Wikipedia user page: https://en.wikipedia.org/wiki/User:Brian.gerstle IRC: bgerstle -- EN Wikipedia user page: https://en.wikipedia.org/wiki/User:Brian.gerstle IRC: bgerstle -- EN Wikipedia user page: https://en.wikipedia.org/wiki/User:Brian.gerstle IRC: bgerstle ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] API BREAKING CHANGE: Default continuation mode for action=query will change at the end of this month
On 06/04/2015 09:45 AM, Brian Gerstle wrote: While it is (a little bit) nicer for new developers, they'll just burned (along with all the other current API users) when you change the defaults. What I'm trying to say is, changing the default seems like more work for more people with very little benefit. This is why https://developer.github.com/v3/ people https://www.reddit.com/dev/api version https://stripe.com/docs/api#charge_object APIs https://developer.linkedin.com/docs/rest-api. I'd recommend reading https://phabricator.wikimedia.org/T41592, which contains a pretty good rationale of why we currently don't version the API. -- Legoktm ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] API BREAKING CHANGE: Default continuation mode for action=query will change at the end of this month
-announce Maybe we should have a reply-to for api-announce mailings that prevent accidental chatter? On Thu, Jun 4, 2015 at 12:45 PM, Brian Gerstle bgers...@wikimedia.org wrote: On Wed, Jun 3, 2015 at 1:13 PM, Brad Jorsch (Anomie) bjor...@wikimedia.org wrote: On Wed, Jun 3, 2015 at 10:04 AM, Brian Gerstle bgers...@wikimedia.org wrote: My question is: why does the default behavior need to change? Wouldn't continuing with the default behavior allow people to continue using the rawcontinue behavior for as long as we want to support it—without making any changes? The decision to change the default came out of the same concerns that led to the improved action=help output and some of the other work I've been doing lately: We want to lower the barriers for using our API, which means that the default shouldn't be something user-hostile. While it is (a little bit) nicer for new developers, they'll just burned (along with all the other current API users) when you change the defaults. What I'm trying to say is, changing the default seems like more work for more people with very little benefit. This is why https://developer.github.com/v3/ people https://www.reddit.com/dev/api version https://stripe.com/docs/api#charge_object APIs https://developer.linkedin.com/docs/rest-api. The raw continuation is deceptively simple: it looks straightforward, but if you're using it with a generator, multiple prop modules, and meta or list modules, your client code has to know when to ignore the returned continuation for the generator, when to remove a module from prop and then when to re-add it, and when to remove the meta or list modules. I wouldn't be that surprised to learn that more people have it wrong than correct if their code supports using prop modules with generators. The new continuation actually is simple: you send the equivalent of array_merge( $originalParams, $continueParams ) and it just works. Yes, some of the same could be said for making format=jsonformatversion=2 the default. In this case the formatversion=1 output is just annoying rather than actually hostile (although representing boolean true as a falsey string comes close), so at this time there's no plan to make that breaking change. That's my point, why *ever* make it a breaking change? It's such a low cost to add a few characters to the URL to specify an API version. Our docs should tell developers what the current version is. -- Brad Jorsch (Anomie) Software Engineer Wikimedia Foundation ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l -- EN Wikipedia user page: https://en.wikipedia.org/wiki/User:Brian.gerstle IRC: bgerstle -- EN Wikipedia user page: https://en.wikipedia.org/wiki/User:Brian.gerstle IRC: bgerstle ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] API BREAKING CHANGE: Default continuation mode for action=query will change at the end of this month
On Wed, Jun 3, 2015 at 1:13 PM, Brad Jorsch (Anomie) bjor...@wikimedia.org wrote: On Wed, Jun 3, 2015 at 10:04 AM, Brian Gerstle bgers...@wikimedia.org wrote: My question is: why does the default behavior need to change? Wouldn't continuing with the default behavior allow people to continue using the rawcontinue behavior for as long as we want to support it—without making any changes? The decision to change the default came out of the same concerns that led to the improved action=help output and some of the other work I've been doing lately: We want to lower the barriers for using our API, which means that the default shouldn't be something user-hostile. While it is (a little bit) nicer for new developers, they'll just burned (along with all the other current API users) when you change the defaults. What I'm trying to say is, changing the default seems like more work for more people with very little benefit. This is why https://developer.github.com/v3/ people https://www.reddit.com/dev/api version https://stripe.com/docs/api#charge_object APIs https://developer.linkedin.com/docs/rest-api. The raw continuation is deceptively simple: it looks straightforward, but if you're using it with a generator, multiple prop modules, and meta or list modules, your client code has to know when to ignore the returned continuation for the generator, when to remove a module from prop and then when to re-add it, and when to remove the meta or list modules. I wouldn't be that surprised to learn that more people have it wrong than correct if their code supports using prop modules with generators. The new continuation actually is simple: you send the equivalent of array_merge( $originalParams, $continueParams ) and it just works. Yes, some of the same could be said for making format=jsonformatversion=2 the default. In this case the formatversion=1 output is just annoying rather than actually hostile (although representing boolean true as a falsey string comes close), so at this time there's no plan to make that breaking change. That's my point, why *ever* make it a breaking change? It's such a low cost to add a few characters to the URL to specify an API version. Our docs should tell developers what the current version is. -- Brad Jorsch (Anomie) Software Engineer Wikimedia Foundation ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l -- EN Wikipedia user page: https://en.wikipedia.org/wiki/User:Brian.gerstle IRC: bgerstle ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] [Mediawiki-api-announce] API BREAKING CHANGE: Default continuation mode for action=query will change at the end of this month
Would it make sense to introduce per-user-agent API black list? This way we could prevent accidental usage of the broken tools. On Thu, Jun 4, 2015 at 4:19 PM, Petr Bena benap...@gmail.com wrote: * 3.1.5 not 3.15, sorry for confusion :P On Thu, Jun 4, 2015 at 3:19 PM, Petr Bena benap...@gmail.com wrote: Out of curiosity, this may also break all versions of huggle that are older than 3.15, which was released sometime around November 2014. I strongly recommend you to upgrade if you are using such an ancient version. I don't know what is going to happen, but it may break. Unless someone patches the legacy huggle version, it will probably remain defunct. On Wed, Jun 3, 2015 at 11:23 PM, Maarten Dammers maar...@mdammers.nl wrote: Hi, Brad Jorsch (Anomie) schreef op 3-6-2015 om 18:43: not an announcement Could you please stop using the announce list for chatter? Probably better to put the announce list on moderation. Maarten ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] [Mediawiki-api-announce] API BREAKING CHANGE: Default continuation mode for action=query will change at the end of this month
Out of curiosity, this may also break all versions of huggle that are older than 3.15, which was released sometime around November 2014. I strongly recommend you to upgrade if you are using such an ancient version. I don't know what is going to happen, but it may break. Unless someone patches the legacy huggle version, it will probably remain defunct. On Wed, Jun 3, 2015 at 11:23 PM, Maarten Dammers maar...@mdammers.nl wrote: Hi, Brad Jorsch (Anomie) schreef op 3-6-2015 om 18:43: not an announcement Could you please stop using the announce list for chatter? Probably better to put the announce list on moderation. Maarten ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] [Mediawiki-api-announce] API BREAKING CHANGE: Default continuation mode for action=query will change at the end of this month
* 3.1.5 not 3.15, sorry for confusion :P On Thu, Jun 4, 2015 at 3:19 PM, Petr Bena benap...@gmail.com wrote: Out of curiosity, this may also break all versions of huggle that are older than 3.15, which was released sometime around November 2014. I strongly recommend you to upgrade if you are using such an ancient version. I don't know what is going to happen, but it may break. Unless someone patches the legacy huggle version, it will probably remain defunct. On Wed, Jun 3, 2015 at 11:23 PM, Maarten Dammers maar...@mdammers.nl wrote: Hi, Brad Jorsch (Anomie) schreef op 3-6-2015 om 18:43: not an announcement Could you please stop using the announce list for chatter? Probably better to put the announce list on moderation. Maarten ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l