Skip to content

Conversation

adamchainz
Copy link
Contributor

@adamchainz adamchainz commented Jul 8, 2024

Problem

The existing warning added in #1667 did not reveal which class used the deprecated mixin.

Solution

Transform this warning to run at class definition time using object.__init_subclass__. Then the deprecated line is shown as the point of class definition.

Acceptance Criteria

Tested in my own project. Modified the tests here, though none check the warning message.

@adamchainz adamchainz force-pushed the improve_mixin_warning branch from ebb3e5c to 808877b Compare July 8, 2024 20:30
@adamchainz adamchainz marked this pull request as ready for review July 8, 2024 20:30
@adamchainz adamchainz force-pushed the improve_mixin_warning branch from 808877b to a9ca23f Compare July 8, 2024 21:19
@coveralls
Copy link

Coverage Status

coverage: 100.0%. remained the same
when pulling a9ca23f on adamchainz:improve_mixin_warning
into afd099f on django-import-export:main.

@matthewhegarty matthewhegarty merged commit b3fd18d into django-import-export:main Jul 9, 2024
@adamchainz adamchainz deleted the improve_mixin_warning branch July 22, 2024 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants