0.5.2

Release date: 2020-09-08

Breaking changes

None

New features

Support for constructors with both positional and keyword arguments (#405)

  • In languages that support both positional and keyword arguments (currently Python and Ruby), oso now supports registering classes with constructors that use both.

  • The syntax for calling a constructor with mixed arguments from an oso policy is:

    new MyClass(1, 2, foo: 3)
    
  • As with Python and Ruby, positional arguments must come before keyword arguments.

  • For more, see documentation for the new operator.

Django integration (django-oso) (#395)

The new django-oso package makes it easy to use oso with Django. It includes middleware for using oso with Django, and authorization functions designed to work with Django views.

Other bugs & improvements

  • The Node.js library will now throw an InvalidConstructorError when attempting to register a non-constructable object via registerClass. (#392)

  • Rule indexing performance improvements. (#409)

  • Standardize handling of ±∞ and NaN across all language libraries. (#410)

  • Better warnings for unknown specializers that are similar to built-in types. (#403)

  • Fix an issue with readline’s calculation of the cursor position in the Python REPL on Linux. (#397)