Edgy

Latest version: v0.28.1

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

Scan your dependencies

Page 1 of 10

0.28.1

Changed

- `hash_names` has now two prefix parameters: `inner_prefix`, `outer_prefix`.

Fixed

- `hash_names` with unique_together incorrectly fed the `uc` prefix into the hasher. This makes the names unidentificatable.
- `BooleanField` logic for automatic migrations works by using server_default.

0.28.0

Added

- `null-field` or `nf` parameter for makemigrations/revision.
- Add `FORCE_FIELDS_NULLABLE` ContextVar.
- Add `CURRENT_FIELD_CONTEXT` ContextVar.
- Add automigrations (migrations capsuled in Registry).

Changed

- The default migration templates allow now to use complex defaults for migrations.
- Fields must use get_columns_nullable instead of ColumnDefinitionModel null. for determining if the columns should be nullable.
- For model `save` and `update` the values can be callables which are evaluated.
- Streamline ContentTypeField in using a parameter-less default function. Use `CURRENT_FIELD_CONTEXT` ContextVar field for referencing the owner.
- Fail when specifying a server_default for ForeignKey, ManyToMany, FileField, ImageField. This is not possible.
- Internals: _insert and _update have now a different signature.

Fixed

- ForeignKeys aren't required to be saved models when passed.
- Cli command revision takes now also the arg argument.
- Revisioning works now with relative revisions with - (e.g. -2).
- Downgrades are now possible with unique_together. Build a constraint name from the fields.
- `is_partial` was incorrectly set to always `False` for the model.save update path.
- FileFields could have make problems when migrating.
- Differing ruff versions and rules between `hatch fmt` and `pre-commit`.

0.27.3

Added

- `bulk_get_or_create` to queryset allowing to bulk inserting or getting existing objects.

Fixed

- BooleanField typing. Thanks to Izcarmt95.

0.27.2

Chamged

- Edgy now allows inheritance of `unique_together` and `indexes` from abstract classes.

Fixed

- Typo in `BaseContentTypeField` from `BaseContentTypeFieldField`.

0.27.1

Added

- `SubFactory` in the model factory helpers allowing to import ModelFactory objects from other parts of the codebase and apply them directly as dependencies.
- New `template` to `edgy init` migrations for [sequencial](./migrations/migrations.mdtemplates) migration file names.
- Sequences like calls for ModelFactory.
- `context` as new parameter to the Marshalls.

Changed

- The faker argument was switched out to `context`. The `context` parameter however behaves like a faker instance.

Fixed

- `exclude_autoincrement` argument applies now also for the sub-factories. Previously we would have need to provide the parameters.

0.27.0

Changed

- Added a new table naming schema for through models of ManyToMany fields. This requires however setting
an explicit table naming schema via the `through_tablename` parameter.
- When `through_tablename` is a string, it is formatted with the field injected as field in the context.

Fixed

- Multiple ManyFields from the same model to the same target model. Note: this is unrelated to `related_name`, setting the
the `related_name` would not help.

BREAKING

For now ManyToMany fields **must** explicitly have a `through_tablename` parameter in which
the table naming schema for the through model is selected.
For existing ManyToMany fields you should pass `edgy.OLD_M2M_NAMING"` so migrations doesn't drop the tables,
for new ManyToMany fields `edgy.NEW_M2M_NAMING"` which prevents clashes of through model names.
You may can also rename the through model table via migration and use the `edgy.NEW_M2M_NAMING"`
or simply use a non-empty string for the `through_tablename` parameter.

Page 1 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.