Project

Profile

Help

Task #3704

closed

Make MasterModel attributes private using leading underscores

Added by bmbouter almost 6 years ago. Updated about 5 years ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Motivations

1. Avoiding attribute naming collisions when content writer's subclass Content.

2. Allow users to easily see which attributes are from pulpcore and therefore common to all content types.

Changes

Rename the MasterModel fields here in the following ways:

created -> _created
id -> _id
last_updated -> _last_updated

Also for the Content model itself

notes -> _notes
artifacts -> _artifacts

Details

After making ^ change, go through pulp/pulp and update any references to the old field names. Once Pulp-smash passes w/ the new field names, you're done.

This will be a backwards incompatible Beta change for both plugin writers and users. As such, the PR needs the 'breaking-changes', 'rest-API', and 'plugin-writer' labels.

Also available in: Atom PDF