Upgrading from needtoknow 1.x to wardowl 2.0#
wardowl 2.0.0 is the first release under the new name. It is a major version because several security fixes change behaviour that 1.x code may rely on. The full list is in the changelog. This page lists what to change, in order.
1. Install the new package#
pip uninstall needtoknow
pip install wardowl # with the same extras, e.g. "wardowl[pgvector,openfga]"
Then rename the imports: needtoknow becomes wardowl, NeedToKnowRetriever becomes
WardowlRetriever, and environment variables named NEEDTOKNOW_* become WARDOWL_*. The default
cache namespace and the metric names change in the same way.
2. Index your chunks again#
The fields the backends store are renamed: needtoknow_terms, needtoknow_id and
needtoknow_metadata become wardowl_terms, wardowl_id and wardowl_metadata. Qdrant and
Weaviate also derive every point id from the chunk id’s SHA-256 now, a UUID chunk id included.
Write your chunks into a new collection, index or table with wardowl, switch the application to it,
then drop the old one.
3. Check the changes that can affect your code#
If you use |
What changed |
What to do |
|---|---|---|
|
|
Give each kind of authorizer its own namespace |
A shared cache during the upgrade |
Cache keys changed |
Call |
|
A chunk without its spans field is hidden whole ( |
Keep the spans field on every chunk; |
The LangChain, LlamaIndex or Haystack retrievers |
They return no chunk metadata unless named |
Pass |
LlamaIndex’s |
Kept nodes are copies with no metadata unless named, in their relationships too |
Pass |
Haystack with an agent ( |
A model can no longer set |
Give the tool the subject from the agent’s state with |
Haystack’s |
|
Name the sockets in |
The conformance kit ( |
|
Make the async path translate filters the way the sync path does |
|
Attributes are read-only copies; id and groups must be strings |
Build a new |
The public filter translators ( |
A filter that matches nothing raises |
Catch |
Chroma’s |
Removed |
Catch |
A large |
|
Lower |
|
Strings, bytes and mappings are refused as the list of values |
Pass a list: |
|
Keys shorter than 16 bytes are refused, and a key that is not bytes raises |
Use a key of 16 bytes or more, such as |
|
Groups are sent as |
Name groups with the prefix in your policies |
|
Grants with an expiry are ignored by default; a deleted or unshared file gives |
Pass |
The HTTP authorizers |
|
Use |
|
Subject ids and groups with |
Map such ids before they reach the authorizer |
|
Writes wait up to 30 seconds for searches to see them |
Pass |
|
|
Store integers as integers |
|
Bodies over 256 KiB answer 413; vectors hold at most 4,096 numbers; |
Raise |
|
Tokens must name their key ( |
Check that your identity provider sets |
The |
Needs PyJWT 2.14 or later, langchain-core 1.3.3 or later |
Upgrade those packages |
4. Run the conformance kit#
If you wrote your own backend or authorizer, run wardowl.testing.check_backend or
check_authorizer against it. The kit now checks the async paths and data that stores tend to
confuse, such as "1" next to 1, so it can find problems the 1.x kit missed.
needtoknow on PyPI#
needtoknow is archived on PyPI. Its last release, 2.0.0, has no code: it installs wardowl, and
import needtoknow raises an error that points here. A requirement below 2.0 still installs
needtoknow 1.6.0, which gets no security fixes; the fixes are in wardowl 2.0.0.