Up to [cvs.NetBSD.org] / pkgsrc / databases / py-tortoise-orm
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
py-tortoise-orm: updated to 1.1.9
1.1.9
Added
Q.__bool__() so Q objects with no filters/children (including nested empty Q children) are falsy.
PostgreSQL password credential now accepts a sync or async callable, resolved once per new connection, to support short-lived credentials such as AWS RDS/Aurora IAM tokens and Azure Entra ID tokens.
Changed
tortoise.contrib.starlette now only supports Starlette 1.0+ (This does not affect FastAPI users; you can continue using FastAPI with any version of Starlette).
Fixed
Aggregates now apply _filter when the aggregated argument is an F() or a combined expression (e.g. Sum(F("price") * F("qty"), _filter=Q(status="paid"))). Previously the filter was silently dropped and every row was aggregated.
Negating an already negated Q now cancels out: ~~Q(...) and .exclude(~Q(...)) used to keep a single NOT, so they returned the rows the caller meant to drop.
PostgreSQL and Oracle RemoveIndex / partial RemoveConstraint now schema-qualify DROP INDEX, so indexes on models with Meta.schema can be dropped when they are not on the connection search_path.
ForeignKeyField/OneToOneField no longer lose a declared source_field when deconstructed. makemigrations wrote the generated <field>_id backing field name as the column name, so a migrated schema disagreed with generate_schemas() and neither path reported an error.
QuerySet.distinct().count() no longer counts rows duplicated by a join (e.g. filtering on a m2m relation); it now counts distinct primary keys and matches the number of rows the query returns.
DecimalField no longer strips the scale it just applied: to_python_value() called .normalize() immediately after .quantize(), so a DecimalField(max_digits=12, decimal_places=2) holding 100.00 came back as Decimal('1E+2') and rendered as 1E+2 in strings, f-strings and JSON.
BlackSheep: register_tortoise now enables the global connection fallback, so database access works when BlackSheep runs handlers in tasks other than the one that initialized the ORM.
fix(queryset): support DELETE/UPDATE with filters on related fields.
Fix naive DatetimeField timezone drift.
A model with its own Meta now inherits Meta.ordering from its abstract base model when it does not define its own.
The return type hint for IntEnumField/CharEnumField is now tortoise.fields.Field[EnumType] instead of EnumType.
Make EmailValidator allowed_domains actually restrict domains.
AlterModelOptions now clears options that were removed from the model, instead of only merging in the ones that remain; removing a model docstring no longer makes makemigrations regenerate the same migration on every run.
Model.update_or_create() now applies the caller's defaults after losing a concurrent insert, re-reading the current row through the existing transactional update path. Creation is attempted at most twice, with a final locked read after the last conflict; repeated concurrent deletions that exhaust recovery raise OperationalError rather than retrying indefinitely.
psycopg: the connection pool now validates a connection on checkout, so one silently dropped by the network while idle (a firewall or load balancer closing it, a DB restart, ...) gets transparently replaced instead of being handed to the caller and failing with psycopg.OperationalError: the connection is closed. The check is a cheap no-op query on an already-open socket, so the added latency per checkout is negligible next to a real query.
Fixed prefetch_related() on m2m fields ignoring select_related(), annotate(), and order_by() applied to the prefetched queryset.
pydantic_model_creator no longer raises TypeError for models with annotations whose origin is not a class, such as Literal[...].
Filtering by a related model instance on a ForeignKeyField/OneToOneField declared with a non-primary-key to_field now uses the to_field value instead of the instance's primary key, so the generated query targets the correct column.
Database URLs with an empty host (e.g. postgres:///db?host=/var/run/postgresql&user=u) no longer overwrite host/user/password given in the query string, so unix domain sockets work.
py-tortoise-orm: updated to 1.1.8 1.1.8 Added QuerySet.union() — SQL UNION query support for combining results from multiple QuerySets, including support for union across different models, union(all=True) for duplicates, order_by(), limit(), and count(). feat: add postgresql:// scheme as alias for asyncpg feat: add pre commit config and fix codespell issues feat: django compatibility field name feat: expose classmethod to build tortoise config QuerySet.contains() method to check if an object exists in a queryset. Added comprehensive EXPLAIN support for MySQL and PostgreSQL. Built-in DomainNameValidator, URLValidator, and EmailValidator classes for common validation patterns. Fixed MigrationRecorder now uses parameterized queries; fixes MariaDB/MySQL rejecting ISO-8601 applied_at values. fix(migrations): use parameterized queries in MigrationRecorder Applies model generics on relational fields functions fix: MSSQL connection left in busy state after insert db_default on ForeignKeyField/OneToOneField now propagates to the underlying <fk>_id column, so CREATE TABLE emits the DEFAULT clause for FK columns. Fix db_default on FK/O2O dropped during _init_relations MigrationRecorder no longer emits tortoise's own pk field DeprecationWarning when applying migrations; it now builds its bookkeeping model with primary_key=True. QuerySet.count() now matches the limited query result for the LIMIT/OFFSET edge cases: it returns 0 (instead of a negative number) when offset() exceeds the total row count, and 0 (instead of the total) for limit(0). tests: cover Q inequality and unhashable behavior Field declarations on models now resolve to their concrete type (e.g. CharField[str]) in Pyright/Pylance instead of Field[Unknown]; the Field.__new__ type-check stub now returns Self. Type hint for TransactionContext now returns a TransactionalDBClient instead of a raw database connection. This change gives the correct inferred type for the transaction context. Fix TSVectorField returned value conversion.
py-tortoise-orm: updated to 1.1.7 1.1.7 Added Tests for model validators. Fixed Reorder delete model operations in migrations to avoid foreign key constraint errors. Return value generated by db_default on create instead of None. Column comment alteration now works correctly for MySQL and PostgreSQL; fixed db_default handling for MySQL. Fix docstrings for a few classes. Changed Improved Pydantic JSON dump performance.
py-tortoise-orm: updated to 1.1.6 1.1.6 Fixed Migration generator now correctly orders AddIndex, RemoveIndex, AddConstraint, RemoveConstraint operations when adding/removing a field to a model that is used in an index or constraint. CreateModel migrations now include DEFAULT clauses for fields with db_default set. Previously only AddField emitted defaults correctly. AlterField migrations now detect max_length changes (e.g. VARCHAR(32) → VARCHAR(64)) and emit the correct ALTER statements across all backends. backward_relations=False in PydanticMeta now only excludes unannotated backward relations — fields explicitly annotated with ReverseRelation in the model class body are preserved. MySQL session time_zone now uses the configured timezone instead of always defaulting to +0:00 when use_tz=True. Plus sign (+) in database URL passwords is no longer incorrectly decoded as a space.
py-tortoise-orm: updated to 1.1.5 1.1.5 Fixed crash for makemigrations on tuple index with new model
py-tortoise-orm: updated to 1.1.4 1.1.4 Added CheckConstraint support in Meta.constraints — named check constraints are now captured by the migration autodetector, enabling AddConstraint/RemoveConstraint/RenameConstraint generation via makemigrations. UniqueConstraint.condition parameter for partial unique indexes on PostgreSQL (emitted as CREATE UNIQUE INDEX ... WHERE). Fixed FK field-to-column resolution in constraint operations — FK fields like organization are now correctly resolved to their DB column (e.g. organization_id) in add_constraint, remove_constraint, and rename_constraint across all backends. MSSQL HASHBYTES expression default — RandomHex now wraps NEWID() with CAST(... AS NVARCHAR(36)) to avoid implicit conversion error. MySQL ALTER COLUMN SET DEFAULT template now wraps expression defaults in parentheses. RenameConstraint operation now preserves constraint type and fields during forward/backward migrations. MySQL schema editor: FK index protection (_create_missing_fk_index) prevents MySQL error 1553 when dropping the only index covering a foreign key column. MySQL schema editor: expression default two-step workaround for ADD COLUMN with non-deterministic SqlDefault expressions (e.g. RANDOM_BYTES). Multi-column constraint introspection — constraint name resolution now matches on the exact set of columns across all backends (PostgreSQL, MySQL, MSSQL, SQLite, Oracle). Tortoise.close_connections() now propagates call to current context.
py-tortoise-orm: updated to 1.1.3 1.1.3 Added RandomHex dialect-aware SqlDefault subclass for generating random hex strings across all backends. Meta.constraints support on models — named UniqueConstraint objects are now captured by the migration autodetector, enabling AddConstraint/RemoveConstraint generation via makemigrations. MySQL schema editor: _alter_field override using MODIFY COLUMN for NULL/NOT NULL changes; backtick-quoted ALTER_FIELD_* templates. MSSQL schema editor: _alter_field override with ALTER COLUMN for nullability, named default constraint management via sys.default_constraints, bracket-quoted templates, and self-referencing FK CASCADE → NO ACTION downgrade. Fixed MySQL migrations: ALTER COLUMN ... SET NOT NULL / DROP NOT NULL now correctly emits MODIFY COLUMN col type NOT NULL/NULL. MSSQL migrations: DELETE_CONSTRAINT_TEMPLATE and UNIQUE_CONSTRAINT_CREATE_TEMPLATE now use bracket quoting [name] instead of double quotes. MSSQL migrations: self-referencing foreign keys with CASCADE no longer fail with error 1785; automatically downgraded to NO ACTION.
py-tortoise-orm: updated to 1.1.2
1.1.2
Fixed
Fixed optimisation issue, if you didn't have pydantic installed, Tortoise would try to import it on every JSONField deserialization, lowering performance.
1.1.1
Added
SqlDefault and Now expressions for db_default — use db_default=SqlDefault("...") to emit raw SQL expressions (e.g. CURRENT_TIMESTAMP) as database defaults. Now() is a convenience shorthand for SqlDefault("CURRENT_TIMESTAMP").
Changed
Field(default=...) and auto_now / auto_now_add no longer emits a DEFAULT clause in generate_schemas(). The default parameter is Python-only; use db_default for database-level defaults. This aligns generate_schemas() with migrations, which don't emitted DEFAULT for default=.
1.1.0
Added
db_default parameter for fields — set database-level DEFAULT clauses that propagate to schema generation and migrations. Unlike default (Python-only), db_default is persisted in the DB schema and applied even for rows inserted outside the ORM.
Model.construct() classmethod for building model instances without field validation — useful in test factories and fixtures.
truncate_all_models() now respects foreign key constraints using topological ordering (SQLite/MySQL) or TRUNCATE ... CASCADE (PostgreSQL).
Auto-recreate database connection when event loop changes. Enables easier testing without session level fixtures
Fixed
Type checking of None assignment to nullable fields.
Fix set global fallback default in Sanic register_tortoise.
Escape [ ] for db url parsing.
Fix UnicodeEncodeError by using UTF-8 encoding for migration files.
py-tortoise-orm: updated to 1.0.0 1.0.0 Breaking Changes Minimum Python version raised to 3.10 (was 3.9). ``use_tz`` now defaults to ``True`` (was False). Set use_tz=False explicitly if you need naive datetimes. Context-first architecture: All ORM state now lives in TortoiseContext instances. Tortoise.init() returns a TortoiseContext (previously returned None). Multiple separate asyncio.run() calls require explicit context management; the typical single asyncio.run(main()) pattern works unchanged. Removed legacy test infrastructure: test.TestCase, test.IsolatedTestCase, test.TruncationTestCase, test.SimpleTestCase, initializer(), finalizer(), env_initializer(), getDBConfig(). Use tortoise_test_context() with pytest instead. Removed ``pytz`` dependency: Timezone handling now uses the standard library zoneinfo module. Tortoise APIs return ZoneInfo objects instead of pytz timezones. ``DatetimeField``/``TimeField`` with ``auto_now=True`` no longer implicitly sets auto_now_add=True. In practice auto_now=True alone still sets the value on every save (including creation), so this is unlikely to affect most users. The internal flag coupling was removed for correctness. Shell extras required: Interactive shell dependencies are now optional. Install with pip install tortoise-orm[ipython] or pip install tortoise-orm[ptpython]. Added Native migrations framework with CLI commands: tortoise makemigrations, tortoise migrate, tortoise sqlmigrate. Supports RunPython, RunSQL, reversible migrations, and multi-app projects. Database schema support for PostgreSQL and MSSQL (on MySQL maps to database name) — tables can live in non-default schemas (e.g., warehouse.inventory), with cross-schema relations and migration support. PostgreSQL full-text search: TSVectorField, SearchVector, SearchQuery, SearchRank, SearchHeadline expressions, and GIN/GiST index support. Query API (tortoise.query_api) for building and executing custom pypika queries against models, with Model.get_table() classmethod. TortoiseContext — explicit context manager for ORM state with full isolation. tortoise_test_context() — modern pytest fixture helper for test isolation. get_connection(alias) / get_connections() — functions to access connections from current context. Tortoise.close_connections() — restored (was deprecated in 0.19) as the canonical way to close connections, now context-aware. Tortoise.is_inited() — explicit method version of Tortoise._inited property. ForeignKeyField and ManyToManyField now accept a model class directly, not just string references. DateField now supports __year / __month / __day filters. Changed Framework integrations (FastAPI, Starlette, Sanic, etc.) now use Tortoise.close_connections() internally. ConnectionHandler uses per-instance ContextVar storage for context isolation. Tortoise.apps and Tortoise._inited are now classproperty descriptors. Performance optimizations for model hydration, object construction, and query building. Pydantic model creator internals cleaned up: removed legacy validator, improved computed field handling. Deprecated from tortoise import connections — use get_connection() / get_connections() instead (still works but deprecated). Fixed use_tz=False now correctly preserves naive datetimes instead of silently making them timezone-aware. Annotations incorrectly selected in ValuesListQuery when not specified in .values_list() fields. M2M filtering broken when two relations point to the same target model. Pydantic incorrectly marking fields with default values as Optional. Model.in_bulk type annotation now supports any primary key type. Migration bug fixes: field serialization, operation ordering, and sqlmigrate command added.
py-tortoise-orm: updated to 0.25.4 0.25.4 Fix AttributeError when using tortoise-orm with Nuitka-compiled Python code Fix 'Self' in python standard library typing.py, but tortoise/model.py required it in 'typing_extensions' Fix examples should not be installed
py-tortoise-orm: updated to 0.25.3 0.25.3 Fix exception when creating aiosqlite connections on aiosqlite==0.22.0 Fix implicit anyio dependency introduced, but not declared
py-tortoise-orm: updated to 0.25.2 0.25.2 Fixed Fix grouping by in subqueries Fix sqlite decimal filter error with __gt Changed Official support python3.14 Migrate from poetry to uv Reorder imports by ruff Migrate lint tool from isort+black to ruff Added Add create() method to reverse ForeignKey relations, enabling parent.children.create() syntax
py-tortoise-orm: updated to 0.25.1
0.25.1
Changed
Force async task switch every 2000 rows when converting db objects to python objects to avoid blocking the event loop
Added
Add no_key parameter to queryset.select_for_update.
F() supports referencing JSONField attributes, e.g. F("json_field__custom_field__nested_id")
py-tortoise-orm: updated to 0.25.0 0.25.0 Fixed Fix pydantic_model_creator incompatibility with Pydantic 2.11 Changed Skip database selection if the router is not configured to improve performance .values(), .values_list() and .only() cannot be used together Added .only supports selecting related fields, e.g. .only(“related__field”) Fixed Fix pydantic_model_creator incompatibility with Pydantic 2.11
py-tortoise-orm: updated to 0.24.2 0.24.2 Fixed Fix model with multi m2m fields generates wrong references name Fix using reserved words in order_by Fix installing tortoise-orm with poetry 2 Changed Use 'unique' instead of 'create_unique_index' for m2m field
py-tortoise-orm: updated to 0.24.1 0.24.1 Added - Implement __contains, __contained_by, __overlap and __len for ArrayField Fixed - Fix update pk field raises unfriendly error - Using `.distinct()` with an annotation and `.order_by()` produces invalid SQL for PostgreSQL
py-tortoise-orm: updated to 0.24.0 0.24.0 Fixed - Rename pypika to pypika_tortoise for fixing package name conflict - Concurrent connection pool initialization - `_get_dialects`: support properties Changed - Drop support for Python3.8 - Optimize field conversion to database format to speed up `create` and `bulk_create` - Improved query performance by optimizing SQL generation 0.23.0 Added - Implement savepoints for transactions - Added type validation for foreign key fields to ensure type safety. Now raises `ValidationError` when assigning foreign key values with incorrect model types Fixed - Fixed a deadlock in three level nested transactions - Fix backward_relations in PydanticMeta
py-tortoise-orm: updated to 0.22.2 0.22.2 Fixed - Fix bug related to `Connector.div` in combined expressions. - Fix recovery in case of database downtime Changed - Parametrizes UPDATE, DELETE, bulk update and create operations - Parametrizes related field queries Added - CharEnumField and IntEnumField is supported by pydantic_model_creator
py-tortoise-orm: updated to 0.22.1 0.22.1 Fixed - Fix unable to use ManyToManyField if OneToOneField passed as Primary Key - Fix sorting by Term (e.g. RawSQL)
py-tortoise-orm: updated to 0.22.0 0.22.0 Fixed - Fix enums not quoted, allowing using of str enums for filters - Primary key field should not be nullable in pydantic schema - Fix ambiguous column name when grouping with joining - Fix same model returned by pydantic_model_creator calls with different arguments Added - JSONField adds optional generic support, and supports OpenAPI document generation by specifying `field_type` as a pydantic BaseModel - Add table_name_generator attribute to Tortoise.init for dynamic table name generation - Support for annotation and joins F() expressions - Allow use of annotate fields within Case-When expression - Added new queryset methods: last(), latest(), earliest() Changed - Change old pydantic docs link to new one - Refactored pydantic_model_creator, interface not changed - Values are no longer validated to be right type upon loading from database - Refactored private field names in queryset classes
py-tortoise-orm: updated to 0.21.7 0.21.7 Fixed - Fix unittest error with pydantic2.9 - Fix bug when using annotate and count at the same time but the annotation does not match anything, leading to an IndexError - Added missing field_type for TimeDeltaField - improve jsonfield type hint - Fix bug in tortoise.models.Model When a QuerySet uses the only function and then uses the print function to print the returned result, an AttributeError is generated - Update the pylint plugin to latest astroid version Added - Add POSIX Regex support for PostgreSQL and MySQL - support app=None for tortoise.contrib.fastapi.RegisterTortoise
py-tortoise-orm: updated to 0.21.6 0.21.6 Fixed - Fix bug in `pydantic_model_creator` when a foreign key is not included in `include` param. - Fix bug in `contrib.sanic.register_tortoise` causing a deadlock when using asyncpg and > 1 workers - Open psycopg pool with `.open()` to remove deprecated warning - Fix bug in `bulk_update` when pk field is not `id` - Fix mysql uuid compression bug - Fix comment for fk fields without constraint for mysql - Removed no_delay option for postgres, as it wasn't doing anything
py-tortoise-orm: updated to 0.21.5 0.21.5 Added - Propagate `_create_db` parameter to RegisterTortoise.
py-tortoise-orm: updated to 0.21.4 0.21.4 Added - Add ObjectDoesNotExistError to show better 404 message. - DoesNotExist and MultipleObjectsReturned support 'Type[Model]' argument. - Add argument use_tz and timezone to RegisterTortoise. - Support await `tortoise.contrib.fastapi.RegisterTortoise`. - Add `tortoise.contrib.test.init_memory_sqlite`. Fixed - Fix `update_or_create` errors when field value changed. - Fix bandit check error - Fix potential race condition in ConnectionWrapper - Fix py312 warning for datetime.utcnow - Fix reusing values and value_list queries Changed - Remove obsolete loop._selector from contrib/test.
py-tortoise-orm: updated to 0.21.3 0.21.3 Fixed - Fix `bulk_update` when using source_field for pk
py-tortoise-orm: updated to 0.21.2 0.21.2 Added - Add `create_unique_index` argument to M2M field and default if it is true 0.21.1 Fixed - Fix error on using old style `pk=True`
py-tortoise-orm: updated to 0.21.0 0.21.0 Added - Enhancement for FastAPI lifespan support - Add __eq__ method to Q to more easily test dynamically-built queries - Added PlainToTsQuery function for postgres - Allow field's default keyword to be async function - Add support for queryset slicing. Fixed - Fix `DatetimeField` use '__year' report `'int' object has no attribute 'utcoffset'`. - Fix `bulk_update` when using custom fields. - Fix `optional` parameter in `pydantic_model_creator` does not work for pydantic v2. - Fix `get_annotations` now evaluates annotations in the default scope instead of the app namespace. - Fix `get_or_create` method. - Use `index_name` instead of `BaseSchemaGenerator._generate_index_name` to generate index name. - Use subquery for count() and exists() in `QuerySet` to match count result to `QuerySet` result. Changed - Change `utils.chunk` from function to return iterables lazily. - Removed lower bound of id keys in generated pydantic models. - Rename Field initial arguments `pk`/`index` to `primary_key`/`db_index`. - Renamed `Model.check` method to `Model._check` to avoid naming collision issues Breaking Changes - `bulk_create` now does not return anything.
py-tortoise-orm: updated to 0.20.1 0.20.1 Added - Add binary compression support for `UUIDField` in `MySQL`. - Only `Model`, `Tortoise`, `BaseDBAsyncClient`, `__version__`, and `connections` are now exported from `tortoise` - Add parameter `validators` to `pydantic_model_creator`. Fixed - Fix order of fields in `ValuesListQuery` when it has more than 10 fields. - Fix pydantic v2 pydantic_model_creator nullable field not optional. - Fix pydantic v2.5 unittest error. - Fix pydantic_model_creator `exclude_readonly` parameter not working. - Fix annotation propagation for non-filter queries.
py-tortoise-orm: updated to 0.20.0 0.20.0 ------ Added ^^^^^ - Allow ForeignKeyField(on_delete=NO_ACTION) - Support `pydantic` 2.0. Fixed ^^^^^ - Fix foreign key constraint not generated on MSSQL Server. - Fix testcase error with python3.11 Breaking Changes ^^^^^^^^^^^^^^^^ - Drop support for `pydantic` 1.x. - Drop support for `python` 3.7. - Param `config_class` of `pydantic_model_creator` is renamed to `model_config`. - Attr `config_class` of `PydanticMeta` is renamed to `model_config`. 0.19 ==== 0.19.3 ------ Added ^^^^^ - Added config_class option to pydantic model genator that allows the developer to customize the generated pydantic model's `Config` class. Fixed ^^^^^ - Fastapi example test not working. - Fix create index sql error. - Fix dependencies resolve error. - Fix ignoring zero value of limit. - Fix ForeignKeyField is none when fk is integer 0. - Fix limit ignore zero. - Fix min/max value validators for decimal fields. 0.19.2 ------ Added ^^^^^ - Added `schema` attribute to Model's Meta to specify exact schema to use with the model. Fixed ^^^^^ - Mixin does not work. - `using_db` wrong position in model shortcut methods. - Fixed connection to `Oracle` database by adding database info to DBQ in connection string. - Fixed ORA-01435 error while using `Oracle` database - Fixed processing of `ssl` option in MySQL connection string. - Fixed type hinting for `QuerySetSingle`. 0.19.1 ------ Added ^^^^^ - Added `Postgres`/`SQLite` partial indexes support. - Added `Microsoft SQL Server`/`Oracle` support, powered by `asyncodbc <https://github.com/tortoise/asyncodbc>`_, note that which is **not fully tested**. - Added `optional` parameter to `pydantic_model_creator`. - Added `using_db` parameter to `Model` shortcut methods. Fixed ^^^^^ - `TimeField` for `MySQL` will return `datetime.timedelta` object instead of `datetime.time` object. - Fix on conflict do nothing. - Fix `_custom_generated_pk` attribute not set in `Model._init_from_db` method. 0.19.0 ------ Added ^^^^^ - Added psycopg backend support. - Added a new unified and robust connection management interface to access DB connections which includes support for lazy connection creation and much more. For more details, check out this `PR <https://github.com/tortoise/tortoise-orm/pull/1001>`_ - Added `TimeField`. - Added `ArrayField`. Fixed ^^^^^ - Fix `bulk_create` doesn't work correctly with more than 1 update_fields. - Fix `bulk_update` errors when setting null for a smallint column on postgres. Deprecated ^^^^^^^^^^ - Existing connection management interface and related public APIs which are deprecated: - `Tortoise.get_connection` - `Tortoise.close_connections` Changed ^^^^^^^ - Refactored `tortoise.transactions.get_connection` method to `tortoise.transactions._get_connection`. Note that this method has now been marked **private to this module and is not part of the public API**
databases: Replace RMD160 checksums with BLAKE2s checksums All checksums have been double-checked against existing RMD160 and SHA512 hashes The following distfiles could not be fetched (some may be only fetched conditionally): ./databases/cstore/distinfo D6.data.ros.gz ./databases/cstore/distinfo cstore0.2.tar.gz ./databases/cstore/distinfo data4.tar.gz
databases: Remove SHA1 distfile hashes
py-tortoise-orm: updated to 0.16.21 0.16.21 - Fixed validating JSON before decoding. - Add model method `update_or_create`. - Add `batch_size` parameter for `bulk_create` method. - Fix save with F expression and field with source_field.
py-tortoise-orm: updated to 0.16.20 0.16.20 - Add model field validators. - Allow function results in group by.
py-tortoise-orm: updated to 0.16.19 0.16.19 - Replace set `TZ` environment variable to `TIMEZONE` to avoid affecting global timezone. - Allow passing module objects to `models_paths` param of `Tortoise.init_models()`. - Implement `PydanticMeta.backward_relations`. - Allow overriding `PydanticMeta` in `PydanticModelCreator`. - Fixed make_native typo to make_naive in timezone module
py-tortoise-orm: updated to 0.16.18 0.16.18 Support custom function in update. Add Model.refresh_from_db. Add timezone support, be careful to upgrade to this version, see docs for details. Remove aerich in case of cyclic dependency.
py-tortoise-orm: updated to 0.16.17 0.16.17 Add on_delete in ManyToManyField. Support F expression in annotate. Fix QuerySet.select_related in case of join same table twice. Integrate Aerich into the install.
py-tortoise-orm: updated to 0.16.16 0.16.16 Fixed inconsistency in integrity error exception of FastAPI add OSError to _get_comments except block
py-tortoise-orm: updated to 0.16.15 0.16.15 Make DateField accept valid date str. Add QuerySet.select_for_update(). check default for not None on pydantic model creation propagate default to pydantic model Add QuerySet.select_related(). Add custom attribute name for Prefetch instruction. Add db_constraint for RelationalField family.
py-tortoise-orm: updated to 0.16.14 0.16.14 Make F expression work with QuerySet.filter(). Include py.typed in source distribution. Added datetime parsing from int for fields.DatetimeField. get_or_create passes the using_db= on if provided. Allow custom loop and connection_class parameters to be passed on to asyncpg.
py-tortoise-orm: updated to 0.16.13 0.16.13 Default install of tortoise-orm now installs with no C-dependencies, if you want to use the C accelerators, please do a pip install tortoise-orm[accel] instead. Added <instance>.clone() method that will create a cloned instance in memory. To persist it you still need to call .save() .clone() will raise a ParamsError if tortoise can’t generate a primary key. In that case do a .clone(pk=<newval>) If manually setting the primary key value to None and the primary key can be automatically generated, this will create a new record. We however still recommend the .clone() method instead. .save() can be forced to do a create by setting force_create=True .save() can be forced to do an update by setting force_update=True Setting update_fields for a .save() operation will strongly prefer to do an update if possible
py-tortoise-orm: added version 0.16.12 Tortoise ORM is an easy-to-use asyncio ORM (Object Relational Mapper) inspired by Django. Tortoise ORM was build with relations in mind and admiration for the excellent and popular Django ORM. It's engraved in it's design that you are working not with just tables, you work with relational data.