lp:~cjwatson/meliae/skip-dumping-large-longs

Created by Colin Watson and last modified
Get this branch:
bzr branch lp:~cjwatson/meliae/skip-dumping-large-longs
Only Colin Watson can upload to this branch. If you are Colin Watson please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Colin Watson
Project:
Meliae
Status:
Merged

Recent revisions

230. By Colin Watson

Skip dumping large longs that would require allocation.

Python long objects (spelled "int" at the Python level in Python 3) are
arbitrary-precision integers, so simply converting them to C longs using
PyLong_AsLong might overflow and raise OverflowError. (I ran into such a
case in the Launchpad test suite; I didn't track down exactly what it was,
but a Python long somewhere in memory that doesn't fit into a C long isn't
all that implausible.)

Converting to long long instead (supported as of Python 2.7) makes this
situation less likely, but it's still possible, and I don't know of a way to
accurately format an arbitrary-precision integer to decimal without
allocating memory, which we try to avoid in the inner parts of the scanner.
Therefore, if the conversion overflows, just omit the value from the dump.
This is presumably reasonably tolerable since longs weren't dumped at all
before meliae 0.5.

229. By John A Meinel

Rev to 0.5.1 to get setup.py correct.

228. By John A Meinel

Mark 0.5.0 as officially released.

227. By John A Meinel

Now that we pass the test suite, actually declare support for multiple Python 3 versions.

226. By John A Meinel

Handle str vs bytes appropriately on Python 3

Lots of great fixes from Colin to bring in str vs bytes for values and types.
intern() type strings, since they are repeated over and over for groups of the
same object.

225. By John A Meinel

Fix of TestGetRecursiveSive for python 3

Also fix TestDumpAllReferenced.

224. By John A Meinel

Handle file-like objects for loader.load.

223. By John A Meinel

Improve constant folding for Python >= 3.7

Python 3.7 is more aggressive about folding of constants, we want to still use
independent objects.

222. By John A Meinel

Port performance counters to Python 3

221. By John A Meinel

Avoid the overloaded problems with 'str', and use more PyBytes.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:meliae
This branch contains Public information 
Everyone can see this information.

Subscribers