-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Not possible to have quotes in environment variable settings #328
Comments
Fixes Supervisor#328 This allows (escaped) quotes in the values as well as empty values.
Bumped into this bug ... seems ubuntu keeps a rather old version of supervisor in the deb packages. |
@mnaberez any idea why this change never made it into the supervisor releases? [email protected] doesn't have this change. |
It requires Python 2.6 but the minimum required version for Supervisor 3.x is Python 2.4. This change was merged into the master branch, which will become Supervisor 4, and raises the minimum Python version to 2.6. |
Pull #329 changed shlex to posix mode to fix quotes inside quotes (#328). A side effect of this change is that it broke parsing empty quotes (#873). This seems to be due to a bug in shlex (http://bugs.python.org/issue21999). Since no release version of Supervisor has shipped with shlex in posix mode to support quotes inside quotes, we're reverting it to fix support for empty quotes which has shipped for many Supervisor versions. Two unit tests introduced in #329 pass without posix mode, so those tests have been retained. A unit test was also added for #873 in the previous commit. Reopens #328 Partially reverts #329 Fixes #873 Closes #880
Pull #329 changed shlex to posix mode to fix quotes inside quotes (#328). A side effect of this change is that it broke parsing empty quotes (#873). This seems to be due to a bug in shlex (http://bugs.python.org/issue21999). Since no release version of Supervisor has shipped with shlex in posix mode to support quotes inside quotes, we're reverting it to fix support for empty quotes which has shipped for many Supervisor versions. Two unit tests introduced in #329 pass without posix mode, so those tests have been retained. A unit test was also added for #873 in the previous commit. Reopens #328 Partially reverts #329 Fixes #873 Closes #880
This comment has been minimized.
This comment has been minimized.
Note for maintainers: Commit description 431b3a1 has more background. We tried to fix this once already but had to revert that fix because of a bug in Python stdlib. Comments above about Python 2.4 are outdated. Support for Python versions below 2.7 was dropped in Supervisor 4.0.0 (2019-04-05). Supervisor 3.x is no longer maintained. |
Fixes Supervisor#328 This allows (escaped) quotes in the values as well as empty values. -- This was done in pull request Supervisor#329 but removed as it broke parsing empty quotes (Supervisor#873) due to a bug in shlex (http://bugs.python.org/issue21999). This bug is fixed so posix mode can be used. Brings back Supervisor#329 Partially reverts Supervisor#880
Fixes Supervisor#328 This allows (escaped) quotes in the values as well as empty values. This was done in pull request Supervisor#329 but removed as it broke parsing empty quotes (Supervisor#873) due to a bug in shlex (http://bugs.python.org/issue21999). This bug is fixed so posix mode can be used. Brings back Supervisor#329 Partially reverts Supervisor#880
It is not possible to pass environment variable values containing quotes, e.g.
throws
Currently shlex is used in legacy mode to parse the env settings, which does not allow any kind of escaping and also has some other odd edge cases (http://docs.python.org/2/library/shlex.html#parsing-rules). I'd propose switching the lexer to posix mode. Ideally, we would like to be able to dump any string dictionary and have it load correctly as environment for the process.
The text was updated successfully, but these errors were encountered: