<div dir="ltr">Hi Grzegors,<div><br></div><div>I agree with your statement that we should support a default value to cpu_count, and also we should document that on windows NUMBER_OF_PROCESSOR variable should be set.</div><div><br></div><div>I would love to see a pull request about that</div><div><br></div><div>Regards</div><div>Pierre</div></div><br><div class="gmail_quote"><div dir="ltr">Le mar. 17 janv. 2017 à 09:59, Grzegorz Antoniak <<a href="mailto:ga@anadoxin.org">ga@anadoxin.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Pierre and Neil,<br class="gmail_msg">
<br class="gmail_msg">
Thank you for both answers. Especially the `appveyor.yml` file was<br class="gmail_msg">
helpful. I've managed to get buildbot-worker v0.9.3 running on<br class="gmail_msg">
Python v2.7.6.<br class="gmail_msg">
<br class="gmail_msg">
I'll add some details in case someone will stumble upon this thread in<br class="gmail_msg">
the future:<br class="gmail_msg">
<br class="gmail_msg">
The patch I wrote about in my original mail turned out to be necessary<br class="gmail_msg">
only when the environment is missing the NUMBER_OF_PROCESSORS<br class="gmail_msg">
environment variable. It appears that this variable is used by<br class="gmail_msg">
<python2.7>/lib/multiprocessing/__init__.py, which uses it inside the<br class="gmail_msg">
implementation of the `cpu_count` function. If this variable is missing,<br class="gmail_msg">
the function throws NotImplementedError instead of returning a default<br class="gmail_msg">
of 1 cpu, and `buildbot-worker` doesn't catch this exception.<br class="gmail_msg">
<br class="gmail_msg">
While I understand that a missing NUMBER_OF_PROCESSORS variable is a<br class="gmail_msg">
problem on my side, I think buildbot-worker also might have a bug in<br class="gmail_msg">
this case, because Python documentation states that `cpu_count()`<br class="gmail_msg">
function is allowed to throw an exception. I think it might be a good<br class="gmail_msg">
idea to catch it in the code, and set worker's CPU count to 1, if it<br class="gmail_msg">
will occur.<br class="gmail_msg">
<br class="gmail_msg">
Anyway, setting the correct NUMBER_OF_PROCESSORS variable fixed the<br class="gmail_msg">
problem for me.<br class="gmail_msg">
<br class="gmail_msg">
Thank you for your help,<br class="gmail_msg">
Grzegorz Antoniak<br class="gmail_msg">
<br class="gmail_msg">
On Mon, Jan 16, 2017 at 09:28:20AM -0600, Neil Gilmore wrote:<br class="gmail_msg">
> Hi everyone,<br class="gmail_msg">
><br class="gmail_msg">
> Our Windows workers are generally running on 2.7.12, with a few older back<br class="gmail_msg">
> to 2.7.6 (I think, I'm too lazy to look). We start them using ssh under<br class="gmail_msg">
> Cygwin, if that matters to you. However, the few running a release version<br class="gmail_msg">
> are running 0.9.1. The others are running 0.9.9rc2(?) or so. I don't recall<br class="gmail_msg">
> any significant patches. We aren't running any masters on Windows.<br class="gmail_msg">
><br class="gmail_msg">
> Neil Gilmore<br class="gmail_msg">
> <a href="http://grammatech.com" rel="noreferrer" class="gmail_msg" target="_blank">grammatech.com</a><br class="gmail_msg">
><br class="gmail_msg">
> On 1/16/2017 8:25 AM, Pierre Tardy wrote:<br class="gmail_msg">
> >Hi,<br class="gmail_msg">
> ><br class="gmail_msg">
> >Buildbot at the moment only works with python 2.<br class="gmail_msg">
> >We are working at the python3 port but it is not quite ready (I'm hoping<br class="gmail_msg">
> >we can have worker support for 0.9.4 thanks to the great work from Craig)<br class="gmail_msg">
> ><br class="gmail_msg">
> >As per the Windows support, we are supporting windows by running unit test<br class="gmail_msg">
> >suite and integration suite on appveyor.<br class="gmail_msg">
> >However, according to our statistics, we have no user accepting to send<br class="gmail_msg">
> >info to the statistic server and running windows. :-(<br class="gmail_msg">
> >So I cannot say "it works, we have people running it". We are however<br class="gmail_msg">
> >interested in having windows users, and are willing to help as much as we<br class="gmail_msg">
> >can.<br class="gmail_msg">
> ><br class="gmail_msg">
> >You can see on the appveyor.yml how we install pywin32 and other buildbot<br class="gmail_msg">
> >dependencies:<br class="gmail_msg">
> ><a href="https://github.com/buildbot/buildbot/blob/master/appveyor.yml#L13" rel="noreferrer" class="gmail_msg" target="_blank">https://github.com/buildbot/buildbot/blob/master/appveyor.yml#L13</a><br class="gmail_msg">
> ><br class="gmail_msg">
> >Let us know.<br class="gmail_msg">
> >Pierre<br class="gmail_msg">
> ><br class="gmail_msg">
> ><br class="gmail_msg">
> >Le lun. 16 janv. 2017 à 12:15, Grzegorz Antoniak <<a href="mailto:ga@anadoxin.org" class="gmail_msg" target="_blank">ga@anadoxin.org</a><br class="gmail_msg">
> ><mailto:<a href="mailto:ga@anadoxin.org" class="gmail_msg" target="_blank">ga@anadoxin.org</a>>> a écrit :<br class="gmail_msg">
> ><br class="gmail_msg">
> >    Hello,<br class="gmail_msg">
> ><br class="gmail_msg">
> >    I would like to know what is the preferred version of Python for<br class="gmail_msg">
> >    running<br class="gmail_msg">
> >    buildbot-worker on Windows?<br class="gmail_msg">
> ><br class="gmail_msg">
> >    Currently I'm trying 0.9.3 on Python 3.6, but it fails with an error:<br class="gmail_msg">
> ><br class="gmail_msg">
> >        File "C:\python36\lib\site-packages\twisted\spread\pb.py",<br class="gmail_msg">
> >    line 1076 [...]<br class="gmail_msg">
> >            m.update(password)<br class="gmail_msg">
> >        builtins.TypeError: Unicode-objects must be encoded before hashing<br class="gmail_msg">
> ><br class="gmail_msg">
> >    I've also tried 0.9.2 and 0.9.1, same error.<br class="gmail_msg">
> ><br class="gmail_msg">
> >    I've tried to install 0.9.3 on Python 2.7, but it failed with this<br class="gmail_msg">
> >    error:<br class="gmail_msg">
> ><br class="gmail_msg">
> >        File "c:\python27\lib\site-packages\buildbot_worker\base.py",<br class="gmail_msg">
> >    line 315[...]<br class="gmail_msg">
> >            self.numcpus = multiprocessing.cpu_count()<br class="gmail_msg">
> >        File "c:\python27\lib\multiprocessing\__init__.py", line 136,<br class="gmail_msg">
> >    in cpu_count<br class="gmail_msg">
> >            raise NotImplementedError('cannot determine number of cpus')<br class="gmail_msg">
> >        exceptions.NotImplementedError: cannot determine number of cpus<br class="gmail_msg">
> ><br class="gmail_msg">
> >    I've checked the documentation for `multiprocessing.cpu_count`, and it<br class="gmail_msg">
> >    says that this function can throw NotImplementedError, as it<br class="gmail_msg">
> >    happens on<br class="gmail_msg">
> >    my machine. I've added a simple patch to catch this exception in<br class="gmail_msg">
> >    `base.py` around line 315, the error was gone and the worker started<br class="gmail_msg">
> >    successfully, but now I'm having some problems installing `pywin32`<br class="gmail_msg">
> >    (which are not related to this mailing list) so the worker is<br class="gmail_msg">
> >    still not<br class="gmail_msg">
> >    fully operational.<br class="gmail_msg">
> ><br class="gmail_msg">
> >    So I'm wondering, what is the Python setup of the developers? Which<br class="gmail_msg">
> >    version of Python is known to work on Windows without any patches?<br class="gmail_msg">
> ><br class="gmail_msg">
> >    Regards,<br class="gmail_msg">
> >    Grzegorz Antoniak<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
users mailing list<br class="gmail_msg">
<a href="mailto:users@buildbot.net" class="gmail_msg" target="_blank">users@buildbot.net</a><br class="gmail_msg">
<a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.buildbot.net/mailman/listinfo/users</a><br class="gmail_msg">
</blockquote></div>