setup-pureos-pkg-repo: ProjectBranch object has no attribute protect
With python3-gitlab 1:3.12.0-1 the setup-pureos-pkg-repo is unhappy:
$ setup-pureos-pkg-repo -i 166
setup-pureos-pkg-repo:102: DeprecationWarning: `as_list=False` is deprecated and will be removed in a future version. Use `iterator=True` instead. (python-gitlab: /usr/lib/python3/dist-packages/gitlab/client.py:917)
projects = gl.projects.list(as_list=False)
Traceback (most recent call last):
File "/home/fortysixandtwo/git/librem5-dev-tools/setup-pureos-pkg-repo", line 199, in <module>
sys.exit(main(sys.argv))
^^^^^^^^^^^^^^
File "/home/fortysixandtwo/git/librem5-dev-tools/setup-pureos-pkg-repo", line 130, in main
def_branch.protect()
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/gitlab/base.py", line 134, in __getattr__
raise AttributeError(message)
AttributeError: 'ProjectBranch' object has no attribute 'protect'. Did you mean: 'protected'?
>>> def_branch = project.branches.get('pureos/latest')
>>> def_branch.
def_branch.asdict( def_branch.developers_can_push def_branch.pprint()
def_branch.attributes def_branch.encoded_id def_branch.project_id
def_branch.can_push def_branch.get_id() def_branch.protected
def_branch.commit def_branch.manager def_branch.to_json(
def_branch.default def_branch.merged def_branch.web_url
def_branch.delete( def_branch.name
def_branch.developers_can_merge def_branch.pformat()
So there is now the protected
attribute, but the protect()
method seems to have moved elsewhere.
The upstream change is here.