ui-cs383 / Freedom-Galaxy

Primary repository for the FitG
1 stars 6 forks source link

Python 2 vs Python 3 #1

Closed hallister closed 11 years ago

hallister commented 11 years ago

So first things first, we need to have a discussion about which version of Python to use. This may be a bit dependent on which frameworks (if any) we decide to use. However, PyGame and PyGame Reloaded both support Python 3 for the most part.

So any arguments for/against Python versions?

cawaltrip commented 11 years ago

One thing that has been mentioned is that because this is a new project, if there are no dependency issues, we should use Python 3. The Python Software Foundation has a page dedicated to the discussion of this. They basically say the same thing: "If you can do exactly what you want with Python 3.x, great!"

I think this is something that can be ultimately decided once we decide what libraries that we want to leverage, but personally, I would prefer to use Python 3.

andyleejordan commented 11 years ago

Agreed with Chris. The Pythonic choice is if you're not already supported stagnated code, use Python 3. It also has much better class structures, and overall is a much improved language (there were very good reasons for diverging and not maintaining backwards compatibility, Python 2 is inconsistent and broken in many odd ways, believe me I know from experience).

andyleejordan commented 11 years ago

As of 9/12 5:07pm, the official choice is Python 3.2.

cawaltrip commented 11 years ago

According to the Python Software Foundation, the current production version of Python 3 is Python 3.3.2. Is this what we want to use instead of Python 3.2?

hallister commented 11 years ago

I'd say target 3.2 and test against 3.3.2. It should be a rare issue to run into big problems, and typically it's not a good idea to target the most recent version of scripting languages since distro repos rarely have the shiniest toys.

andyleejordan commented 11 years ago

@hall5714 Seconded for target and dev with 3.2, test against 3.3.2. But that might change depending on what *nix box we want to use for Vagrant. My Jenkins server is running Ubuntu 13.04, which for python3 is currently ad 3.3.1.

cawaltrip commented 11 years ago

I've been looking at the changelog between Python 3.2 and 3.3.2 and it doesn't look like there's a big difference - mainly bugfixes. The only big things I'm seeing are some NULL pointer dereferences and one change to the underlying C code, so I imagine that it will run just fine on both.

cawaltrip commented 11 years ago

Python 3.2 it still is!

hallister commented 11 years ago

I completely spaced this, but once this is distributed we will probably be using something like Freeze, py2exe/py2app anyway. So this was a bit moot lol.

rangera commented 11 years ago

I propose a reopening of this issue.

The argument that "we aren't supporting old code" is only somewhat good. The fact that we aren't full time programmers and don't want to build everything in this program from scratch, in some way, we do have a code base that we have to support. It just isn't our code. The fact of the matter is that 2.7.5 has a lot more development and support in auxiliary tools.

As I have mentioned to several people, the 3d graphics library that I have been using has the newest version only supported by 2.7.5. Tkinter, the ui library seems equally supported by both, and, above, Justin mentions py2exe, which does not work on 3+. It seems like Freeze works for 3+, as well as py2app. If the AI team wants to use any auxiliary modules as well, chances are that the newer/better version is on 2.7.5.

So, this isn't saying that we should go to 2.7.5, but it is pointing out that a good chunk of the above arguments aren't as solid as they are presented to be. 3.2 is still very doable, but maybe we should approach the decision with a little more knowledge and care, especially once everybody starts coding and looking into modules and finds that they either are or aren't supported in 3.+. For the most part, porting back and forth shouldn't be too hard, so I don't think it needs to be, nor should it be, decided right now.

cawaltrip commented 11 years ago

Agreed. I think the decision is Python 3, unless we can't. What we need to do is, like you said, decide on what tools that we are going to use to develop this and those tools will dictate which version we use. I'm going to go ahead and keep this closed for now mainly because our hand will be forced by which tools we utilize.