maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Newer python versions (https://talk.maemo.org/showthread.php?t=72378)

Gamgigo 2011-04-20 21:19

Newer python versions
 
Is there any way to run a newer version of python than 2.5.4 (preferable 2.7.x) without easy debian? I need some features that are new in python 2.6. I have tried downloading and compiling python 2.7.1 for Linux, although cannot run ./configure.

Gamgigo 2011-04-21 08:33

Re: Newer python versions
 
I have now managed to run ./configure (with python 2.7) after getting numerous patches from http://cgit.openembedded.org/cgit.cg...recipes/python. Although I cannot run make:
~/MyDocs/.documents/Python-2.7.1 $ make
gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c
In file included from Include/Python.h:58,
from ./Modules/python.c:3:
Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"
make: *** [Modules/python.o] Error 1
~/MyDocs/.documents/Python-2.7.1 $

tetris11_ 2011-06-08 14:12

Re: Newer python versions
 
Someone needs to really get 2.7 on the repos.
2.5.4 has NUMEROUS bugs, all of which were (mostly) fixed in 2.5.6 (which we still dont have).

It's just tedious. Im currently using Fedora15 with 2.7, so downgrading Python to 2.5.4 will break the sytem (probably). I've tried compiling 2.5.4 on F15 as a local install, but the IDE has problems with the interpreter and...GAAAH!

So now we have to work in 2.7, and check that every ****ing function or method we use is backwards - ****ing - compatible.
THEY'RE KILLING US!

thp 2011-06-08 14:27

Re: Newer python versions
 
Quote:

Originally Posted by Gamgigo (Post 992830)
I need some features that are new in python 2.6.

Which functions that are in Python 2.6 do you need? Maybe they are available as a drop-in module for 2.5 or available via a __future__ import in 2.5 already? There's no feature in 2.6 that can't be implemented in 2.5 with a bit effort. If you want 2.6, go N900 MeeGo DE, as you are definitely a hardcore developer.

Quote:

Originally Posted by tetris11_ (Post 1025064)
2.5.4 has NUMEROUS bugs, all of which were (mostly) fixed in 2.5.6 (which we still dont have).

Any bugs that affect you directly? Python 2.5.6 has only been released two weeks ago, so calm down. What has really changed since 2.5.4 are exactly 9 issues, three of which are unlikely to affect your Maemo apps (audioop module and SimpleHTTPServer), one of which is a bug in urllib/urllib2, but *only* affects you when you are using a protocol other than HTTP, HTTPS or FTP (you are unlikely to use anything else?), two are security bugs with expat (if you use that instead of some of the other XML library), another one which only affects you when you subclass threading.local. The remaining two issues that have been fixed is a "possible race condition" in the logging module and a bug in the bzip2 uncompression.

Quote:

Originally Posted by tetris11_ (Post 1025064)
It's just tedious. Im currently using Fedora15 with 2.7, so downgrading Python to 2.5.4 will break the sytem (probably). I've tried compiling 2.5.4 on F15 as a local install, but the IDE has problems with the interpreter and...GAAAH!

There's no need to downgrade Python on your development machine. Python 2.7 will happily run Python code written for 2.5. In fact, I do most development on my laptop on 2.6 and then deploy it to both 2.5 (on Maemo 5) and 2.6 (on MeeGo N900 DE) without problems.

thp 2011-06-08 14:35

Re: Newer python versions
 
Quote:

Originally Posted by tetris11_ (Post 1025064)
So now we have to work in 2.7, and check that every ****ing function or method we use is backwards - ****ing - compatible.

I'm not sure if you are just trolling, but anyway..

Use What’s New in Python as handy guide for this.

Plus, the docs always say New in version X.Y for relevant functions. Use Google:

site:docs.python.org ("New in version 2.6" OR "New in version 2.7")

tetris11_ 2011-06-09 10:27

Re: Newer python versions
 
Honestly, I was just having a shitty day and felt like ranting. I'm sorry.
I've only just switched over to python from c++(qtsdk) and I kept getting stuck on a stupid tuple error that never appeared when I ran it on the desktop.

Naturally I blamed the difference in versions as the reason, and not my infant coding. As a plus, I'd changed distros the day before (from ubuntu fedora because I prefered gnome3 over unity), and had now possibly broken my machine when I forced a downgrade...

But I solved the python problem yesterday, and it was my clearly my own stupid fault. Honestly again, I had no idea what 'fixes' I was referring to, it was just something I read on the net looking for a quick solution.

Sorry...


All times are GMT. The time now is 03:30.

vBulletin® Version 3.8.8