Skip to main content

A library for deferring decorator actions

Project description


Venusian is a library which allows framework authors to defer decorator actions. Instead of taking actions when a function (or class) decorator is executed at import time, you can defer the action usually taken by the decorator until a separate “scan” phase.

See the “docs” directory of the package or the online documentation at .

Change Log

1.0a3 (2012-02-08)

  • Add an ignore argument to the scan method of a Scanner. This argument allows a user to ignore packages, modules, and global objects by name during a scan. See the “ignore Scan Argument” in the narrative documentation for more details.

1.0a2 (2011-09-02)

  • Close ImpLoader file handle to avoid resource warnings on Python 3.

1.0a1 (2011-08-27)

  • Python 3 compatibility.

  • Allow an onerror callback to be passed to Scanner.scan().

0.9 (2011-06-18)

0.8 (2011-04-30)

  • Normal “ test” can’t support running the venusian tests under py 2.4 or 2.5; when it scans the ‘classdecorators’ fixture, it barfs. To get around this, we used to depend on nose in setup_requires and tell “ test” to use nose by setting test_suite to “nose.collector” but we can’t anymore because folks use Venusian in systems which install from pip bundles; pip bundles do not support setup_requires. So, sorry, we’re painted into a corner; at this point you just have to know to install nose and run “ nosetests” rather than “ test”. Or just run “tox” which tests it under all Pythons.

0.7 (2011-03-16)

  • Use Pylons theme in documentation.

  • Fix orphaned pyc test on pypy.

  • Fix GitHub Issue #1: subclasses of decorated classes that do not have any decorations should not inherit the decorations of their parent classes.

  • Fix GitHub Issue #2: scans should only “find” each object once per scan, regardless of how many modules that object is imported into.

0.6 (2011-01-09)

  • Some metaclasses (Elixir’s) don’t raise an AttributeError when asked for a nonexistent attribute during a scan. We now catch all exceptions when interrogating an object for __venusian_callbacks__ rather than just AttributeError.

0.5 (2010-12-19)

  • Make codeinfo attribute available as an attribute of the AttachInfo object. It will be a tuple in the form (filename, lineno, function, sourceline) representing the context of the venusian decorator. Eg. ('/home/chrism/projects/venusian/tests/', 81, 'testCallInfo', 'add_handler(foo, bar)')

0.4 (2010-09-03)

  • Bug fix: when a venusian decorator used as a class decorator was used against both a class and a subclass of that class, the superclass and subclass would effectively share the same set of callbacks. This was not the intent: each class declaration should have its own local set of callbacks; callbacks added via decorations should not be inherited, and a superclass should not receive its subclass’ decorations.

  • Arrange test fixtures into a single directory.

0.3 (2010-06-24)

  • Ignore orphaned modules (.pyc or .pyo files without a corresponding .py file) during a scan.

0.2 (2010-04-18)

  • Add the concept of scan categories (see the “Scan Categories” section of the documentation) to allow an application to make use of more than one Venusian-using framework simultaneously.

0.1 (2010-02-15)

  • Initial release.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

venusian-1.0a3.tar.gz (41.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page