Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`persisted`.`styles`.`Versioned``

class documentation

`class Versioned: (source)`

Known subclasses: `twisted.web.distrib.ResourcePublisher`, `twisted.words.im.basesupport.AbstractAccount`

View In Hierarchy

This type of object is persisted with versioning information.

I have a single class attribute, the int persistenceVersion. After I am unserialized (and styles.doUpgrade() is called), self.upgradeToVersionX() will be called for each version upgrade I must undergo.

For example, if I serialize an instance of a Foo(Versioned) at version 4 and then unserialize it when the code is at version 9, the calls:

      self.upgradeToVersion5()
      self.upgradeToVersion6()
      self.upgradeToVersion7()
      self.upgradeToVersion8()
      self.upgradeToVersion9()

will be made. If any of these methods are undefined, a warning message will be printed.

Method | `__getstate__` | Get state, adding a version number to it on its way out.
Method | `__setstate__` | Undocumented
Method | `versionUpgrade` | (internal) Do a version upgrade.
Class Variable | `persistenceForgets` | Undocumented
Class Variable | `persistenceVersion` | Undocumented
Instance Variable | `__dict__` | Undocumented

def __getstate__(self, dict=None): (source)
overridden in `twisted.words.im.basesupport.AbstractAccount`

Get state, adding a version number to it on its way out.

def __setstate__(self, state): (source)

Undocumented

def versionUpgrade(self): (source)

(internal) Do a version upgrade.

persistenceForgets: `tuple` = (source)

Undocumented

persistenceVersion: `int` = (source)
overridden in `twisted.web.distrib.ResourcePublisher`

Undocumented

__dict__ = (source)

Undocumented