Commit a3c8c55
authored
orm: deprecate global tenant filter APIs, deadline 2027-06-08 (#27389)
* orm: deprecate global tenant filter APIs, deadline 2027-06-08
The old global tenant filter mechanism (configure_tenant_filter,
set_current_tenant_id, with_tenant, without_tenant_filter, etc.)
is replaced by the per-instance DataScope / orm.DB pattern.
Add @[deprecated] and @[deprecated_after] attributes to all 10
public items so users get a notice directing them to the new API.
See: PR #27324 (DataScope support)
* orm: remove deprecation from apply_tenant_filter (still used by DB backends)
apply_tenant_filter is an internal helper called by the sqlite, mysql,
and pg ORM backends in their select/update/delete paths. Marking it
@[deprecated] would produce notices in every ORM-backed build and
become a hard error after the grace period, breaking the backends.
Keeps the 9 user-facing APIs deprecated as-is.
* orm: deprecate apply_tenant_filter (covers remaining global-tenant public API point)
* orm: remove deprecation from apply_tenant_filter (still used by DB backends)
The apply_tenant_filter function is internal plumbing still used by
db/sqlite, db/pg, and db/mysql backends. Deprecating it with -W in CI
causes every tool that imports db/sqlite or any .vv test that imports
it to fail.
Keeps the other 9 deprecation markers (TenantFilterConfig,
configure_tenant_filter, set_tenant_filter_enabled,
set_current_tenant_id, clear_current_tenant_id, with_tenant,
with_tenant_value, without_tenant_filter,
without_tenant_filter_value).
Fixes all 19 CI failures in PR #27389.1 parent b0cf6a5 commit a3c8c55
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| 301 | + | |
| 302 | + | |
301 | 303 | | |
302 | 304 | | |
303 | 305 | | |
| |||
343 | 345 | | |
344 | 346 | | |
345 | 347 | | |
| 348 | + | |
| 349 | + | |
346 | 350 | | |
347 | 351 | | |
348 | 352 | | |
349 | 353 | | |
350 | 354 | | |
351 | 355 | | |
| 356 | + | |
| 357 | + | |
352 | 358 | | |
353 | 359 | | |
354 | 360 | | |
355 | 361 | | |
356 | 362 | | |
| 363 | + | |
| 364 | + | |
357 | 365 | | |
358 | 366 | | |
359 | 367 | | |
| |||
364 | 372 | | |
365 | 373 | | |
366 | 374 | | |
| 375 | + | |
| 376 | + | |
367 | 377 | | |
368 | 378 | | |
369 | 379 | | |
370 | 380 | | |
371 | 381 | | |
372 | 382 | | |
| 383 | + | |
| 384 | + | |
373 | 385 | | |
374 | 386 | | |
375 | 387 | | |
| |||
382 | 394 | | |
383 | 395 | | |
384 | 396 | | |
| 397 | + | |
| 398 | + | |
385 | 399 | | |
386 | 400 | | |
387 | 401 | | |
| |||
394 | 408 | | |
395 | 409 | | |
396 | 410 | | |
| 411 | + | |
| 412 | + | |
397 | 413 | | |
398 | 414 | | |
399 | 415 | | |
| |||
404 | 420 | | |
405 | 421 | | |
406 | 422 | | |
| 423 | + | |
| 424 | + | |
407 | 425 | | |
408 | 426 | | |
409 | 427 | | |
| |||
0 commit comments