Generate Sphinx object inventory instead of pickle

Bug #1287458 reported by Tom Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pydoctor
Fix Committed
Undecided
Adi Roiban

Bug Description

A pickle generated from https://twistedmatrix.com/trac/ticket/7018 can't then be loaded:

$ pydoctor --extra-system path/to/twisted/apidocs/system.pickle:https://twistedmatrix.com/documents/13.2.0/api/

Traceback (most recent call last):
  File "bin/pydoctor", line 12, in <module>
    sys.exit(main(sys.argv[1:]))
  File "lib/python2.7/site-packages/pydoctor/driver.py", line 261, in main
    moresystems.append(cPickle.load(open(fname, 'rb')))
  File "lib/python2.7/site-packages/pydoctor/model.py", line 463, in __setstate__
    n.append(lookup(vv))
  File "lib/python2.7/site-packages/pydoctor/model.py", line 446, in lookup
    raise KeyError, name
KeyError: 'twisted.internet.unix._SendmsgMixin 0._writeSomeDataBase'

Related branches

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

So the fix here is (probably) to delete all the pickle-related code and switch to using sphinx's objects.inv format (this also means that we should be able to use the python.org objects.inv and delete the special casing for the standard library)

Adi Roiban (adiroiban)
Changed in pydoctor:
assignee: nobody → Adi Roiban (adiroiban)
Revision history for this message
Adi Roiban (adiroiban) wrote :

I will try to work on this. Format for object inv is

# Sphinx inventory version 2
# Project: NAME
# Version: VERSION
# The remainder of this file is compressed with zlib.
ZLIB_COMPRESSED_CONTENT

content lines in the format
--------------------------------

name domainname:type priority uri dispname

Example
-------------

genindex std:label -1 genindex.html# Index
modindex std:label -1 py-modindex.html# Module Index
search std:label -1 search.html# Search Page

generate-uuid std:label -1 operation/command-line.html#$ Generating UUID

summary: - Pydoctor can't load pickle it generates for twisted
+ Generate Sphinx object inventory instead of pickle
Changed in pydoctor:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.