convert python 3 to python2

40 views
Skip to first unread message

Ankita Gupta

unread,
Sep 21, 2019, 1:32:56 PM9/21/19
to Django users
Not related to Django, I have a project made in python3 but due to some package installation, i need to convert my project to python2. Is there any method or package to solve this?

Sipum

unread,
Sep 21, 2019, 1:37:21 PM9/21/19
to django...@googlegroups.com
Hi Ankita,

In coming January, python 2 is going to retire. So better to use python 3.

Thanks

On Sat, 21 Sep, 2019, 11:02 PM Ankita Gupta, <ankita.g...@gmail.com> wrote:
Not related to Django, I have a project made in python3 but due to some package installation, i need to convert my project to python2. Is there any method or package to solve this?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/875549f9-5bca-4280-88fd-db197ca577dc%40googlegroups.com.

utkarsh Raj

unread,
Sep 21, 2019, 1:51:08 PM9/21/19
to django...@googlegroups.com
okay will get back to you after looking into it

On Sat, Sep 21, 2019 at 11:02 PM Ankita Gupta <ankita.g...@gmail.com> wrote:
Not related to Django, I have a project made in python3 but due to some package installation, i need to convert my project to python2. Is there any method or package to solve this?

--

Ankita Gupta

unread,
Sep 22, 2019, 6:14:00 AM9/22/19
to Django users


On Saturday, September 21, 2019 at 11:07:21 PM UTC+5:30, Sipum wrote:
Hi Ankita,

In coming January, python 2 is going to retire. So better to use python 3.
Only official access is denied, we can still work in python2. Anyway thanks.
 

Thanks

On Sat, 21 Sep, 2019, 11:02 PM Ankita Gupta, <ankita....@gmail.com> wrote:
Not related to Django, I have a project made in python3 but due to some package installation, i need to convert my project to python2. Is there any method or package to solve this?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.

Shakil Ahmmed

unread,
Sep 23, 2019, 2:10:55 AM9/23/19
to django...@googlegroups.com
How Can I Use ['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace'] in One Class 

To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/408bd2a0-add7-450d-a004-d5fc22bc4b45%40googlegroups.com.


--

Andréas Kühne

unread,
Sep 24, 2019, 4:16:05 AM9/24/19
to django...@googlegroups.com
Official access isn't denied - and python 2 will probably be available. The problem is that you don't get any security fixes or any updates at all. That in itself is a major problem. If someone is saying that you need to use python 2, I would strongly recommend them to not even think about it. All code that is written will be useless in a couple of years time, and need to be updated or even worse thrown away.

Regards,

Andréas


To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/408bd2a0-add7-450d-a004-d5fc22bc4b45%40googlegroups.com.

Larry Martell

unread,
Sep 24, 2019, 8:02:48 AM9/24/19
to django...@googlegroups.com
On Tue, Sep 24, 2019 at 4:15 AM Andréas Kühne
<andrea...@hypercode.se> wrote:
>
> Official access isn't denied - and python 2 will probably be available. The problem is that you don't get any security fixes or any updates at all. That in itself is a major problem. If someone is saying that you need to use python 2, I would strongly recommend them to not even think about it. All code that is written will be useless in a couple of years time, and need to be updated or even worse thrown away.

This is totally untrue. Yes, all code should be converted to py3, but
that is simply not happing at many companies. They will continue to
use their py2 apps, and either support them internally or purchase py2
support from one of the many companies offering it. Is that a good
idea? No, but it's a reality.

Deep Sukhwani

unread,
Sep 24, 2019, 8:12:46 AM9/24/19
to django...@googlegroups.com
Wow, TIL there are companies selling support for Python 2? Never heard of it. So basically we are saying these companies will maintain there own version of Python programming language which will continue to be maintained as long as they have paid users for Python 2? I seriously doubt that. Or may be I am understanding it all wrong.


--
Regards
Deep L Sukhwani


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

Larry Martell

unread,
Sep 24, 2019, 8:23:48 AM9/24/19
to django...@googlegroups.com
Anaconda, Enthought, ActiveState, Red Hat and maybe others as well.
Also large companies can do their own support.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEMqiPeL8KMsq9d7FhZGh%2B73dY7i3rhA7kxHKjpWnMA3K83S-w%40mail.gmail.com.

Deep Sukhwani

unread,
Sep 24, 2019, 8:31:34 AM9/24/19
to django...@googlegroups.com
Thanks for the prompt reply. Did a quick cursory check with Anaconda, I don't think Anaconda does it. In fact Anaconda has posted a few months ago about Python 2's EOL (End of Life) - https://www.anaconda.com/end-of-life-eol-for-python-2-7-is-coming-are-you-ready/

Also, just did a quick look at their professional services, couldn't see anything suggesting they will offer python 2 support beyond the python 2's community itself.

--
Regards
Deep L Sukhwani

Larry Martell

unread,
Sep 24, 2019, 8:32:20 AM9/24/19
to django...@googlegroups.com
You can get anyone to do anything for enough money.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEMqiPe-ZOJLbiXn2Qesk-dSC%2Bw8JYcAii81ecsL%2BpV%2B_7AFfA%40mail.gmail.com.

Nick Sarbicki

unread,
Sep 24, 2019, 8:33:45 AM9/24/19
to Django users
I'm not convinced anyone could pay me enough to go back to Python 1...


Larry Martell

unread,
Sep 24, 2019, 8:42:24 AM9/24/19
to django...@googlegroups.com
Ha! How about perl? ;-)

Andréas Kühne

unread,
Sep 24, 2019, 9:24:09 AM9/24/19
to django...@googlegroups.com
Yes of course - I think RedHat will be continuing to support a python 2 environment because they haven't updated their own internal infrastructure and also their distributions to python 3.

However - using one of those is still not very smart. The problem is that all plugins have moved on. So Django, Flask, Numpy, Scipy, Mypy, Pypy and so on are ported to python 3. The main argument still stands - why invest money today into a language that is obsolete - and that you have had several years notice to stop using? Porting to python 3 isn't that hard either - there are a lot of tools to help you do that. I myself have ported a website from python 2 to python 3, with tens of thousands rows of code. 

So all you need to do is to set aside time to port the applications - and if you don't do it now, you WILL need to do it later - that's a simple fact. And then the code will be in the best case scenario obsolete, worst case useless. I can't see one reason to invest a cent into writing python 2 code. I know that I am lucky to be able to define what I want to work with and to set requirements and also have no legacy code. But even having legacy code, it's just a matter of investing into your own application. 

To say that it can't be done - look at Instagram - they did it with their codebase, and I don't think that many of us are working on that size of codebase.....

Regards,

Andréas


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

אורי

unread,
Sep 24, 2019, 9:47:21 AM9/24/19
to django...@googlegroups.com
On Sat, Sep 21, 2019 at 8:32 PM Ankita Gupta <ankita.g...@gmail.com> wrote:
Not related to Django...

Then write to pytho...@python.org

Mike Dewhirst

unread,
Sep 24, 2019, 7:00:44 PM9/24/19
to django...@googlegroups.com
I think the original question was around backwards conversion of 3.x
code to 2.7.

I don't know of course because all my efforts have been forwards but I
believe the six module would be the easiest way backwards.

And I imagine you would simply run your unit tests in 2.7 and use the
six utilities to correct errors. With a little luck that would
simultaneously keep the codebase compatible with 3.x for the inevitable
forward upgrade.

Just a thought

Mike

Derek

unread,
Sep 25, 2019, 3:20:16 AM9/25/19
to Django users
Agreed - Mike's suggestion is a very sensible one.  In the short term, supporting 2 and 3 could be very useful, until you have the option to drop support for 2.

Aldian Fazrihady

unread,
Sep 25, 2019, 5:53:24 AM9/25/19
to django...@googlegroups.com
Ankita, why would a new project be forced to use Python 2 by a (probably old)  package? A well-maintained package must already have its Python 3 version.
Why can't we find an alternative package that uses Python 3? I am curious about what package that is.

On Sun, Sep 22, 2019 at 12:32 AM Ankita Gupta <ankita.g...@gmail.com> wrote:
Not related to Django, I have a project made in python3 but due to some package installation, i need to convert my project to python2. Is there any method or package to solve this?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.


--
Regards,

Reply all
Reply to author
Forward
0 new messages