Announcement

Collapse
No announcement yet.

Python 3 Is Close To Becoming The Default In Fedora 22

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • FLHerne
    replied
    Originally posted by cocklover View Post
    Well, In the past I have managed to write two pyqt minor programs on Arch Linux , then I tried to run on Ubuntu but It won't work. I believe was some internal python oop changes, and sure, was easy to make it work changing some lines but it was a little program and was very annoying have to make the changes, where are talking about minor version changes of python numeration. I'm not sure if I was using python 3.3 on arch linux and python 3.2 on Ubuntu or vice versa. But are you telling that we need to develop for python 3 cause python new versions are fully backward compatible with him? or are every version fully backward campatible e.g 3.3 with 3.2? cause It doesn't look like that in my experience.
    Within a major version (2 or 3), all spec revisions are backward-compatible with existing versions.
    All code written to run on 3.1 will run perfectly on 3.4 or any future 3.x version.

    Code that uses features introduced in a particular version won't run on an interpreter that only supports an older version. Code written using 3.3 features will run perfectly on 3.4, but will fail on 3.1 or 3.2.
    Since the whole point of language changes is to add new things that weren't available in prior versions, that applies to every other language too (C++11 code won't compile on old compilers, Java 8 code won't run on v7 JREs).

    Leave a comment:


  • DanL
    replied
    Originally posted by cocklover View Post
    Why? Python 2.7 is still very widely used and supported.
    Why? Because 3 > 2 and new versions are automatically better**. Some people will tell you that every chance they get, even if they never wrote a Python program or know anything about your usage scenario...
    Seriously, the article was about removing python2 from Fedora install media because there's not much that depends on it and it's taking up space. The article was NOT about killing/obsoleting Python 2 entirely.


    **Note: This is true until you get to version 9, and then 7 will eat 9, as is my understanding. I guess that's why MS skipped Windows 9.

    Leave a comment:


  • cocklover
    replied
    Originally posted by rastersoft View Post
    Saying that means that you didn't understood the problem: Python 3 breaks backwards compatibility with Python 2. The reason is that a lot of things in the language got crufty, so the team decided to clean it up. Python 3.2, 3.3, and so on are fully backwards compatible with Python 3. Python 2.7 will keep security updates for several years, but won't have new features.
    Well, In the past I have managed to write two pyqt minor programs on Arch Linux , then I tried to run on Ubuntu but It won't work. I believe was some internal python oop changes, and sure, was easy to make it work changing some lines but it was a little program and was very annoying have to make the changes, where are talking about minor version changes of python numeration. I'm not sure if I was using python 3.3 on arch linux and python 3.2 on Ubuntu or vice versa. But are you telling that we need to develop for python 3 cause python new versions are fully backward compatible with him? or are every version fully backward campatible e.g 3.3 with 3.2? cause It doesn't look like that in my experience.

    Leave a comment:


  • chithanh
    replied
    Originally posted by cocklover View Post
    And we lacked of mysql connector for windows for a very long time... so not thanks...
    Python 2 (many people refuse to use newer Python versions) is security supported until 2020.
    Windows 7 (many people refuse to use newer Windows versions) is security supported until 2020.
    Python 2 is apparently the only version which has certain important things working on Windows.

    Coincidence? I think not.

    Leave a comment:


  • diegoherranz
    replied
    I'll be worth it

    Switching to python 3 is taking much longer than expected but I think in the long term the clean-up in the 2.x -> 3.x transition will be worth it.

    I specially like:
    - unicode strings
    - strings vs data separation
    - new division behaviour

    Leave a comment:


  • nanonyme
    replied
    Originally posted by pininety View Post
    ,

    The jump from python2 to python3 is in my eyes a bit more problematic then the jump from 3.3 to 3.4.
    A lot was changed between 2 and 3 (hence the new major number) especially in reagards to how strings are handled.

    While porting my code to python3 I found so many possible bugs in my python2 code due to improper encoding handling which I just had not seen before.
    SInce then I always try to write my code in python 3 first and then port it to python 2 if needed. Makes things a lot easier from my point of view.
    Linters may also make life easier

    Leave a comment:


  • schmidtbag
    replied
    Originally posted by cocklover View Post
    Why? Python 2.7 is still very widely uselly and supported. Most of professional development are in Python 2.7. e.g OpenStack. Google App engine only support python 2.7. Django start to support to python 3 in 2013... And if you start to develop on python 3 you have distros with python 3.2, 3.3, 3.4 and when the update come you have to move again you old code to the new version... so not really interested right now on python 3.x. And we lacked of mysql connector for windows for a very long time... so not thanks...
    Based on my experience, most libraries have moved on and are now properly compatible with python 3. Anything that isn't compatible is some sort of niche that is too complicated to port over. However, I have written a roughly 3000 line program in python 2 and managed to convert it into python 3 while only changing a total of maybe 30 lines of code.

    Also, there are several MySQL libraries for python 3.x. I would be surprised if any were explicitly incompatible with Windows.

    As others have said, python 3.x is pretty much backward compatible with all of python 3. The way I see it, if you CAN upgrade, do it. Python 3 is taking so long to be adopted because people don't want to spend a few hours just making small tweaks in their code.

    Leave a comment:


  • rastersoft
    replied
    Originally posted by cocklover View Post
    And if you start to develop on python 3 you have distros with python 3.2, 3.3, 3.4 and when the update come you have to move again you old code to the new version...
    Saying that means that you didn't understood the problem: Python 3 breaks backwards compatibility with Python 2. The reason is that a lot of things in the language got crufty, so the team decided to clean it up. Python 3.2, 3.3, and so on are fully backwards compatible with Python 3. Python 2.7 will keep security updates for several years, but won't have new features.

    Leave a comment:


  • pininety
    replied
    Originally posted by cocklover View Post
    Why? Python 2.7 is still very widely uselly and supported. Most of professional development are in Python 2.7. e.g OpenStack. Google App engine only support python 2.7. Django start to support to python 3 in 2013... And if you start to develop on python 3 you have distros with python 3.2, 3.3, 3.4 and when the update come you have to move again you old code to the new version... so not really interested right now on python 3.x. And we lacked of mysql connector for windows for a very long time... so not thanks...
    ,

    The jump from python2 to python3 is in my eyes a bit more problematic then the jump from 3.3 to 3.4.
    A lot was changed between 2 and 3 (hence the new major number) especially in reagards to how strings are handled.

    While porting my code to python3 I found so many possible bugs in my python2 code due to improper encoding handling which I just had not seen before.
    SInce then I always try to write my code in python 3 first and then port it to python 2 if needed. Makes things a lot easier from my point of view.

    Leave a comment:


  • cocklover
    replied
    Originally posted by uid313 View Post
    Sweet, hope Debian and Ubuntu follows suit.

    If you have old Python 2 code, port it to Python 3 with 2to3.

    Why? Python 2.7 is still very widely uselly and supported. Most of professional development are in Python 2.7. e.g OpenStack. Google App engine only support python 2.7. Django start to support to python 3 in 2013... And if you start to develop on python 3 you have distros with python 3.2, 3.3, 3.4 and when the update come you have to move again you old code to the new version... so not really interested right now on python 3.x. And we lacked of mysql connector for windows for a very long time... so not thanks...

    Leave a comment:

Working...
X