Edgy

Latest version: v0.23.3

Safety actively analyzes 682457 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 8

0.17.4

Fixed

- `model_dump_json` returns right result.
- `show_pk=False` can now be used to disable the inclusion of pk fields regardless of `__show_pk__`.
- `__setattr__` is called after insert/update. We have transform_input already.

0.17.3

Fixed

- Lazy ManyToMany fields.

0.17.2

Added

- `build_where_clause` method in QuerySet for easing the integration in raw SQLAlchemy queries.

Fixed

- `update` and `delete` methods of QuerySet did ignore or clauses.
- Fixed ManyToMany fields not able to use their Owner Model as target.
- Fixed makemigration failing with foreignkeys when using model_apps.

0.17.1

Added

- `CURRENT_MODEL_INSTANCE` ContextVariable which always point to a model instance.

Fixed

- Under circumstances it was possible for the assigned database attribute to appear as value.
- Typings of some (class) properties are now correctly detected.
- FileFields doesn't need an explicit `to_file` call assignment anymore to work with revisions. This restriction was lifted.
- Execute database operation of `bulk_update` in right scope.

0.17.0

Added

- Support for querying across multiple databases.
- Support for passing functions as clauses or keyword parameters.
- Support for autocreated reflection objects by pattern matching.
- Added some context variables for `extract_column_values` and `transform_input`:
- `CURRENT_PHASE`: allows retrieving the current context in which it was executed.
- `EXPLICIT_SPECIFIED_VALUES`: when set, it returns a set of the keys from the explicitly specified values.

Changed

- `crawl_relationship` has a slightly changed interface: it has `cross_db_remainder` as kwarg for callbacks and in the result.
Also it doesn't raise NotImplementedError anymore when detecting a crossdb situation.
- `is_cross_db` optionally gets a database as parameter and compares the databases instead of registries.
- Relax fields parameter requirements for values/values_list.
- More lazy meta/metadata.
- `database` attribute of models is used for queries instead of the main database of the registry.
- We use more metaclass kwarg arguments.
- Switch to python >= 3.9.
- Rename internal `_is_init` of MetaInfo to `_fields_are_initialized`.
- `phase` argument is shifted to `CURRENT_PHASE` context_var. If you rely on the correct phase you need to use it instead.
- `extract_column_values` provides now also a `CURRENT_PHASE` environment.
- `is_update` argument of `get_defaults` is now replaced by `CURRENT_PHASE` too. It is way more accurate.
- Deprecate `force_save` kwarg of save in favor of `force_insert`. This is way more precise.
- `post_save_callback` receives now also the `force_insert` parameter.

Fixed

- Fix ForeignKey not None but empty hull under some conditions.
- Fix DecimalField requiring `max_digits`.

0.16.0

Added

- ASGI, async context manager support to connect/disconnect multiple dbs at once.
- `create_all`/`drop_all`, `create_schema`/`drop_schema` are now capable of initializing dbs in extra.
- Add `transaction` helper to Model and QuerySet.
- Allow copying models properly.
- Allow None as default.

Changed

- Unify `using` to allow setting schema and database via keyword arguments and deprecate both former calls.

Fixed

- Esmerald typing issues.
- Migration metadata was not completely initialized which caused problems.
- Foreign keys None/null handling was inconsistent. Now we have a None for unset foreign keys.

Page 3 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.