pulp / pulp/pulpcore

Refactor serializer field mixins to avoid diamond inheritance problem

Open
#1,875 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Task
Dominant language
Python
Stars
598
Forks
168
Avg merge
1d 4h
Merged PRs (30d)
86

Description

Author: daviddavis (daviddavis)

Redmine Issue: 6389, https://pulp.plan.io/issues/6389


Some of the mixins in app/serializers/fields.py define __init__ methods which can cause problems with classes that inherit from them. Refactor them so they no longer do this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading app/serializers/fields.py and locating the mixins that define init methods. Trace the serializer classes that inherit from them and identify how those initializers interact under multiple inheritance. The work is done when the mixins no longer cause diamond-inheritance problems without breaking affected serializer behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.