Code review request

9 views
Skip to first unread message

Michał Kwiatkowski

unread,
Jul 25, 2009, 4:18:02 PM7/25/09
to pytho...@googlegroups.com
Hi,

Recently I've been busy making Pythoscope compatible with older
versions of Python[1]. I was developing on Python 2.5 all this time
without really testing my code on 2.4 or 2.3. In the end, that meant
Pythoscope was broken for anything less than 2.5, go figure. ;) I want
to change that. From now on all changes will be tested against all
stable Python versions >= 2.3.

Making Pythoscope compatible with Python 2.4 and 2.3 was
straightforward most of the time, but there was one corner case that
needed special attention. I described the problem in detail in a post
to comp.lang.python[2]. In order to provide consistent behaviour
across all supported versions I had to write a C extension. If you
have time, please review this change on [3]. I don't have much
experience in writing C extensions, so really any suggestions are
welcome.

Another thing is a script for running full test suite under all
supported versions, both with and without the binary component. It
assumes you have all three versions of Python installed. It probably
only works under Linux now. It will surely need improvement, so I
would be glad to hear how you test your code under many different
environments. Please either discuss the script on [4] or post your
suggestions here.

That brings us to another new issue, which is building binary
distributions. Since now Pythoscope have a C extension, we can't get
away with only source releases anymore.

Currently all changes have been tested only on Linux, so if anyone has
a bit of time and access to Windows or MacOS machine with build
environment, please download support-python2.3 branch and try running
"python setup.py build". I uploaded a tarball for your convenience[5],
so just grab that.

In the long run, I believe Snakebite project[6] could help us here,
both for building and testing Pythoscope on multiple platforms. I
believe Titus could shed some light on this. :)

Cheers,
mk

[1] https://blueprints.launchpad.net/pythoscope/+spec/support-python2.3
[2] http://groups.google.com/group/comp.lang.python/browse_thread/thread/09ff179e8cb5e9bc
[3] http://pythoscope.appspot.com/2001/show
[4] http://pythoscope.appspot.com/2002/show
[5] http://groups.google.com/group/pythoscope/web/support-python2.3.tar.gz
[6] http://www.snakebite.org/

Paul Hildebrandt

unread,
Jul 25, 2009, 4:33:01 PM7/25/09
to pytho...@googlegroups.com
Really quick comments:
1. The goal of being Python 2.3 compatible is a good one.
2. When posting to newsgroups about the product, remember to include a link to pythoscope.org in the message or your signature. Sorry, that's just the marketing side of me coming out.
3. The C extension is really cool. Good job.
4. It would be even better if we didn't need it. I am sure you've thought about that. I just wanted to encourage you again that if there is anyway we stay pure python the project will be much more appealing to people.

Paul

Michał Kwiatkowski

unread,
Jul 25, 2009, 4:54:27 PM7/25/09
to pytho...@googlegroups.com
On Sat, Jul 25, 2009 at 10:33 PM, Paul
Hildebrandt<paul_hil...@yahoo.com> wrote:
> Really quick comments:
> 1. The goal of being Python 2.3 compatible is a good one.

Yep, and neglected for too long, I think.

> 2. When posting to newsgroups about the product,
> remember to include a link to pythoscope.org in the
> message or your signature.  Sorry, that's just the
> marketing side of me coming out.

You're right, I will remember the next time.

> 3. The C extension is really cool.  Good job.

Thanks!

> 4. It would be even better if we didn't need it.  I am sure
> you've thought about that.  I just wanted to encourage
> you again that if there is anyway we stay pure python
> the project will be much more appealing to people.

I agree. I added fallbacks to the Python code, so if the C extension
is not present it will still work, but sometimes unreliably (in which
case a warning is issued to the user). For me, the whole thing looks
like the omission in the CPython API for generators, and there's not
much I can do about it.

Cheers,
mk

Reply all
Reply to author
Forward
0 new messages