gunicorn icon indicating copy to clipboard operation
gunicorn copied to clipboard

Add Windows support

Open jezdez opened this issue 12 years ago • 108 comments

This is related to the things we discussed at PyCon

jezdez avatar May 01 '13 10:05 jezdez

wip. planned for R18.

benoitc avatar May 27 '13 06:05 benoitc

Some update on that:

  • SOCKET support is quite done, a branch will be posted online next week

TODO:

handle service start/stop/restart to use gunicorn as a full windows service. It is replacing somehow the use of signals under unix.

benoitc avatar Aug 09 '13 12:08 benoitc

the support will finally happen in R20. i will create the new PR to track the development of this feature next week.

Things to fix are:

  • adapt Worker notifications to windows
  • port the signaling to windows: reload and reexec
  • make sure sockets can be inherited among processes

benoitc avatar Oct 31 '13 08:10 benoitc

What is the progress on adding windows support for gunicorn?. Or rather How far are you from R20? I am having the same problem as #587

renierdbruyn avatar Jan 22 '14 07:01 renierdbruyn

Slow progress. I want to release R19 with the threaded work now. I will push a version on monday. the windows support will arrive right after.

benoitc avatar Jan 25 '14 06:01 benoitc

Is this windows supported version available somewhere ?

helmus avatar Feb 07 '14 13:02 helmus

Windows support will be in R20, so I guess it will be a while till guincorn will have windows support... I created a vm with Ubuntu, and this works for me.....

renierdbruyn avatar Feb 10 '14 07:02 renierdbruyn

Just curious as to any progress in this. As a first pass it doesn't even need to be fast; a big advantage will be just being able to develop with Gunicorn on Windows and push to a Linux server (e.g. Heroku) without changing config.

robertlagrant avatar Sep 13 '14 17:09 robertlagrant

@robertlagrant it's on my todo. I need to find a windows license first. R20 will be released in october,

benoitc avatar Sep 22 '14 13:09 benoitc

How about the VM images at modern.ie ? Those are free and legal On Sep 22, 2014 3:30 PM, "Benoit Chesneau" [email protected] wrote:

@robertlagrant https://github.com/robertlagrant it's on my todo until the end of the year. I need to find a windows license first.

— Reply to this email directly or view it on GitHub https://github.com/benoitc/gunicorn/issues/524#issuecomment-56372470.

helmus avatar Sep 22 '14 14:09 helmus

I used modern.ie images to test a web app in IE8 recently. Easy to get going and worked great.

tilgovi avatar Sep 22 '14 18:09 tilgovi

@benoitc If needed, I believe the PSF can provide you with a windows license.

cyberdelia avatar Sep 28 '14 23:09 cyberdelia

@benoitc is there a WIP branch for this? I'm not a Windows user, but I can take a look at this.

berkerpeksag avatar May 12 '15 06:05 berkerpeksag

@berkerpeksag no not yet :/ we should really start one asap.

benoitc avatar May 12 '15 07:05 benoitc

like @cyberdelia said we could ask a license of windows at the PSF that the gunicorn project could use for such development. Thoughts?

benoitc avatar May 12 '15 07:05 benoitc

It's a good idea. https://www.python.org/psf/grants/ has all information about grant proposals.

berkerpeksag avatar May 12 '15 07:05 berkerpeksag

Any updates on this?

zet4 avatar Nov 14 '15 11:11 zet4

I am also looking for updates to this.

jamespedid avatar Nov 18 '15 20:11 jamespedid

@berkerpeksag let's have a talk asap on IRC, just ping me sometimes before since i'm away from any instant thing these days :)

benoitc avatar Nov 20 '15 10:11 benoitc

@benoitc any update on this one?

lealhugui avatar Dec 22 '15 12:12 lealhugui

@lealhugui as far as I know there has been no progress since. Anyway I came with a plan:

  1. we should put gunicorn inside a CI system that handle windows to knows where it fails
  2. start the port over the new IPC library (sometimes next month) to start the work on windows

I can expect a release sometimes in march. Possibly sooner but no promises :) Work can of course go faster if someone that actually knows window better than me (hint I didn't use windows since 1995...) can help!

benoitc avatar Dec 28 '15 13:12 benoitc

@benoitc after mid january, i can help out (basically testing, or anything that you need and i could help).

lealhugui avatar Dec 28 '15 15:12 lealhugui

@lealhugui thanks! I will provide updates ASAP

benoitc avatar Dec 31 '15 10:12 benoitc

Hope things are going well. Are we still good with this release in March ?

tannaalok avatar Mar 17 '16 15:03 tannaalok

@tannaalok unlikely. Hopefully, @benoitc can publish the IPC work and then maybe Windows support will be possible. It will take some time for the IPC work to land, then the rest of the Windows work to be discovered, triaged, worked on. It's very hard to say.

tilgovi avatar Mar 17 '16 16:03 tilgovi

@tilgovi the IPC work will land in a branch sometimes next week finally :)

Now about the windows version, here is the plan I have in head. The first thing to do would be hooking Gunicorn to a windows CI to start to note issues. There are then 2 scenarios, running gunicorn in cygwin or running gunicorn in plain windows. The two can trigger different results and need to be tested. As far as I know the things to make gunicorn portable are the following:

  • signals handling: signals work differently under windows and we need to find a way to expose the following features: http://docs.gunicorn.org/en/stable/signals.html
  • worker spawning: there maybe some difference on windows. The IPC work will remove the usage of temporary file to check if the workers are alive replacing it by a pipe. This part should be made compatible
  • worker supports: i am not sure yet how behave the gevent, eventlet and tornado workers on windows. this is a good call to split them outside gunicorn anyway. So we can upgrade them apart. The gthread worker can work transparently if we go to python 3. which will be the case.

Did I miss anything? Any help is welcome, I am not a windows daily user myself. So anyone who is experienced on windows that wants to take the lead on that part to make the windows platform a first citizen in gunicorn is welcome!

benoitc avatar Mar 25 '16 09:03 benoitc

Python 3.5 adds an useful feature to handle signals on Windows: signal.set_wakeup_fd() now accepts a socket handle on Windows. https://docs.python.org/dev/library/signal.html#signal.set_wakeup_fd

like @cyberdelia said we could ask a license of windows at the PSF

Microsoft gives free MSDN licenses for Python core developers. For example, as a core developer, I have access to Visual Studio 2015.

vstinner avatar Mar 25 '16 10:03 vstinner

@haypo thanks. Actually that could also be used to wake up the arbiter on unix too... Very useful.

If a core dev could help then that will be useful :) Any idea on how to ask for one when it's an external project?

benoitc avatar Mar 25 '16 12:03 benoitc

You also have the WSL (Windows for Linux) to target for Windows capability

paul-hammant avatar May 26 '16 00:05 paul-hammant

Is there any way a person with limited linux and gunicorn knowledge can help port this to windows, or are the problems too non-trivial?

jamespedid avatar Jun 23 '16 13:06 jamespedid