CherryPy: 64-bit and Python 3.x support?

362 views
Skip to first unread message

Malcolm

unread,
Dec 29, 2009, 11:30:27 PM12/29/09
to cherrypy-users
I was recently asked about CherryPy's support for 64-bit and Python
3.x code.

My understanding is that:

1. CherryPy 3.2 supports 32-bit and 64-bit versions of Python 2.6 on
Windows, Linux, and Mac.

2. An upcoming release of CherryPy (already under version control)
will support some version of Python 3 (3.0 or 3.1?) in both 32-bit and
64-bit flavors. This version will continue to be cross platform
compatible across Windows, Linux, and Mac.

Can someone confirm or correct the above statements?

Thank you,
Malcolm

Robert Brewer

unread,
Dec 30, 2009, 11:53:11 AM12/30/09
to cherryp...@googlegroups.com

CherryPy 3.2 is ready for final release (just need a free moment) and
will have separate distributions for Python 2.x and 3.x. We are
targeting Python 3.1 but I believe we are also compatible with Python
3.0 (anywhere we aren't should be considered a bug).

We should work for both 32 and 64-bit, but I don't personally have a
64-bit machine. Someone needs to run the test suite on 64-bit before we
release CP 3.2 final. Volunteers?


Robert Brewer
fuma...@aminus.org

Pete H

unread,
Dec 31, 2009, 9:52:45 AM12/31/09
to cherrypy-users

> fuman...@aminus.org

I've just tried to run the test suite on Ubuntu 8.04.3 adm64 with
Python 3.0 and 3.1 against CP 3.2.0rc1, but I'm getting so many errors
there must be something wrong with my setup.

Is it still possible to run CherryPy 3.2 without having to formally
install it?
I've just unpacked the tar.gz, cd'd to the test directory in the
CherryPy-3.2.0rc1, set PYTHONPATH to the CP 3.2 directory and run
python3.0 test.py and python3.1 test.py.

Using python3.0 I get:

testExpiresTool (test_caching.CacheTest) ...
ERROR: Status ('404 Not Found') != '200 OK'
And a slew of other similar errors

Using python3.1 I get:

testBasic (test_auth_basic.BasicAuthTest) ... Exception in thread
HTTPServer Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.1/threading.py", line 509, in
_bootstrap_inner
self.run()
File "/usr/lib/python3.1/threading.py", line 462, in run
self._target(*self._args, **self._kwargs)
File "/home/home/downloads/CherryPy-3.2.0rc1-py3/cherrypy/process/
servers.py", line 75, in _start_http_thread
self.httpserver.start()
File "/home/home/downloads/CherryPy-3.2.0rc1-py3/cherrypy/wsgiserver/
__init__.py", line 1343, in start
self.tick()
File "/home/home/downloads/CherryPy-3.2.0rc1-py3/cherrypy/wsgiserver/
__init__.py", line 1417, in tick
conn = self.ConnectionClass(self, s, makefile)
File "/home/home/downloads/CherryPy-3.2.0rc1-py3/cherrypy/wsgiserver/
__init__.py", line 911, in __init__
self.rfile = makefile(sock, "rb", self.rbufsize)
File "/home/home/downloads/CherryPy-3.2.0rc1-py3/cherrypy/wsgiserver/
__init__.py", line 890, in CP_makefile
return io.BufferedReader(socket.SocketIO(sock, mode), bufsize)
File "/usr/lib/python3.1/_pyio.py", line 875, in __init__
raise ValueError("invalid buffer size")
ValueError: invalid buffer size

Plus many others


The tests using CP 3.2.0rc1 and python2.5 with the same setup run
fine.

PeteH

Aric Coady

unread,
Jan 1, 2010, 3:07:24 PM1/1/10
to cherrypy-users
On Dec 30 2009, 8:53 am, "Robert Brewer" <fuman...@aminus.org> wrote:
> We should work for both 32 and 64-bit, but I don't personally have a
> 64-bit machine. Someone needs to run the test suite on 64-bit before we
> release CP 3.2 final. Volunteers?

Tested the system python 2.6 on osx 10.6 and ubuntu 9.10 amd64. On
osx all tests passed. On ubuntu there was 1 failure:

======================================================================
FAIL: test_file_stream (test_static.StaticTest)
----------------------------------------------------------------------


Traceback (most recent call last):

File "CherryPy-3.2.0rc1/cherrypy/test/webtest.py", line 308, in
__call__
testMethod()
File "CherryPy-3.2.0rc1/cherrypy/test/test_static.py", line 265, in
test_file_stream
expected)
AssertionError: The file should have advanced to position 458752, but
has already advanced to the end of the file. It may not be streamed as
intended, or at the wrong chunk size (64k)

FAILED (failures=1)

I looked at it briefly, and tweaking the fudge factor referenced in
the comments fixed the test.

Malcolm

unread,
Jan 4, 2010, 6:59:35 PM1/4/10
to cherrypy-users
Thank you Robert.

Regards,
Malcolm

Reply all
Reply to author
Forward
0 new messages