Skip to content

Releases: dymmond/edgy

Version 0.36.1

Choose a tag to compare

@devkral devkral released this 31 Aug 16:05
0.36.1
00bf8b2

Fixed

  • Fix copying model without a registry and adding it to one when its meta.registry equals None.
  • Fix CompositeField handling of Mappings.

Version 0.36.0

Choose a tag to compare

@devkral devkral released this 25 Aug 07:09
0.36.0
08f972e

Added

  • Support for unconstraint numeric mode of postgresql for DecimalField.
  • Add the bulk_update_or_create operation to querysets.
  • Add the update_embed_parent operation to querysets.
  • Add the ignore_conflicts parameter to bulk_create.
  • Add relationship signals (pre/post_relation_add and pre/post_relation_remove).
  • Add bulk signals (pre/post_bulk).
  • Add SkipOperation exception for signals.
  • Add injected_filters parameter for pre_delete to dynamically inject protection rules.
  • Allow lazy references for ForeignKey and ManyToMany. This is useful for libraries.
  • Add dirty tracking.

Changed

  • DecimalField supports now also None for decimal_places and max_digits.
    It emits an UserWarning and falls back to None for each of both parameters not provided.
  • bulk_get_or_create mirrors now get_or_create and returns a list with (instance, created) tuples. The returned instances are not always complete.
  • CombinedQuerySet is moved from edgy.core.db.queryset.mixins.combined to edgy.core.db.queryset.combined. It is not a mixin.
  • The bulk operations are moved to a mixin.
  • The typings changed for QuerySet: it is now a Generic.
  • The typings changed for QuerySetType: EdgyEmbedTarget and EdgyModel (the queryset model) are switched in the Generic definition.
  • Bulk operations are now keywords only (except the first objs parameter).
  • Dedupe bulk_create, bulk_get_or_create, and bulk_update_or_create inputs.
  • Refactor QueryExecutor so it can update itself.
  • real_save, raw_delete and delete are now keyword only to prevent bad overwrites.
  • Remove the skip_post_delete_hooks parameter from delete as it is for internal use and shouldn't be exposed.
  • (Internal detail only) bypass the overwritten __getattr__, __getattribute__ and __setattr__ for speed improvements.

Fixed

  • Relations did not use the tenancy/used schema properly when querying.
  • Bulk operations with reflected fields did not always work properly.
  • run_concurrently now properly cleans up not executed coroutines in case of an error.
  • SuspiciousFileOperation inherits now correctly from EdgyException.
  • Return row count for update.
  • Fix get_created_time, get_modified_time and get_accessed_time on filesystem storage. Previously it used a non-existing setting and didn't follow the specs.
  • Comparing reflected models.
  • Directly issuing queries on through models of ManyToMany.

Version 0.35.11

Choose a tag to compare

@devkral devkral released this 29 Jun 23:24
0.35.11
0bacc83

Fixed

  • Improved typings for QuerySet.
  • bulk_get_or_create supports now officially also other types than lists and is exposed in QuerySetType.
  • Update .gitignore.

Version 0.35.10

Choose a tag to compare

@tarsil tarsil released this 05 Mar 10:04
5846126

Added

  • Add explicit SQLAlchemy compatibility mode via SQLAlchemyModelMixin for opted-in models.
    This enables SQLAlchemy Core expressions such as select(Model.id).where(Model.id == value).
  • Add foreign key scalar alias support in compatibility mode (for example Model.owner_id).
  • Compatibility mode can be declared once on an abstract base model and inherited by concrete models.

Fixed

  • Preserve existing Edgy query behavior for non-opted-in models and relationship handling.

Version 0.35.9

Choose a tag to compare

@tarsil tarsil released this 26 Feb 17:38
459003e

Fixed

  • Missing table_prefix when ManyToMany is declared.

Version 0.35.8

Choose a tag to compare

@tarsil tarsil released this 26 Feb 10:29
392561d

Added

  • where, select, select or none
    and insert as idiomatic alternatives to filter, get, get_or_none and create.
  • table_prefix is now allowed in the Meta of models. This allows to prefix tables and inherit any prefix to related models.
    This is useful for multi-tenancy and sharding.

Fixed

  • Contrib parsing of UUID was not working correctly.
  • CSS of Edit of a model.

Version 0.35.7

Choose a tag to compare

@tarsil tarsil released this 13 Feb 14:52

Changed

  • Fix internal typing search for SQLAlchemy.

Version 0.35.6

Choose a tag to compare

@tarsil tarsil released this 13 Feb 14:18
d4ff30e

Changed

  • Fix queryset bulk calls with empty iterable.
  • Rename to esmerald references to ravyn.
  • Update import references.

Version 0.35.5

Choose a tag to compare

@tarsil tarsil released this 29 Nov 14:50
d08489a

Fixed

  • Resolved duplicate row issues when combining Q expressions with | (global OR).
    Edgy now correctly collapses duplicates at hydration level for non-embedded querysets.
  • .count() now returns the correct number of logical rows when OR or join-fan-out is present
    (uses COUNT(DISTINCT pk) automatically when required).
  • Fixed incorrect behaviour where OR clauses polluted .exists() uniqueness checks.
  • Ensured select_related() does not introduce duplicate rows under OR or complex joins.
  • Fixed values() and values_list() returning duplicated logical rows when OR joins were involved.
  • first() and last() now operate on deduped results in OR scenarios.
  • Prevented ManyToMany and embedded relation querysets from being deduped incorrectly
    (avoid breaking album.tracks.all() and similar accessors).
  • Stabilised internal OR/local_OR clause handling to ensure consistent join inference.

Version 0.35.4

Choose a tag to compare

@tarsil tarsil released this 25 Nov 15:23
69bcb3b

Added

  • Support for queryset_class in the managers. This allows to override the default Queryset with a custom one.
    This is useful when we need to have nested querysets that relies on an initial manager to be custom.

Example

from edgy import Manager, QuerySet

class CustomQuerySet(QuerySet):

  def filter(...):
    ...


class CustomManager(Manager):
  queryset_class = CustomQuerySet