lp:~cjwatson/meliae/py3-fix-scanner-tests

Created by Colin Watson and last modified
Get this branch:
bzr branch lp:~cjwatson/meliae/py3-fix-scanner-tests
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

224. By Colin Watson

Fix TestGetRecursiveSize.test_referenced for Python 3.

Python >= 3.3 uses a more compact representation of dicts whose keys are
Unicode strings; this tripped up this test. Also, Python >= 3.7 does more
aggressive constant folding, defeating the attempt in this test to produce
two equal but non-object-identical strings.

Using unique objects as dict keys is sufficient for the purposes of this
test, and avoids both problems.

223. By Colin Watson

Fix TestDumpAllReferenced.assertDumpAllReferenced for Python 3.

test__scanner.py_dump_object_info returns bytes, so treat its return value
accordingly.

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.

220. By John A Meinel

Update _scanner for Python 3 types.

PyDict, PyUnicode, PyLong all are different in 3.*, and have even changed a bit
during the 3.x lifetime. But these all pass the new test suite, and avoid
allocating a PyLong for every object that we know about.

219. By John A Meinel

Python 3 doesn't have the old FILE interface.

Now we just use raw write() to file descriptors. It may mean we aren't doing
buffered IO, which is a bit of a shame, but at least it works on both Python2
and Python3 and still allows us to take a memory dump with fewer allocations.

218. By John A Meinel

Remove _format_list and _set_default as they were no longer used.

217. By John A Meinel

Use six.string_types instead of basestring.

216. By John A Meinel

Use cleaner import statements, since cython does it in a nicer way.

215. By John A Meinel

Update tests to be clearer about bytes vs text.

This is to avoid confusion where Python2 str objects are bytes while Python3 str objects are Unicode.

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