Shouldn't manage.py call python3 instead of python?

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Shouldn't manage.py call python3 instead of python?

Bobby Mozumder
The header of manage.py has: #!/usr/bin/env python

Shoudn’t it be: #!/usr/bin/env python3

Since 2.0 is now only Python3. Both my Mac OS & FreeBSD environments have Python 3.5+ as “python3". (I’m not sure about Linux or other environments).

Is that a bug I need to file?

-bobby

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/C158A05A-0DA3-485D-861E-B72DA11E5074%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Josh Smeaton
I think you're right and PEP394 is the relevant text: https://www.python.org/dev/peps/pep-0394/

TL;DR

For now, python should refer to python2 and python3 should be used to refer to python 3.

On Saturday, 7 April 2018 07:07:35 UTC+10, Bobby Mozumder wrote:
The header of manage.py has: #!/usr/bin/env python

Shoudn’t it be: #!/usr/bin/env python3

Since 2.0 is now only Python3. Both my Mac OS & FreeBSD environments have Python 3.5+ as “python3". (I’m not sure about Linux or other environments).

Is that a bug I need to file?

-bobby

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/d13b010f-df53-46eb-8dab-93b4fc05dd97%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Tim Graham-2
It was tried in https://code.djangoproject.com/ticket/27878 but it caused problems, particularly on Windows.

On Friday, April 6, 2018 at 6:35:50 PM UTC-4, Josh Smeaton wrote:
I think you're right and PEP394 is the relevant text: <a href="https://www.python.org/dev/peps/pep-0394/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.python.org%2Fdev%2Fpeps%2Fpep-0394%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFVNV1PRoM2L31hSWkv17A4VAwVeA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.python.org%2Fdev%2Fpeps%2Fpep-0394%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFVNV1PRoM2L31hSWkv17A4VAwVeA&#39;;return true;">https://www.python.org/dev/peps/pep-0394/

TL;DR

For now, python should refer to python2 and python3 should be used to refer to python 3.

On Saturday, 7 April 2018 07:07:35 UTC+10, Bobby Mozumder wrote:
The header of manage.py has: #!/usr/bin/env python

Shoudn’t it be: #!/usr/bin/env python3

Since 2.0 is now only Python3. Both my Mac OS & FreeBSD environments have Python 3.5+ as “python3". (I’m not sure about Linux or other environments).

Is that a bug I need to file?

-bobby

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7cdf48bb-ab0b-449d-8f33-a4c6d7777369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Bobby Mozumder
Is it OK to reopen that ticket?

The problem is that python2 and python3 need to coexist in most systems, and you can’t just rename python3 to python.

-bobby

On Apr 6, 2018, at 8:30 PM, Tim Graham <[hidden email]> wrote:

It was tried in https://code.djangoproject.com/ticket/27878 but it caused problems, particularly on Windows.

On Friday, April 6, 2018 at 6:35:50 PM UTC-4, Josh Smeaton wrote:
I think you're right and PEP394 is the relevant text: https://www.python.org/dev/peps/pep-0394/

TL;DR

For now, python should refer to python2 and python3 should be used to refer to python 3.

On Saturday, 7 April 2018 07:07:35 UTC+10, Bobby Mozumder wrote:
The header of manage.py has: #!/usr/bin/env python

Shoudn’t it be: #!/usr/bin/env python3

Since 2.0 is now only Python3. Both my Mac OS & FreeBSD environments have Python 3.5+ as “python3". (I’m not sure about Linux or other environments).

Is that a bug I need to file?

-bobby

-- 
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7cdf48bb-ab0b-449d-8f33-a4c6d7777369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/E1881F92-2D8C-45D8-8315-E5D72D0D7B6E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Tom Forbes
This only seems to be an issue when you are using the base system interpreter to run manage.py. installing Django and other dependencies there is not recommended for a variety of reasons, and this isn't a problem when using a virtualenv, it doesn't seem like there is much to fix IMO.


On Sun, 8 Apr 2018, 08:19 Bobby Mozumder, <[hidden email]> wrote:
Is it OK to reopen that ticket?

The problem is that python2 and python3 need to coexist in most systems, and you can’t just rename python3 to python.

-bobby

On Apr 6, 2018, at 8:30 PM, Tim Graham <[hidden email]> wrote:

It was tried in https://code.djangoproject.com/ticket/27878 but it caused problems, particularly on Windows.

On Friday, April 6, 2018 at 6:35:50 PM UTC-4, Josh Smeaton wrote:
I think you're right and PEP394 is the relevant text: https://www.python.org/dev/peps/pep-0394/

TL;DR

For now, python should refer to python2 and python3 should be used to refer to python 3.

On Saturday, 7 April 2018 07:07:35 UTC+10, Bobby Mozumder wrote:
The header of manage.py has: #!/usr/bin/env python

Shoudn’t it be: #!/usr/bin/env python3

Since 2.0 is now only Python3. Both my Mac OS & FreeBSD environments have Python 3.5+ as “python3". (I’m not sure about Linux or other environments).

Is that a bug I need to file?

-bobby

-- 
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7cdf48bb-ab0b-449d-8f33-a4c6d7777369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/E1881F92-2D8C-45D8-8315-E5D72D0D7B6E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFNZOJORs_f%3D70fkjdCRX%2BHwY4%2B%3DTk2Ns8TZwU-m7zboTY8Ssg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Bobby Mozumder
I never really liked the idea of using VirtualEnv or HomeBrew over the default installation in Mac OS.  (FreeBSD has the same naming issues).  

Having beginners use VirtualEnv or HomeBrew always struck me as a huge obstacle to getting a beginners Django developer's environment operational, as well as being a huge pain-in-the-ass of always setting VirtualEnvs for each shell.  So, I personally don’t use them anymore, and just use the base system now.

I wish there was a process of running Django out-of-the-box from a default Mac OS install.

-bobby

On Apr 8, 2018, at 8:27 AM, Tom Forbes <[hidden email]> wrote:

This only seems to be an issue when you are using the base system interpreter to run manage.py. installing Django and other dependencies there is not recommended for a variety of reasons, and this isn't a problem when using a virtualenv, it doesn't seem like there is much to fix IMO.


On Sun, 8 Apr 2018, 08:19 Bobby Mozumder, <[hidden email]> wrote:
Is it OK to reopen that ticket?

The problem is that python2 and python3 need to coexist in most systems, and you can’t just rename python3 to python.

-bobby

On Apr 6, 2018, at 8:30 PM, Tim Graham <[hidden email]> wrote:

It was tried in https://code.djangoproject.com/ticket/27878 but it caused problems, particularly on Windows.

On Friday, April 6, 2018 at 6:35:50 PM UTC-4, Josh Smeaton wrote:
I think you're right and PEP394 is the relevant text: https://www.python.org/dev/peps/pep-0394/

TL;DR

For now, python should refer to python2 and python3 should be used to refer to python 3.

On Saturday, 7 April 2018 07:07:35 UTC+10, Bobby Mozumder wrote:
The header of manage.py has: #!/usr/bin/env python

Shoudn’t it be: #!/usr/bin/env python3

Since 2.0 is now only Python3. Both my Mac OS & FreeBSD environments have Python 3.5+ as “python3". (I’m not sure about Linux or other environments).

Is that a bug I need to file?

-bobby

-- 
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7cdf48bb-ab0b-449d-8f33-a4c6d7777369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/E1881F92-2D8C-45D8-8315-E5D72D0D7B6E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFNZOJORs_f%3D70fkjdCRX%2BHwY4%2B%3DTk2Ns8TZwU-m7zboTY8Ssg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/AF1F8F57-9E1D-47D5-A655-A86F60E2969F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Tom Forbes

It may be an obstacle but I believe it’s better than having them nuke their base systems by accident by installing a package that conflicts with their base system. This isn’t such a huge issue on MacOS but on Linux it is and I’ve seen it happen a few times. Not to mention the issue of multiple conflicting dependencies across projects - all in all it’s really not a recommended and we should not look to make it easier IMO.

People have different setups and whatever works, works, but things like pipenv are maturing rapidly and solve the convenience issue you describe. I personally use virtualenvwrapper which is really simple to set up and displays the current virtual environment in the prompt, and makes it really easy to switch between them/create new ones.

Tom



On 8 April 2018 at 15:00:46, Bobby Mozumder ([hidden email]) wrote:

I never really liked the idea of using VirtualEnv or HomeBrew over the default installation in Mac OS.  (FreeBSD has the same naming issues).  

Having beginners use VirtualEnv or HomeBrew always struck me as a huge obstacle to getting a beginners Django developer's environment operational, as well as being a huge pain-in-the-ass of always setting VirtualEnvs for each shell.  So, I personally don’t use them anymore, and just use the base system now.

I wish there was a process of running Django out-of-the-box from a default Mac OS install.

-bobby

On Apr 8, 2018, at 8:27 AM, Tom Forbes <[hidden email]> wrote:

This only seems to be an issue when you are using the base system interpreter to run manage.py. installing Django and other dependencies there is not recommended for a variety of reasons, and this isn't a problem when using a virtualenv, it doesn't seem like there is much to fix IMO.


On Sun, 8 Apr 2018, 08:19 Bobby Mozumder, <[hidden email]> wrote:
Is it OK to reopen that ticket?

The problem is that python2 and python3 need to coexist in most systems, and you can’t just rename python3 to python.

-bobby

On Apr 6, 2018, at 8:30 PM, Tim Graham <[hidden email]> wrote:

It was tried in https://code.djangoproject.com/ticket/27878 but it caused problems, particularly on Windows.

On Friday, April 6, 2018 at 6:35:50 PM UTC-4, Josh Smeaton wrote:
I think you're right and PEP394 is the relevant text: https://www.python.org/dev/peps/pep-0394/

TL;DR

For now, python should refer to python2 and python3 should be used to refer to python 3.

On Saturday, 7 April 2018 07:07:35 UTC+10, Bobby Mozumder wrote:
The header of manage.py has: #!/usr/bin/env python

Shoudn’t it be: #!/usr/bin/env python3

Since 2.0 is now only Python3. Both my Mac OS & FreeBSD environments have Python 3.5+ as “python3". (I’m not sure about Linux or other environments).

Is that a bug I need to file?

-bobby

-- 
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7cdf48bb-ab0b-449d-8f33-a4c6d7777369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/E1881F92-2D8C-45D8-8315-E5D72D0D7B6E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFNZOJORs_f%3D70fkjdCRX%2BHwY4%2B%3DTk2Ns8TZwU-m7zboTY8Ssg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/AF1F8F57-9E1D-47D5-A655-A86F60E2969F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFNZOJO5N2uaqvNXkD_%2BDKcaTzuo_UcsJix2A12m1tvWY9L_WA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Collin Anderson-2
I personally just edit my manage.py to change it from python to python3. Maybe we could just document that?

(Or would it work to use os.path.basename(sys.executable) ?)

On Sun, Apr 8, 2018 at 11:02 AM, Tom Forbes <[hidden email]> wrote:

It may be an obstacle but I believe it’s better than having them nuke their base systems by accident by installing a package that conflicts with their base system. This isn’t such a huge issue on MacOS but on Linux it is and I’ve seen it happen a few times. Not to mention the issue of multiple conflicting dependencies across projects - all in all it’s really not a recommended and we should not look to make it easier IMO.

People have different setups and whatever works, works, but things like pipenv are maturing rapidly and solve the convenience issue you describe. I personally use virtualenvwrapper which is really simple to set up and displays the current virtual environment in the prompt, and makes it really easy to switch between them/create new ones.

Tom



On 8 April 2018 at 15:00:46, Bobby Mozumder ([hidden email]) wrote:

I never really liked the idea of using VirtualEnv or HomeBrew over the default installation in Mac OS.  (FreeBSD has the same naming issues).  

Having beginners use VirtualEnv or HomeBrew always struck me as a huge obstacle to getting a beginners Django developer's environment operational, as well as being a huge pain-in-the-ass of always setting VirtualEnvs for each shell.  So, I personally don’t use them anymore, and just use the base system now.

I wish there was a process of running Django out-of-the-box from a default Mac OS install.

-bobby

On Apr 8, 2018, at 8:27 AM, Tom Forbes <[hidden email]> wrote:

This only seems to be an issue when you are using the base system interpreter to run manage.py. installing Django and other dependencies there is not recommended for a variety of reasons, and this isn't a problem when using a virtualenv, it doesn't seem like there is much to fix IMO.


On Sun, 8 Apr 2018, 08:19 Bobby Mozumder, <[hidden email]> wrote:
Is it OK to reopen that ticket?

The problem is that python2 and python3 need to coexist in most systems, and you can’t just rename python3 to python.

-bobby

On Apr 6, 2018, at 8:30 PM, Tim Graham <[hidden email]> wrote:

It was tried in https://code.djangoproject.com/ticket/27878 but it caused problems, particularly on Windows.

On Friday, April 6, 2018 at 6:35:50 PM UTC-4, Josh Smeaton wrote:
I think you're right and PEP394 is the relevant text: https://www.python.org/dev/peps/pep-0394/

TL;DR

For now, python should refer to python2 and python3 should be used to refer to python 3.

On Saturday, 7 April 2018 07:07:35 UTC+10, Bobby Mozumder wrote:
The header of manage.py has: #!/usr/bin/env python

Shoudn’t it be: #!/usr/bin/env python3

Since 2.0 is now only Python3. Both my Mac OS & FreeBSD environments have Python 3.5+ as “python3". (I’m not sure about Linux or other environments).

Is that a bug I need to file?

-bobby

-- 
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7cdf48bb-ab0b-449d-8f33-a4c6d7777369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/E1881F92-2D8C-45D8-8315-E5D72D0D7B6E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFNZOJORs_f%3D70fkjdCRX%2BHwY4%2B%3DTk2Ns8TZwU-m7zboTY8Ssg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/AF1F8F57-9E1D-47D5-A655-A86F60E2969F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFNZOJO5N2uaqvNXkD_%2BDKcaTzuo_UcsJix2A12m1tvWY9L_WA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFO84S5rYmrQ9ggK4hr%3DBR78kP%2BDYJhW4PgZQgyKUizFxsOnhg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Adam Johnson-2
(Or would it work to use os.path.basename(sys.executable) ?)

The shebang is interpreted by the OS so this is before python even starts :)

On 9 April 2018 at 20:53, Collin Anderson <[hidden email]> wrote:
I personally just edit my manage.py to change it from python to python3. Maybe we could just document that?

(Or would it work to use os.path.basename(sys.executable) ?)

On Sun, Apr 8, 2018 at 11:02 AM, Tom Forbes <[hidden email]> wrote:

It may be an obstacle but I believe it’s better than having them nuke their base systems by accident by installing a package that conflicts with their base system. This isn’t such a huge issue on MacOS but on Linux it is and I’ve seen it happen a few times. Not to mention the issue of multiple conflicting dependencies across projects - all in all it’s really not a recommended and we should not look to make it easier IMO.

People have different setups and whatever works, works, but things like pipenv are maturing rapidly and solve the convenience issue you describe. I personally use virtualenvwrapper which is really simple to set up and displays the current virtual environment in the prompt, and makes it really easy to switch between them/create new ones.

Tom



On 8 April 2018 at 15:00:46, Bobby Mozumder ([hidden email]) wrote:

I never really liked the idea of using VirtualEnv or HomeBrew over the default installation in Mac OS.  (FreeBSD has the same naming issues).  

Having beginners use VirtualEnv or HomeBrew always struck me as a huge obstacle to getting a beginners Django developer's environment operational, as well as being a huge pain-in-the-ass of always setting VirtualEnvs for each shell.  So, I personally don’t use them anymore, and just use the base system now.

I wish there was a process of running Django out-of-the-box from a default Mac OS install.

-bobby

On Apr 8, 2018, at 8:27 AM, Tom Forbes <[hidden email]> wrote:

This only seems to be an issue when you are using the base system interpreter to run manage.py. installing Django and other dependencies there is not recommended for a variety of reasons, and this isn't a problem when using a virtualenv, it doesn't seem like there is much to fix IMO.


On Sun, 8 Apr 2018, 08:19 Bobby Mozumder, <[hidden email]> wrote:
Is it OK to reopen that ticket?

The problem is that python2 and python3 need to coexist in most systems, and you can’t just rename python3 to python.

-bobby

On Apr 6, 2018, at 8:30 PM, Tim Graham <[hidden email]> wrote:

It was tried in https://code.djangoproject.com/ticket/27878 but it caused problems, particularly on Windows.

On Friday, April 6, 2018 at 6:35:50 PM UTC-4, Josh Smeaton wrote:
I think you're right and PEP394 is the relevant text: https://www.python.org/dev/peps/pep-0394/

TL;DR

For now, python should refer to python2 and python3 should be used to refer to python 3.

On Saturday, 7 April 2018 07:07:35 UTC+10, Bobby Mozumder wrote:
The header of manage.py has: #!/usr/bin/env python

Shoudn’t it be: #!/usr/bin/env python3

Since 2.0 is now only Python3. Both my Mac OS & FreeBSD environments have Python 3.5+ as “python3". (I’m not sure about Linux or other environments).

Is that a bug I need to file?

-bobby

-- 
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7cdf48bb-ab0b-449d-8f33-a4c6d7777369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/E1881F92-2D8C-45D8-8315-E5D72D0D7B6E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFNZOJORs_f%3D70fkjdCRX%2BHwY4%2B%3DTk2Ns8TZwU-m7zboTY8Ssg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/AF1F8F57-9E1D-47D5-A655-A86F60E2969F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFNZOJO5N2uaqvNXkD_%2BDKcaTzuo_UcsJix2A12m1tvWY9L_WA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFO84S5rYmrQ9ggK4hr%3DBR78kP%2BDYJhW4PgZQgyKUizFxsOnhg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Adam

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM0j6ZhkzP9QWahN2qGm8RO-q1%3DKmq0zujgK1jiZB4Grxw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Collin Anderson-2
I'm thinking something like #!/usr/bin/env {{ os.path.basename(sys.executable) }} when running startproject. (Though on windows I that would be #!/usr/bin/env python.exe - not sure if that would work or not)

On Mon, Apr 9, 2018 at 3:58 PM, Adam Johnson <[hidden email]> wrote:
(Or would it work to use os.path.basename(sys.executable) ?)

The shebang is interpreted by the OS so this is before python even starts :)

On 9 April 2018 at 20:53, Collin Anderson <[hidden email]> wrote:
I personally just edit my manage.py to change it from python to python3. Maybe we could just document that?

(Or would it work to use os.path.basename(sys.executable) ?)

On Sun, Apr 8, 2018 at 11:02 AM, Tom Forbes <[hidden email]> wrote:

It may be an obstacle but I believe it’s better than having them nuke their base systems by accident by installing a package that conflicts with their base system. This isn’t such a huge issue on MacOS but on Linux it is and I’ve seen it happen a few times. Not to mention the issue of multiple conflicting dependencies across projects - all in all it’s really not a recommended and we should not look to make it easier IMO.

People have different setups and whatever works, works, but things like pipenv are maturing rapidly and solve the convenience issue you describe. I personally use virtualenvwrapper which is really simple to set up and displays the current virtual environment in the prompt, and makes it really easy to switch between them/create new ones.

Tom



On 8 April 2018 at 15:00:46, Bobby Mozumder ([hidden email]) wrote:

I never really liked the idea of using VirtualEnv or HomeBrew over the default installation in Mac OS.  (FreeBSD has the same naming issues).  

Having beginners use VirtualEnv or HomeBrew always struck me as a huge obstacle to getting a beginners Django developer's environment operational, as well as being a huge pain-in-the-ass of always setting VirtualEnvs for each shell.  So, I personally don’t use them anymore, and just use the base system now.

I wish there was a process of running Django out-of-the-box from a default Mac OS install.

-bobby

On Apr 8, 2018, at 8:27 AM, Tom Forbes <[hidden email]> wrote:

This only seems to be an issue when you are using the base system interpreter to run manage.py. installing Django and other dependencies there is not recommended for a variety of reasons, and this isn't a problem when using a virtualenv, it doesn't seem like there is much to fix IMO.


On Sun, 8 Apr 2018, 08:19 Bobby Mozumder, <[hidden email]> wrote:
Is it OK to reopen that ticket?

The problem is that python2 and python3 need to coexist in most systems, and you can’t just rename python3 to python.

-bobby

On Apr 6, 2018, at 8:30 PM, Tim Graham <[hidden email]> wrote:

It was tried in https://code.djangoproject.com/ticket/27878 but it caused problems, particularly on Windows.

On Friday, April 6, 2018 at 6:35:50 PM UTC-4, Josh Smeaton wrote:
I think you're right and PEP394 is the relevant text: https://www.python.org/dev/peps/pep-0394/

TL;DR

For now, python should refer to python2 and python3 should be used to refer to python 3.

On Saturday, 7 April 2018 07:07:35 UTC+10, Bobby Mozumder wrote:
The header of manage.py has: #!/usr/bin/env python

Shoudn’t it be: #!/usr/bin/env python3

Since 2.0 is now only Python3. Both my Mac OS & FreeBSD environments have Python 3.5+ as “python3". (I’m not sure about Linux or other environments).

Is that a bug I need to file?

-bobby

-- 
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7cdf48bb-ab0b-449d-8f33-a4c6d7777369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/E1881F92-2D8C-45D8-8315-E5D72D0D7B6E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFNZOJORs_f%3D70fkjdCRX%2BHwY4%2B%3DTk2Ns8TZwU-m7zboTY8Ssg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/AF1F8F57-9E1D-47D5-A655-A86F60E2969F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFNZOJO5N2uaqvNXkD_%2BDKcaTzuo_UcsJix2A12m1tvWY9L_WA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFO84S5rYmrQ9ggK4hr%3DBR78kP%2BDYJhW4PgZQgyKUizFxsOnhg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Adam

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM0j6ZhkzP9QWahN2qGm8RO-q1%3DKmq0zujgK1jiZB4Grxw%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFO84S6Tv%3DzbDB4s7ucCK9weRE%2BO1VZ1%3DFYMvss226%3D%2BFOaF_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Adam Johnson-2
Oh yeah, duh, my bad :)

On 9 April 2018 at 23:35, Collin Anderson <[hidden email]> wrote:
I'm thinking something like #!/usr/bin/env {{ os.path.basename(sys.executable) }} when running startproject. (Though on windows I that would be #!/usr/bin/env python.exe - not sure if that would work or not)

On Mon, Apr 9, 2018 at 3:58 PM, Adam Johnson <[hidden email]> wrote:
(Or would it work to use os.path.basename(sys.executable) ?)

The shebang is interpreted by the OS so this is before python even starts :)

On 9 April 2018 at 20:53, Collin Anderson <[hidden email]> wrote:
I personally just edit my manage.py to change it from python to python3. Maybe we could just document that?

(Or would it work to use os.path.basename(sys.executable) ?)

On Sun, Apr 8, 2018 at 11:02 AM, Tom Forbes <[hidden email]> wrote:

It may be an obstacle but I believe it’s better than having them nuke their base systems by accident by installing a package that conflicts with their base system. This isn’t such a huge issue on MacOS but on Linux it is and I’ve seen it happen a few times. Not to mention the issue of multiple conflicting dependencies across projects - all in all it’s really not a recommended and we should not look to make it easier IMO.

People have different setups and whatever works, works, but things like pipenv are maturing rapidly and solve the convenience issue you describe. I personally use virtualenvwrapper which is really simple to set up and displays the current virtual environment in the prompt, and makes it really easy to switch between them/create new ones.

Tom



On 8 April 2018 at 15:00:46, Bobby Mozumder ([hidden email]) wrote:

I never really liked the idea of using VirtualEnv or HomeBrew over the default installation in Mac OS.  (FreeBSD has the same naming issues).  

Having beginners use VirtualEnv or HomeBrew always struck me as a huge obstacle to getting a beginners Django developer's environment operational, as well as being a huge pain-in-the-ass of always setting VirtualEnvs for each shell.  So, I personally don’t use them anymore, and just use the base system now.

I wish there was a process of running Django out-of-the-box from a default Mac OS install.

-bobby

On Apr 8, 2018, at 8:27 AM, Tom Forbes <[hidden email]> wrote:

This only seems to be an issue when you are using the base system interpreter to run manage.py. installing Django and other dependencies there is not recommended for a variety of reasons, and this isn't a problem when using a virtualenv, it doesn't seem like there is much to fix IMO.


On Sun, 8 Apr 2018, 08:19 Bobby Mozumder, <[hidden email]> wrote:
Is it OK to reopen that ticket?

The problem is that python2 and python3 need to coexist in most systems, and you can’t just rename python3 to python.

-bobby

On Apr 6, 2018, at 8:30 PM, Tim Graham <[hidden email]> wrote:

It was tried in https://code.djangoproject.com/ticket/27878 but it caused problems, particularly on Windows.

On Friday, April 6, 2018 at 6:35:50 PM UTC-4, Josh Smeaton wrote:
I think you're right and PEP394 is the relevant text: https://www.python.org/dev/peps/pep-0394/

TL;DR

For now, python should refer to python2 and python3 should be used to refer to python 3.

On Saturday, 7 April 2018 07:07:35 UTC+10, Bobby Mozumder wrote:
The header of manage.py has: #!/usr/bin/env python

Shoudn’t it be: #!/usr/bin/env python3

Since 2.0 is now only Python3. Both my Mac OS & FreeBSD environments have Python 3.5+ as “python3". (I’m not sure about Linux or other environments).

Is that a bug I need to file?

-bobby

-- 
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7cdf48bb-ab0b-449d-8f33-a4c6d7777369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/E1881F92-2D8C-45D8-8315-E5D72D0D7B6E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFNZOJORs_f%3D70fkjdCRX%2BHwY4%2B%3DTk2Ns8TZwU-m7zboTY8Ssg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/AF1F8F57-9E1D-47D5-A655-A86F60E2969F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFNZOJO5N2uaqvNXkD_%2BDKcaTzuo_UcsJix2A12m1tvWY9L_WA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFO84S5rYmrQ9ggK4hr%3DBR78kP%2BDYJhW4PgZQgyKUizFxsOnhg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Adam

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM0j6ZhkzP9QWahN2qGm8RO-q1%3DKmq0zujgK1jiZB4Grxw%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFO84S6Tv%3DzbDB4s7ucCK9weRE%2BO1VZ1%3DFYMvss226%3D%2BFOaF_A%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Adam

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM2OC2TWMraBseF6SRo%3D6RorpBejYhiM23cNLDyA0jEXiA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Tim Allen
Since `django-admin startproject my_project` is created on the fly from templates, couldn't we dynamically create the `manage.py` executable based on some system introspection and an agreed upon priority?

Regards,

Tim

On Tuesday, April 10, 2018 at 4:28:12 AM UTC-4, Adam Johnson wrote:
Oh yeah, duh, my bad :)

On 9 April 2018 at 23:35, Collin Anderson <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="KFojms1BBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">cmawe...@...> wrote:
I'm thinking something like #!/usr/bin/env {{ os.path.basename(sys.executable) }} when running startproject. (Though on windows I that would be #!/usr/bin/env python.exe - not sure if that would work or not)

On Mon, Apr 9, 2018 at 3:58 PM, Adam Johnson <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="KFojms1BBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">m...@...> wrote:
(Or would it work to use os.path.basename(sys.executable) ?)

The shebang is interpreted by the OS so this is before python even starts :)

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/171caf56-a3cb-497d-9ebf-0a1ca61a31eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Florian Apolloner


On Tuesday, April 10, 2018 at 1:28:33 PM UTC+2, Tim Allen wrote:
Since `django-admin startproject my_project` is created on the fly from templates, couldn't we dynamically create the `manage.py` executable based on some system introspection and an agreed upon priority

Wouldn't that result in something along the lines of "works on my system" and breaks elsewhere? after all manage.py is committed into git more often than not.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/4806c0b4-1f2a-4dd4-ba6d-4463004bc766%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Aymeric Augustin
On 10 Apr 2018, at 17:43, Florian Apolloner <[hidden email]> wrote:

On Tuesday, April 10, 2018 at 1:28:33 PM UTC+2, Tim Allen wrote:
Since `django-admin startproject my_project` is created on the fly from templates, couldn't we dynamically create the `manage.py` executable based on some system introspection and an agreed upon priority

Wouldn't that result in something along the lines of "works on my system" and breaks elsewhere? after all manage.py is committed into git more often than not.

... which directs us to the correct solution: setting PYTHONPATH and DJANGO_SETTINGS_MODULE correctly and using django-admin instead of manage.py. 

pip / setuptools rewrites the shebang line appropriately when it installs the django-admin script. (I'm not sure how this happens exactly.)

My point is — there's no perfect solution. At best we can aim for a less imperfect solution than the status quo.

-- 
Aymeric.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/C36A8494-1094-4A03-A402-618BB999F927%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Bobby Mozumder
In any case you’re going to see a lot of Django 2.0 developers on Mac OS hit this problem when they install to default Python or use standard Python install convention where Python 3.5 is installed as “python3".

-bobby

On Apr 10, 2018, at 3:46 PM, Aymeric Augustin <[hidden email]> wrote:

On 10 Apr 2018, at 17:43, Florian Apolloner <[hidden email]> wrote:

On Tuesday, April 10, 2018 at 1:28:33 PM UTC+2, Tim Allen wrote:
Since `django-admin startproject my_project` is created on the fly from templates, couldn't we dynamically create the `manage.py` executable based on some system introspection and an agreed upon priority

Wouldn't that result in something along the lines of "works on my system" and breaks elsewhere? after all manage.py is committed into git more often than not.

... which directs us to the correct solution: setting PYTHONPATH and DJANGO_SETTINGS_MODULE correctly and using django-admin instead of manage.py. 

pip / setuptools rewrites the shebang line appropriately when it installs the django-admin script. (I'm not sure how this happens exactly.)

My point is — there's no perfect solution. At best we can aim for a less imperfect solution than the status quo.

-- 
Aymeric.


--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/C36A8494-1094-4A03-A402-618BB999F927%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CADE6613-965B-4A27-885A-EAE5651014A6%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Josh Smeaton
As a datapoint, I've seen roughly 1 person per week in #django IRC confused about specific startup exceptions due to them using python 2 rather than python 3 on Django >= 2.0. Unsure how many of these are due to the shebang. That said, it looks like there are no good solutions other than maybe ensuring our docs always show the form python3 manage.py <command> rather than ./manage.py <command>.

On Wednesday, 11 April 2018 12:02:31 UTC+10, Bobby Mozumder wrote:
In any case you’re going to see a lot of Django 2.0 developers on Mac OS hit this problem when they install to default Python or use standard Python install convention where Python 3.5 is installed as “python3".

-bobby

On Apr 10, 2018, at 3:46 PM, Aymeric Augustin <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="eoX96sF_BwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">aymeric....@polytechnique.org> wrote:

On 10 Apr 2018, at 17:43, Florian Apolloner <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="eoX96sF_BwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">f.apo...@...> wrote:

On Tuesday, April 10, 2018 at 1:28:33 PM UTC+2, Tim Allen wrote:
Since `django-admin startproject my_project` is created on the fly from templates, couldn't we dynamically create the `manage.py` executable based on some system introspection and an agreed upon priority

Wouldn't that result in something along the lines of "works on my system" and breaks elsewhere? after all manage.py is committed into git more often than not.

... which directs us to the correct solution: setting PYTHONPATH and DJANGO_SETTINGS_MODULE correctly and using django-admin instead of manage.py. 

pip / setuptools rewrites the shebang line appropriately when it installs the django-admin script. (I'm not sure how this happens exactly.)

My point is — there's no perfect solution. At best we can aim for a less imperfect solution than the status quo.

-- 
Aymeric.


--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="eoX96sF_BwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-develop...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="eoX96sF_BwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-d...@googlegroups.com.
Visit this group at <a href="https://groups.google.com/group/django-developers" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/django-developers&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-developers&#39;;return true;">https://groups.google.com/group/django-developers.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-developers/C36A8494-1094-4A03-A402-618BB999F927%40polytechnique.org?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-developers/C36A8494-1094-4A03-A402-618BB999F927%40polytechnique.org?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-developers/C36A8494-1094-4A03-A402-618BB999F927%40polytechnique.org?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-developers/C36A8494-1094-4A03-A402-618BB999F927%40polytechnique.org.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/33ec0ccb-a63b-4451-bfec-815b9e5f52a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Shouldn't manage.py call python3 instead of python?

Collin Anderson-2
but python3 manage.py <command> doesn't work on windows, right?

On Tue, Apr 10, 2018 at 10:17 PM, Josh Smeaton <[hidden email]> wrote:
As a datapoint, I've seen roughly 1 person per week in #django IRC confused about specific startup exceptions due to them using python 2 rather than python 3 on Django >= 2.0. Unsure how many of these are due to the shebang. That said, it looks like there are no good solutions other than maybe ensuring our docs always show the form python3 manage.py <command> rather than ./manage.py <command>.

On Wednesday, 11 April 2018 12:02:31 UTC+10, Bobby Mozumder wrote:
In any case you’re going to see a lot of Django 2.0 developers on Mac OS hit this problem when they install to default Python or use standard Python install convention where Python 3.5 is installed as “python3".

-bobby

On Apr 10, 2018, at 3:46 PM, Aymeric Augustin <[hidden email]> wrote:

On 10 Apr 2018, at 17:43, Florian Apolloner <[hidden email]> wrote:

On Tuesday, April 10, 2018 at 1:28:33 PM UTC+2, Tim Allen wrote:
Since `django-admin startproject my_project` is created on the fly from templates, couldn't we dynamically create the `manage.py` executable based on some system introspection and an agreed upon priority

Wouldn't that result in something along the lines of "works on my system" and breaks elsewhere? after all manage.py is committed into git more often than not.

... which directs us to the correct solution: setting PYTHONPATH and DJANGO_SETTINGS_MODULE correctly and using django-admin instead of manage.py. 

pip / setuptools rewrites the shebang line appropriately when it installs the django-admin script. (I'm not sure how this happens exactly.)

My point is — there's no perfect solution. At best we can aim for a less imperfect solution than the status quo.

-- 
Aymeric.


--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/C36A8494-1094-4A03-A402-618BB999F927%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/33ec0ccb-a63b-4451-bfec-815b9e5f52a7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFO84S6xks7eiFGWYtvvWo0E8JXaiHWOPLvVbY_T_UQHy0YURw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: Shouldn't manage.py call python3 instead of python?

Matthew Pava

Right.  I just use python manage.py…

I just checked python3 manage.py and it doesn’t work.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Collin Anderson
Sent: Wednesday, April 11, 2018 7:46 AM
To: [hidden email]
Subject: Re: Shouldn't manage.py call python3 instead of python?

 

but python3 manage.py <command> doesn't work on windows, right?

 

On Tue, Apr 10, 2018 at 10:17 PM, Josh Smeaton <[hidden email]> wrote:

As a datapoint, I've seen roughly 1 person per week in #django IRC confused about specific startup exceptions due to them using python 2 rather than python 3 on Django >= 2.0. Unsure how many of these are due to the shebang. That said, it looks like there are no good solutions other than maybe ensuring our docs always show the form python3 manage.py <command> rather than ./manage.py <command>.

On Wednesday, 11 April 2018 12:02:31 UTC+10, Bobby Mozumder wrote:

In any case you’re going to see a lot of Django 2.0 developers on Mac OS hit this problem when they install to default Python or use standard Python install convention where Python 3.5 is installed as “python3".

 

-bobby

 

On Apr 10, 2018, at 3:46 PM, Aymeric Augustin <[hidden email]> wrote:

 

On 10 Apr 2018, at 17:43, Florian Apolloner <[hidden email]> wrote:


On Tuesday, April 10, 2018 at 1:28:33 PM UTC+2, Tim Allen wrote:

Since `django-admin startproject my_project` is created on the fly from templates, couldn't we dynamically create the `manage.py` executable based on some system introspection and an agreed upon priority


Wouldn't that result in something along the lines of "works on my system" and breaks elsewhere? after all manage.py is committed into git more often than not.

 

... which directs us to the correct solution: setting PYTHONPATH and DJANGO_SETTINGS_MODULE correctly and using django-admin instead of manage.py. 

 

pip / setuptools rewrites the shebang line appropriately when it installs the django-admin script. (I'm not sure how this happens exactly.)

 

My point is — there's no perfect solution. At best we can aim for a less imperfect solution than the status quo.

 

-- 

Aymeric.

 

 

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/C36A8494-1094-4A03-A402-618BB999F927%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.

 

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/33ec0ccb-a63b-4451-bfec-815b9e5f52a7%40googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

 

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFO84S6xks7eiFGWYtvvWo0E8JXaiHWOPLvVbY_T_UQHy0YURw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/d9652aa4943b4dae9f22bc236e9cc753%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.