[Django] #23433: Django installs /usr/bin/django-admin and /usr/bin/django-admin.py

36 views
Skip to first unread message

Django

unread,
Sep 6, 2014, 1:27:59 AM9/6/14
to django-...@googlegroups.com
#23433: Django installs /usr/bin/django-admin and /usr/bin/django-admin.py
--------------------------------------+--------------------
Reporter: Arfrever | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Packaging | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
Django (since 1.7) installs `/usr/bin/django-admin` and `/usr/bin/django-
admin.py`.
Both of them execute `django.core.management.execute_from_command_line()`.
`/usr/bin/django-admin.py` does it directly, while `/usr/bin/django-admin`
does it through `pkg_resources` module of Setuptools.

`/usr/bin/django-admin.py`:
{{{
#!/usr/bin/python3.4
from django.core import management

if __name__ == "__main__":
management.execute_from_command_line()
}}}
`/usr/bin/django-admin`:
{{{
#!/usr/bin/python3.4
# EASY-INSTALL-ENTRY-SCRIPT: 'Django==1.7','console_scripts','django-
admin'
__requires__ = 'Django==1.7'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
sys.exit(
load_entry_point('Django==1.7', 'console_scripts', 'django-
admin')()
)
}}}
`/usr/lib64/python3.4/site-packages/Django-1.7-py3.4.egg-
info/entry_points.txt`:
{{{
[console_scripts]
django-admin = django.core.management:execute_from_command_line

}}}

Installation of `/usr/bin/django-admin.py` is caused by
`scripts=['django/bin/django-admin.py']` in `setup.py`.
Installation of `/usr/bin/django-admin` is caused by
`entry_points={'console_scripts': ['django-admin =
django.core.management:execute_from_command_line',]}` in `setup.py`.

I think that it would suffice to install only one of these scripts.

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

Django

unread,
Sep 6, 2014, 2:49:51 AM9/6/14
to django-...@googlegroups.com
#23433: Django installs /usr/bin/django-admin and /usr/bin/django-admin.py
-------------------------------------+-------------------------------------
Reporter: Arfrever | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Packaging | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* version: 1.7 => master
* needs_tests: => 0
* stage: Unreviewed => Someday/Maybe
* needs_docs: => 0


Comment:

We've introduced django-admin because commands don't usually have
"language extensions".

We're keeping django-admin.py for backwards-compatibility.

There's little benefit to remove django-admin.py and it would be very
disruptive.

Maybe we'll do to at some point, but not soon.

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

Django

unread,
Sep 13, 2014, 7:48:38 AM9/13/14
to django-...@googlegroups.com
#23433: Django installs /usr/bin/django-admin and /usr/bin/django-admin.py
-------------------------------------+-------------------------------------
Reporter: Arfrever | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Packaging | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by aaugustin):

We should wait until support for Django 1.6 ends to remove `django-
admin.py`.

Otherwise, it will become complicated to write version-independent test
scripts (think tox.ini).

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

Django

unread,
Sep 17, 2014, 11:45:25 AM9/17/14
to django-...@googlegroups.com
#23433: Django installs /usr/bin/django-admin and /usr/bin/django-admin.py
-------------------------------------+-------------------------------------
Reporter: Arfrever | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Packaging | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by collinanderson):

If we do remove it, we should officially deprecate it first, right?

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

Django

unread,
Sep 17, 2014, 3:55:55 PM9/17/14
to django-...@googlegroups.com
#23433: Django installs /usr/bin/django-admin and /usr/bin/django-admin.py
-------------------------------------+-------------------------------------
Reporter: Arfrever | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Packaging | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by aaugustin):

Yes, the fast track would be to deprecate it in Django 1.8 and remove it
in Django 2.0.

However, there's almost no downside to keeping it for a few more years,
and it will avoid making many tutorials obsolete (for example).

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

Django

unread,
Nov 13, 2019, 6:54:18 AM11/13/19
to django-...@googlegroups.com
#23433: Django installs /usr/bin/django-admin and /usr/bin/django-admin.py
-------------------------------------+-------------------------------------
Reporter: Arfrever | Owner: Jon
Type: | Dufresne
Cleanup/optimization | Status: assigned
Component: Packaging | Version: master
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 felixxm):

* owner: nobody => Jon Dufresne
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
* status: new => assigned
* stage: Someday/Maybe => Accepted


Comment:

[https://github.com/django/django/pull/12009 PR]

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

Django

unread,
Nov 13, 2019, 9:56:36 AM11/13/19
to django-...@googlegroups.com
#23433: Django installs /usr/bin/django-admin and /usr/bin/django-admin.py
-------------------------------------+-------------------------------------
Reporter: Arfrever | Owner: Jon
Type: | Dufresne
Cleanup/optimization | Status: assigned
Component: Packaging | Version: master
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 Jon Dufresne):

* needs_better_patch: 1 => 0


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

Django

unread,
Dec 6, 2019, 7:40:10 AM12/6/19
to django-...@googlegroups.com
#23433: Django installs /usr/bin/django-admin and /usr/bin/django-admin.py
-------------------------------------+-------------------------------------
Reporter: Arfrever | Owner: Jon
Type: | Dufresne
Cleanup/optimization | Status: closed
Component: Packaging | Version: master
Severity: Normal | Resolution: fixed

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 Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"5708327c3769262b845730996ca2784245ada4d1" 5708327]:
{{{
#!CommitTicketReference repository=""
revision="5708327c3769262b845730996ca2784245ada4d1"
Fixed #23433 -- Deprecated django-admin.py entry point in favor of django-
admin.

Unify on the entry point created by setuptools entry_points feature.
}}}

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

Django

unread,
Dec 6, 2019, 7:40:12 AM12/6/19
to django-...@googlegroups.com
#23433: Django installs /usr/bin/django-admin and /usr/bin/django-admin.py
-------------------------------------+-------------------------------------
Reporter: Arfrever | Owner: Jon
Type: | Dufresne
Cleanup/optimization | Status: assigned

Component: Packaging | Version: master
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
-------------------------------------+-------------------------------------

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

In [changeset:"8eb0f73eed4535a9e53ffd988242b7294d859a55" 8eb0f73]:
{{{
#!CommitTicketReference repository=""
revision="8eb0f73eed4535a9e53ffd988242b7294d859a55"
Refs #23433 -- Removed script argument from
AdminScriptTestCase.run_test().
}}}

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

Django

unread,
Dec 10, 2019, 5:19:05 AM12/10/19
to django-...@googlegroups.com
#23433: Django installs /usr/bin/django-admin and /usr/bin/django-admin.py
-------------------------------------+-------------------------------------
Reporter: Arfrever | Owner: Jon
Type: | Dufresne
Cleanup/optimization | Status: closed
Component: Packaging | Version: master
Severity: Normal | Resolution: fixed

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

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

Comment (by GitHub <noreply@…>):

In [changeset:"3fb7c12158a2402f0f80824f6778112071235803" 3fb7c121]:
{{{
#!CommitTicketReference repository=""
revision="3fb7c12158a2402f0f80824f6778112071235803"
Refs #23433 -- Fixed test_django_admin_py.DeprecationTest tests failures
on Windows and Python < 3.8.

subprocess.run()'s args parameter accepts a path-like object on Windows
since Python 3.8.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23433#comment:9>

Django

unread,
Jan 14, 2021, 2:12:18 PM1/14/21
to django-...@googlegroups.com
#23433: Django installs /usr/bin/django-admin and /usr/bin/django-admin.py
-------------------------------------+-------------------------------------
Reporter: Arfrever | Owner: Jon
Type: | Dufresne
Cleanup/optimization | Status: closed
Component: Packaging | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
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:"90c59b4e12e6ff41407694a460f5f30c4688dbfd" 90c59b4e]:
{{{
#!CommitTicketReference repository=""
revision="90c59b4e12e6ff41407694a460f5f30c4688dbfd"
Refs #23433 -- Removed django-admin.py entry point per deprecation
timeline.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23433#comment:10>

Reply all
Reply to author
Forward
0 new messages