[Python-Dev] very long python files

Thomas Wouters thomas@xs4all.net
Thu, 6 Sep 2001 22:02:01 +0200


On Thu, Sep 06, 2001 at 12:28:14PM -0700, The Intermission Elf wrote:

> I just got this message from a developer inside of ILM today.  Before
> I start digging, can anyone tell me if this has been dealt with in any 
> version of python more recent than 1.5.2?  (and where I might look for 
> this info myself- I'm very unfamiliar with sourceforge and its bug
> tracker)...

Yes, it's fixed. As for how to find it, well, that can prove a bit
challenging, as there are already hundreds of closed bugreports, and only a
few of them deal with this ;P The easiest way is to use CVS. You know the
code is in compile.c, so a quick browse of the CVS log might show it:

----------------------------
revision 2.133
date: 2000/08/24 00:32:09;  author: fdrake;  state: Exp;  lines: +32 -2
 
Charles G. Waldman <cgw@fnal.gov>:
Add the EXTENDED_ARG opcode to the virtual machine, allowing 32-bit
arguments to opcodes instead of being forced to stick to the 16-bit
limit.  This is especially useful for machine-generated code, which
can be too long for the SET_LINENO parameter to fit into 16 bits.
 
This closes the implementation portion of SourceForge patch #100893.
----------------------------

(Checking the version numbers you'll see that it was fixed between Python
1.6-final and Python 2.0b1. The fix should be pretty backportable, if you
want to insert it into 1.5.2 or older.... but that would kind of defeat the
point of releases.)

Or you can browse the bug or patch database online, first the open
bugs/patches, and then the closed bugs/patches... but though in this case
there's an entry in both the (closed) lists, it isn't true for all bugs, so
checking the CVS logs is more fool-proof. Frankly, asking someone here might
be the easiest solution :-)

Of course, the best test is to copy one of those large files over to a
machine with a recent Python, and checking to see if it works. Maybe
******** generates files so big, or big in a different way, that it still
doesn't work.

> Garrick Meeker writes:
> | ******** is starting to produce very long project files (over 32K lines)
> | which it currently can't read.  (Because curves are imbedded in the
> | files, it's not difficult to hit that limit.)

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!