Skip to content

Releases: mutating/pristan

0.0.24

Choose a tag to compare

@pomponchik pomponchik released this 09 Jul 14:49
6fc1e7b

Now, .one() returns the direct result of the plugin call, rather than a container holding it.

0.0.23

Choose a tag to compare

@pomponchik pomponchik released this 06 Jul 14:56
91c8e68

A potential deadlock was eliminated in a situation where two different slots recursively call each other.

Closes #28.

0.0.22

Choose a tag to compare

@pomponchik pomponchik released this 06 Jul 13:15
19f5f17

A purely technical stability release with no major new features:

  • Added many docstrings for existing tests.
  • Added several thread-safety tests.
  • Improved thread safety of slots: most public operations are now performed under locks.
  • Added a warning suggesting that if the .one attribute is used when retrieving an item from a slot, it is recommended to set the unique=True flag for the slot, since your code effectively expects uniqueness.
  • Minor code refactoring was performed.

0.0.21

Choose a tag to compare

@pomponchik pomponchik released this 26 Jun 17:35
179413a

Now, before checking the contents of a plugin slot and when determining the number of plugins in it, lazy loading of entry points is triggered.

0.0.20

Choose a tag to compare

@pomponchik pomponchik released this 26 Jun 14:13
78b5cea

A new dynamic attribute, .one, was added to slots and slot selections; it contains a selection of exactly one plugin. Accessing it will raise an exception if there is more than one plugin in the slot or selection.

This feature is very similar to how things used to be done:

selection = some_slot[‘plugin_name’]

if not selection:
    raise SomeError(‘I need some plugin, sorry.’)

if len(selection) > 1:
    raise SomeError(‘I need only one plugin!’)

selection()

Now, the complete equivalent of the code above would look like this:

some_slot[‘plugin_name’].one()

0.0.19

Choose a tag to compare

@pomponchik pomponchik released this 23 Jun 20:52
e00c24e

Added the ability to enforce the requirement that all plugin names be explicitly specified at the slot level.

0.0.18

Choose a tag to compare

@pomponchik pomponchik released this 23 Jun 08:21
575278e

Added the ability to cast slots to bool.

0.0.17

Choose a tag to compare

@pomponchik pomponchik released this 09 Jun 09:41
e3ac40e

The ability to specify not just one, but multiple expected signatures for a slot was added. In this case, functions used as slots and plugins must match not just one, but all of the specified signatures at the same time.

Closes #19.

0.0.16

Choose a tag to compare

@pomponchik pomponchik released this 04 Jun 22:07
735a20a

Small but important update: @slot(..., unique=True) can now enforce unique requested plugin names at the slot level. By default duplicate names still get suffixed as before, but slots that require stricter registration can now reject duplicates explicitly.

Closes #16

0.0.15

Choose a tag to compare

@pomponchik pomponchik released this 13 May 09:05
1495895

Fixed a bug where, when removing a plugin from a slot, only its metadata was deleted, but not the plugin itself.