[Django] #26941: Remove quotes from uwsgi "env = LANG=…" configuration

46 views
Skip to first unread message

Django

unread,
Jul 22, 2016, 10:34:10 PM7/22/16
to django-...@googlegroups.com
#26941: Remove quotes from uwsgi "env = LANG=…" configuration
-------------------------------+--------------------
Reporter: denilsonsa | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
At the very end of
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/uwsgi/
There is this example line for uwsgi INI configuration:

{{{
env = LANG='en_US.UTF-8'
}}}

After trying to debug my configuration for hours, I found that line is
incorrect. Those quotes should be removed. The correct line is:

{{{
env = LANG=en_US.UTF-8
}}}

How to reproduce it:
* Ubuntu 16.04
* Python 3.5.2
* Django 1.9.8
* uwsgi 2.0.12-debian

And add the following lines to the settings.py:
{{{
import locale
import os
print(os.getenv('LANG', None))
print(locale.getlocale(), locale.getdefaultlocale())
print(locale.getpreferredencoding())
print(sys.getfilesystemencoding())
}}}

The broken configuration prints:
{{{
'en_US.UTF-8'
(None, None) ("'en_US", "UTF-8'")
ANSI_X3.4-1968
ascii
}}}

The correct one prints:
{{{
en_US.UTF-8
('en_US', 'UTF-8') ('en_US', 'UTF-8')
UTF-8
utf-8
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26941>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 24, 2016, 5:25:32 PM7/24/16
to django-...@googlegroups.com
#26941: Remove quotes from uwsgi "env = LANG=…" configuration
-------------------------------+--------------------------------------
Reporter: denilsonsa | Owner: navidkhn1
Type: Bug | Status: assigned
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by navidkhn1):

* owner: nobody => navidkhn1
* needs_better_patch: => 0
* status: new => assigned
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/26941#comment:1>

Django

unread,
Jul 25, 2016, 6:46:33 AM7/25/16
to django-...@googlegroups.com
#26941: Remove quotes from uwsgi "env = LANG=…" configuration
-------------------------------+--------------------------------------
Reporter: denilsonsa | Owner: navidkhn1
Type: Bug | Status: assigned
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by navidkhn1):

Pull Request Submitted. (#6970 )

--
Ticket URL: <https://code.djangoproject.com/ticket/26941#comment:2>

Django

unread,
Jul 25, 2016, 7:01:22 AM7/25/16
to django-...@googlegroups.com
#26941: Remove quotes from uwsgi "env = LANG=…" configuration
-------------------------------+--------------------------------------
Reporter: denilsonsa | Owner: navidkhn1
Type: Bug | Status: closed
Component: Documentation | Version: 1.9
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"9a5a789da2b53a9c19ea47130507ce26839eb008" 9a5a789d]:
{{{
#!CommitTicketReference repository=""
revision="9a5a789da2b53a9c19ea47130507ce26839eb008"
Fixed #26941 -- Corrected uwsgi "env = LANG=…" configuration in docs.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26941#comment:3>

Django

unread,
Jul 25, 2016, 7:01:48 AM7/25/16
to django-...@googlegroups.com
#26941: Remove quotes from uwsgi "env = LANG=…" configuration
-------------------------------+--------------------------------------
Reporter: denilsonsa | Owner: navidkhn1
Type: Bug | Status: closed
Component: Documentation | Version: 1.9
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"7665a52161512a963e35fb314d830b59e94bc21d" 7665a521]:
{{{
#!CommitTicketReference repository=""
revision="7665a52161512a963e35fb314d830b59e94bc21d"
[1.8.x] Fixed #26941 -- Corrected uwsgi "env = LANG=…" configuration in
docs.

Backport of 9a5a789da2b53a9c19ea47130507ce26839eb008 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26941#comment:4>

Django

unread,
Jul 25, 2016, 7:01:48 AM7/25/16
to django-...@googlegroups.com
#26941: Remove quotes from uwsgi "env = LANG=…" configuration
-------------------------------+--------------------------------------
Reporter: denilsonsa | Owner: navidkhn1
Type: Bug | Status: closed
Component: Documentation | Version: 1.9
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"3ee1751a9907eeb1680e89a1e390717b28308231" 3ee1751a]:
{{{
#!CommitTicketReference repository=""
revision="3ee1751a9907eeb1680e89a1e390717b28308231"
[1.9.x] Fixed #26941 -- Corrected uwsgi "env = LANG=…" configuration in
docs.

Backport of 9a5a789da2b53a9c19ea47130507ce26839eb008 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26941#comment:5>

Django

unread,
Jul 25, 2016, 7:01:53 AM7/25/16
to django-...@googlegroups.com
#26941: Remove quotes from uwsgi "env = LANG=…" configuration
-------------------------------+--------------------------------------
Reporter: denilsonsa | Owner: navidkhn1
Type: Bug | Status: closed
Component: Documentation | Version: 1.9
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"ec6b3cc6e95fa1646a582b4f1fb78149179adc4a" ec6b3cc6]:
{{{
#!CommitTicketReference repository=""
revision="ec6b3cc6e95fa1646a582b4f1fb78149179adc4a"
[1.10.x] Fixed #26941 -- Corrected uwsgi "env = LANG=…" configuration in
docs.

Backport of 9a5a789da2b53a9c19ea47130507ce26839eb008 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26941#comment:6>

Reply all
Reply to author
Forward
0 new messages