-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Configs now have to be named as proper Python modules #787
Comments
There is an example in examples: https://github.com/benoitc/gunicorn/blob/master/examples/example_config.py To be honnest I didn't expect any breaking change here. Gunicorn should still be able to load any file. It has been introduced by 8b49de4 to solve #693 . We should either fix this change or revert it for the coming release. @jerynmathew would be cool if you could also have a look. I will work on it later in the day. |
It looks like it was a major refactor. That being said, I took a brief glance at the current version of the file to see if there were any quick fixes. _check_if_pyc is being called by _get_codeobj ( Line 306 in 8b49de4
|
- Remodeled the logic to use imp module to validate the python gunicorn config file
- Moved README.md and requirements.txt to resources/ so that we can reference them from setup.py . - Began documentation. - Renamed gunicorn configs so they'll load correctly in light of Gunicorn bug (benoitc/gunicorn#787). - Fixed packages value in setup.py . Was excluding non-root packages.
@dsoprea i posted a pr to fix it. please let me know. I intend to make a new release today. |
I won't be able to test it for a few hours. On Sat, Jun 14, 2014 at 4:23 AM, Benoit Chesneau notifications@github.com
|
Looks good. |
- Moved README.md and requirements.txt to resources/ so that we can reference them from setup.py . - Began documentation. - Renamed gunicorn configs so they'll load correctly in light of Gunicorn bug (benoitc/gunicorn#787). - Fixed packages value in setup.py . Was excluding non-root packages.
Hello all, Sorry for the delay to respond. The issue seems to be the use of imp.find_module(). It insists that the It actually came in after a review comment. Seemed like a good thought at @benoitc: Your fix should easily hold up as well. Looks good. Best Regards, PS. Please excuse the brevity. I'm on mobile device.
|
fix #787 check if we load a pyc file or not.
You mentioned doing a release? |
Traditionally, I name my Gunicorn configuration files for the environment that they run in, such as gunicorn.conf.dev or gunicorn.conf.prod. However, as of several hours ago, I started running into this:
I could only fix it by renaming the configuration file to gunicorn_conf_dev.py .
It looks like your change from:
gunicorn/gunicorn/six.py
Line 289 in 2e84d68
to:
gunicorn/gunicorn/six.py
Line 289 in e1e5d36
is what broke it.
Man. I just lost several hours debugging several applications and several combinations of dependency versions trying to figure out why projects worked and then didn't work. It turns out that I had a couple of different Gunicorn versions, and that it was Gunicorn's changes that had broken everything. It took me extra long to identify it because I usually exclude Gunicorn as a suspect.. It never is.
I searched the issue on Google, and got zero relevant results. Meanwhile, I had sought to verify if anything had changed with how to name Gunicorn configurations and how to launch with them, but there weren't any examples in the documentation. I guess I must've picked-up my conventions from some other project back when I first started using Gunicorn.
I highly recommend that you add such an example for using a configuration file and how to name it, and put a warning in the documentation that configurations must now be named like proper Python modules, but didn't previously have to be.
The text was updated successfully, but these errors were encountered: