Pydev 1.3.9 with Cherrypy3.0.x under Eclipse

128 views
Skip to first unread message

boost...@googlemail.com

unread,
Sep 27, 2007, 4:45:12 AM9/27/07
to cherrypy-users
Since I update pydev to the newest version 1.3.9, I have problem with
cherrypy 3.0.x if I use debugger under Eclipse!

According to the pydev New Release: 1.3.9 /Major highlights:
* psyco changed for Null object for debug (so, no changes are
required to the code if psyco is used while

If I use debugger with cherrypy, I have problem within the function
autoreload in the module _cpengine.py because there is k with the
value "psyco" in the list sys.modules.items(), but m is an instance
(Null object). So the following
code

for filename in sysfiles + self.reload_files:
if filename:
if type(filename) != str:

both of the conditions are true, so the code tries to get file
information, but is is not a file!!!

Any idea? who, cherrypy and pydev, has implemented wrongly and should
change?

Thanks in advance!

boost...@googlemail.com

unread,
Sep 28, 2007, 4:31:10 AM9/28/07
to cherrypy-users
Under the newest version of pydev (Eclipse Plugin for Python), there
is something wrong with cherrypy if one uses debug mode.

I found this is a general problem if we use sys.modules because pydev
introduce the Null object and therefore psyco will be forced as Null,
not as real module within sys.modules

My workaround as follows and work for me,
at the beginning of the function autoreload of _cpengine.py will be
added the second and the third lines direct within the for loop.
for k, m in sys.modules.items():
if type(m) == types.InstanceType:
continue

Is there a better alternative or?

thanks for any tips!

Reply all
Reply to author
Forward
0 new messages