You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
python examples: Django preload and Flask gunicorn commands fail as documented #86
Two Python framework examples in sdks/python/examples/ fail as documented (reproduced while verifying the 0.2.0 README; the README itself gives the correct guidance):
Django under gunicorn --preload with examples/gunicorn.conf.py: AppConfig.ready() creates the client in the master, so flags.start() in post_fork returns the inherited client, and the worker raises CheckgateForkError on first evaluation.
Flask: the documented gunicorn 'flask_app:create_app()' fails to boot when run from examples/. gunicorn auto-loads ./gunicorn.conf.py, whose post_fork imports Django, and that raises ImproperlyConfigured.
Acceptance criteria
With preload, the Django example creates the client only in workers (post_fork), never in the master.
The Flask example's documented command boots from examples/ (separate gunicorn config per framework, or an explicit -c).
sdks/python/tests/test_examples.py runs both under gunicorn -w 2 --preload and evaluates a flag in each worker.
Activity
Merge pull request #96 from checkgate-sh/fix/v0.2.1-python-sdk
akosidencio commentedon Nov 30, 2026
Fixed in 0.2.1 by #96 (merged to
dev; part of the 0.2.1 release).Verification: Both examples tested under
gunicorn -w 2 --preloadin CI.Details are in the 0.2.1 changelog.