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

Fix failure to parse environment with quoted empty strings. #880

Closed
wants to merge 2 commits into from

Conversation

coldnight
Copy link
Contributor

The shlex in standard library has a bug before Python 2.7.13 and 3.6.0. Try keep an newest version in local to solve this problem.

The bug detail of shlex: http://bugs.python.org/issue21999

This pull request fixes #873.

The shlex in standard library has a bug before Python 2.7.13 and 3.6.0.
keep an newest version in local to solve this problem.
@mnaberez
Copy link
Member

Thanks for your work on this. I'd rather not bundle two complete shlex implementations inside Supervisor just to fix #328, so I've committed fa7e3f5 instead. I'd still like to fix #328, so hopefully we can find a simpler solution.

mnaberez added a commit that referenced this pull request May 27, 2017
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
vereszol pushed a commit to vereszol/supervisor that referenced this pull request Dec 8, 2023
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
vereszol pushed a commit to vereszol/supervisor that referenced this pull request Dec 8, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Failure to parse environment with quoted empty strings. (Issue #328)
2 participants