Subject: CVS commit: pkgsrc/www/py-django-import-export
From: Adam Ciarcinski
Date: 2024-05-06 10:13:24
Message id: 20240506081324.6BACEFA2C@cvs.NetBSD.org

Log Message:
py-django-import-export: updated to 4.0.0

4.0.0 (2024-04-27)

Version 4 introduces breaking changes.  Please refer to :doc:`release \ 
notes<release_notes>`.

Deprecations

- Removed v3 deprecations
- Deprecation of ``ExportViewFormMixin``

Enhancements

- Refactor ordering logic

  - Refactor 'diff' logic to avoid calling dehydrate methods

  - Refactor declarations of ``fields``, ``import_order`` and ``export_order`` \ 
to fix ordering issues

- refactor to export HTML / formulae escaping updates
- removed unused variable ``Result.new_record``
- Refactor ``resources.py`` to standardise method args
- added specific check for missing ``import_id_fields``
- Enable optional tablib dependencies
- added :meth:`~import_export.widgets.ForeignKeyWidget.get_lookup_kwargs` to \ 
make it easier to override object lookup
- Standardised interface of :meth:`~import_export.widgets.Widget.render`
- Fix declaring existing model field(s) in ModelResource altering export order
- Added :meth:`~import_export.resources.Resource.do_instance_save` helper method
- Enable defining Resource model as a string
- Support multiple Resources for export
- Support export from model change form
- Import form defaults to read-only field if only one format defined
- Updated Admin UI to track deleted and skipped Imports
- Added customizable ``MediaStorage``
- Added customization of Admin UI import error messages
- Improve output of error messages
- Added feature: selectable fields for admin export view
- Added specific check for declared \ 
:attr:`~import_export.options.ResourceOptions.import_id_fields` not in dataset
- added try / catch to \ 
:meth:`~import_export.results.RowResult.add_instance_info` to handle \ 
unserializable instances
- Add form error if source file contains invalid header
- Remove unneeded format method overrides
- Support dynamic selection of Resource class based on request property

Fixes

- dynamic widget parameters for CharField fixes 'NOT NULL constraint' error in xlsx
- fix cooperation with adminsortable2
- Removed unused method ``utils.original()``
- Fix deprecated ``log_action`` method
- fix multiple inheritance not setting options
- Fix issue where declared Resource fields not defined in ``fields`` are still \ 
imported
- Fixed handling of :attr:`~import_export.exceptions.FieldError` during Admin import
- Fixed handling of django ``FieldError`` during Admin export
- Add check for type to :meth:`~import_export.widgets.Widget.render`
- fix: YAML export does not work with SafeString
- fix: :meth:`~import_export.widgets.SimpleArrayWidget.render` crashes if value \ 
is ``None``
- fix form not being passed to ``get_import_resource_kwargs()``
- Fix: Missing default widget for ``PositiveBigIntegerField``

Development

- Refactor build process
- Refactored ``test_admin_integration()``: split into smaller test modules
- Refactored ``test_resources()``: split into smaller test modules
- Updated ``docker-compose`` command with latest version syntax in ``runtests.sh``
- Refactored :mod:`~import_export.resources` into separate modules for \ 
``declarative`` and ``options``
- Refactored tests to remove dependencies between tests
- Handle python3.12 datetime deprecations
- Refactor ``test_resources.py`` into smaller modules
- Updated test coverage to include error row when ``collect_failed_rows`` is ``True``
- Removed support for django 3.2
- Added test for widgets generating by model fields

Documentation

- Clarified ``skip_diff`` documentation
- Improved documentation relating to validation on import
- Added FAQ entry for exporting large datasets
- Relocated admin integration section from advanced_usage.rst into new file
- Updated Admin integration documentation to clarify how to save custom form values

Performance

- Fix slow export with ForeignKey id

i18n

- updated translations for release-4

Files:
RevisionActionfile
1.25modifypkgsrc/www/py-django-import-export/Makefile
1.11modifypkgsrc/www/py-django-import-export/PLIST
1.22modifypkgsrc/www/py-django-import-export/distinfo