Open
Conversation
PasteScript depends on pkg_resources (from setuptools), which is no longer bundled in modern Python, causing ModuleNotFoundError when running paster serve. Replace with gunicorn, a well-maintained WSGI server that supports the same features (HTTP serving, SSL, daemon mode). - Add pulsar/scripts/serve.py: gunicorn-based launcher with --daemon, --stop-daemon, --pid, and SSL support - Add pulsar-serve console_scripts entry point - Change web extra from Paste/PasteScript to gunicorn - Remove PasteDeploy from requirements.txt and Dockerfile - Update scripts/pulsar to default to gunicorn mode (with paster backward compat that prints deprecation warning) - Update scripts/pulsar.bat and run.bat to use pulsar-serve - Update pulsar-config template and defaults - Remove Paste directives from server.ini.sample and config/server.ini - Update documentation and install tests
Drop _generate_ssl_cert and the ssl_pem=* magic value. This was a Paste-era convenience that added a pyOpenSSL dependency for little benefit — users can generate their own certificates.
8408d28 to
7516586
Compare
nsoranzo
reviewed
Feb 27, 2026
gunicorn's BaseApplication does not implement daemon mode (only the Application subclass does), so setting daemon=True was silently ignored and run() blocked forever. Fix by implementing a standard double-fork daemonize before starting gunicorn in foreground mode. Also increase worker timeout to 300s for slow app initialization, and set OBJC_DISABLE_INITIALIZE_FORK_SAFETY at module level for macOS compatibility.
Pulsar sends job parameters (command_line, dependencies_description, etc.) as long query strings that exceed gunicorn's default 8190-byte limit_request_line, causing 400 Bad Request errors. Set both limit_request_line and limit_request_field_size to 0 (unlimited) to match the old Paste server behavior.
Member
Author
|
Yay, green! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PasteScript depends on pkg_resources (from setuptools), which is no longer bundled in modern Python, causing ModuleNotFoundError when running paster serve. Replace with gunicorn, a well-maintained WSGI server that supports the same features (HTTP serving, SSL, daemon mode).