Skip to content

"'ProjectRelease' object has no attribute 'delete'" #3240

@nickbroon

Description

@nickbroon

Description of the problem, including code/CLI snippet

The API documentation examples suggest that a release can be deleted directly:

# via its tag name from project attributes
release = project.releases.delete('v1.2.3')

# delete object directly
release.delete()

However when I use release.delete() directly I get the following error:

'ProjectRelease' object has no attribute 'delete'

Looking at code I see that ProjectRelease only uses the SaveMixin and RestObject Mixins, but not the DeleteMixin or ObjectDeleteMixin. (though ProjectRegistryTagManager does use the DeleteMixin so release can deleted using the first example).

It's not clear to me if documentation example should fix to remove direct call, or if ProjectRelease updated to include the use of a Delete Mixin....

Expected Behavior

Directly delete an release object with release.delete()

Actual Behavior

Fails with: 'ProjectRelease' object has no attribute 'delete'

Specifications

  • python-gitlab version: 6.2.0
  • Gitlab server version (or gitlab.com): GitLab.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions