Some interrogations concerning Web2py compatibilities

20 views
Skip to first unread message

Magnitus

unread,
Feb 24, 2010, 4:23:31 AM2/24/10
to web2py-users
Hi, I'm a beginner in python and a complete neophyte in python web
frameworks so don't bash my head in if the questions are stupid...

I'm developing an application in C++ for windows x64 and I am now
looking for a way to make it a web app.

I'm looking for compatibility with python 2.6 (already started the
process of gluing my code with the C API) and eventually python 3.1 in
case they stop supporting prior versions. I'm also looking for
compatibility with the 64 bits address format.

Now, I see that web2py is available with a pre-compiled binary for
windows. Is it a win32 binary? If so, can I build a win64 binary from
the source code with python 2.6?

Also, looking at the current compatibilities (2.4/2.5/2.6) and the
claim that backward compatibility of the framework will not be broken,
I'm wondering if there any future plans for web2py to be eventually
compatible with python 3.1 (given that python 3.1 is not backward
compatible with code written for previous versions of python or so I
heard).

Tiago Almeida

unread,
Feb 24, 2010, 9:48:02 AM2/24/10
to web...@googlegroups.com
No questions are stupid.
I'm no expert but I'll coment on what I know.

Web2py runs officially in python 2.5. Don't know how hard it would be to put web2py running on 2.6.

You don't need the binary package to run web2py, you can run it directly from python (execute file web2py.py)
>>python web2py.py
Because you can do so, I believe you can package it in a binary form using tools like py2exe.

Backward compatibility claim is just related to the fact that code changes to web2py don't break webapplications written for web2py.

I believe web2py will have to support python2.6 eventually but don't know when.
Python 3.x support is even farther away. Py3k is a different language, it has some details that break existing code base and, as such, all the code has to be ported. It won't happen overnight.

Doesn't the code you wrote for python 2.6 run in 2.5? Maybe it does and you can integrate it easily with web2py (instead of integrating web2py with what you have).

Regards,
Tiago

-------------------



--
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to web2py+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/web2py?hl=en.


Magnitus

unread,
Feb 24, 2010, 7:10:29 AM2/24/10
to web2py-users
Ah, I'm browsing through the web manual and found this statement which
left me with more questions:

"web2py runs with CPython (the C implementation) and/or Jython (the
Java implementation), versions 2.4, 2.5 and 2.6 although "officially"
only support 2.5 else we cannot guarantee backward compatibility for
applications. "

So then python 2.6 is supported "unofficially"?

Would it imply that some of the features from 2.6 are not supported or
that the framework has not been tested as thoroughly on 2.6?

Timothy Farrell

unread,
Feb 24, 2010, 10:07:10 AM2/24/10
to web...@googlegroups.com
web2py runs flawlessly in Python 2.6. I've been running it for several
months. All python code (web2py included) that runs on 2.5 runs on 2.6
as well. The inverse is not true however. The main purpose of Python
2.6 (and the upcoming 2.7) is to facilitate code migration to Python
3.x. It serves as a bridge being as close to compatible with Python 3.x
without breaking 2.5 apps.

If you run Python 2.6 some standard library modules might issue a
warning about using deprecated features (cgitb comes to mind) but that
is about the only difference you'll see.

web2py currently has no plans to support 3.x due to its backward
compatible nature. Something will eventually come along but certain
standard libraries are badly broken in 3.x that need fixing before
porting a web framework is really plausible. These items needing fixing
are the cgi module and the email module it depends on. Work is
currently underway to fix the email module. Once that is done, I plan
on submitting a patch for the cgi module. Once these issues are
addressed, I predict that Python 3 will become the web-language of
choice due to the possibility of unladen-swallow being merged in.

I write my web2py apps in Python 2.6.

-tim

Thadeus Burgess

unread,
Feb 24, 2010, 1:17:28 PM2/24/10
to web...@googlegroups.com
I run all of my web2py apps on 2.6 and have never had any problems.

web2py will never support python 3.x. For this there will be a fork of
web2py created named web3py which will support the python 3.x branch.

Python 3.x goes against everything that web2py stands for (backwards
compatibility).

However for web3py to even be started other important projects will
need to be ported over, important modules such as database drivers
come to mind.

-Thadeus

Magnitus

unread,
Feb 25, 2010, 5:02:16 AM2/25/10
to web2py-users
Thanks for the heads up.

I did run web2py.py directly and while it works, I got the following
warning:

WARNING:root:no file locking

It seems to work otherwise, but I'd still like some clarification on
the warning if anybody knows.

Parallel to this, I found a py2exe to make a 64 bit binary at
(downloaded the one for python 2.6 as its the version of python that I
use): http://sourceforge.net/projects/py2exe/files/

When I tried running "python setup_exe.py py2exe", I got the following
error during installation:

*** copy data files ***
warning: install_data: setup script did not provide a directory for
'admin.w2p'
-- installing right in 'D:\web2py\dist'
error: can't copy 'admin.w2p': doesn't exist or not a regular file

>>python web2py.py


Because you can do so, I believe you can package it in a binary form
using
tools like py2exe.

> > web2py+un...@googlegroups.com<web2py%2Bunsu...@googlegroups.com>


> > .
> > For more options, visit this group at

> >http://groups.google.com/group/web2py?hl=en.- Hide quoted text -
>
> - Show quoted text -

mdipierro

unread,
Feb 25, 2010, 6:22:44 AM2/25/10
to web2py-users
On Feb 25, 4:02 am, Magnitus <eric_vallee2...@yahoo.ca> wrote:
> Thanks for the heads up.
>
> I did run web2py.py directly and while it works, I got the following
> warning:
>
> WARNING:root:no file locking

what os are you using. This should work o Posix and win32.

About your other issue.

py2exe and py2app have a bug and I am about to rewrite them. Will do
it soon.

> > >http://groups.google.com/group/web2py?hl=en.-Hide quoted text -

Tiago Almeida

unread,
Feb 25, 2010, 6:32:19 AM2/25/10
to web...@googlegroups.com
For the root no file locking, try:

Install "Python for windows
extensions<http://sourceforge.net/projects/pywin32/>"  (If you're using windows)

I had a similar issue and documented here in the past and it solved my problem. Don't know why though.

Regards,
Tiago
---

To unsubscribe from this group, send email to web2py+un...@googlegroups.com.

Magnitus

unread,
Feb 25, 2010, 7:13:07 AM2/25/10
to web2py-users
>what os are you using. This should work o Posix and win32.

Windows Vista, 64-bit.

I got the 64-bit download for the windows extension at the link that
Tiago mentioned and it 'fixed' the warning message (though I'm still
puzzled at why a special windows extension was needed on top of the
release to 'fix' python, perhaps they should include it the release...
some doc came with the open source version, guess I'll have to read it
and find out what the add-on fixes).

Thanks for all the help :).

On Feb 25, 6:32 am, Tiago Almeida <tiago.b.alme...@gmail.com> wrote:
> For the root no file locking, try:
>
> Install "Python for windows

> extensions<http://sourceforge.net/projects/pywin32/<http://www.google.com/url?sa=D&q=http://sourceforge.net/projects/pywi...>>"


> (If you're using windows)
>
> I had a similar issue and documented here

> <http://groups.google.co.uk/group/web2py/browse_thread/thread/ddc56534...[Troubleshooting]+Running+from+source+on+windows+[WARNING%3Aroot%3Aunable+t­o+import+wsgiserver]+[WARNING%3Aroot%3Ano+file+locking]#f61c0827103abcd7>in

> > <web2py%2Bunsu...@googlegroups.com<web2py%252Bunsubscribe@googlegroups.­com>


>
> > > > .
> > > > For more options, visit this group at

> > > >http://groups.google.com/group/web2py?hl=en.-Hide quoted text -

mdipierro

unread,
Feb 25, 2010, 9:12:54 PM2/25/10
to web2py-users
Tiago was right. You need the windows extension to have file locking
in windows. I do not know why they did not include that as standard in
Python. I agree with you it should be critical.

> > > > >http://groups.google.com/group/web2py?hl=en.-Hidequoted text -

mr.freeze

unread,
Feb 25, 2010, 9:19:24 PM2/25/10
to web2py-users
I started using ActivePython instead of the stock releases of python.
They have win32 extensions built in and a few other helpful things.
http://www.activestate.com/activepython/features/

> > > > > >http://groups.google.com/group/web2py?hl=en.-Hidequotedtext -

Tiago Almeida

unread,
Feb 26, 2010, 7:17:50 AM2/26/10
to web...@googlegroups.com
Thanks. Didn't know about it :)


To unsubscribe from this group, send email to web2py+un...@googlegroups.com.

mdipierro

unread,
Feb 26, 2010, 7:47:48 AM2/26/10
to web2py-users
If you get the web2py binary it also includes win32 extension.
ActiveState does not solve the problem that the Python standard
distribution for windows does not include it.

On Feb 25, 8:19 pm, "mr.freeze" <nat...@freezable.com> wrote:
> I started using ActivePython instead of the stock releases of python.

> They have win32 extensions built in and a few other helpful things.http://www.activestate.com/activepython/features/

Reply all
Reply to author
Forward
0 new messages