-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
138 additions
and
98 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.6.0 | ||
0.7.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
===== | ||
0.7.0 | ||
===== | ||
|
||
**Release date:** 2020-10-13 | ||
|
||
Breaking changes | ||
================ | ||
|
||
.. warning:: This release contains breaking changes. Be sure | ||
to follow migration steps before upgrading. | ||
|
||
``Oso.clear()`` replaced with ``Oso.clear_rules()``/``clearRules()`` | ||
-------------------------------------------------------------------- | ||
|
||
The ``Oso.clear()`` method in oso's language libraries has been removed. | ||
To clear rules from the Polar knowledge base, use the new ``clear_rules()`` | ||
(or ``clearRules()``) method, which clears rules but leaves registered classes | ||
and constants in place. | ||
|
||
To migrate, replace calls to ``Oso.clear()`` with either ``Oso.clear_rules()`` or | ||
``Oso.clearRules()``, depending on the library you are using. | ||
It is no longer necessary to re-register classes/constants after clearing. | ||
|
||
Method signature for ``Oso.register_constant()`` updated | ||
-------------------------------------------------------- | ||
|
||
The parameters were swapped to mirror the signature of | ||
``Oso.register_class()``. | ||
|
||
Select Ruby methods now return ``self`` to enable method chaining | ||
----------------------------------------------------------------- | ||
|
||
- ``Oso#clear_rules`` | ||
- ``Oso#load_file`` | ||
- ``Oso#load_str`` | ||
- ``Oso#register_class`` | ||
- ``Oso#register_constant`` | ||
|
||
Custom constructors no longer supported in the Java, Python, or Ruby libraries | ||
------------------------------------------------------------------------------ | ||
|
||
For the Java, Python, and Ruby libraries, custom constructors are a relic. They | ||
were useful for translating keyword args into positional args before oso | ||
supported supplying positional args when constructing an instance via Polar's | ||
:ref:`new operator <operator-new>`. They were also useful for specifying a | ||
``find_or_create``-style class method as a constructor, but that's been | ||
superseded by the introduction of calling methods directly on registered | ||
constants, including classes. | ||
|
||
To migrate, replace usage of a custom constructor with an equivalent class | ||
method. | ||
|
||
Note that custom constructors are still supported for the Rust library since | ||
specifying a static ``new`` method for a type is nothing more than a | ||
convention. | ||
|
||
New features | ||
============ | ||
|
||
List filtering in ``django-oso`` (preview) | ||
------------------------------------------- | ||
|
||
oso can now respond to some queries with a set of constraints instead of a yes | ||
or no decision. In the ``django-oso`` library, the | ||
:py:meth:`django_oso.auth.authorize_model` function and | ||
:py:class:`django_oso.models.AuthorizedModel` class have been added to use this | ||
functionality to authorize a **collection** of objects. Instead of fetching | ||
all objects and evaluating a query, the relevant authorization constraints will | ||
be pushed down to the ORM and applied to a Django ``QuerySet``. | ||
|
||
This feature makes implementing list endpoints with authorization more | ||
performant, since authorization does not need to be applied after fetching | ||
data. | ||
|
||
**This feature is currently in preview.** | ||
|
||
.. todo:: Link to blog post | ||
|
||
Other bugs & improvements | ||
========================= | ||
|
||
- Language libraries that haven't yet implemented operations on application | ||
instances (Java, Node.js, Ruby, Rust) now throw a uniform error type. | ||
|
||
Improvements to the debugger | ||
---------------------------- | ||
|
||
- Changes to the way stepping is implemented: | ||
- ``step`` steps by query instead of goal. | ||
- ``over`` and ``out`` are now implemented using a stack that tracks query | ||
parents. | ||
- New ``goal`` command to step by goal (the way ``step`` used to work). | ||
- New ``stack`` command to show all parent queries of the current one. | ||
- ``query n`` command can take an integer argument ``n`` to inspect the query | ||
at the nth level of the stack. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
oso~=0.6.0 | ||
oso~=0.7.0 | ||
django~=3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
oso~=0.6.0 | ||
oso~=0.7.0 | ||
flask>=0.12.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
"""Core oso functionality""" | ||
|
||
__version__ = "0.6.0" | ||
__version__ = "0.7.0" | ||
|
||
from pathlib import Path | ||
import os | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
oso-oso (0.6.0) | ||
oso-oso (0.7.0) | ||
ffi (~> 1.0) | ||
|
||
GEM | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Oso | ||
VERSION = '0.6.0' | ||
VERSION = '0.7.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
3e6009a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rust Benchmark
unify_once
814
ns/iter (± 60
)876
ns/iter (± 67
)0.93
unify_twice
2457
ns/iter (± 271
)2620
ns/iter (± 177
)0.94
many_rules
63582
ns/iter (± 5439
)66510
ns/iter (± 3130
)0.96
fib/5
519388
ns/iter (± 36315
)532608
ns/iter (± 5804
)0.98
prime/3
18144
ns/iter (± 1587
)18646
ns/iter (± 1068
)0.97
prime/23
17761
ns/iter (± 2020
)18678
ns/iter (± 4032
)0.95
prime/43
17661
ns/iter (± 2056
)18530
ns/iter (± 740
)0.95
prime/83
17838
ns/iter (± 1438
)18722
ns/iter (± 1150
)0.95
prime/255
15837
ns/iter (± 1315
)16486
ns/iter (± 1112
)0.96
indexed/1
5311
ns/iter (± 394
)5508
ns/iter (± 382
)0.96
indexed/10
5362
ns/iter (± 331
)5538
ns/iter (± 1308
)0.97
indexed/100
5898
ns/iter (± 1224
)6038
ns/iter (± 889
)0.98
This comment was automatically generated by workflow using github-action-benchmark.