Clorm

Latest version: v1.6.0

Safety actively analyzes 663899 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

1.3.8

Bug fixes and enhancements:

- Bug fix for query aliases. Internally an alias has a generated uuid. Clashes in the uuid can cause a query to fail. Since a clash only happens occasionally this can lead to frustrating intermittent failures that are hard to track down. Now using the full `uuid.uuid4()` identity so shouldn't get any more clashes (see https://stackoverflow.com/questions/1785503/when-should-i-use-uuid-uuid1-vs-uuid-uuid4-in-python)

- Added picking of anonymous tuples in a predicate definition. This makes it easier to use facts in a multi-process setting.

- Cleanup implementation of fact instantiation and unification for some performance improvements.

1.3.7

Bug fixes and enhancements:
- Better type annotations and field type annotations
- Experimental feature to declare predicates using only field type annotations to infer the correct field type. This will make the predicate declaration look more like standard dataclasses and will be more intuitive for most python user. This feature is currently undocumented but hopefully will become the main way of declaring clorm predicates. For example, the following two declarations will now create the same class definition:

class Fact(Predicate):
i : int
s : str

class Fact(Predicate):
i = IntegerField
s = StringField

- Some small improvements to the performance for the fact parser and symbol unification
- Some internal simplifications

1.3.6

Bug fix and enhancements:

- Bug fix to dealiasing paths
- Enhancement to `FactBase.asp_str(commented=True)` for complex/nested predicate signatures.

1.3.4

Minor enhancements:
- Added a flag `FactBase.asp_str(sorted=True)` to make the generated ASP string sorted. By default the output is not sorted (but is deterministic based on the insertion order of constructing the factbase). With the sorted flag the output is sorted first on the predicate type (name/arity) and then on the instances of each predicate.
- Internal implementation change to `Predicate` initialiser that is cleaner and also works better with `pylint`.

1.3.3

Bug fix release:

- `FactBase.discard()` and `FactBase.remove()` were broken. They have been fixed and unit tests added
- The query `singleton()` and `first()` didn't work correctly, they should raise an exception if the query results are empty.
- Some documentation fixes, especially adding some description of the query `select()` clause being passed a lambda function.

1.3.2

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.