Re: [Django] #24857: Add __main__ entry point as an alias for django-admin

2015-09-07 Thread Django
#24857: Add __main__ entry point as an alias for django-admin
-+-
 Reporter:  tricoder42   |Owner:  Tim
 |  Graham 
 Type:  New feature  |   Status:  closed
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

 * owner:   => Tim Graham 
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"617eff41acc583a3b0f97bb6bcc7efe096dc4891" 617eff4]:
 {{{
 #!CommitTicketReference repository=""
 revision="617eff41acc583a3b0f97bb6bcc7efe096dc4891"
 Fixed #24857 -- Added "python -m django" entry point.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.ce8f1e9b27dd04a47c411527f85f67fe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24857: Add __main__ entry point as an alias for django-admin

2015-05-26 Thread Django
#24857: Add __main__ entry point as an alias for django-admin
-+-
 Reporter:  tricoder42   |Owner:
 Type:  New feature  |   Status:  new
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by tricoder42):

 * owner:  tricoder42 =>
 * status:  assigned => new


Comment:

 I agree that simple test will be sufficient:

 {{{
 import subprocess


 def test_module_installed():
 call_args = ['python', '-m', 'django', '-v']
 assert subprocess.call(call_args) == 0
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.c071a7a55af0c9807a67934137291b3f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24857: Add __main__ entry point as an alias for django-admin

2015-05-26 Thread Django
#24857: Add __main__ entry point as an alias for django-admin
-+-
 Reporter:  tricoder42   |Owner:
 |  tricoder42
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by timgraham):

 Did you investigate my suggestion of using the subprocess module
 (following the example in `tests/model_regress/test_pickle.py`). I don't
 think we need to test `python -m django`, but rather just execute the the
 `__main__.py` script directly and ensure it works like django-admin (one
 test should be enough -- I don't think we don't need to execute all the
 admin_script tests through it).

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.1f96aaff8d5380e2a38e948ee38d8a7e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24857: Add __main__ entry point as an alias for django-admin

2015-05-26 Thread Django
#24857: Add __main__ entry point as an alias for django-admin
-+-
 Reporter:  tricoder42   |Owner:
 |  tricoder42
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by ryanhiebert):

 I've worked on this a bit more, added a couple updates to the PR
 referenced in the OP. I spent a little time figuring out how to test it,
 but don't have it all worked out yet. Best I can tell so far is that the
 tests probably need to live in {{{tests/admin_scripts/tests.py}}}, but I
 don't have it worked out what and how is the best way to test.

 My first thought is to subclass or copy the {{{DjangoAdmin*}}} tests to
 use the python entry point. I could subclass {{{AdminScriptTestCase}}},
 but that just seems like a lot of test coupling.

 One problem I'm not quite sure how to deal with is that the current tests
 don't seem to require that Django be installed properly. I might be able
 to just make sure the current working directory is the root of the
 repository...

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.f6b00465e944b77a20d2f6adb76ec9d9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24857: Add __main__ entry point as an alias for django-admin

2015-05-26 Thread Django
#24857: Add __main__ entry point as an alias for django-admin
-+-
 Reporter:  tricoder42   |Owner:
 |  tricoder42
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by ryanhiebert):

 I don't think it's worth it. I expect others will too, given that's how
 the duplication is avoided in {{{manage.py}}}.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.925dd75fdc5db9bb2cbc1cece789d386%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24857: Add __main__ entry point as an alias for django-admin

2015-05-25 Thread Django
#24857: Add __main__ entry point as an alias for django-admin
-+-
 Reporter:  tricoder42   |Owner:
 |  tricoder42
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by tricoder42):

 I've started working on it. I want to make `django/bin/django-admin.py` an
 alias for `django/__main__.py` so we don't have to duplicate code (just
 two lines though) but the best what I've got so far is:


 {{{
 # django/bin/django-admin.py
 #!/usr/bin/env python
 from runpy import run_module

 if __name__ == "__main__":
 run_module('django')
 }}}

 Not sure if it's worth it. I'll rather write some tests…

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.17d8cca4c72e9518aba7b0a8a26af1d4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24857: Add __main__ entry point as an alias for django-admin

2015-05-25 Thread Django
#24857: Add __main__ entry point as an alias for django-admin
-+-
 Reporter:  tricoder42   |Owner:
 |  tricoder42
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by bmispelon):

 * stage:  Unreviewed => Accepted


Comment:

 I think this is a good idea and there was support for it on the mailing
 list thread [1].

 The PR looks good but some basic tests would be nice.

 [1] https://groups.google.com/forum/#!searchin/django-developers/guessable
 /django-developers/_Mrf1nFVchk/tfpGyKatiHIJ

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.25819d078c3f315245b00444399feda5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24857: Add __main__ entry point as an alias for django-admin

2015-05-25 Thread Django
#24857: Add __main__ entry point as an alias for django-admin
-+-
 Reporter:  tricoder42   |Owner:
 |  tricoder42
 Type:  New feature  |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by tricoder42):

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


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.a69d3761cbe3366939edbe4beabd3604%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.