[ckan-changes] [ckan/ckan] 8afd28: Remove statefulness from package extras

David Read noreply at github.com
Fri Mar 15 16:37:20 UTC 2019


  Branch: refs/heads/integrate-vdm-stateful
  Home:   https://github.com/ckan/ckan
  Commit: 8afd288e71678146ad1e90bd2e60bc0e2675ce7a
      https://github.com/ckan/ckan/commit/8afd288e71678146ad1e90bd2e60bc0e2675ce7a
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-03-15 (Fri, 15 Mar 2019)

  Changed paths:
    M ckan/lib/dictization/model_save.py
    M ckan/model/package_extra.py
    M ckan/model/resource.py

  Log Message:
  -----------
  Remove statefulness from package extras

* This is part of getting rid of vdm.
* We don't need to store state in PackageExtra any more because you can view the history via activity stream, since it now stores the full package_dict #3972. (The package_extra_revision table will be used to migrate old versions of the package to activity_streams migrate_package_activity.py. But from this version of CKAN, we do not need to record PackageExtra.stateit any more.)
* The mapping between PackageExtra and Package is now a simply dict i.e. attribute_mapped_collection - not a vdm StatefulDict any more.
* vdm's OurAssociationProxy is replaced by the vanilla sqlalchemy association_proxy - I'm not clear why we had to prevent scalars being assigned in the first place since it is a dict mapping, not a scalar mapping. Seems ok.
* package_extras_save() no longer needs to add and remove PackageExtra objects carefully changing the state, we can simply replace them with fresh objects.
* package_no_state/extras_list is no longer needed because it was only used by package_extras_save()




More information about the ckan-changes mailing list