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

Cannot use compiled python config files in gunicorn. #693

Closed
jerynmathew opened this issue Feb 6, 2014 · 0 comments
Closed

Cannot use compiled python config files in gunicorn. #693

jerynmathew opened this issue Feb 6, 2014 · 0 comments

Comments

@jerynmathew
Copy link
Contributor

Hi,

My product uses shipment policies that compiles all sources (.py) files to compiled pycode (.pyc) and removes the sources, before creating the tarball for shipment.

The gunicorn config file I use (with the -c option) also gets compiled down this way. Reason being, I use the server hooks for special operations that expose the inner working of the code.

I get the same error message as mentioned in earlier issue #316.

I was wondering, is there a fix for the same?

jerynmathew added a commit to jerynmathew/gunicorn that referenced this issue Feb 6, 2014
  - Made changes to read and fetch code object from .pyc files.
  - Error message "Non-ASCII character '\xf3' in file" is resolved.
jerynmathew pushed a commit to jerynmathew/gunicorn that referenced this issue Feb 6, 2014
  - Override older behavior of execfile_ with one with pyc patch
jerynmathew added a commit to jerynmathew/gunicorn that referenced this issue Feb 6, 2014
  - Override older behavior of execfile_ with one with pyc patch
jerynmathew pushed a commit to jerynmathew/gunicorn that referenced this issue Mar 15, 2014
	- .py/.pyc files are now fetched with find_module for better validation.
jerynmathew added a commit to jerynmathew/gunicorn that referenced this issue Mar 15, 2014
	- Remodeled the logic to use imp module to validate the python
	  gunicorn config file
jerynmathew added a commit to jerynmathew/gunicorn that referenced this issue Mar 17, 2014
	- Added changes to file read, as per review comments
@tilgovi tilgovi closed this as completed Mar 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants