Skip to content

Commit

Permalink
chore(objects): remove noisy deprecation warning for audit events
Browse files Browse the repository at this point in the history
It's mostly an internal thing anyway and can be removed in 3.0.0
  • Loading branch information
nejch committed Apr 25, 2021
1 parent cfc42d2 commit 2953642
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions gitlab/v4/objects/audit_events.py
Expand Up @@ -2,8 +2,6 @@
GitLab API:
https://docs.gitlab.com/ee/api/audit_events.html
"""
import warnings

from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import RetrieveMixin

Expand Down Expand Up @@ -43,29 +41,13 @@ class GroupAuditEventManager(RetrieveMixin, RESTManager):
class ProjectAuditEvent(RESTObject):
_id_attr = "id"

def __init_subclass__(self):
warnings.warn(
"This class has been renamed to ProjectAuditEvent "
"and will be removed in a future release.",
DeprecationWarning,
2,
)


class ProjectAuditEventManager(RetrieveMixin, RESTManager):
_path = "/projects/%(project_id)s/audit_events"
_obj_cls = ProjectAuditEvent
_from_parent_attrs = {"project_id": "id"}
_list_filters = ("created_after", "created_before")

def __init_subclass__(self):
warnings.warn(
"This class has been renamed to ProjectAuditEventManager "
"and will be removed in a future release.",
DeprecationWarning,
2,
)


class ProjectAudit(ProjectAuditEvent):
pass
Expand Down

0 comments on commit 2953642

Please sign in to comment.