[16:16:04] I'm trying to use Composer to install the Maps extension but run into various issues. [16:16:05] In the extensions directory, as root, I created a Maps/ directory and within that directory I ran: [16:16:07] COMPOSER=composer.local.json composer require --no-update mediawiki/maps:~5.6.0 [16:16:08] This created a composer.local.json in the current path: [16:16:10] "require": { [16:16:11] "mediawiki/maps": "~5.6.0" [16:16:13] } [16:16:14] So far, so good. Thearafter I ran: [16:16:16] composer update mediawiki/maps --no-dev -o [16:16:17] ... which returned: [16:16:19] No composer.json in current directory, do you want to use the one at /usr/home/wiki? [Y,n]? Y [16:16:20] (as far as I understand, composer consults the /usr/home/wiki/composer.json to configure the installation based on the MW-version, in this case 1.27.1) [16:16:22] The "wikimedia/composer-merge-plugin" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option. [16:16:23] Continue as root/super user [yes]? yes [16:16:25] > ComposerHookHandler::onPreUpdate [16:16:26] Cannot update only a partial set of packages without a lock file present. [16:16:28] [root@zebu /usr/home/wiki/extensions/Maps]# [16:16:29] I'm not sure if the first error about the missing composer-merge-plugin is critical but certainly the second about the missing lock file is. [16:16:31] Also, I'm not entirely sure if I'm running the composer commands to install Maps correctly? [16:16:32] Any ideas what else I can try would be much appreciated. [16:16:34] Thanks in advance. [16:16:38] Zebu: please use pastebin [16:16:59] MediaWiki does not work with Composer 2.0 yet [16:17:25] T248908 [16:17:26] T248908: composer-merge-plugin support for composer 2.0 - https://phabricator.wikimedia.org/T248908 [16:17:54] Zebu: ^ you will needt o downgrade your Composer install to a 1.x version [16:18:15] Thanks, and for the instant answers! [16:19:13] `composer self-update --1` should do it [16:25:40] I downgraded to Composer 1.10.17 using the above self-update. That worked. Thanks for the tip. [16:28:03] My next step was 'composer update mediawiki/maps --no-dev -o' from within the Maps directory but that failed with an unclear error. [16:29:16] The output was: [16:29:26] > ComposerHookHandler::onPreUpdate [16:29:27] Loading composer repositories with package information [16:29:29] Updating dependencies [16:29:30] Killed [16:29:32] [root@zebu /usr/home/wiki/extensions/Maps]# [16:30:10] Just 'Killed' doesn't say much... [16:31:19] Is there any kind of verbose composer mode? [16:31:46] I'm not sure you want to be updating maps from inside the maths directory [16:31:58] *insde the maps directory [16:32:55] Ok. I agree. Someone told me that would be necessary but I suspect to might be wrong. I try again in the wiki installation path. [16:39:28] you might need to run `composer update --no-dev` in the extension folder, but not with mediawiki/maps in it [16:39:49] Depending on whether you setup composer-merge-plugin (via composer.local.json) you just need to run it in the MW root [16:46:18] I tried running both from the /usr/home/wiki path where my LocalSettings reside and from within the extensions directory. A composer.local.json is created and the composer.json is read when running the 'composer update mediawiki/maps --no-dev -o' install command, but the process is still killed. [16:48:06] The two commands are simply: [16:48:16] COMPOSER=composer.local.json composer require --no-update mediawiki/maps:~5.6.0 [16:48:17] composer update mediawiki/maps --no-dev -o [16:49:19] Are there any other variations I can try? Finding clear usage information other than on this channel is difficult. [16:50:47] I wish there was a way to install dependencies manually. [16:50:47] When localisation update is going to be deployed? I see it has been imported to GitHub (Not sure about Gerrit) but not deployed onwiki yet. [16:52:18] which localization update are you referring to, CptViraj [16:52:43] AntiComposite: translatewiki translations [16:52:58] for mediawiki? [16:53:24] Yes, specifically WikimediaMessages extension [16:53:38] and CentralAuth too [16:57:07] AntiComposite: ^ [16:57:23] (I'm researching) [17:00:31] It looks like translation updates are currently riding the train, so they are deployed once weekly based on https://wikitech.wikimedia.org/wiki/Deployments [17:01:40] translation updates were previously processed nightly until https://phabricator.wikimedia.org/phame/post/view/121/translatewiki.net_security_incident/ but that has still not been resolved [17:01:41] Zebu: If you're doing composer require mediawiki/maps, it's going to try to install [17:02:45] Translations are deployed with the train [17:03:03] So the train was cut last night... they'll start being deployed over the next week, I think [17:03:24] https://wikitech.wikimedia.org/wiki/Deployments [17:06:01] Reedy: Do you mean running 'composer require mediawiki/maps --no-dev -o'? [17:06:21] yes [17:06:33] require is like "install" [17:06:45] you either want to run `composer update --no-dev` inside the maps folder [17:06:49] or use the merge plugin [17:07:06] https://www.mediawiki.org/wiki/Composer#Using_composer-merge-plugin [17:07:32] It complains --no-dev option exists [17:07:43] on require? possibly [17:08:36] AntiComposite, Reedy: I see, Thanks :) [17:09:13] Yes, and if I run without that as in "composer require mediawiki/maps -o" the process is killed again. [17:09:36] why are you running composer require? [17:09:45] you've already got it installed based on it being in extensions/Maps [17:11:06] Yes, I guess I have to rerun "COMPOSER=composer.local.json composer require --no-update mediawiki/maps:~5.6.0" before each try. [17:13:52] Still Killed. [17:14:07] There was nothing in extension/Maps [17:14:55] I created that directory manually, but I think that was wrong so I removed it and try to run the various commands from the wiki install directory or the extensions directory. [17:15:05] FWIW, we don't actually support installing skins and extensions with composer [17:15:12] some say they support it, but it's not official [17:15:39] I presume the Maps directory would be auto-created by the composer install process. [17:16:20] This is complicated! :-) [17:16:38] I would have expected so [17:17:09] I feel like just manually adding maps on pages using Google's API. [17:17:29] https://maps.extension.wiki/wiki/Installation#Installation [17:17:43] If that doesn't work, I would suggest contacting the maintainers [17:18:18] it would look like you probably want a newer version than 5.6.0 [17:18:23] >If you are using MediaWiki 1.31 or later and PHP 7.1 or later, [17:18:30] I presume you're not using an older version of MW/PHP [17:19:17] Yes, thanks I've read that and have contacted the maintainers but no clear answers. Unfortunately, it is not possible for me to upgrade MW from the location where I am. [17:21:31] I use MW 1.27.1 and according to the maintainers of Maps the 5.6.0 version of Maps works with that version of MW. That's the only bit of information I managed to receive from the developers. [17:47:33] Composer behaves erratically, sometimes killed and other times it creates the composer.local.json when running the first command? Is there really no way of getting this Maps extension installed other than via Composer? The Maps-5.6.0.tar.gz I've found. Maybe this or some dependencies are just not fetched from wherever they reside by Composer resulting in non-descriptive Killed errors. [17:49:47] As above, you should be able to just install the dependancies for Maps using composer [17:50:22] so extract that tarball, enter the directory, run `composer update --no-dev` [17:50:26] if composer is being killed, that sounds like a problem with your system [17:50:41] hello all [17:50:43] https://www.mediawiki.org/wiki/API:Usercontribs [17:50:53] I want to get the usercontrib using python [17:51:05] the sample code works fine but gives last 500 only [17:51:11] how to get more than 500? [17:51:22] pass a higher limit parameter [17:51:25] and/or pagination [17:51:27] Is there any sample code for python to use paginated query [17:51:29] ? [17:51:42] first off, pass "limit": "max" [17:53:30] even if I increase the limit, it gives only 500 results [17:53:37] need to use pagination [17:53:49] looking for sample python code for pagination [17:54:03] if you were logged in, it would probably be higher [17:54:27] You might want to consider using a client library that handles that for you [17:54:28] https://www.mediawiki.org/wiki/API:Client_code#Python [17:55:29] For some reason my ChatZilla keeps kicking me out but I'm now back :-) [17:56:55] ok [17:57:05] I'm not sure my last few message were transmitted. In short: Is there really no way of getting this Maps extension installed other than via Composer? [17:57:33] MediaWiki has required composer for handling depednancies since 1.25 [17:57:46] If we hosted Maps (which we don't), we do have a tool that bundles them as part of the tarballing process [17:58:22] As I said, you should be able to just extract the tarball, and then run `composer update --no-dev` inside the Maps directory [17:58:39] You could also run composer on another machine, and copy the files across [17:58:46] if there's some reason why composer won't run on your server [18:00:24] Yes, that's what the developer described but I did not fully understand it before. I will try unpacking in extensions and run the command within the Maps directory. [18:00:49] Unfortunately, I don't have another machine with Composer to run the commands from my location. [18:01:15] Why can't you run it on the machine you're IRC-ing from? [18:01:26] Thanks for the advice, I will try again within the extracted source directory. [18:02:04] I don't have MW and much else on the machine I'm IRC-ing from. [18:02:12] You don't need MW [18:02:24] You really only need PHP [18:02:25] You can download the composer phar from the internet [18:03:28] Ah. Ok. That sounds worth a try, after I've tested running in the extracted files directory on the server. [18:03:40] ... with the old Composer version. [18:04:10] yes :D [18:36:56] I'm back again :-) [18:40:18] On the server, after having extracted the sources and running the commands in the Maps directory I get too many errors to list here. In short: "Your requirements could not be resolved to an installable set of packages". And when running the final 'composer require mediawiki/maps --no-dev -o' various file-fetcher incompatible errors precedes a Killed signal, or when running 'composer update... [18:40:20] ...mediawiki/maps -o ' the shell returns command "Root package 'mediawiki/maps' cannot require itself in its composer.json". [18:40:25] (the --no-dev is not working with require) [18:41:03] [[Tech]]; 199.195.61.12; /* reports and the requests. */ new section; https://meta.wikimedia.org/w/index.php?diff=20677178&oldid=20666907&rcid=16698741 [18:42:38] does Maps/composer.json include mediawiki/maps in the requires? [18:45:32] Not seemingly by default https://github.com/JeroenDeDauw/Maps/blob/5.6.0/composer.json [18:53:26] At the top of the file it reads { "name": "mediawiki/maps", but not in the "require": {... section [18:56:43] Like in the file you linked. [18:59:19] So as far as I understand it, I can compile Maps-5.6.0 on a local system with PHP using Composer. The process does not need to run or depend on the same system where the relevant MW (1.27.1) installation resides? [19:00:50] indeed [19:02:50] If so, for ease of installation, could someone here with the right tools at hand make an installable zip or tar.gz version available somewhere? [19:04:35] From Maps-5.6.0.tar.gz [19:05:09] I can't remember or find again where I found that archive. [19:15:33] [[Tech]]; MarcoAurelio; Undo revision 20677178 by [[Special:Contributions/199.195.61.12|199.195.61.12]] ([[User talk:199.195.61.12|talk]]): Off topic; https://meta.wikimedia.org/w/index.php?diff=20677361&oldid=20677178&rcid=16698985 [19:16:37] Meanwhile, I installed composer-2.0.2 locally. Easy install, no missing dependencies. [19:22:08] Within the extracted Maps-5.6.0 directory I ran: [19:22:09] COMPOSER=composer.local.json composer require --no-update mediawiki/maps:~5.6.0 [19:22:11] Then: [19:22:12] composer update mediawiki/maps --no-dev -o [19:22:51] But which results with the error: [19:22:53] Cannot update only a partial set of packages without a lock file present. [19:25:10] So this was the result on my local system. What can I you suggest to try from the secret list of commands? :-) [19:25:51] * I meant what can you suggest I try.. [19:27:53] In fact, trying with 'require' instead of update, the errors are the same as on the server with the older composer. [19:29:52] I just can't understand why these files are not made available as pre-installable packages if it makes no difference where they are compiled. [20:11:22] hello all, I want to get the user contribution between a start and end date [20:11:24] https://ta.wikisource.org/wiki/Special:ApiSandbox#action=query&format=json&list=usercontribs&ucstart=2020-11-14T19%3A34%3A26.000Z&ucend=2020-11-17T19%3A34%3A26.000Z&ucuser=Fathima Shaila [20:11:43] this sample is not working if i give both ucstart and ucend [20:12:07] it works if only ecstart is given [20:12:24] not working if only ucend is selected [20:12:29] how to solve this? [21:17:06] Hey all, I'm getting a weird error. I dowloaded the dump enwiki-20201101-pages-logging.xml.gz and extracted it, and all it's showing is the ... header and nothing more. I downloaded it twice, and checked it using two programs, and it looks the same. Is this a corrupted dump or am I reading it wrong? [21:18:09] for reference, the non-recombined versions like enwiki-20201101-pages-logging1.xml.gz work just fine [21:25:37] actually, I think it might be an issue with my library. The logging13 file actually looks fine when opened in Neovim, but triggers the same error when using the flate2 crate [21:34:44] aha, so it looks like it's a multistream gzip file, and my library can't handle those for some reason. nevermind!