Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows support #524

Open
jezdez opened this issue May 1, 2013 · 77 comments

Comments

@jezdez
Copy link
Contributor

commented May 1, 2013

This is related to the things we discussed at PyCon

@ghost ghost assigned benoitc May 27, 2013

@benoitc

This comment has been minimized.

Copy link
Owner

commented May 27, 2013

wip. planned for R18.

@benoitc

This comment has been minimized.

Copy link
Owner

commented Aug 9, 2013

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

This comment has been minimized.

Copy link
Owner

commented Oct 31, 2013

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
@renierdbruyn

This comment has been minimized.

Copy link

commented Jan 22, 2014

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

@benoitc

This comment has been minimized.

Copy link
Owner

commented Jan 25, 2014

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.

@helmus

This comment has been minimized.

Copy link

commented Feb 7, 2014

Is this windows supported version available somewhere ?

@renierdbruyn

This comment has been minimized.

Copy link

commented Feb 10, 2014

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.....

@robertlagrant

This comment has been minimized.

Copy link

commented Sep 13, 2014

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.

@benoitc

This comment has been minimized.

Copy link
Owner

commented Sep 22, 2014

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

@benoitc benoitc modified the milestones: R20, R20.0 Sep 22, 2014

@helmus

This comment has been minimized.

Copy link

commented Sep 22, 2014

How about the VM images at modern.ie ? Those are free and legal
On Sep 22, 2014 3:30 PM, "Benoit Chesneau" notifications@github.com 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
#524 (comment).

@tilgovi

This comment has been minimized.

Copy link
Collaborator

commented Sep 22, 2014

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

@cyberdelia

This comment has been minimized.

Copy link

commented Sep 28, 2014

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

@berkerpeksag

This comment has been minimized.

Copy link
Collaborator

commented May 12, 2015

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

@benoitc

This comment has been minimized.

Copy link
Owner

commented May 12, 2015

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

@benoitc

This comment has been minimized.

Copy link
Owner

commented May 12, 2015

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

@berkerpeksag

This comment has been minimized.

Copy link
Collaborator

commented May 12, 2015

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

@zet4

This comment has been minimized.

Copy link

commented Nov 14, 2015

Any updates on this?

@jamespedid

This comment has been minimized.

Copy link

commented Nov 18, 2015

I am also looking for updates to this.

@benoitc

This comment has been minimized.

Copy link
Owner

commented Nov 20, 2015

@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 benoitc removed this from the R20.0 milestone Dec 6, 2015

edmorley added a commit to edmorley/gunicorn that referenced this issue Sep 7, 2017

Enable CI testing on Windows using Appveyor
Currently everything but the prospector lint job fails, however having
CI set up makes it easier to see what work remains for benoitc#524.

Fixes benoitc#1467.

berkerpeksag added a commit that referenced this issue Sep 7, 2017

Enable CI testing on Windows using Appveyor
Currently everything but the prospector lint job fails, however having
CI set up makes it easier to see what work remains for #524.

Fixes #1467.
@bartmika

This comment has been minimized.

Copy link

commented Sep 15, 2017

Hello everyone! How is the progress coming along for this issue? Do we have any target dates in sight for the completion? Thanks!

@tilgovi

This comment has been minimized.

Copy link
Collaborator

commented Sep 16, 2017

@bartmika no. There will not be a target date. We have lots of work to do as Benoitc outlined. We welcome help. As I said above, please subscribe to this issue for updates. We will update when there is anything to share.

@tilgovi tilgovi referenced this issue Oct 5, 2017

Closed

Windows support #1614

@berkerpeksag berkerpeksag referenced this issue Oct 7, 2017

Closed

Windows? #1618

@bartmika

This comment has been minimized.

Copy link

commented Oct 10, 2017

Thank you @tilgovi,

I would like to discuss potentially putting a bounty on closing this issue. May a developer from Gunicorn please contact me at bart [ at ] simalam.com

Thank you!

@benoitc

This comment has been minimized.

Copy link
Owner

commented Oct 15, 2017

@bartmika sorry was a busy week. I will contact you tomorrow once I have been in contact with @tilgovi & @berkerpeksag . Good idea anyway.

@jmaulsby

This comment has been minimized.

Copy link

commented Oct 19, 2017

@benoitc just wanted to check the status on Gunicorn for Windows. I see that there is not a release date yet but wanted to see if there is anything beta that I can test on Windows.

@benoitc

This comment has been minimized.

Copy link
Owner

commented Nov 6, 2017

@jmaulsby work have not really been started yet. I'm slowly back on it. Plan for me is to make the next major release happen sometimes in December including some support of windows.

@bartmika i have been side-tracked these days. I will try to setup a plan an make it public later this week.

@Xceptions

This comment has been minimized.

Copy link

commented Dec 9, 2017

So is there now a support for Windows?. It's December

@greyli

This comment has been minimized.

Copy link

commented Jan 2, 2018

Looking forward to it! It's January.

@MrKaKisen

This comment has been minimized.

Copy link

commented Jan 3, 2018

@benoitc Any updates?

@ghost

This comment has been minimized.

Copy link

commented Jan 22, 2018

Hi,

Just checking in again, is there anything new?

Thanks
Mike

@sudhakarrand

This comment has been minimized.

Copy link

commented Jan 22, 2018

Hi

Can i use Apache Airflow on windows now?

Thanks
Sudhakar

@socratesk

This comment has been minimized.

Copy link

commented Jan 29, 2018

Hi,

I am trying to the following command but I get this error. Can you help on this?

(flaskms) C:\Users\Socrates>gunicorn --bind 0.0.0.0:8000 hello-world:app
Traceback (most recent call last):
  File "c:\programdata\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\programdata\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\ProgramData\Anaconda3\Scripts\gunicorn.exe\__main__.py", line 5, in <module>
  File "c:\programdata\anaconda3\lib\site-packages\gunicorn\app\wsgiapp.py", line 10, in <module>
    from gunicorn.app.base import Application
  File "c:\programdata\anaconda3\lib\site-packages\gunicorn\app\base.py", line 12, in <module>
    from gunicorn import util
  File "c:\programdata\anaconda3\lib\site-packages\gunicorn\util.py", line 9, in <module>
    import fcntl
ModuleNotFoundError: No module named 'fcntl'

As a hack, I created fcntl.py file with below content, compiled it as fcntl.cpython-36.pyc file, placed it under __pycache__ folder, restarted the terminal, and ran the command gunicorn --bind 0.0.0.0:8000 hello-world:app, but still no luck.

fcntl.py content:

FD_CLOEXEC = 1
F_DUPFD = 0
F_GETFD = 1
F_SETFD = 2
F_GETFL = 3
F_SETFL = 4
F_GETOWN = 5
F_SETOWN = 6
F_GETLK = 7
F_SETLK = 8
F_SETLKW = 9
F_RGETLK = 10
F_RSETLK = 11
F_CNVT = 12
F_RSETLKW = 13
F_RDLCK = 1
F_WRLCK = 2
F_UNLCK = 3
F_UNLKSYS = 4

def fcntl(fd, op, arg=0):
    return 0
        
def ioctl(fd, op, arg=0, mutable_flag=True):
    if mutable_flag:
        return 0
    else:
        return ""
    
def flock(fd, op):
    return
        
def lockf(fd, operation, length=0, start=0, whence=0):
    return
@ceefour

This comment was marked as off-topic.

Copy link

commented Jan 31, 2018

Got this from https://stackoverflow.com/questions/11087682/does-gunicorn-run-on-windows

Would be helpful is anyone can suggest the best Gunicorn alternative for Windows for the time being?

Update: I'm using waitress now, very good alternative :)

fofanov pushed a commit to fofanov/gunicorn that referenced this issue Mar 16, 2018

Remove dead code found using vulture (benoitc#1469)
https://pypi.python.org/pypi/vulture

In particular the removal of `get_maxfd()` means the `resource` module
is no longer required (which is not available on Windows) and so helps
with benoitc#524.

fofanov pushed a commit to fofanov/gunicorn that referenced this issue Mar 16, 2018

Enable CI testing on Windows using Appveyor
Currently everything but the prospector lint job fails, however having
CI set up makes it easier to see what work remains for benoitc#524.

Fixes benoitc#1467.
@hsluoyz

This comment has been minimized.

Copy link

commented Jun 30, 2018

It has been 5 years and any update on this one? Thanks.

@robertlagrant

This comment has been minimized.

Copy link

commented Jul 2, 2018

@hsluoyz the last thing that happened publicly was on 16 March of this year, I believe.

@ghost

This comment has been minimized.

Copy link

commented Aug 21, 2018

Hi,
No luck yet with getting the fork to work in windows?

@Sweenpet

This comment has been minimized.

Copy link

commented Oct 28, 2018

Hi,

I would be interested in working on this ticket.
What is the current state of the port?

@edmorley

This comment has been minimized.

Copy link
Contributor

commented Oct 29, 2018

What is the current state of the port?

PR #1468 was merged a year ago that added testing on AppVeyor on Windows, but the AppVeyor account needs activating before it will run.

After that, someone needs to iterate through the failures that occur in the Windows test runs.

@benoitc

This comment has been minimized.

Copy link
Owner

commented Oct 29, 2018

@edmorley I will take care about appveyor today.

@Sweenpet nothing much yet . The first thing to do is to look at the test results and create from tickets from it.

Also we need to decide about the scope:

  • does it ru non WSL ? What is missing for iy?
  • cygwin support?
  • native support : which kind of supervision we want. I guess we want it running as a service.

I propose to discuss that over IRC sometimes tomorrow if you want to?

@benoitc

This comment has been minimized.

Copy link
Owner

commented Oct 29, 2018

I installed appveyor on the repository:

https://ci.appveyor.com/project/benoitc/gunicorn

@Sweenpet

This comment has been minimized.

Copy link

commented Oct 30, 2018

@benoitc , I have the application (examples/flaskapp.py) and all the tests running on WSL, for Ubuntu 18.04 and Python 3.6.5. Presumably it should work for all the other version specified in the tox file. The fact it runs on WSL would solve most Windows users problems i'd imagine unless they are not running on Windows 10. Is Cygwin still widely used?

Happy to have a discussion tomorrow about native support on Windows, what time suits?

Will create those tickets tomorrow too, seems to be mainly around native Linux modules and sockets.

@bayesfactor

This comment has been minimized.

Copy link

commented Mar 14, 2019

FWIW, I use cygwin on windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.