[Django] #33027: runserver command leave out of consideration xoption in cpython implementation

28 views
Skip to first unread message

Django

unread,
Aug 15, 2021, 3:19:39 AM8/15/21
to django-...@googlegroups.com
#33027: runserver command leave out of consideration xoption in cpython
implementation
--------------------------------------+------------------------
Reporter: dotuser | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: 3.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------+------------------------
Windows OS

{{{
$ winpty python -m django startproject my_project
$ cd my_project/
$ winpty python -m django startapp my_app

$ vi my_app/apps.py # demo for xoptions ...
$ cat -n my_app/apps.py
1 from django.apps import AppConfig
2
3 class MyAppConfig(AppConfig):
4 default_auto_field = 'django.db.models.BigAutoField'
5 name = 'my_app'
6
7 # myapp global initial_demo ...
8 with open("manage.py", mode="r") as stream:
9 print("=== %s" % stream.encoding)

$ vi my_project/settings.py # INSTALLED_APPS
}}}

{{{
$ winpty python -X utf8 manage.py runserver 0.0.0.0:8005 -v3
=== UTF-8
=== cp936
Watching for file changes with StatReloader
Performing system checks...
... ...
}}}

{{{
$ winpty python -X utf8 manage.py runserver 0.0.0.0:8005 -v3 --noreload
=== UTF-8
Performing system checks...
... ...
}}}


Refer:
* https://docs.python.org/3/library/sys.html#sys._xoptions
* https://docs.python.org/3/library/functions.html#open

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

Django

unread,
Aug 17, 2021, 4:26:49 AM8/17/21
to django-...@googlegroups.com
#33027: runserver command leave out of consideration xoption in cpython
implementation
---------------------------+--------------------------------------
Reporter: dotuser | Owner: nobody
Type: Bug | Status: closed
Component: Utilities | Version: 3.2
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+--------------------------------------
Changes (by Carlton Gibson):

* status: new => closed
* resolution: => invalid


Comment:

Hi. This looks like an issue prior to getting to Django:

{{{
winpty python -X utf8 ...
}}}

Django is not responsible for setting UTF8 mode.

* https://docs.python.org/3.9/using/windows.html#utf-8-mode
* See discussion on #26721 and related tickets.

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

Django

unread,
Aug 17, 2021, 5:44:33 AM8/17/21
to django-...@googlegroups.com
#33027: runserver command leave out of consideration xoption in cpython
implementation
---------------------------+--------------------------------------

Reporter: dotuser | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: 3.2
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+--------------------------------------
Changes (by Carlton Gibson):

* status: closed => new
* resolution: invalid =>


Comment:

I missed that this was about the auto-reloader. I will reopen to have
another look.

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

Django

unread,
Aug 17, 2021, 5:52:23 AM8/17/21
to django-...@googlegroups.com
#33027: Auto-reloader should pass -X options (for cpython implementation)
---------------------------+--------------------------------------

Reporter: dotuser | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: 3.2
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+--------------------------------------

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

Django

unread,
Aug 17, 2021, 6:38:49 AM8/17/21
to django-...@googlegroups.com
#33027: Auto-reloader should pass -X options (for cpython implementation)
---------------------------+------------------------------------
Reporter: dotuser | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: 3.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+------------------------------------
Changes (by Carlton Gibson):

* stage: Unreviewed => Accepted


Comment:

OK, let's accept this. We probably should pass the `-X` options if
provided. Thanks.

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

Django

unread,
Sep 28, 2021, 3:29:49 AM9/28/21
to django-...@googlegroups.com
#33027: Auto-reloader should pass -X options (for cpython implementation)
---------------------------+-----------------------------------------
Reporter: dotuser | Owner: uddmorningsun
Type: Bug | Status: assigned
Component: Utilities | Version: 3.2

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
---------------------------+-----------------------------------------
Changes (by Mariusz Felisiak):

* owner: nobody => uddmorningsun
* needs_better_patch: 0 => 1
* status: new => assigned


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

Django

unread,
Sep 29, 2021, 5:43:52 AM9/29/21
to django-...@googlegroups.com
#33027: Auto-reloader should pass -X options (for cpython implementation)
---------------------------+---------------------------------------------

Reporter: dotuser | Owner: uddmorningsun
Type: Bug | Status: assigned
Component: Utilities | Version: 3.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+---------------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


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

Django

unread,
Sep 29, 2021, 6:04:58 AM9/29/21
to django-...@googlegroups.com
#33027: Auto-reloader should pass -X options (for cpython implementation)
---------------------------+---------------------------------------------
Reporter: dotuser | Owner: uddmorningsun
Type: Bug | Status: closed
Component: Utilities | Version: 3.2
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+---------------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"36d54b7a142689e0f882338159bca879d8b6d783" 36d54b7a]:
{{{
#!CommitTicketReference repository=""
revision="36d54b7a142689e0f882338159bca879d8b6d783"
Fixed #33027 -- Made autoreloader pass -X options.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33027#comment:7>

Django

unread,
Sep 29, 2021, 6:05:12 AM9/29/21
to django-...@googlegroups.com
#33027: Auto-reloader should pass -X options (for cpython implementation)
---------------------------+---------------------------------------------
Reporter: dotuser | Owner: uddmorningsun
Type: Bug | Status: closed
Component: Utilities | Version: 3.2

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+---------------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"ee79fe0f8ee01826ef151a8c70c3496f9938379b" ee79fe0]:
{{{
#!CommitTicketReference repository=""
revision="ee79fe0f8ee01826ef151a8c70c3496f9938379b"
[4.0.x] Fixed #33027 -- Made autoreloader pass -X options.

Backport of 36d54b7a142689e0f882338159bca879d8b6d783 from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33027#comment:8>

Reply all
Reply to author
Forward
0 new messages