CHANGELOG

v5.0.0 (2024-10-28)

Breaking

  • feat: remove support for Python 3.8, require 3.9 or higher (#3005)

Python 3.8 is End-of-Life (EOL) as of 2024-10 as stated in https://devguide.python.org/versions/ and https://peps.python.org/pep-0569/#lifespan

By dropping support for Python 3.8 and requiring Python 3.9 or higher it allows python-gitlab to take advantage of new features in Python 3.9, which are documented at: https://docs.python.org/3/whatsnew/3.9.html

Closes: #2968

BREAKING CHANGE: As of python-gitlab 5.0.0, Python 3.8 is no longer supported. Python 3.9 or higher is required. (9734ad4)

Bug Fixes

  • fix(api): set _repr_attr for project approval rules to name attr (#3011)

Co-authored-by: Patrick Evans patrick.evans@gehealthcare.com (1a68f1c)

Chores

  • chore: add testing of Python 3.14

Also fix annotations not working in Python 3.14 by using the annotation on the ‘class’ instead of on the ‘instance’

Closes: #3013 (14d2a82)

  • chore(deps): update dependency ubuntu to v24 (6fda15d)

  • chore(deps): update all non-major dependencies (1e4326b)

  • chore(deps): update gitlab/gitlab-ee docker tag to v17.5.0-ee.0 (c02a392)

  • chore: add Python 3.13 as supported (#3012)

Mark that Python 3.13 is supported.

Use Python 3.13 for the Mac and Windows tests.

Also remove the ‘py38’ tox environment. We no longer support Python 3.8. (b565e78)

  • chore: remove “v3” question from issue template (#3017)

python-gitlab hasn’t supported the GitLab v3 API since 2018. The last version of python-gitlab to support it was v1.4

Support was removed in:

commit fe89b949922c028830dd49095432ba627d330186 Author: Gauvain Pocentek gauvain@pocentek.net Date: Sat May 19 17:10:08 2018 +0200

Drop API v3 support

Drop the code, the tests, and update the documentation. ([`482f2fe`](https://github.com/python-gitlab/python-gitlab/commit/482f2fe6ccae9239b3a010a70969d8d887cdb6b6))
  • chore(deps): update all non-major dependencies (b3834dc)

  • chore(deps): update gitlab/gitlab-ee docker tag to v17.4.2-ee.0 (1cdfe40)

Documentation

  • docs(users): update Gitlab docs links (#3022) (3739b5d)

Testing

  • test: add test for to_json() method

This should get us to 100% test coverage on gitlab/base.py (f4bfe19)

v4.13.0 (2024-10-08)

Chores

  • chore(deps): update dependency pre-commit to v4 (#3008)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> (5c27546)

  • chore(deps): update all non-major dependencies (c3efb37)

Features

  • feat(api): add support for project Pages API (0ee0e02)

v4.12.2 (2024-10-01)

Bug Fixes

  • fix: raise GitlabHeadError in project.files.head() method (#3006)

When an error occurs, raise GitlabHeadError in project.files.head() method.

Closes: #3004 (9bf26df)

v4.12.1 (2024-09-30)

Bug Fixes

  • fix(ci): do not rely on GitLab.com runner arch variables (#3003) (c848d12)

  • fix(files): correctly raise GitlabGetError in get method (190ec89)

Chores

  • chore(deps): update all non-major dependencies (#3000)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> (d3da326)

  • chore(deps): update gitlab/gitlab-ee docker tag to v17.4.1-ee.0 (64eed5d)

v4.12.0 (2024-09-28)

Bug Fixes

  • fix(api): head requests for projectfilemanager (#2977)

  • fix(api): head requests for projectfilemanager


Co-authored-by: Patrick Evans patrick.evans@gehealthcare.com Co-authored-by: Nejc Habjan hab.nejc@gmail.com (96a18b0)

Chores

  • chore(deps): update all non-major dependencies (ae132e7)

  • chore: update pylint to 3.3.1 and resolve issues (#2997)

pylint 3.3.1 appears to have added “too-many-positional-arguments” check with a value of 5.

I don’t disagree with this, but we have many functions which exceed this value. We might think about converting some of positional arguments over to keyword arguments in the future. But that is for another time.

For now disable the check across the project. (a0729b8)

  • chore(deps): update dependency types-setuptools to v75 (a2ab54c)

  • chore(deps): update gitlab/gitlab-ee docker tag to v17.4.0-ee.0 (8601808)

  • chore(deps): update all non-major dependencies (10ee58a)

  • chore(deps): update gitlab/gitlab-ee docker tag to v17.3.2-ee.0 (5cd1ab2)

Features

  • feat(build): build multi-arch images (#2987) (29f617d)

  • feat: introduce related_issues to merge requests (#2996) (174d992)

v4.11.1 (2024-09-13)

Bug Fixes

  • fix(client): ensure type evaluations are postponed (b41b2de)

v4.11.0 (2024-09-13)

Chores

  • chore(pre-commit): add deps (fe5e608)

  • chore(deps): update all non-major dependencies (fac8bf9)

  • chore(deps): update dependency types-setuptools to v74 (bdfaddb)

  • chore(deps): update all non-major dependencies (88c7529)

Documentation

  • docs(objects): fix typo in get latest pipeline (b9f5c12)

Features

  • feat(client): make retries configurable in GraphQL (145870e)

  • feat(client): add retry handling to GraphQL client (8898c38)

  • feat(api): add exclusive GET attrs for /projects/:id/members (e637808)

  • feat: add a minimal GraphQL client (d6b1b0a)

  • feat(api): add exclusive GET attrs for /groups/:id/members (d44ddd2)

Refactoring

  • refactor(client): move retry logic into utility (3235c48)

v4.10.0 (2024-08-28)

Chores

  • chore(release): track tags for renovate (d600444)

  • chore(deps): update python-semantic-release/upload-to-gh-release digest to 17c75b7 (12caaa4)

  • chore(deps): update dependency types-setuptools to v73 (d55c045)

  • chore(deps): update all non-major dependencies (2ade0d9)

  • chore(deps): update gitlab/gitlab-ee docker tag to v17.3.1-ee.0 (3fdd130)

  • chore(deps): update all non-major dependencies (0578bf0)

  • chore(deps): update gitlab/gitlab-ee docker tag to v17.3.0-ee.0 (e5a46f5)

  • chore(deps): update dependency myst-parser to v4 (930d4a2)

  • chore(deps): update dependency sphinx to v8 (cb65ffb)

  • chore(deps): update gitlab/gitlab-ee docker tag to v17.2.2-ee.0 (b2275f7)

  • chore(deps): update all non-major dependencies (31786a6)

Documentation

  • docs(faq): correct the attribute fetching example

There is an example about object attributes in the FAQ. It shows how to properly fetch all attributes of all projects, by using list() followed by a get(id) call.

Unfortunately this example used a wrong variable name, which caused it not to work and which could have made it slightly confusing to readers. This commit fixes that, by changing the variable name.

Now the example uses one variable for two Python objects. As they correspond to the same GitLab object and the intended behavior is to obtain that very object, just with all attributes, this is fine and is probably what readers will find most useful in this context. (43a16ac)

Features

  • feat(api): project/group hook test triggering

Add the ability to trigger tests of project and group hooks.

Fixes #2924 (9353f54)

Testing

  • test(cli): allow up to 30 seconds for a project export

Before we allowed a maximum of around 15 seconds for the project-export. Often times the CI was failing with this value.

Change it to a maximum of around 30 seconds. (bdc155b)

v4.9.0 (2024-08-06)

Chores

  • chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v38 (f13968b)

  • chore(deps): update all non-major dependencies (f95ca26)

  • chore(deps): update dependency types-setuptools to v71 (d6a7dba)

  • chore(deps): update python-semantic-release/upload-to-gh-release digest to 0dcddac (eb5c6f7)

  • chore(deps): update gitlab/gitlab-ee docker tag to v17.2.1-ee.0 (d13a656)

  • chore(deps): update all non-major dependencies (7adc86b)

  • chore(deps): update python-semantic-release/upload-to-gh-release digest to e2355e1 (eb18552)

  • chore(deps): update all non-major dependencies (e820db0)

  • chore(ci): make pre-commit check happy

pre-commit incorrectly wants double back-quotes inside the code section. Rather than fight it, just use single quotes. (67370d8)

Features

  • feat(snippets): add support for listing all instance snippets (64ae61e)

v4.8.0 (2024-07-16)

Bug Fixes

  • fix: issues closed_by()/related_merge_requests() use http_list

The closed_by() and related_merge_requests() API calls return lists. So use the http_list() method.

This will also warn the user if only a subset of the data is returned. (de2e4dd)

  • fix: Have participants() method use http_list()

Previously it was using http_get() but the participants API returns a list of participants. Also by using this then we will warn if only a subset of the participants are returned.

Closes: #2913 (d065275)

  • fix(files): CR: add explicit comparison to None

Co-authored-by: Nejc Habjan hab.nejc@gmail.com (51d8f88)

  • fix(files): make ref parameter optional in get raw file api

The ref parameter was made optional in gitlab v13.11.0. (00640ac)

  • fix(cli): generate UserWarning if list does not return all entries

Previously in the CLI, calls to list() would have get_all=False by default. Therefore hiding the fact that not all items are being returned if there were more than 20 items.

Added --no-get-all option to list actions. Along with the already existing --get-all.

Closes: #2900 (e5a4379)

Chores

  • chore(deps): update gitlab/gitlab-ee docker tag to v17.1.2-ee.0 (6fedfa5)

  • chore(deps): update all non-major dependencies (4a2b213)

  • chore(ci): specify name of “stale” label

Saw the following error in the log: [#2618] Removing the label “Stale” from this issue… ##[error][#2618] Error when removing the label: “Label does not exist”

My theory is that the case doesn’t match (“Stale” != “stale”) and that is why it failed. Our label is “stale” so update this to match. Thought of changing the label name on GitHub but then would also require a change here to the “any-of-labels”. So it seemed simpler to just change it here.

It is confusing though that it detected the label “stale”, but then couldn’t delete it. (44f62c4)

  • chore(ci): stale: allow issues/PRs that have stale label to be closed

If a stale label is manually applied, allow the issue or PR to be closed by the stale job.

Previously it would require the stale label and to also have one of ‘need info’ or ‘Waiting for response’ labels added. (2ab88b2)

  • chore(ci): use codecov token when available (b74a6fb)

  • chore(deps): update python-semantic-release/upload-to-gh-release digest to fe6cc89 (3f3ad80)

  • chore(deps): update all non-major dependencies (0f59069)

  • chore: add show_caller argument to utils.warn()

This allows us to not add the caller’s location to the UserWarning message. (7d04315)

  • chore: use correct type-hint for die() (9358640)

  • chore(deps): update gitlab/gitlab-ee docker tag to v17.1.1-ee.0 (5e98510)

  • chore(deps): update python-semantic-release/upload-to-gh-release digest to c7c3b69 (23393fa)

  • chore(deps): update all non-major dependencies (cf87226)

Documentation

  • docs: document how to use sudo if modifying an object

Add a warning about using sudo when saving.

Give an example of how to get an object, modify it, and then save it using sudo

Closes: #532 (d509da6)

  • docs: variables: add note about filter for updating

Add a note about using filter when updating a variable.

Closes: #2835 Closes: #1387 Closes: #1125 (c378817)

Features

  • feat(api): add support for project cluster agents (32dbc6f)

  • feat(api): add support for container registry protection rules (6d31649)

  • feat(api): add support for package protection rules (6b37811)

  • feat(api): add support for commit sequence (1f97be2)

Refactoring

  • refactor(package_protection_rules): add missing attributes (c307dd2)

Testing

  • test(registry): disable functional tests for unavailable endpoints (ee393a1)

  • test(files): test with and without ref parameter in test case (f316b46)

  • test(files): omit optional ref parameter in test case (9cb3396)

  • test(fixtures): remove deprecated config option (2156949)

v4.7.0 (2024-06-28)

Bug Fixes

  • fix: add ability to add help to custom_actions

Now when registering a custom_action can add help text if desired.

Also delete the VerticalHelpFormatter as no longer needed. When the help value is set to None or some other value, the actions will get printed vertically. Before when the help value was not set the actions would all get put onto one line. (9acd2d2)

Chores

  • chore(deps): update all non-major dependencies (88de2f0)

  • chore(deps): update all non-major dependencies (a510f43)

  • chore(deps): update gitlab/gitlab-ee docker tag to v17.0.2-ee.0 (51779c6)

  • chore(deps): update python-semantic-release/upload-to-gh-release digest to 6b7558f (fd0f0b0)

  • chore(deps): update all non-major dependencies (d4fdf90)

  • chore(deps): update dependency types-setuptools to v70 (7767514)

  • chore(deps): update gitlab/gitlab-ee docker tag to v17.0.1-ee.0 (df0ff4c)

  • chore(deps): update python-semantic-release/upload-to-gh-release digest to 477a404 (02a551d)

  • chore(deps): update all non-major dependencies (d5de288)

  • chore: add a help message for gitlab project-key enable

Add some help text for gitlab project-key enable. This both adds help text and shows how to use the new help feature.

Example:

$ gitlab project-key –help usage: gitlab project-key [-h] {list,get,create,update,delete,enable} …

options: -h, –help show this help message and exit

action: {list,get,create,update,delete,enable} Action to execute on the GitLab resource. list List the GitLab resources get Get a GitLab resource create Create a GitLab resource update Update a GitLab resource delete Delete a GitLab resource enable Enable a deploy key for the project (1291dbb)

  • chore: sort CLI behavior-related args to remove

Sort the list of CLI behavior-related args that are to be removed. (9b4b0ef)

Features

  • feat(api): add support for latest pipeline (635f5a7)

  • feat: add --no-mask-credentials CLI argument

This gives the ability to not mask credentials when using the --debug argument. (18aa1fc)

v4.6.0 (2024-05-28)

Bug Fixes

  • fix(deps): update minimum dependency versions in pyproject.toml

Update the minimum versions of the dependencies in the pyproject.toml file.

This is related to PR #2878 (37b5a70)

  • fix(cli): don’t require --id when enabling a deploy key

No longer require --id when doing: gitlab project-key enable

Now only the –project-id and –key-id are required. (98fc578)

  • fix: don’t raise RedirectError for redirected HEAD requests (8fc13b9)

  • fix: handle large number of approval rules

Use iterator=True when going through the list of current approval rules. This allows it to handle more than the default of 20 approval rules.

Closes: #2825 (ef8f0e1)

  • fix(projects): fix ‘import_project’ file argument type for typings

Signed-off-by: Adrian DC radian.dc@gmail.com (33fbc14)

Chores

  • chore(deps): update python-semantic-release/upload-to-gh-release digest to 673709c (1b550ac)

  • chore(deps): update all non-major dependencies (4c7014c)

  • chore: update commit reference in git-blame-ignore-revs (d0fd5ad)

  • chore(cli): add ability to not add _id_attr as an argument

In some cases we don’t want to have _id_attr as an argument.

Add ability to have it not be added as an argument. (2037352)

  • chore: create a CustomAction dataclass (61d8679)

  • chore: add an initial .git-blame-ignore-revs

This adds the .git-blame-ignore-revs file which allows ignoring certain commits when doing a git blame --ignore-revs

Ignore the commit that requires keyword arguments for register_custom_action()

https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view (74db84c)

  • chore: require keyword arguments for register_custom_action

This makes it more obvious when reading the code what each argument is for. (7270523)

  • chore: remove typing-extensions from requirements.txt

We no longer support Python versions before 3.8. So it isn’t needed anymore. (d569128)

  • chore(deps): update dependency requests to v2.32.0 [security] (1bc788c)

  • chore(deps): update all non-major dependencies (ba1eec4)

  • chore(deps): update gitlab/gitlab-ee docker tag to v17 (5070d07)

  • chore(cli): on the CLI help show the API endpoint of resources

This makes it easier for people to map CLI command names to the API.

Looks like this: $ gitlab –help The GitLab resource to manipulate. application API endpoint: /applications application-appearance API endpoint: /application/appearance application-settings API endpoint: /application/settings application-statistics API endpoint: /application/statistics (f1ef565)

  • chore(cli): add some simple help for the standard operations

Add help for the following standard operations:

  • list: List the GitLab resources

  • get: Get a GitLab resource

  • create: Create a GitLab resource

  • update: Update a GitLab resource

  • delete: Delete a GitLab resource

For example: $ gitlab project-key –help usage: gitlab project-key [-h] {list,get,create,update,delete,enable} …

options: -h, –help show this help message and exit

action: list get create update delete enable Action to execute on the GitLab resource. list List the GitLab resources get Get a GitLab resource create Create a GitLab resource update Update a GitLab resource delete Delete a GitLab resource (5a4a940)

  • chore: correct type-hint for job.trace()

Closes: #2808 (840572e)

  • chore: add type info for ProjectFile.content

Closes: #2821 (62fa271)

Features

  • feat(api): add additional parameter to project/group iteration search (#2796)

Co-authored-by: Cristiano Casella cristiano.casella@seacom.it Co-authored-by: Nejc Habjan hab.nejc@gmail.com (623dac9)

  • feat(api): add support for gitlab service account (#2851)

Co-authored-by: Nejc Habjan hab.nejc@siemens.com (b187dea)

  • feat: more usernames support for MR approvals

I don’t think commit a2b8c8ccfb5d went far enough to enable usernames support. We create and edit a lot of approval rules based on an external service (similar to CODE_OWNERS), but only have the usernames available, and currently, have to look up each user to get their user ID to populate user_ids for .set_approvers() calls. Would very much like to skip the lookup and just send the usernames, which this change should allow.

See: https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-project-level-rule

Signed-off-by: Jarod Wilson jarod@redhat.com (12d195a)

v4.5.0 (2024-05-13)

Bug Fixes

  • fix: Consider scope an ArrayAttribute in PipelineJobManager

List query params like ‘scope’ were not being handled correctly for pipeline/jobs endpoint. This change ensures multiple values are appended with ‘[]’, resulting in the correct URL structure.

Signed-off-by: Guilherme Gallo guilherme.gallo@collabora.com


Background: If one queries for pipeline jobs with scope=["failed", "success"]

One gets: GET /api/v4/projects/176/pipelines/1113028/jobs?scope=success&scope=failed

But it is supposed to get: GET /api/v4/projects/176/pipelines/1113028/jobs?scope[]=success&scope[]=failed

The current version only considers the last element of the list argument.

Signed-off-by: Guilherme Gallo guilherme.gallo@collabora.com (c5d0404)

  • fix(test): use different ids for merge request, approval rule, project

The original bug was that the merge request identifier was used instead of the approval rule identifier. The test didn’t notice that because it used 1 for all identifiers. Make these identifiers different so that a mixup will become apparent. (c23e6bd)

  • fix(api): fix saving merge request approval rules

Closes #2548 (b8b3849)

  • fix: user.warn() to show correct filename of issue

Previously would only go to the 2nd level of the stack for determining the offending filename and line number. When it should be showing the first filename outside of the python-gitlab source code. As we want it to show the warning for the user of the libraries code.

Update test to show it works as expected. (529f1fa)

  • fix(api): update manual job status when playing it (9440a32)

  • fix(cli): allow exclusive arguments as optional (#2770)

  • fix(cli): allow exclusive arguments as optional

The CLI takes its arguments from the RequiredOptional, which has three fields: required, optional, and exclusive. In practice, the exclusive options are not defined as either required or optional, and would not be allowed in the CLI. This changes that, so that exclusive options are also added to the argument parser.

  • fix(cli): inform argument parser that options are mutually exclusive

  • fix(cli): use correct exclusive options, add unit test

Closes #2769 (7ec3189)

Build System

  • build: Add “–no-cache-dir” to pip commands in Dockerfile

This would not leave cache files in the built docker image.

Additionally, also only build the wheel in the build phase.

On my machine, before this PR, size is 74845395; after this PR, size is 72617713. (4ef94c8)

Chores

  • chore(deps): update all non-major dependencies (4f338ae)

  • chore(deps): update gitlab/gitlab-ee docker tag to v16.11.2-ee.0 (9be48f0)

  • chore(deps): update dependency myst-parser to v3 (9289189)

  • chore(deps): update all non-major dependencies (65d0e65)

  • chore(deps): update dependency jinja2 to v3.1.4 [security] (8ea10c3)

  • chore(deps): update all non-major dependencies (1f0343c)

  • chore(deps): update gitlab/gitlab-ee docker tag to v16.11.1-ee.0 (1ed8d6c)

  • chore(deps): update all non-major dependencies (0e9f4da)

  • chore(deps): update gitlab/gitlab-ee docker tag to v16 (ea8c4c2)

  • chore(deps): update all non-major dependencies (d5b5fb0)

  • chore(deps): update dependency pytest-cov to v5 (db32000)

  • chore: update mypy to 1.9.0 and resolve one issue

mypy 1.9.0 flagged one issue in the code. Resolve the issue. Current unit tests already check that a None value returns text/plain. So function is still working as expected. (dd00bfc)

  • chore(deps): update dependency black to v24.3.0 [security] (f6e8692)

  • chore(deps): update all non-major dependencies (14a3ffe)

  • chore(deps): update all non-major dependencies (3c4dcca)

  • chore(deps): update all non-major dependencies (04c569a)

  • chore: add tox labels to enable running groups of environments

tox now has a feature of labels which allows running groups of environments using the command tox -m LABEL_NAME. For example tox -m lint which has been setup to run the linters.

Bumped the minimum required version of tox to be 4.0, which was released over a year ago. (d7235c7)

  • chore: add py312 & py313 to tox environment list

Even though there isn’t a Python 3.13 at this time, this is done for the future. tox is already configured to just warn about missing Python versions, but not fail if they don’t exist. (679ddc7)

  • chore(deps): update python-semantic-release/python-semantic-release action to v9 (e11d889)

  • chore(deps): update all non-major dependencies (3c4b27e)

  • chore(deps): update dependency furo to v2024 (f6fd02d)

  • chore(deps): update dependency pytest to v8 (253babb)

  • chore(deps): update dependency pytest-docker to v3 (35d2aec)

  • chore: update version of black for pre-commit

The version of black needs to be updated to be in sync with what is in requirements-lint.txt (3501716)

  • chore(deps): update all non-major dependencies (7dc2fa6)

  • chore(deps): update codecov/codecov-action action to v4 (d2be1f7)

  • chore: adapt style for black v24 (4e68d32)

  • chore(deps): update dependency black to v24 (f59aee3)

  • chore(deps): update all non-major dependencies (48726fd)

Documentation

  • docs: add FAQ about conflicting parameters

We have received multiple issues lately about this. Add it to the FAQ. (683ce72)

  • docs(README): tweak GitLab CI usage docs (d9aaa99)

  • docs: how to run smoke tests

Signed-off-by: Tim Knight tim.knight1@engineering.digital.dwp.gov.uk (2d1f487)

  • docs(objects): minor rst formatting typo

To correctly format a code block have to use :: (57dfd17)

  • docs: correct rotate token example

Rotate token returns a dict. Change example to print the entire dict.

Closes: #2836 (c53e695)

  • docs: Note how to use the Docker image from within GitLab CI

Ref: #2823 (6d4bffb)

  • docs(artifacts): Fix argument indentation (c631eeb)

Features

  • feat(job_token_scope): support Groups in job token allowlist API (#2816)

  • feat(job_token_scope): support job token access allowlist API

Signed-off-by: Tim Knight tim.knight1@engineering.digital.dwp.gov.uk l.dwp.gov.uk> Co-authored-by: Nejc Habjan nejc.habjan@siemens.com (2d1b749)

  • feat(cli): allow skipping initial auth calls (001e596)

  • feat(api): allow updating protected branches (#2771)

  • feat(api): allow updating protected branches

Closes #2390 (a867c48)

Testing

  • test: remove approve step

Signed-off-by: Tim Knight tim.knight1@engineering.digital.dwp.gov.uk (48a6705)

  • test: tidy up functional tests

Signed-off-by: Tim Knight tim.knight1@engineering.digital.dwp.gov.uk (06266ea)

  • test: update api tests for GL 16.10

  • Make sure we’re testing python-gitlab functionality, make sure we’re not awaiting on Gitlab Async functions

  • Decouple and improve test stability

Signed-off-by: Tim Knight tim.knight1@engineering.digital.dwp.gov.uk (4bef473)

  • test(functional): enable bulk import feature flag before test (b81da2e)

  • test: don’t use weak passwords

Newer versions of GitLab will refuse to create a user with a weak password. In order for us to move to a newer GitLab version in testing use a stronger password for the tests that create a user. (c64d126)

  • test: update tests for gitlab 16.8 functionality

  • use programmatic dates for expires_at in tokens tests

  • set PAT for 16.8 into tests

Signed-off-by: Tim Knight tim.knight1@engineering.digital.dwp.gov.uk (f8283ae)

  • test(smoke): normalize all dist titles for smoke tests (ee013fe)

v4.4.0 (2024-01-15)

Bug Fixes

  • fix(cli): support binary files with @ notation

Support binary files being used in the CLI with arguments using the @ notation. For example --avatar @/path/to/avatar.png

Also explicitly catch the common OSError exception, which is the parent exception for things like: FileNotFoundError, PermissionError and more exceptions.

Remove the bare exception handling. We would rather have the full traceback of any exceptions that we don’t know about and add them later if needed.

Closes: #2752 (57749d4)

Chores

  • chore(deps): update all non-major dependencies (550f935)

  • chore(deps): update pre-commit hook pycqa/flake8 to v7 (9a199b6)

  • chore(deps): update dependency jinja2 to v3.1.3 [security] (880913b)

  • chore(deps): update dependency flake8 to v7 (20243c5)

  • chore(deps): update all non-major dependencies (cbc13a6)

  • chore(ci): align upload and download action versions (dcca59d)

  • chore(deps): update actions/upload-artifact action to v4 (7114af3)

  • chore(ci): add Python 3.13 development CI job

Add a job to test the development versions of Python 3.13. (ff0c11b)

  • chore(deps): update all non-major dependencies (369a595)

Features

  • feat(api): add reviewer_details manager for mergrequest to get reviewers of merge request

Those changes implements ‘GET /projects/:id/merge_requests/:merge_request_iid/reviewers’ gitlab API call. Naming for call is not reviewers because reviewers atribute already presen in merge request response (adbd90c)

  • feat(api): support access token rotate API (b13971d)

  • feat(api): support single resource access token get API (dae9e52)

v4.3.0 (2023-12-28)

Bug Fixes

  • fix(cli): add ability to disable SSL verification

Add a --no-ssl-verify option to disable SSL verification

Closes: #2714 (3fe9fa6)

Chores

  • chore(deps): update all non-major dependencies (d7bdb02)

  • chore(deps): update actions/stale action to v9 (c01988b)

  • chore(deps): update all non-major dependencies (9e067e5)

  • chore(deps): update actions/setup-python action to v5 (fad1441)

  • chore(deps): update all non-major dependencies (bb2af7b)

  • chore(deps): update all non-major dependencies (5ef1b4a)

  • chore(deps): update dependency types-setuptools to v69 (de11192)

Documentation

  • docs: fix rst link typo in CONTRIBUTING.rst (2b6da6e)

Features

  • feat(api): add support for the Draft notes API (#2728)

  • feat(api): add support for the Draft notes API

  • fix(client): handle empty 204 reponses in PUT requests (ebf9d82)

v4.2.0 (2023-11-28)

Chores

  • chore(deps): update all non-major dependencies (8aeb853)

  • chore(deps): update dessant/lock-threads action to v5 (f4ce867)

  • chore(deps): update all non-major dependencies (9fe2335)

  • chore(deps): update all non-major dependencies (91e66e9)

  • chore(deps): update all non-major dependencies (d0546e0)

Features

  • feat: add pipeline status as Enum

https://docs.gitlab.com/ee/api/pipelines.html (4954bbc)

  • feat(api): add support for wiki attachments (#2722)

Added UploadMixin in mixin module Added UploadMixin dependency for Project, ProjectWiki, GroupWiki Added api tests for wiki upload Added unit test for mixin Added docs sections to wikis.rst (7b864b8)

v4.1.1 (2023-11-03)

Bug Fixes

  • fix(build): include py.typed in dists (b928639)

Chores

  • chore(ci): add release id to workflow step (9270e10)

  • chore(deps): update all non-major dependencies (32954fb)

Documentation

  • docs(users): add missing comma in v4 API create runner examples

The examples which show usage of new runner registration api endpoint are missing commas. This change adds the missing commas. (b1b2edf)

v4.1.0 (2023-10-28)

Bug Fixes

  • fix: remove depricated MergeStatus (c6c012b)

Chores

  • chore(deps): update all non-major dependencies (bf68485)

  • chore(CHANGELOG): re-add v4.0.0 changes using old format (258a751)

  • chore(CHANGELOG): revert python-semantic-release format change (b5517e0)

  • chore: add source label to container image (7b19278)

  • chore(rtd): revert to python 3.11 (#2694) (1113742)

Continuous Integration

  • ci: remove unneeded GitLab auth (fd7bbfc)

Features

  • feat: add Merge Request merge_status and detailed_merge_status values as constants (e18a424)

v4.0.0 (2023-10-17)

Breaking

  • docs(advanced): document new netrc behavior

BREAKING CHANGE: python-gitlab now explicitly passes auth to requests, meaning it will only read netrc credentials if no token is provided, fixing a bug where netrc credentials took precedence over OAuth tokens. This also affects the CLI, where all environment variables now take precedence over netrc files. (45b8930)

  • refactor(build): build project using PEP 621

BREAKING CHANGE: python-gitlab now stores metadata in pyproject.toml as per PEP 621, with setup.py removed. pip version v21.1 or higher is required if you want to perform an editable install. (71fca8c)

  • refactor(const): remove deprecated global constant import

BREAKING CHANGE: Constants defined in gitlab.const can no longer be imported globally from gitlab. Import them from gitlab.const instead. (e4a1f6e)

  • refactor(list): as_list support is removed.

In list() calls support for the as_list argument has been removed. as_list was previously deprecated and now the use of iterator will be required if wanting to have same functionality as using as_list

BREAKING CHANGE: Support for the deprecated as_list argument in list() calls has been removed. Use iterator instead. (9b6d89e)

  • refactor(lint): remove deprecated lint()in favor of ci_lint.create()

BREAKING CHANGE: The deprecated lint() method is no longer available. Use ci_lint.create() instead. (0b17a2d)

  • refactor(artifacts): remove deprecated artifact()in favor of artifacts.raw()

BREAKING CHANGE: The deprecated project.artifact() method is no longer available. Use project.artifacts.raw() instead. (90134c9)

  • refactor(artifacts): remove deprecated artifacts()in favor of artifacts.download()

BREAKING CHANGE: The deprecated project.artifacts() method is no longer available. Use project.artifacts.download() instead. (42639f3)

  • refactor(groups): remove deprecated LDAP group link add/delete methods

BREAKING CHANGE: The deprecated group.add_ldap_group_link() and group.delete_ldap_group_link() methods are no longer available. Use group.ldap_group_links.create() and group.ldap_group_links.delete() instead. (5c8b7c1)

  • refactor(projects): remove deprecated project.transfer_project() in favor of project.transfer()

BREAKING CHANGE: The deprecated project.transfer_project() method is no longer available. Use project.transfer() instead. (27ed490)

  • fix(cli): remove deprecated --all option in favor of --get-all

BREAKING CHANGE: The --all option is no longer available in the CLI. Use --get-all instead. (e9d48cf)

  • feat: remove support for Python 3.7, require 3.8 or higher

Python 3.8 is End-of-Life (EOL) as of 2023-06-27 as stated in https://devguide.python.org/versions/ and https://peps.python.org/pep-0537/

By dropping support for Python 3.7 and requiring Python 3.8 or higher it allows python-gitlab to take advantage of new features in Python 3.8, which are documented at: https://docs.python.org/3/whatsnew/3.8.html

BREAKING CHANGE: As of python-gitlab 4.0.0, Python 3.7 is no longer supported. Python 3.8 or higher is required. (058d5a5)

Bug Fixes

  • fix(cli): add _from_parent_attrs to user-project manager (#2558) (016d90c)

  • fix(cli): fix action display in –help when there are few actions

fixes #2656 (b22d662)

  • fix(client): support empty 204 responses in http_patch (e15349c)

  • fix(snippets): allow passing list of files (31c3c5e)

Chores

  • chore(ci): follow upstream config for release build_command (3e20a76)

  • chore(ci): update release build for python-semantic-release v8 (#2692) (bf050d1)

  • chore(deps): update pre-commit hook pycqa/pylint to v3 (0f4a346)

  • chore(deps): update all non-major dependencies (1348a04)

  • chore: add package pipelines API link (2a2404f)

  • chore(ci): fix pre-commit deps and python version (1e7f257)

  • chore(ci): remove Python 3.13 dev job (e8c50f2)

  • chore(helpers): fix previously undetected flake8 issue (bf8bd73)

  • chore: fix test names (f1654b8)

  • chore: make linters happy (3b83d5d)

  • chore: change _update_uses to _update_method and use an Enum

Change the name of the _update_uses attribute to _update_method and store an Enum in the attribute to indicate which type of HTTP method to use. At the moment it supports POST and PUT. But can in the future support PATCH. (7073a2d)

  • chore(deps): update all non-major dependencies (ff45124)

  • chore(deps): update dependency pylint to v3 (491350c)

  • chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v37 (b4951cd)

  • chore(deps): update all non-major dependencies (0d49164)

  • chore(deps): update dependency commitizen to v3.10.0 (becd8e2)

  • chore(deps): update pre-commit hook commitizen-tools/commitizen to v3.10.0 (626c2f8)

  • chore(deps): update all non-major dependencies (6093dbc)

  • chore(deps): update all non-major dependencies (bb728b1)

  • chore(deps): update all non-major dependencies to v23.9.1 (a16b732)

  • chore(deps): update actions/checkout action to v4 (af13914)

  • chore(deps): update all non-major dependencies (9083787)

  • chore(deps): update dependency build to v1 (2e856f2)

  • chore(deps): update all non-major dependencies (b6a3db1)

  • chore(rtd): use readthedocs v2 syntax (6ce2149)

  • chore(rtd): fix docs build on readthedocs.io (#2654) (3d7139b)

  • chore(ci): adapt release workflow and config for v8 (827fefe)

  • chore(deps): update relekang/python-semantic-release action to v8 (c57c85d)

  • chore(deps): update all non-major dependencies (16f2d34)

  • chore(deps): update all non-major dependencies (5b33ade)

  • chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v36 (db58cca)

  • chore(deps): update dependency ubuntu to v22 (8865552)

  • chore(deps): update all non-major dependencies (3732841)

  • chore(deps): update dependency pytest-docker to v2 (b87bb0d)

  • chore: switch to docker-compose v2

Closes: #2625 (713b5ca)

  • chore: update PyYAML to 6.0.1

Fixes issue with CI having error: AttributeError: cython_sources

Closes: #2624 (3b8939d)

  • chore(deps): update all non-major dependencies (511f45c)

  • chore(deps): update all non-major dependencies (d4a7410)

  • chore(deps): update all non-major dependencies (12846cf)

  • chore(deps): update all non-major dependencies (33d2aa2)

  • chore(deps): update dependency types-setuptools to v68 (bdd4eb6)

  • chore(deps): update actions/upload-artifact action to v3 (b78d6bf)

  • chore(deps): update dependency setuptools to v68 (0f06082)

  • chore(deps): bring myst-parser up to date with sphinx 7 (da03e9c)

  • chore(deps): bring furo up to date with sphinx (a15c927)

  • chore(deps): update dependency sphinx to v7 (2918dfd)

  • chore(deps): update actions/checkout action to v3 (e2af1e8)

  • chore(deps): update actions/setup-python action to v4 (e0d6783)

  • chore(deps): update all non-major dependencies (5ff56d8)

  • chore(deps): pin pytest-console-scripts for 3.7 (6d06630)

  • chore(deps): update all non-major dependencies (7586a5c)

Documentation

  • docs: correct error with back-ticks (#2653)

New linting package update detected the issue. (0b98dd3)

  • docs(access_token): adopt token docs to 16.1

expires_at is now required Upstream MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124964 (fe7a971)

  • docs(files): fix minor typo in variable declaration (118ce42)

Features

  • feat(client): mask tokens by default when logging (1611d78)

  • feat(api): add ProjectPackagePipeline

Add ProjectPackagePipeline, which is scheduled to be included in GitLab 16.0 (5b4addd)

  • feat: officially support Python 3.12 (2a69c0e)

  • feat(packages): Allow uploading bytes and files

This commit adds a keyword argument to GenericPackageManager.upload() to allow uploading bytes and file-like objects to the generic package registry. That necessitates changing file path to be a keyword argument as well, which then cascades into a whole slew of checks to not allow passing both and to not allow uploading file-like objects as JSON data.

Closes https://github.com/python-gitlab/python-gitlab/issues/1815 (61e0fae)

  • feat: Use requests AuthBase classes (5f46cfd)

  • feat(api): add support for job token scope settings (59d6a88)

  • feat(api): support project remote mirror deletion (d900910)

  • feat(api): add optional GET attrs for /projects/:id/ci/lint (40a102d)

  • feat(api): add support for new runner creation API (#2635)

Co-authored-by: Nejc Habjan hab.nejc@gmail.com (4abcd17)

  • feat(releases): Add support for direct_asset_path

This commit adds support for the “new” alias for filepath: direct_asset_path (added in 15.10) in release links API. (d054917)

  • feat: Added iteration to issue and group filters (8d2d297)

Testing

  • test: add tests for token masking (163bfcf)

  • test(cli): add test for user-project list (a788cff)

  • test: correct calls to script_runner.run()

Warnings were being raised. Resolve those warnings. (cd04315)

  • test: fix failing tests that use 204 (No Content) plus content

urllib3>=2 now checks for expected content length. Also codes 204 and 304 are set to expect a content length of 0 [1]

So in the unit tests stop setting content to return in these situations.

[1] https://github.com/urllib3/urllib3/blob/88a707290b655394aade060a8b7eaee83152dc8b/src/urllib3/response.py#L691-L693 (3074f52)

Unknown

  • chore(deps): update dependency requests to v2.31.0 [security]

Also update dependency responses==0.23.3 as it provides support for urllib3>=2

Closes: #2626 (988a6e7)

v3.15.0 (2023-06-09)

Chores

  • chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v35 (8202e3f)

  • chore: update sphinx from 5.3.0 to 6.2.1 (c44a290)

  • chore: update copyright year to include 2023 (511c6e5)

  • chore(deps): update all non-major dependencies (e3de6ba)

  • chore(deps): update pre-commit hook commitizen-tools/commitizen to v3 (1591e33)

  • chore(deps): update dependency types-setuptools to v67 (c562424)

  • chore(deps): update dependency requests-toolbelt to v1 (86eba06)

  • chore(deps): update dependency myst-parser to v1 (9c39848)

  • chore(deps): update dependency commitizen to v3 (784d59e)

  • chore(ci): use OIDC trusted publishing for pypi.org (#2559)

  • chore(ci): use OIDC trusted publishing for pypi.org

  • chore(ci): explicitly install setuptools in tests (7be09e5)

Documentation

  • docs: remove exclusive EE about issue links (e0f6f18)

Features

  • feat: add support for select="package_file" in package upload

Add ability to use select="package_file" when uploading a generic package as described in: https://docs.gitlab.com/ee/user/packages/generic_packages/index.html

Closes: #2557 (3a49f09)

  • feat(api): add support for events scope parameter (348f56e)

  • feat: usernames support for MR approvals

This can be used instead of ‘user_ids’

See: https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-project-level-rule (a2b8c8c)

v3.14.0 (2023-04-11)

Bug Fixes

  • fix(cli): warn user when no fields are displayed (8bf53c8)

  • fix(client): properly parse content-type when charset is present (76063c3)

  • fix: support int for parent_id in import_group

This will also fix other use cases where an integer is passed in to MultipartEncoder.

Added unit tests to show it works.

Closes: #2506 (90f96ac)

  • fix(cli): add ability to escape at-prefixed parameter (#2513)

  • fix(cli): Add ability to escape at-prefixed parameter (#2511)


Co-authored-by: Nejc Habjan hab.nejc@gmail.com (4f7c784)

  • fix(cli): display items when iterator is returned (33a04e7)

Chores

  • chore(ci): wait for all coverage reports in CI status (511764d)

  • chore(setup): depend on typing-extensions for 3.7 until EOL (3abc557)

  • chore: add Contributor Covenant 2.1 as Code of Conduct

See https://www.contributor-covenant.org/version/2/1/code_of_conduct/ (fe334c9)

  • chore(deps): update all non-major dependencies (8b692e8)

  • chore(deps): update dependency furo to v2023 (7a1545d)

  • chore(deps): update actions/stale action to v8 (7ac4b86)

  • chore(pre-commit): Bumping versions (e973729)

  • chore(.github): actually make PR template the default (7a8a862)

  • chore: use a dataclass to return values from prepare_send_data

I found the tuple of three values confusing. So instead use a dataclass to return the three values. It is still confusing but a little bit less so.

Also add some unit tests (f2b5e4f)

  • chore(contributing): refresh development docs (d387d91)

  • chore(github): add default pull request template (bf46c67)

  • chore(deps): update all non-major dependencies (#2493)

  • chore(deps): update all non-major dependencies

  • chore(fixtures): downgrade GitLab for now

  • chore(deps): ungroup typing deps, group gitlab instead

  • chore(deps): downgrade argcomplete for now


Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Nejc Habjan nejc.habjan@siemens.com (07d03dc)

  • chore(deps): update dependency pre-commit to v3 (#2508)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> (7d779c8)

  • chore(deps): update dependency coverage to v7 (#2501)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> (aee73d0)

  • chore(deps): update dependency flake8 to v6 (#2502)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> (3d4596e)

  • chore(renovate): swith to gitlab-ee (8da48ee)

  • chore(renovate): bring back custom requirements pattern (ae0b21c)

  • chore(deps): update mypy (1.0.0) and responses (0.22.0)

Update the requirements-* files.

In order to update mypy==1.0.0 we need to also update responses==0.22.0

Fix one issue found by mypy

Leaving updates for precommit to be done in a separate commit by someone. (9c24657)

  • chore(renovate): do not ignore tests dir (5b8744e)

  • chore(deps): update all non-major dependencies (2f06999)

  • chore(deps): update pre-commit hook psf/black to v23 (217a787)

  • chore(deps): update black (23.1.0) and commitizen (2.40.0) (#2479)

Update the dependency versions: black: 23.1.0 commitizen: 2.40.0

They needed to be updated together as just updating black caused a dependency conflict.

Updated files by running black and committing the changes. (44786ef)

  • chore: add SECURITY.md (572ca3b)

  • chore: remove pre-commit as a default tox environment (#2470)

For users who use tox having pre-commit as part of the default environment list is redundant as it will run the same tests again that are being run in other environments. For example: black, flake8, pylint, and more. (fde2495)

  • chore: add Python 3.12 testing

Add a unit test for Python 3.12. This will use the latest version of Python 3.12 that is available from https://github.com/actions/python-versions/

At this time it is 3.12.0-alpha.4 but will move forward over time until the final 3.12 release and updates. So 3.12.0, 3.12.1, … will be matched. (0867564)

Documentation

  • docs(objects): fix typo in pipeline schedules (3057f45)

  • docs(advanced): clarify netrc, proxy behavior with requests (1da7c53)

  • docs: fix update badge behaviour

docs: fix update badge behaviour

Earlier: badge.image_link = new_link

Now: badge.image_url = new_image_url badge.link_url = new_link_url (3d7ca1c)

  • docs(advanced): fix typo in Gitlab examples (1992790)

Features

  • feat(projects): allow importing additional items from GitHub (ce84f2e)

  • feat(objects): support fetching PATs via id or self endpoint (19b38bd)

  • feat: add resource_weight_event for ProjectIssue (6e5ef55)

  • feat(backends): use PEP544 protocols for structural subtyping (#2442)

The purpose of this change is to track API changes described in https://github.com/python-gitlab/python-gitlab/blob/main/docs/api-levels.rst, for example, for package versioning and breaking change announcements in case of protocol changes.

This is MVP implementation to be used by #2435. (4afeaff)

  • feat(client): add http_patch method (#2471)

In order to support some new API calls we need to support the HTTP PATCH method.

Closes: #2469 (f711d9e)

  • feat(cli): add setting of allow_force_push for protected branch

For the CLI: add allow_force_push as an optional argument for creating a protected branch.

API reference: https://docs.gitlab.com/ee/api/protected_branches.html#protect-repository-branches

Closes: #2466 (929e07d)

Refactoring

  • refactor(client): let mypy know http_password is set (2dd177b)

Testing

  • test(unit): increase V4 CLI coverage (5748d37)

  • test(unit): split the last remaining unittest-based classes into modules” (14e0f65)

  • test(unit): remove redundant package (4a9e3ee)

  • test(unit): consistently use inline fixtures (1bc56d1)

  • test(meta): move meta suite into unit tests

They’re always run with it anyway, so it makes no difference. (847004b)

  • test(functional): clarify MR fixture factory name (d8fd1a8)

Unknown

  • Merge pull request #2465 from valentingregoire/typos

docs: fix typo in issue docs (43f5ac5)

  • Merge branch ‘main’ into typos (3cfd390)

v3.13.0 (2023-01-30)

Bug Fixes

  • fix(client): regression - do not automatically get_next if page=# and iterator=True/as_list=False are used

This fix a regression introduced on commit https://github.com/python-gitlab/python-gitlab/commit/1339d645ce58a2e1198b898b9549ba5917b1ff12

If page is used, then get_next should be false.

This was found on the mesa ci project, after upgrading the python-gitlab version, the script that monitors the ci was getting killed by consuming too much memory. (585e3a8)

  • fix: change return value to “None” in case getattr returns None to prevent error (3f86d36)

  • fix(deps): bump requests-toolbelt to fix deprecation warning (faf842e)

  • fix: typo fixed in docs (ee5f444)

  • fix: Use the ProjectIterationManager within the Project object

The Project object was previously using the GroupIterationManager resulting in the incorrect API endpoint being used. Utilize the correct ProjectIterationManager instead.

Resolves #2403 (44f05dc)

  • fix(api): Make description optional for releases (5579750)

Chores

  • chore: make backends private (1e629af)

  • chore(deps): update all non-major dependencies (ea7010b)

  • chore: add a UserWarning if both iterator=True and page=X are used (#2462)

If a caller calls a list() method with both iterator=True (or as_list=False) and page=X then emit a UserWarning as the options are mutually exclusive. (8e85791)

  • chore: remove tox envdir values

tox > 4 no longer will re-use the tox directory :( What this means is that with the previous config if you ran: $ tox -e mypy; tox -e isort; tox -e mypy It would recreate the tox environment each time :(

By removing the envdir values it will have the tox environments in separate directories and not recreate them.

The have an FAQ entry about this: https://tox.wiki/en/latest/upgrading.html#re-use-of-environments (3c7c7fc)

  • chore: update attributes for create and update projects (aa44f2a)

  • chore(deps): update all non-major dependencies (122988c)

  • chore(deps): update all non-major dependencies (49c0233)

  • chore(deps): update all non-major dependencies (10c4f31)

  • chore(deps): update all non-major dependencies (bbd01e8)

  • chore(deps): update actions/stale action to v7 (76eb024)

  • chore(ci): complete all unit tests even if one has failed (#2438) (069c6c3)

  • chore: add test, docs, and helper for 409 retries (3e1c625)

  • chore(deps): update all non-major dependencies (6682808)

  • chore(deps): update all non-major dependencies (1816107)

  • chore(deps): update pre-commit hook pycqa/flake8 to v6 (82c61e1)

  • chore: add docs for schedule pipelines (9a9a6a9)

  • chore(tox): ensure test envs have all dependencies (63cf4e4)

  • chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v34.48.4 (985b971)

  • chore(deps): update dessant/lock-threads action to v4 (337b25c)

  • chore: Use SPDX license expression in project metadata (acb3a4a)

  • chore(deps): update actions/download-artifact action to v3 (64ca597)

  • chore(deps): update all non-major dependencies (21e767d)

Documentation

  • docs(faq): describe and group common errors (4c9a072)

Features

  • feat(group): add support for group restore API (9322db6)

  • feat(client): automatically retry on HTTP 409 Resource lock

Fixes: #2325 (dced76a)

  • feat(api): add support for bulk imports API (043de2d)

  • feat(api): add support for resource groups (5f8b8f5)

  • feat(api): support listing pipelines triggered by pipeline schedules (865fa41)

  • feat: allow filtering pipelines by source

See: https://docs.gitlab.com/ee/api/pipelines.html#list-project-pipelines Added in GitLab 14.3 (b6c0872)

  • feat(client): bootstrap the http backends concept (#2391) (91a665f)

  • feat: add resource iteration events (see https://docs.gitlab.com/ee/api/resource_iteration_events.html) (ef5feb4)

  • feat: allow passing kwargs to Gitlab class when instantiating with from_config (#2392) (e88d34e)

  • feat: add keep_base_url when getting configuration from file (50a0301)

Refactoring

  • refactor: add reason property to RequestsResponse (#2439) (b59b7bd)

  • refactor: remove unneeded requests.utils import (#2426) (6fca651)

  • refactor: Migrate MultipartEncoder to RequestsBackend (#2421) (43b369f)

  • refactor: move Response object to backends (#2420) (7d9ce0d)

  • refactor: move the request call to the backend (#2413) (283e7cc)

  • refactor: Moving RETRYABLE_TRANSIENT_ERROR_CODES to const (887852d)

Testing

  • test(functional): do not require config file (43c2dda)

  • test(unit): expand tests for pipeline schedules (c7cf0d1)

v3.12.0 (2022-11-28)

Bug Fixes

  • fix(cli): Enable debug before doing auth

Authentication issues are currently hard to debug since --debug only has effect after gl.auth() has been called.

For example, a 401 error is printed without any details about the actual HTTP request being sent:

$ gitlab --debug --server-url https://gitlab.com current-user get
401: 401 Unauthorized

By moving the call to gl.enable_debug() the usual debug logs get printed before the final error message.

Signed-off-by: Emanuele Aina emanuele.aina@collabora.com (65abb85)

  • fix(cli): expose missing mr_default_target_self project attribute

Example::

gitlab project update –id 616 –mr-default-target-self 1

References:

  • https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58093

  • https://gitlab.com/gitlab-org/gitlab/-/blob/v13.11.0-ee/doc/user/project/merge_requests/creating_merge_requests.md#new-merge-request-from-a-fork

  • https://gitlab.com/gitlab-org/gitlab/-/blob/v14.7.0-ee/doc/api/projects.md#get-single-project (12aea32)

  • fix: use POST method and return dict in cancel_merge_when_pipeline_succeeds() (#2350)

  • Call was incorrectly using a PUT method when should have used a POST method.

    • Changed return type to a dict as GitLab only returns {‘status’: ‘success’} on success. Since the function didn’t work previously, this should not impact anyone.

    • Updated the test fixture merge_request to add ability to create a pipeline.

    • Added functional test for mr.cancel_merge_when_pipeline_succeeds()

Fixes: #2349 (bd82d74)

Chores

  • chore: validate httpx package is not installed by default (0ecf3bb)

  • chore(deps): update all non-major dependencies (d8a657b)

  • chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v34.24.0 (a0553c2)

  • chore: correct website for pylint

Use https://github.com/PyCQA/pylint as the website for pylint. (fcd72fe)

  • chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v34.20.0 (e6f1bd6)

  • chore(deps): update all non-major dependencies (b2c6d77)

  • chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v34 (623e768)

Documentation

  • docs: Use the term “log file” for getting a job log file

The GitLab docs refer to it as a log file: https://docs.gitlab.com/ee/api/jobs.html#get-a-log-file

“trace” is the endpoint name but not a common term people will think of for a “log file” (9d2b1ad)

  • docs(groups): describe GitLab.com group creation limitation (9bd433a)

  • docs(api): pushrules remove saying None is returned when not found

In groups.pushrules.get(), GitLab does not return None when no rules are found. GitLab returns a 404.

Update docs to not say it will return None

Also update docs in project.pushrules.get() to be consistent. Not 100% sure if it returns None or returns a 404, but we don’t need to document that.

Closes: #2368 (c3600b4)

Features

  • feat: add support for SAML group links (#2367) (1020ce9)

  • feat(groups): add LDAP link manager and deprecate old API endpoints (3a61f60)

  • feat(groups): add support for listing ldap_group_links (#2371) (ad7c8fa)

  • feat: implement secure files API (d0a0348)

  • feat(ci): Re-Run Tests on PR Comment workflow (034cde3)

  • feat(api): add support for getting a project’s pull mirror details

Add the ability to get a project’s pull mirror details. This was added in GitLab 15.5 and is a PREMIUM feature.

https://docs.gitlab.com/ee/api/projects.html#get-a-projects-pull-mirror-details (060cfe1)

  • feat(api): add support for remote project import from AWS S3 (#2357) (892281e)

  • feat(api): add support for remote project import (#2348) (e5dc72d)

  • feat(api): add application statistics (6fcf3b6)

Refactoring

  • refactor: explicitly use ProjectSecureFile (0c98b2d)

Testing

  • test(api): fix flaky test test_cancel_merge_when_pipeline_succeeds

This is an attempt to fix the flaky test test_cancel_merge_when_pipeline_succeeds. Were seeing a: 405 Method Not Allowed error when setting the MR to merge_when_pipeline_succeeds.

Closes: #2383 (6525c17)

Unknown

  • Merge pull request #2347 from Shreya-7/issue-2264-add-application-statistics

feat(api): add application statistics (31ec146)

  • Merge pull request #2351 from python-gitlab/renovate/all-minor-patch

chore(deps): update all non-major dependencies (2974966)

  • Merge pull request #2352 from python-gitlab/renovate/maxbrunet-pre-commit-renovate-34.x

chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v34 (c3d9820)

v3.11.0 (2022-10-28)

Bug Fixes

  • fix: remove project.approvals.set_approvals() method

The project.approvals.set_approvals() method used the /projects/:id/approvers end point. That end point was removed from GitLab in the 13.11 release, on 2-Apr-2021 in commit 27dc2f2fe81249bbdc25f7bd8fe799752aac05e6 via merge commit e482597a8cf1bae8e27abd6774b684fb90491835. It was deprecated on 19-Aug-2019.

See merge request: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57473 (91f08f0)

  • fix: use epic id instead of iid for epic notes (97cae38)

  • fix(cli): handle list response for json/yaml output

Handle the case with the CLI where a list response is returned from GitLab and json/yaml output is requested.

Add a functional CLI test to validate it works.

Closes: #2287 (9b88132)

  • fix: intermittent failure in test_merge_request_reset_approvals

Have been seeing intermittent failures in the test: tests/functional/api/test_merge_requests.py::test_merge_request_reset_approvals

Also saw a failure in: tests/functional/cli/test_cli_v4.py::test_accept_request_merge[subprocess]

Add a call to wait_for_sidekiq() to hopefully resolve the issues. (3dde36e)

Chores

  • chore: add responses to pre-commit deps (4b8ddc7)

  • chore: add basic type checks to functional/api tests (5b642a5)

  • chore: add basic typing to functional tests (ee143c9)

  • chore: narrow type hints for license API (50731c1)

  • chore: add basic type checks to meta tests (545d6d6)

  • chore: add basic typing to smoke tests (64e8c31)

  • chore: add basic typing to test root (0b2f6bc)

  • chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v33 (932bbde)

  • chore(deps): update all non-major dependencies (dde3642)

  • chore: add not-callable to pylint ignore list

The not-callable error started showing up. Ignore this error as it is invalid. Also mypy tests for these issues.

Closes: #2334 (f0c02a5)

  • chore: revert compose upgrade

This reverts commit f825d70e25feae8cd9da84e768ec6075edbc2200. (dd04e8e)

  • chore(deps): update all non-major dependencies (2966234)

  • chore: use kwargs for http_request docs (124abab)

  • chore(deps): pin GitHub Actions (8dbaa5c)

  • chore(deps): group non-major upgrades to reduce noise (37d14bd)

  • chore(deps): pin and clean up test dependencies (60b9197)

  • chore(deps): pin dependencies (953f38d)

  • chore: topic functional tests (d542eba)

  • chore: renovate and precommit cleanup (153d373)

  • chore(deps): update black to v22.10.0 (531ee05)

  • chore(deps): update dependency types-requests to v2.28.11.2 (d47c0f0)

  • chore: fix flaky test (fdd4114)

  • chore: update the issue templates

  • Have an option to go to the discussions

  • Have an option to go to the Gitter chat

  • Move the bug/issue template into the .github/ISSUE_TEMPLATE/ directory (c15bd33)

  • chore: simplify wait_for_sidekiq usage

Simplify usage of wait_for_sidekiq by putting the assert if it timed out inside the function rather than after calling it. (196538b)

  • chore(deps): update dependency pylint to v2.15.3 (6627a60)

  • chore(deps): update dependency mypy to v0.981 (da48849)

  • chore(deps): update dependency commitizen to v2.35.0 (4ce9559)

  • chore(deps): update typing dependencies (81285fa)

Documentation

  • docs(advanced): add hint on type narrowing (a404152)

  • docs: add minimal docs about the enable_debug() method

Add some minimal documentation about the enable_debug() method. (b4e9ab7)

  • docs(commits): fix commit create example for binary content (bcc1eb4)

  • docs(readme): add a basic feature list (b4d53f1)

  • docs(api): describe use of lower-level methods (b7a6874)

  • docs(api): describe the list() and all() runners’ functions (b6cc3f2)

  • docs(api): Update merge_requests.rst: mr_id to mr_iid

Typo: Author probably meant mr_iid (i.e. project-specific MR ID) and not mr_id (i.e. server-wide MR ID)

Closes: https://github.com/python-gitlab/python-gitlab/issues/2295

Signed-off-by: Stavros Ntentos 133706+stdedos@users.noreply.github.com (b32234d)

Features

  • feat(build): officially support Python 3.11 (74f66c7)

  • feat(api): add support for topics merge API (9a6d197)

Refactoring

  • refactor: pre-commit trigger from tox (6e59c12)

  • refactor: migrate legacy EE tests to pytest (88c2505)

  • refactor: pytest-docker fixtures (3e4781a)

  • refactor(deps): drop compose v1 dependency in favor of v2 (f825d70)

Testing

  • test: fix test_project_push_rules test

Make the test_project_push_rules test work. (8779cf6)

  • test: enable skipping tests per GitLab plan (01d5f68)

  • test: use false instead of /usr/bin/false

On Debian systems false is located at /bin/false (coreutils package). This fixes unit test failure on Debian system:

FileNotFoundError: [Errno 2] No such file or directory: ‘/usr/bin/false’ /usr/lib/python3.10/subprocess.py:1845: FileNotFoundError (51964b3)

Unknown

  • Merge pull request #2345 from python-gitlab/jlvillal/enable_debug

docs: add minimal docs about the enable_debug() method (8f74a33)

  • Merge pull request #2343 from python-gitlab/feat/python-3-11

feat(build): officially support Python 3.11 (a3b4824)

  • Merge pull request #2341 from python-gitlab/renovate/maxbrunet-pre-commit-renovate-33.x

chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v33 (31a39e1)

  • Merge pull request #2320 from lmilbaum/refactoring

refactor: pre-commit triggered from tox (eec6c02)

  • Merge pull request #2333 from python-gitlab/jlvillal/remove_approvers_endpoint

fix: remove project.approvals.set_approvals() method (eb54adf)

  • Merge pull request #2332 from python-gitlab/jlvillal/fix_test

test: fix test_project_push_rules test (c676b43)

  • Merge pull request #2322 from AndreySV/fix-test-with-false

test: use false instead of /usr/bin/false (4eca9b9)

  • Merge pull request #2318 from python-gitlab/renovate/all-minor-patch

chore(deps): update all non-major dependencies (9410acb)

v3.10.0 (2022-09-28)

Bug Fixes

  • fix(cli): add missing attributes for creating MRs (1714d0a)

  • fix(cli): add missing attribute for MR changes (20c46a0)

Chores

  • chore: bump GitLab docker image to 15.4.0-ee.0

  • Use settings.delayed_group_deletion=False as that is the recommended method to turn off the delayed group deletion now.

  • Change test to look for default as pages is not mentioned in the docs[1]

[1] https://docs.gitlab.com/ee/api/sidekiq_metrics.html#get-the-current-queue-metrics (b87a2bc)

  • chore(deps): update black to v22.8.0 (86b0e40)

  • chore(deps): update dependency types-requests to v2.28.10 (5dde7d4)

  • chore(deps): update dependency pytest to v7.1.3 (ec7f26c)

  • chore(deps): update dependency commitizen to v2.32.5 (e180f14)

  • chore(deps): update dependency commitizen to v2.32.2 (31aea28)

  • chore(deps): update pre-commit hook commitizen-tools/commitizen to v2.32.2 (31ba64f)

Features

  • feat: Add reset_approvals api

Added the newly added reset_approvals merge request api.

Signed-off-by: Lucas Zampieri lzampier@redhat.com (88693ff)

  • feat: add support for deployment approval endpoint

Add support for the deployment approval endpoint[1]

[1] https://docs.gitlab.com/ee/api/deployments.html#approve-or-reject-a-blocked-deployment Closes: #2253 (9c9eeb9)

Unknown

  • Merge pull request #2280 from python-gitlab/jlvillal/docker_image

chore: bump GitLab docker image to 15.4.0-ee.0 (fceeebc)

  • Merge pull request #2261 from python-gitlab/renovate/commitizen-2.x

chore(deps): update dependency commitizen to v2.32.2 (336ee21)

  • Merge pull request #2262 from python-gitlab/renovate/commitizen-tools-commitizen-2.x

chore(deps): update pre-commit hook commitizen-tools/commitizen to v2.32.2 (89bf581)

  • Merge pull request #2254 from python-gitlab/jlvillal/deploy_approve

feat: add support for deployment approval endpoint (56fbe02)

v3.9.0 (2022-08-28)

Chores

  • chore: Only check for our UserWarning

The GitHub CI is showing a ResourceWarning, causing our test to fail.

Update test to only look for our UserWarning which should not appear.

What was seen when debugging the GitHub CI: {message: ResourceWarning( “unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=(‘127.0.0.1’, 50862), raddr=(‘127.0.0.1’, 8080)>” ), category: ‘ResourceWarning’, filename: ‘/home/runner/work/python-gitlab/python-gitlab/.tox/api_func_v4/lib/python3.10/site-packages/urllib3/poolmanager.py’, lineno: 271, line: None } (bd4dfb4)

  • chore: fix issue if only run test_gitlab.py func test

Make it so can run just the test_gitlab.py functional test.

For example: $ tox -e api_func_v4 – -k test_gitlab.py (98f1956)

  • chore(ci): make pytest annotations work (f67514e)

  • chore(deps): update pre-commit hook commitizen-tools/commitizen to v2.32.1 (cdd6efe)

  • chore(deps): update dependency commitizen to v2.32.1 (9787c5c)

  • chore(deps): update dependency types-requests to v2.28.9 (be932f6)

  • chore(deps): update pre-commit hook pycqa/flake8 to v5 (835d884)

  • chore(deps): update pre-commit hook commitizen-tools/commitizen to v2.31.0 (71d37d9)

  • chore(deps): update dependency commitizen to v2.31.0 (4ff0894)

  • chore(deps): update dependency types-setuptools to v64 (4c97f26)

  • chore(deps): update dependency types-requests to v2.28.8 (8e5b86f)

Features

  • feat: add support for merge_base API (dd4fbd5)

Unknown

  • Merge pull request #2255 from python-gitlab/jlvillal/noop

chore: fix issue if only run test_gitlab.py func test (e095735)

  • Merge pull request #2241 from python-gitlab/renovate/pycqa-flake8-5.x

chore(deps): update pre-commit hook pycqa/flake8 to v5 (13d4927)

  • Merge pull request #2239 from python-gitlab/renovate/commitizen-tools-commitizen-2.x

chore(deps): update pre-commit hook commitizen-tools/commitizen to v2.31.0 (9381a44)

  • Merge pull request #2238 from python-gitlab/renovate/commitizen-2.x

chore(deps): update dependency commitizen to v2.31.0 (b432e47)

v3.8.1 (2022-08-10)

Bug Fixes

  • fix(client): do not assume user attrs returned for auth()

This is mostly relevant for people mocking the API in tests. (a07547c)

Chores

  • chore(deps): update dependency commitizen to v2.29.5 (181390a)

  • chore(deps): update dependency flake8 to v5.0.4 (50a4fec)

  • chore(deps): update dependency sphinx to v5 (3f3396e)

  • chore: remove broad Exception catching from config.py

Change “except Exception:” catching to more granular exceptions.

A step in enabling the “broad-except” check in pylint. (0abc90b)

  • chore: add license badge to readme (9aecc9e)

  • chore: consolidate license and authors (366665e)

Unknown

  • Merge pull request #2233 from python-gitlab/fix/do-not-require-web-url (99d580a)

  • Merge pull request #2153 from python-gitlab/renovate/sphinx-5.x

chore(deps): update dependency sphinx to v5 (1e12eaf)

  • Merge pull request #2212 from python-gitlab/jlvillal/config

chore: remove broad Exception catching from config.py (70e67bf)

v3.8.0 (2022-08-04)

Bug Fixes

  • fix(client): ensure encoded query params are never duplicated (1398426)

  • fix: optionally keep user-provided base URL for pagination (#2149) (e2ea8b8)

Chores

  • chore: use urlunparse instead of string replace

Use the urlunparse() function to reconstruct the URL without the query parameters. (6d1b62d)

  • chore(ci): bump semantic-release for fixed commit parser (1e063ae)

  • chore: enable mypy check disallow_any_generics (24d17b4)

  • chore(deps): update pre-commit hook commitizen-tools/commitizen to v2.29.2 (4988c02)

  • chore: enable mypy check no_implicit_optional (64b208e)

  • chore(deps): update dependency flake8 to v5 (cdc384b)

  • chore(deps): update dependency types-requests to v2.28.6 (54dd4c3)

  • chore(deps): update dependency commitizen to v2.29.2 (30274ea)

  • chore: change _repr_attr for Project to be path_with_namespace

Previously _repr_attr was path but that only gives the basename of the path. So https://gitlab.com/gitlab-org/gitlab would only show “gitlab”. Using path_with_namespace it will now show “gitlab-org/gitlab” (7cccefe)

  • chore: enable mypy check warn_return_any

Update code so that the warn_return_any check passes. (76ec4b4)

  • chore: make code PEP597 compliant

Use encoding="utf-8" in open() and open-like functions.

https://peps.python.org/pep-0597/ (433dba0)

  • chore(clusters): deprecate clusters support

Cluster support was deprecated in GitLab 14.5 [1]. And disabled by default in GitLab 15.0 [2]

  • Update docs to mark clusters as deprecated

  • Remove testing of clusters

[1] https://docs.gitlab.com/ee/api/project_clusters.html [2] https://gitlab.com/groups/gitlab-org/configure/-/epics/8 (b46b379)

  • chore(topics): ‘title’ is required when creating a topic

In GitLab >= 15.0 title is required when creating a topic. (271f688)

Documentation

  • docs: describe self-revoking personal access tokens (5ea48fc)

Features

  • feat(client): warn user on misconfigured URL in auth() (0040b43)

  • feat: Support downloading archive subpaths (cadb0e5)

Refactoring

  • refactor(client): factor out URL check into a helper (af21a18)

  • refactor(client): remove handling for incorrect link header

This was a quirk only present in GitLab 13.0 and fixed with 13.1. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33714 and https://gitlab.com/gitlab-org/gitlab/-/issues/218504 for more context. (77c04b1)

Testing

  • test(unit): reproduce duplicate encoded query params (6f71c66)

  • test: attempt to make functional test startup more reliable

The functional tests have been erratic. Current theory is that we are starting the tests before the GitLab container is fully up and running.

  • Add checking of the Health Check[1] endpoints.

  • Add a 20 second delay after we believe it is up and running.

  • Increase timeout from 300 to 400 seconds

[1] https://docs.gitlab.com/ee/user/admin_area/monitoring/health_check.html (67508e8)

  • test(functional): bump GitLab docker image to 15.2.0-ee.0

Use the GitLab docker image 15.2.0-ee.0 in the functional testing. (69014e9)

Unknown

  • Merge pull request #2221 from python-gitlab/jlvillal/unparse

chore: use urlunparse instead of string replace (9e0b60f)

  • Merge pull request #2219 from python-gitlab/fix/no-duplicate-params

fix(client): ensure encoded query params are never duplicated (d263f57)

  • Merge pull request #2220 from python-gitlab/chore/bump-semantic-release

chore(ci): bump semantic-release for fixed commit parser (2ebfc70)

  • Merge pull request #2211 from python-gitlab/jlvillal/mypy_step_step

chore: enable mypy check disallow_any_generics (1136b17)

  • Merge pull request #2208 from python-gitlab/renovate/commitizen-tools-commitizen-2.x

chore(deps): update pre-commit hook commitizen-tools/commitizen to v2.29.2 (6cedbc8)

  • Merge pull request #2210 from python-gitlab/jlvillal/mypy_step_by_step

chore: enable mypy check no_implicit_optional (1c91b24)

  • Merge pull request #2209 from python-gitlab/renovate/flake8-5.x

chore(deps): update dependency flake8 to v5 (d81cec3)

  • Merge pull request #2203 from python-gitlab/jlvillal/project_repr

chore: change _repr_attr for Project to be path_with_namespace (98bdb98)

  • Merge pull request #2188 from python-gitlab/jlvillal/fix_functional_ci

test: attempt to make functional test startup more reliable (17414f7)

  • Merge pull request #2199 from orf/patch-1

Support downloading archive subpaths (5e1df65)

  • Merge pull request #2157 from python-gitlab/jlvillal/mypy_step_by_step

chore: enable mypy check warn_return_any (b8be32a)

  • Merge pull request #2201 from python-gitlab/jlvillal/encoding_warning

chore: make code PEP597 compliant (1b7cd31)

  • Merge pull request #2194 from python-gitlab/jlvillal/update-gitlab

test(functional): bump GitLab docker image to 15.2.0-ee.0 (7a53c69)

v3.7.0 (2022-07-28)

Bug Fixes

  • fix: support array types for most resources (d9126cd)

  • fix: use the [] after key names for array variables in params

  1. If a value is of type ArrayAttribute then append ‘[]’ to the name of the value for query parameters (params).

This is step 3 in a series of steps of our goal to add full support for the GitLab API data types[1]:

  • array

  • hash

  • array of hashes

Step one was: commit 5127b1594c00c7364e9af15e42d2e2f2d909449b Step two was: commit a57334f1930752c70ea15847a39324fa94042460

Fixes: #1698

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types (1af44ce)

  • fix(runners): fix listing for /runners/all (c6dd57c)

  • fix(config): raise error when gitlab id provided but no config section found (1ef7018)

  • fix(config): raise error when gitlab id provided but no config file found (ac46c1c)

  • fix: add get_all param (and --get-all) to allow passing all to API (7c71d5d)

  • fix: results returned by attributes property to show updates

Previously the attributes method would show the original values in a Gitlab Object even if they had been updated. Correct this so that the updated value will be returned.

Also use copy.deepcopy() to ensure that modifying the dictionary returned can not also modify the object. (e5affc8)

  • fix: Enable epic notes

Add the notes attribute to GroupEpic (5fc3216)

  • fix(cli): remove irrelevant MR approval rule list filters (0daec5f)

  • fix: ensure path elements are escaped

Ensure the path elements that are passed to the server are escaped. For example a “/” will be changed to “%2F”

Closes: #2116 (5d9c198)

Chores

  • chore: revert “test(functional): simplify token creation”

This reverts commit 67ab24fe5ae10a9f8cc9122b1a08848e8927635d. (4b798fc)

  • chore: enable using GitLab EE in functional tests

Enable using GitLab Enterprise Edition (EE) in the functional tests. This will allow us to add functional tests for EE only features in the functional tests. (17c01ea)

  • chore(deps): update pre-commit hook commitizen-tools/commitizen to v2.29.0 (ad8d62a)

  • chore(deps): update dependency commitizen to v2.29.0 (c365be1)

  • chore(deps): update dependency mypy to v0.971 (7481d27)

  • chore(deps): update typing dependencies (f2209a0)

  • chore(authors): fix email and do the ABC (9833632)

  • chore: make reset_gitlab() better

Saw issues in the CI where reset_gitlab() would fail. It would fail to delete the group that is created when GitLab starts up. Extending the timeout didn’t fix the issue.

Changed the code to use the new helpers.safe_delete() function. Which will delete the resource and then make sure it is deleted before returning.

Also added some logging functionality that can be seen if logging is turned on in pytest. (d87d6b1)

  • chore: fixtures: after delete() wait to verify deleted

In our fixtures that create:

  • groups

  • project merge requests

  • projects

  • users

They delete the created objects after use. Now wait to ensure the objects are deleted before continuing as having unexpected objects existing can impact some of our tests. (1f73b6b)

  • chore: add a lazy boolean attribute to RESTObject

This can be used to tell if a RESTObject was created using lazy=True.

Add a message to the AttributeError if attribute access fails for an instance created with lazy=True. (a7e8cfb)

  • chore: enable mypy check strict_equality

Enable the mypy strict_equality check. (a29cd6c)

  • chore: change name of API functional test to api_func_v4

The CLI test is cli_func_v4 and using api_func_v4 matches with that naming convention. (8cf5cd9)

  • chore(deps): update typing dependencies (e772248)

  • chore(deps): update pre-commit hook pycqa/pylint to v2.14.5 (c75a1d8)

  • chore(deps): update dependency pylint to v2.14.5 (e153636)

  • chore(deps): update pre-commit hook commitizen-tools/commitizen to v2.28.0 (d238e1b)

  • chore(deps): update dependency commitizen to v2.28.0 (8703dd3)

  • chore(deps): update black to v22.6.0 (82bd596)

  • chore(deps): update pre-commit hook pycqa/pylint to v2.14.4 (5cd39be)

  • chore(ci_lint): add create attributes (6e1342f)

  • chore: simplify multi-nested try blocks

Instead of have a multi-nested series of try blocks. Convert it to a more readable series of if statements. (e734470)

  • chore(deps): update dependency requests to v2.28.1 (be33245)

  • chore(deps): update dependency pylint to v2.14.4 (2cee2d4)

  • chore: fix misspelling (2d08fc8)

  • chore(docs): convert tabs to spaces

Some tabs snuck into the documentation. Convert them to 4-spaces. (9ea5520)

Documentation

  • docs(cli): showcase use of token scopes (4a6f8d6)

  • docs(projects): document export with upload to URL (03f5484)

  • docs: describe fetching existing export status (9c5b8d5)

  • docs(authors): add John (e2afb84)

  • docs: document CI Lint usage (d5de4b1)

  • docs(users): add docs about listing a user’s projects

Add docs about listing a user’s projects.

Update docs on the membership API to update the URL to the upstream docs and also add a note that it requires Administrator access to use. (065a1a5)

  • docs: update return type of pushrules

Update the return type of pushrules to surround None with back-ticks to make it code-formatted. (53cbecc)

  • docs: describe ROPC flow in place of password authentication (91c17b7)

  • docs(readme): Remove redundant -v that breaks the command Remove redundant -v that breaks the command (c523e18)

Features

  • feat: allow sort/ordering for project releases

See: https://docs.gitlab.com/ee/api/releases/#list-releases (b1dd284)

  • feat(cli): add a custom help formatter

Add a custom argparse help formatter that overrides the output format to list items vertically.

The formatter is derived from argparse.HelpFormatter with minimal changes.

Co-authored-by: John Villalovos john@sodarock.com Co-authored-by: Nejc Habjan nejc.habjan@siemens.com (005ba93)

  • feat: add support for iterations API (194ee01)

  • feat(groups): add support for shared projects API (66461ba)

  • feat(issues): add support for issue reorder API (8703324)

  • feat(namespaces): add support for namespace existence API (4882cb2)

  • feat: add support for group and project invitations API (7afd340)

  • feat(projects): add support for project restore API (4794ecc)

  • feat: add support for filtering jobs by scope

See: ‘scope’ here: https://docs.gitlab.com/ee/api/jobs.html#list-project-jobs (0e1c0dd)

  • feat: add asdict() and to_json() methods to Gitlab Objects

Add an asdict() method that returns a dictionary representation copy of the Gitlab Object. This is a copy and changes made to it will have no impact on the Gitlab Object.

The asdict() method name was chosen as both the dataclasses and attrs libraries have an asdict() function which has the similar purpose of creating a dictionary represenation of an object.

Also add a to_json() method that returns a JSON string representation of the object.

Closes: #1116 (08ac071)

  • feat(api): add support for instance-level registry repositories (284d739)

  • feat(groups): add support for group-level registry repositories (70148c6)

  • feat: Add ‘merge_pipelines_enabled’ project attribute

Boolean. Enable or disable merge pipelines.

See: https://docs.gitlab.com/ee/api/projects.html#edit-project https://docs.gitlab.com/ee/ci/pipelines/merged_results_pipelines.html (fc33c93)

  • feat: support validating CI lint results (3b1ede4)

  • feat(cli): add support for global CI lint (3f67c4b)

  • feat(objects): add Project CI Lint support

Add support for validating a project’s CI configuration [1]

[1] https://docs.gitlab.com/ee/api/lint.html (b213dd3)

  • feat: add support for group push rules

Add the GroupPushRules and GroupPushRulesManager classes.

Closes: #1259 (b5cdc09)

  • feat(api): add support for get for a MR approval rule

In GitLab 14.10 they added support to get a single merge request approval rule [1]

Add support for it to ProjectMergeRequestApprovalRuleManager

[1] https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-a-single-merge-request-level-rule (89c18c6)

Refactoring

  • refactor: migrate services to integrations (a428051)

  • refactor(objects): move ci lint to separate file (6491f1b)

  • refactor(test-projects): apply suggestions and use fixtures (a51f848)

  • refactor(test-projects): remove test_restore_project (9be0875)

Testing

  • test(cli): add tests for token scopes (263fe3d)

  • test: add test to show issue fixed

https://github.com/python-gitlab/python-gitlab/issues/1698 has been fixed. Add test to show that. (75bec7d)

  • test: always ensure clean config environment (8d4f13b)

  • test(ee): add an EE specific test (10987b3)

  • test(functional): simplify token creation (67ab24f)

  • test: fix broken test if user had config files

Use monkeypatch to ensure that no config files are reported for the test.

Closes: #2172 (864fc12)

  • test: allow podman users to run functional tests

Users of podman will likely have DOCKER_HOST set to something like unix:///run/user/1000/podman/podman.sock

Pass this environment variable so that it will be used during the functional tests. (ff215b7)

  • test(api_func_v4): catch deprecation warning for gl.lint()

Catch the deprecation warning for the call to gl.lint(), so it won’t show up in the log. (95fe924)

  • test(functional): use both get_all and all in list() tests (201298d)

  • test: add more tests for container registries (f6b6e18)

  • test(functional): replace len() calls with list membership checks (97e0eb9)

  • test(projects): add unit tests for projects (67942f0)

Unknown

  • Merge pull request #2198 from nickbroon/nickbroon-release-sort-order

feat: allow sort/ordering for project releases (c33cb20)

  • Merge pull request #2195 from python-gitlab/jlvillal/array_test

test: add test to show issue fixed (1cf5932)

  • Merge pull request #1699 from python-gitlab/jlvillal/arrays

fix: use the [] after key names for array variables in params (510ec30)

  • Merge pull request #1778 from python-gitlab/jlvillal/gitlab-ee

chore: enable using GitLab EE in functional tests (b661003)

  • Merge pull request #2184 from python-gitlab/renovate/commitizen-tools-commitizen-2.x

chore(deps): update pre-commit hook commitizen-tools/commitizen to v2.29.0 (346cf76)

  • Merge pull request #2182 from python-gitlab/renovate/commitizen-2.x

chore(deps): update dependency commitizen to v2.29.0 (e2ca0b4)

  • Merge pull request #2173 from python-gitlab/jlvillal/config_test_fix

test: fix broken test if user had config files (1ecbc7c)

  • Merge pull request #2166 from python-gitlab/jlvillal/podman

test: allow podman users to run functional tests (0b02b95)

  • Merge pull request #1785 from python-gitlab/jlvillal/reset_gitlab

chore: make reset_gitlab() better (789ef81)

  • Merge pull request #1784 from python-gitlab/jlvillal/sidekiq

chore: fixtures: after delete() wait to verify deleted (916b1db)

  • Merge pull request #2163 from python-gitlab/jlvillal/lint_warning

test(api_func_v4): catch deprecation warning for gl.lint() (1855279)

  • Merge pull request #2161 from nickbroon/nickbroon-jobs_scope

feat: add support for filtering jobs by scope (0549afa)

  • Merge pull request #2160 from python-gitlab/docs-author-add-john

docs(authors): add John (ead9f15)

  • Merge pull request #1872 from python-gitlab/jlvillal/as_dict

feat: add asdict() and to_json() methods to Gitlab Objects (fcbced8)

  • Merge pull request #2082 from python-gitlab/jlvillal/mark_lazy_state

chore: add a lazy boolean attribute to RESTObject (2c90fd0)

  • Merge pull request #2146 from python-gitlab/jlvillal/mypy_strict_step_by_step

chore: enable mypy check strict_equality (c84379d)

  • Merge pull request #2147 from python-gitlab/jlvillal/api_func_v4

chore: change name of API functional test to api_func_v4 (ed110bd)

  • Merge pull request #2141 from nickbroon/nickbroon-merge_pipelines_enabled

feat: Add ‘merge_pipelines_enabled’ project attribute (e409811)

  • Merge pull request #2125 from python-gitlab/jlvillal/user_docs

docs(users): add docs about listing a user’s projects (1fbfb22)

  • Merge pull request #1896 from python-gitlab/jlvillal/ci_lint

feat: add Project CI Lint support (d15fea0)

  • Merge pull request #2126 from python-gitlab/jlvillal/push_rules

docs: update return type of pushrules (88a1535)

  • Merge pull request #1266 from gokeefe/gokeefe/group_push_rules

#1259 Add GroupPushRules and GroupPushRulesManager classes (768890a)

  • Merge pull request #2114 from python-gitlab/jlvillal/remove_trys

chore: simplify multi-nested try blocks (3df404c)

  • Merge pull request #2117 from python-gitlab/jlvillal/encodedid_path

fix: ensure path elements are escaped (04c6063)

  • Merge pull request #2113 from tuxiqae/patch-1

Remove redundant -v that breaks the command (ca3b438)

  • Merge pull request #2069 from antoineauger/test/unit-tests-projects

test(projects): add unit tests for projects (0e4db56)

  • Merge pull request #2110 from python-gitlab/jlvillal/mr_approval_rules

feat(api): add support for get for a MR approval rule (389e1e6)

  • Merge pull request #2111 from python-gitlab/jlvillal/meta_fix

chore: fix misspelling (6486566)

  • Merge pull request #2112 from python-gitlab/jlvillal/doc_remove_tabs

chore(docs): convert tabs to spaces (8771ad8)

v3.6.0 (2022-06-28)

Bug Fixes

  • fix(base): do not fail repr() on lazy objects (1efb123)

  • fix(cli): project-merge-request-approval-rule

Using the CLI the command: gitlab project-merge-request-approval-rule list –mr-iid 1 –project-id foo/bar

Would raise an exception. This was due to the fact that _id_attr and _repr_attr were set for keys which are not returned in the response.

Add a unit test which shows the repr function now works. Before it did not.

This is an EE feature so we can’t functional test it.

Closes: #2065 (15a242c)

  • fix(cli): fix project export download for CLI

Since ac1c619cae6481833f5df91862624bf0380fef67 we delete parent arg keys from the args dict so this has been trying to access the wrong attribute. (5d14867)

Chores

  • chore(deps): ignore python-semantic-release updates (f185b17)

  • chore(workflows): explicitly use python-version (eb14475)

  • chore(deps): update actions/setup-python action to v4 (77c1f03)

  • chore(deps): update typing dependencies (acc5c39)

  • chore(deps): update pre-commit hook pycqa/pylint to v2.14.3 (d1fe838)

  • chore(ci): increase timeout for docker container to come online

Have been seeing timeout issues more and more. Increase timeout from 200 seconds to 300 seconds (5 minutes). (bda020b)

  • chore(docs): ignore nitpicky warnings (1c3efb5)

  • chore: patch sphinx for explicit re-exports (06871ee)

  • chore: bump mypy pre-commit hook (0bbcad7)

  • chore(gitlab): fix implicit re-exports for mpypy (981b844)

  • chore: add link to Commitizen in Github workflow

Add a link to the Commitizen website in the Github workflow. Hopefully this will help people when their job fails. (d08d07d)

  • chore(deps): update dependency pylint to v2.14.3 (9a16bb1)

  • chore: fix issue found with pylint==2.14.3

A new error was reported when running pylint==2.14.3: gitlab/client.py:488:0: W1404: Implicit string concatenation found in call (implicit-str-concat)

Fixed this issue. (eeab035)

  • chore(deps): update pre-commit hook commitizen-tools/commitizen to v2.27.1 (22c5db4)

  • chore(deps): update dependency requests to v2.28.0 (d361f4b)

  • chore(deps): update dependency mypy to v0.961 (f117b2f)

  • chore(deps): update typing dependencies (aebf9c8)

  • chore(deps): update dependency mypy to v0.960 (8c016c7)

  • chore(cli): rename “object” to “GitLab resource”

Make the parser name more user friendly by renaming from generic “object” to “GitLab resource” (62e64a6)

  • chore: use multiple processors when running PyLint

Use multiple processors when running PyLint. On my system it took about 10.3 seconds to run PyLint before this change. After this change it takes about 5.8 seconds to run PyLint. (7f2240f)

  • chore: enable pylint check: “redefined-outer-name”,

Enable the pylint check “redefined-outer-name” and fix the errors detected. (1324ce1)

  • chore: enable pylint check: “no-self-use”

Enable the pylint check “no-self-use” and fix the errors detected. (80aadaf)

  • chore: enable pylint check: “no-else-return”

Enable the pylint check “no-else-return” and fix the errors detected. (d0b0811)

  • chore: enable pylint check: “attribute-defined-outside-init”

Enable the pylint check: “attribute-defined-outside-init” and fix errors detected. (d6870a9)

  • chore: enable pylint check “raise-missing-from”

Enable the pylint check “raise-missing-from” and fix errors detected. (1a2781e)

  • chore: enable pylint checks which require no changes

Enabled the pylint checks that don’t require any code changes. Previously these checks were disabled. (50fdbc4)

  • chore: enable pylint checks

Enable the pylint checks:

  • unnecessary-pass

  • unspecified-encoding

Update code to resolve errors found (1e89164)

  • chore: rename whaction and action to resource_action in CLI

Rename the variables whaction and action to resource_action to improve code-readability. (fb3f28a)

  • chore: rename what to gitlab_resource

Naming a variable what makes it difficult to understand what it is used for.

Rename it to gitlab_resource as that is what is being stored.

The Gitlab documentation talks about them being resources: https://docs.gitlab.com/ee/api/api_resources.html

This will improve code readability. (c86e471)

  • chore: rename __call__() to run() in GitlabCLI

Less confusing to have it be a normal method. (6189437)

  • chore: enable ‘consider-using-sys-exit’ pylint check

Enable the ‘consider-using-sys-exit’ pylint check and fix errors raised. (0afcc3e)

  • chore: require f-strings

We previously converted all string formatting to use f-strings. Enable pylint check to enforce this. (96e994d)

  • chore(ci): pin 3.11 to beta.1 (7119f2d)

  • chore(cli): ignore coverage on exceptions triggering cli.die (98ccc3c)

  • chore: move utils._validate_attrs inside types.RequiredOptional

Move the validate_attrs function to be inside the RequiredOptional class. It makes sense for it to be part of the class as it is working on data related to the class. (9d629bb)

  • chore: remove use of ‘%’ string formatter in gitlab/utils.py

Replace usage with f-string (0c5a121)

  • chore: have EncodedId creation always return EncodedId

There is no reason to return an int as we can always return a str version of the int

Change EncodedId to always return an EncodedId. This removes the need to have mypy ignore the error raised. (a1a246f)

  • chore: move RequiredOptional to the gitlab.types module

By having RequiredOptional in the gitlab.base module it makes it difficult with circular imports. Move it to the gitlab.types module which has no dependencies on any other gitlab module. (7d26530)

  • chore: update type-hints return signature for GetWithoutIdMixin methods

Commit f0152dc3cc9a42aa4dc3c0014b4c29381e9b39d6 removed situation where get() in a GetWithoutIdMixin based class could return None

Update the type-hints to no longer return Optional AKA None (aa972d4)

  • chore: correct ModuleNotFoundError() arguments

Previously in commit 233b79ed442aac66faf9eb4b0087ea126d6dffc5 I had used the name argument for ModuleNotFoundError(). This basically is the equivalent of not passing any message to ModuleNotFoundError(). So when the exception was raised it wasn’t very helpful.

Correct that and add a unit-test that shows we get the message we expect. (0b7933c)

  • chore(deps): update typing dependencies (f3f79c1)

  • chore(deps): update dependency commitizen to v2.27.1 (456f9f1)

  • chore(mixins): remove None check as http_get always returns value (f0152dc)

Documentation

  • docs(api): add separate section for advanced usage (22ae101)

  • docs(api): document usage of head() methods (f555bfb)

  • docs(projects): provide more detailed import examples (8f8611a)

  • docs(projects): document 404 gotcha with unactivated integrations (522ecff)

  • docs(variables): instruct users to follow GitLab rules for values (194b6be)

  • docs(api): stop linking to python-requests.org (49c7e83)

  • docs(api): fix incorrect docs for merge_request_approvals (#2094)

  • docs(api): fix incorrect docs for merge_request_approvals

The set_approvers() method is on the ProjectApprovalManager class. It is not part of the ProjectApproval class.

The docs were previously showing to call set_approvers using a ProjectApproval instance, which would fail. Correct the documentation.

This was pointed out by a question on the Gitter channel.

Co-authored-by: Nejc Habjan nejc.habjan@siemens.com (5583eaa)

  • docs(api-usage): add import os in example (2194a44)

  • docs: drop deprecated setuptools build_sphinx (048d66a)

  • docs(usage): refer to upsteam docs instead of custom attributes (ae7d3b0)

  • docs(ext): fix rendering for RequiredOptional dataclass (4d431e5)

  • docs: documentation updates to reflect addition of mutually exclusive attributes (24b720e)

  • docs: use as_list=False or all=True in Getting started

In the “Getting started with the API” section of the documentation, use either as_list=False or all=True in the example usages of the list() method.

Also add a warning about the fact that list() by default does not return all items. (de8c6e8)

Features

  • feat(downloads): allow streaming downloads access to response iterator (#1956)

  • feat(downloads): allow streaming downloads access to response iterator

Allow access to the underlying response iterator when downloading in streaming mode by specifying iterator=True.

Update type annotations to support this change.

  • docs(api-docs): add iterator example to artifact download

Document the usage of the iterator=True option when downloading artifacts

  • test(packages): add tests for streaming downloads (b644721)

  • feat(users): add approve and reject methods to User

As requested in #1604.

Co-authored-by: John Villalovos john@sodarock.com (f57139d)

  • feat(api): support head() method for get and list endpoints (ce9216c)

  • feat(api): implement HEAD method (90635a7)

  • feat(api): convert gitlab.const to Enums

This allows accessing the elements by value, i.e.:

import gitlab.const gitlab.const.AccessLevel(20) (c3c6086)

  • feat: Add support for Protected Environments

  • https://docs.gitlab.com/ee/api/protected_environments.html

  • https://github.com/python-gitlab/python-gitlab/issues/1130

no write operation are implemented yet as I have no use case right now and am not sure how it should be done (1dc9d0f)

  • feat(users): add ban and unban methods (0d44b11)

  • feat(docker): provide a Debian-based slim image (384031c)

  • feat: support mutually exclusive attributes and consolidate validation to fix board lists (#2037)

add exclusive tuple to RequiredOptional data class to support for mutually exclusive attributes

consolidate _check_missing_create_attrs and _check_missing_update_attrs from mixins.py into _validate_attrs in utils.py

change _create_attrs in board list manager classes from required=(‘label_ld’,) to exclusive=(‘label_id’,’asignee_id’,’milestone_id’)

closes https://github.com/python-gitlab/python-gitlab/issues/1897 (3fa330c)

  • feat(client): introduce iterator=True and deprecate as_list=False in list()

as_list=False is confusing as it doesn’t explain what is being returned. Replace it with iterator=True which more clearly explains to the user that an iterator/generator will be returned.

This maintains backward compatibility with as_list but does issue a DeprecationWarning if as_list is set. (cdc6605)

Refactoring

  • refactor: do not recommend plain gitlab.const constants (d652133)

  • refactor: avoid possible breaking change in iterator (#2107)

Commit b6447211754e126f64e12fc735ad74fe557b7fb4 inadvertently introduced a possible breaking change as it added a new argument iterator and added it in between existing (potentially positional) arguments.

This moves the iterator argument to the end of the argument list and requires it to be a keyword-only argument. (212ddfc)

  • refactor: remove no-op id argument in GetWithoutIdMixin (0f2a602)

  • refactor(mixins): extract custom type transforms into utils (09b3b22)

Testing

  • test: add tests and clean up usage for new enums (323ab3c)

  • test(pylint): enable pylint “unused-argument” check

Enable the pylint “unused-argument” check and resolve issues it found.

  • Quite a few functions were accepting **kwargs but not then passing them on through to the next level. Now pass **kwargs to next level.

  • Other functions had no reason to accept **kwargs, so remove it

  • And a few other fixes. (23feae9)

  • test(api): add tests for HEAD method (b0f02fa)

  • test: add more tests for RequiredOptional (ce40fde)

  • test: move back to using latest Python 3.11 version (8c34781)

  • test: increase client coverage (00aec96)

  • test(cli): improve coverage for custom actions (7327f78)

  • test(gitlab): increase unit test coverage (df072e1)

Unknown

  • Merge pull request #2105 from python-gitlab/renovate/actions-setup-python-4.x

chore(deps): update actions/setup-python action to v4 (ebd5795)

  • Merge pull request #2100 from python-gitlab/jlvillal/pylint_2022-06-26

test(pylint): enable pylint “unused-argument” check (3c3f865)

  • Merge pull request #2061 from bgamari/patch-1

feat(users): add approve and reject methods to User (f9b7c7b)

  • Merge pull request #2089 from python-gitlab/jlvillal/more_time

chore(ci): increase timeout for docker container to come online (a825844)

  • Merge pull request #1688 from jspricke/enum

feat(api): Convert gitlab.const to Enums (f0ac3cd)

  • Merge pull request #2084 from calve/protected-environments

feat: Add support for Protected Environments (1feabc0)

  • Merge pull request #2083 from python-gitlab/jlvillal/cz

chore: add link to Commitizen in Github workflow (8342f53)

  • Merge pull request #2066 from python-gitlab/jlvillal/approval_rule_id

fix(cli): project-merge-request-approval-rule (41ceaca)

  • Merge pull request #2076 from python-gitlab/renovate/pylint-2.x

chore(deps): update dependency pylint to v2.14.3 (e48ad91)

  • Merge pull request #2077 from python-gitlab/jlvillal/pylint

chore: fix issue found with pylint==2.14.3 (8e0cd8b)

  • Merge pull request #2064 from antoineauger/feat/user-ban-unban

feat(users): add ban and unban methods (ca98d88)

  • Merge pull request #2057 from walterrowe/main

docs: update docs to reflect addition of mutually exclusive attributes (0f607f6)

  • Merge pull request #2055 from python-gitlab/jlvillal/resource

chore(cli): rename “object” to “GitLab resource” (0e3c461)

  • Merge pull request #2045 from python-gitlab/jlvillal/test_validate_attrs

test: add more tests for RequiredOptional (40c9b4f)

  • Merge pull request #2056 from python-gitlab/jlvillal/pylint_job

chore: use multiple processors when running PyLint (7b9bb3c)

  • Merge pull request #2051 from python-gitlab/jlvillal/more_more_pylint

chore: enable more pylint checks (7a5923c)

  • Merge pull request #2054 from python-gitlab/jlvillal/resource

chore: rename whaction and action to resource_action in CLI (61b8beb)

  • Merge pull request #2049 from python-gitlab/jlvillal/python_311

test: move back to using latest Python 3.11 version (6cdccd9)

  • Merge pull request #2053 from python-gitlab/jlvillal/resource

chore: rename what to gitlab_resource (8d30b15)

  • Merge pull request #2052 from python-gitlab/jlvillal/cli_minor_clean

chore: rename __call__() to run() in GitlabCLI (4eb5bad)

  • Merge pull request #2050 from python-gitlab/jlvillal/more_pylint

chore: enable ‘consider-using-sys-exit’ pylint check (9ab3c10)

  • Merge pull request #2043 from python-gitlab/jlvillal/f-string

chore: require f-strings (3d000d3)

  • Merge pull request #2042 from python-gitlab/jlvillal/exclusive

Clean-up the validate_attrs method/function (28cf3c3)

  • Merge pull request #2040 from python-gitlab/jlvillal/type_alias

chore: have EncodedId creation always return EncodedId (dea9435)

  • Merge pull request #2039 from python-gitlab/jlvillal/required_optional

chore: move RequiredOptional to the gitlab.types module (37eb8e0)

  • Merge pull request #2036 from python-gitlab/jlvillal/get_not_none

chore: update type-hints return signature for GetWithoutIdMixin methods (1f17349)

  • Merge pull request #2033 from python-gitlab/jlvillal/module_not_found_error

chore: correct ModuleNotFoundError() arguments (b2e6f3b)

  • Merge pull request #2034 from python-gitlab/renovate/typing-dependencies

chore(deps): update typing dependencies (38218e5)

  • Merge pull request #2035 from python-gitlab/renovate/commitizen-2.x

chore(deps): update dependency commitizen to v2.27.1 (91e60ba)

  • Merge pull request #2032 from python-gitlab/jlvillal/i_hate_as_list

feat(client): introduce iterator=True and deprecate as_list=False in list() (c51b538)

  • Merge pull request #1884 from python-gitlab/jlvillal/list_docs

docs: use as_list=False or all=True in Getting started (5ae18d0)

v3.5.0 (2022-05-28)

Bug Fixes

  • fix(cli): changed default allow_abbrev value to fix arguments collision problem (#2013)

fix(cli): change default allow_abbrev value to fix argument collision (d68cacf)

  • fix: duplicate subparsers being added to argparse

Python 3.11 added an additional check in the argparse libary which detected duplicate subparsers being added. We had duplicate subparsers being added.

Make sure we don’t add duplicate subparsers.

Closes: #2015 (f553fd3)

Chores

  • chore(ci): fix prefix for action version (1c02189)

  • chore(ci): pin semantic-release version (0ea61cc)

  • chore(deps): update pre-commit hook pycqa/pylint to v2.13.9 (1e22790)

  • chore(deps): update dependency pylint to v2.13.9 (4224950)

  • chore: run the pylint check by default in tox

Since we require pylint to pass in the CI. Let’s run it by default in tox. (55ace1d)

  • chore: rename the test which runs flake8 to be flake8

Previously the test was called pep8. The test only runs flake8 so call it flake8 to be more precise. (78b4f99)

  • chore(deps): update pre-commit hook pycqa/pylint to v2.13.8 (1835593)

  • chore(deps): update dependency pylint to v2.13.8 (b235bb0)

  • chore: exclude build/ directory from mypy check

The build/ directory is created by the tox environment twine-check. When the build/ directory exists mypy will have an error. (989a12b)

  • chore: add cz to default tox environment list and skip_missing_interpreters

Add the cz (comittizen) check by default.

Set skip_missing_interpreters = True so that when a user runs tox and doesn’t have a specific version of Python it doesn’t mark it as an error. (ba8c052)

  • chore(deps): update dependency types-requests to v2.27.25 (d6ea47a)

  • chore(ci): replace commitlint with commitizen (b8d15fe)

  • chore(renovate): set schedule to reduce noise (882fe7a)

  • chore(deps): update dependency types-requests to v2.27.24 (f88e3a6)

  • chore(deps): update dependency types-requests to v2.27.23 (a6fed8b)

Documentation

  • docs: update issue example and extend API usage docs (aad71d2)

  • docs(CONTRIBUTING.rst): fix link to conventional-changelog commit format documentation (2373a4f)

  • docs: add missing Admin access const value

As shown here, Admin access is set to 60: https://docs.gitlab.com/ee/api/protected_branches.html#protected-branches-api (3e0d4d9)

  • docs(merge_requests): add new possible merge request state and link to the upstream docs

The actual documentation do not mention the locked state for a merge request (e660fa8)

Features

  • feat(objects): support get project storage endpoint (8867ee5)

  • feat: display human-readable attribute in repr() if present (6b47c26)

  • feat(ux): display project.name_with_namespace on project repr

This change the repr from:

$ gitlab.projects.get(id=some_id)

To:

$ gitlab.projects.get(id=some_id) <Project id:some_id name_with_namespace:”group_name / project_name”>

This is especially useful when working on random projects or listing of projects since users generally don’t remember projects ids. (e598762)

Testing

  • test(projects): add tests for list project methods (fa47829)

Unknown

  • Merge pull request #2022 from MichaelSweikata/feat/documentation-update

docs: update issue example and extend API usage docs (792cee9)

  • Merge pull request #2012 from rnoberger/rnoberger/test-projects

test: increase projects coverage (fd9154e)

  • Merge pull request #2019 from python-gitlab/jlvillal/tox

Some improvements to our tox environment defaults (d121d2d)

  • Merge pull request #2018 from python-gitlab/renovate/pycqa-pylint-2.x

chore(deps): update pre-commit hook pycqa/pylint to v2.13.8 (9e64645)

  • Merge pull request #2017 from python-gitlab/renovate/pylint-2.x

chore(deps): update dependency pylint to v2.13.8 (0049f83)

  • Merge pull request #2014 from python-gitlab/jlvillal/python3.11beta1

fix: duplicate subparsers being added to argparse (7d5a0c9)

  • Merge pull request #1996 from Psycojoker/project-name-in-repr

feat(ux): display project.name_with_namespace on project repr (82c9a07)

  • Merge pull request #2008 from python-gitlab/jlvillal/mypy-tox

chore: exclude build/ directory from mypy check (d169983)

  • Merge pull request #2009 from python-gitlab/jlvillal/tox-env

chore: add cz to default tox environment list and skip_missing_interpreters (5cb2859)

  • Merge pull request #2005 from carlosduelo/patch-1

merge request can have state locked (ef207da)

  • Merge pull request #2001 from python-gitlab/renovate/typing-dependencies

chore(deps): update dependency types-requests to v2.27.25 (04e0d24)

  • Merge pull request #1994 from python-gitlab/renovate/typing-dependencies

chore(deps): update dependency types-requests to v2.27.24 (79b903d)

v3.4.0 (2022-04-28)

Bug Fixes

  • fix: avoid passing redundant arguments to API (3431887)

  • fix: add ChunkedEncodingError to list of retryable exceptions (7beb20f)

  • fix(cli): add missing filters for project commit list (149d244)

  • fix: add 52x range to retry transient failures and tests (c3ef1b5)

  • fix: also retry HTTP-based transient errors (3b49e4d)

Chores

  • chore(deps): update dependency mypy to v0.950 (241e626)

  • chore(deps): update dependency types-requests to v2.27.22 (22263e2)

  • chore(deps): update dependency types-requests to v2.27.21 (0fb0955)

  • chore(deps): update dependency pytest to v7.1.2 (fd3fa23)

  • chore(deps): update typing dependencies (c12466a)

  • chore(deps): update pre-commit hook pycqa/pylint to v2.13.7 (1396221)

  • chore(deps): update dependency pylint to v2.13.7 (5fb2234)

  • chore(deps): update typing dependencies (d27cc6a)

  • chore(deps): update pre-commit hook pycqa/pylint to v2.13.5 (17d5c6c)

  • chore(deps): update dependency pylint to v2.13.5 (5709675)

  • chore(deps): update codecov/codecov-action action to v3 (292e91b)

  • chore(deps): update dependency types-setuptools to v57.4.12 (6551353)

  • chore(client): remove duplicate code (5cbbf26)

  • chore(deps): update dependency types-requests to v2.27.16 (ad799fc)

  • chore(deps): upgrade gitlab-ce to 14.9.2-ce.0 (d508b18)

  • chore(deps): update pre-commit hook pycqa/pylint to v2.13.4 (9d0b252)

  • chore(deps): update dependency pylint to v2.13.4 (a9a9392)

  • chore(deps): update pre-commit hook pycqa/pylint to v2.13.3 (8f0a3af)

  • chore(deps): update dependency pylint to v2.13.3 (0ae3d20)

  • chore(deps): update black to v22.3.0 (8d48224)

Documentation

  • docs(api-docs): docs fix for application scopes (e1ad93d)

Features

  • feat(objects): support getting project/group deploy tokens by id (fcd37fe)

  • feat(user): support getting user SSH key by id (6f93c05)

  • feat: emit a warning when using a list() method returns max

A common cause of issues filed and questions raised is that a user will call a list() method and only get 20 items. As this is the default maximum of items that will be returned from a list() method.

To help with this we now emit a warning when the result from a list() method is greater-than or equal to 20 (or the specified per_page value) and the user is not using either all=True, all=False, as_list=False, or page=X. (1339d64)

  • feat(api): re-add topic delete endpoint

This reverts commit e3035a799a484f8d6c460f57e57d4b59217cd6de. (d1d96bd)

Unknown

  • Merge pull request #1988 from python-gitlab/renovate/mypy-0.x

chore(deps): update dependency mypy to v0.950 (0c0035e)

  • Merge pull request #1986 from python-gitlab/renovate/typing-dependencies

chore(deps): update dependency types-requests to v2.27.21 (ab8352e)

  • Merge pull request #1983 from python-gitlab/renovate/pytest-7.x

chore(deps): update dependency pytest to v7.1.2 (4a6bd90)

  • Merge pull request #1981 from python-gitlab/renovate/typing-dependencies

chore(deps): update typing dependencies (cf2953e)

  • Merge pull request #1980 from python-gitlab/renovate/pycqa-pylint-2.x

chore(deps): update pre-commit hook pycqa/pylint to v2.13.7 (0305979)

  • Merge pull request #1979 from python-gitlab/renovate/pylint-2.x

chore(deps): update dependency pylint to v2.13.7 (396e30c)

  • Merge pull request #1965 from python-gitlab/fix/redundant-args-api

fix: avoid passing redundant arguments to API (ba7692a)

  • Merge pull request #1974 from Sineaggi/add-chunked-to-list-of-retryable-exceptions

Add ChunkedEncodingError to list of retryable exceptions (07a16af)

  • Merge pull request #1963 from python-gitlab/feat/deploy-token-get

feat(objects): support getting project/group deploy tokens by id (69ace2d)

  • Merge pull request #1962 from python-gitlab/feat/user-ssh-key

feat(user): support getting user SSH key by id (68bf5d8)

  • Merge pull request #1875 from python-gitlab/jlvillal/list_warning

feat: emit a warning when using a list() method returns max (4d6f125)

  • Merge pull request #1971 from python-gitlab/renovate/pycqa-pylint-2.x

chore(deps): update pre-commit hook pycqa/pylint to v2.13.5 (5370979)

  • Merge pull request #1964 from python-gitlab/fix/missing-commit-list-filters

fix(cli): add missing filters for project commit list (3b0806e)

  • Merge pull request #1968 from python-gitlab/renovate/codecov-codecov-action-3.x

chore(deps): update codecov/codecov-action action to v3 (de8cfd9)

  • Merge pull request #1967 from python-gitlab/renovate/typing-dependencies

chore(deps): update dependency types-setuptools to v57.4.12 (3be5ac2)

  • Merge pull request #1904 from Sineaggi/retry-additional-http-transient-errors

Retry additional http transient errors (0353bd4)

  • Merge pull request #1961 from python-gitlab/renovate/typing-dependencies

chore(deps): update dependency types-requests to v2.27.16 (19ab07d)

  • Merge pull request #1959 from python-gitlab/renovate/pycqa-pylint-2.x

chore(deps): update pre-commit hook pycqa/pylint to v2.13.4 (8db6841)

  • Merge pull request #1958 from python-gitlab/renovate/pylint-2.x

chore(deps): update dependency pylint to v2.13.4 (400d8e5)

  • Merge pull request #1951 from wacuuu/main

docs: small docs fix-up for application scopes (8e241e4)

  • Merge pull request #1954 from python-gitlab/renovate/pycqa-pylint-2.x

chore(deps): update pre-commit hook pycqa/pylint to v2.13.3 (eee173e)

  • Merge pull request #1953 from python-gitlab/renovate/pylint-2.x

chore(deps): update dependency pylint to v2.13.3 (5498f9e)

  • Merge pull request #1952 from python-gitlab/renovate/black

chore(deps): update black to v22.3.0 (f942e65)

v3.3.0 (2022-03-28)

Bug Fixes

  • fix: support RateLimit-Reset header

Some endpoints are not returning the Retry-After header when rate-limiting occurrs. In those cases use the RateLimit-Reset [1] header, if available.

Closes: #1889

[1] https://docs.gitlab.com/ee/user/admin_area/settings/user_and_ip_rate_limits.html#response-headers (4060146)

Chores

  • chore(deps): update dependency sphinx to v4.5.0 (36ab769)

  • chore(deps): update pre-commit hook pycqa/pylint to v2.13.2 (14d367d)

  • chore(deps): update dependency pylint to v2.13.2 (10f15a6)

  • chore(deps): update dependency types-requests to v2.27.15 (2e8ecf5)

  • chore(deps): update pre-commit hook pycqa/pylint to v2.13.1 (1d0c6d4)

  • chore(deps): update dependency types-requests to v2.27.14 (be6b54c)

  • chore(deps): update dependency pylint to v2.13.1 (eefd724)

  • chore(deps): update pre-commit hook pycqa/pylint to v2.13.0 (9fe60f7)

  • chore(deps): update dependency pylint to v2.13.0 (5fa403b)

  • chore(deps): update dependency mypy to v0.942 (8ba0f8c)

  • chore(deps): update dependency pytest-console-scripts to v1.3.1 (da392e3)

  • chore(deps): update dependency pytest to v7.1.1 (e31f2ef)

  • chore(deps): update typing dependencies (21e7c37)

  • chore(deps): update dependency mypy to v0.941 (3a9d4f1)

  • chore(deps): update dependency pytest to v7.1.0 (27c7e33)

  • chore(deps): update dependency types-requests to v2.27.12 (8cd668e)

  • chore(deps): update dependency mypy to v0.940 (dd11084)

  • chore(deps): update black to v22 (3f84f1b)

  • chore(deps): update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v8 (5440780)

  • chore(deps): update dependency types-setuptools to v57.4.10 (b37fc41)

  • chore(deps): update dependency pytest to v7 (ae8d70d)

  • chore(deps): update actions/upload-artifact action to v3 (18a0eae)

  • chore(deps): update actions/stale action to v5 (d841185)

  • chore(deps): update actions/setup-python action to v3 (7f845f7)

  • chore(deps): update dependency sphinx to v4.4.0 (425d161)

  • chore(deps): update actions/checkout action to v3 (7333cbb)

  • chore(deps): update dependency pytest-console-scripts to v1.3 (9c202dd)

  • chore(deps): update dependency mypy to v0.931 (33646c1)

  • chore(deps): update typing dependencies (37a7c40)

  • chore(deps): update dependency requests to v2.27.1 (95dad55)

Code Style

  • style: reformat for black v22 (93d4403)

Documentation

  • docs(chore): include docs .js files in sdist (3010b40)

  • docs: fix typo and incorrect style (2828b10)

  • docs: add pipeline test report summary support (d78afb3)

Features

  • feat(object): add pipeline test report summary support (a97e0cf)

Unknown

  • Merge pull request #1947 from python-gitlab/renovate/typing-dependencies

chore(deps): update dependency types-requests to v2.27.15 (59ae16c)

  • Merge pull request #1895 from python-gitlab/jlvillal/rate-limit

fix: support RateLimit-Reset header (114958e)

  • Merge pull request #1905 from derekschrock/docs-static

docs(chore): Include docs .js files in sdist (363bc87)

  • Merge pull request #1917 from python-gitlab/renovate/major-black

chore(deps): update black to v22 (major) (a4e76eb)

  • Merge pull request #1919 from python-gitlab/renovate/alessandrojcm-commitlint-pre-commit-hook-8.x

chore(deps): update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v8 (71ebee4)

  • Merge pull request #1915 from kinbald/test-report-summary

feat: add support for test report summary (7966584)

v3.2.0 (2022-02-28)

Bug Fixes

  • fix(services): use slug for id_attr instead of custom methods (e30f39d)

  • fix: remove custom delete method for labels

The usage of deleting was incorrect according to the current API. Remove custom delete() method as not needed.

Add tests to show it works with labels needing to be encoded.

Also enable the test_group_labels() test function. Previously it was disabled.

Add ability to do a get() for group labels.

Closes: #1867 (0841a2a)

Chores

  • chore: create a custom warnings.warn wrapper

Create a custom warnings.warn wrapper that will walk the stack trace to find the first frame outside of the gitlab/ path to print the warning against. This will make it easier for users to find where in their code the error is generated from (6ca9aa2)

  • chore: correct type-hints for per_page attrbute

There are occasions where a GitLab list() call does not return the x-per-page header. For example the listing of custom attributes.

Update the type-hints to reflect that. (e825653)

  • chore: require kwargs for utils.copy_dict()

The non-keyword arguments were a tiny bit confusing as the destination was first and the source was second.

Change the order and require key-word only arguments to ensure we don’t silently break anyone. (7cf35b2)

  • chore: create new ArrayAttribute class

Create a new ArrayAttribute class. This is to indicate types which are sent to the GitLab server as arrays https://docs.gitlab.com/ee/api/#array

At this stage it is identical to the CommaSeparatedListAttribute class but will be used later to support the array types sent to GitLab.

This is the second step in a series of steps of our goal to add full support for the GitLab API data types[1]:

  • array

  • hash

  • array of hashes

Step one was: commit 5127b1594c00c7364e9af15e42d2e2f2d909449b

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types

Related: #1698 (a57334f)

  • chore(ci): do not run release workflow in forks (2b6edb9)

Code Style

  • style(objects): add spacing to docstrings (700d25d)

Documentation

  • docs: enable gitter chat directly in docs (bd1ecdd)

  • docs: add delete methods for runners and project artifacts (5e711fd)

  • docs: add retry_transient infos

Co-authored-by: Nejc Habjan hab.nejc@gmail.com (bb1f054)

  • docs: add transient errors retry info (b7a1266)

  • docs(artifacts): deprecate artifacts() and artifact() methods (64d01ef)

  • docs: revert “chore: add temporary banner for v3” (#1864)

This reverts commit a349793307e3a975bb51f864b48e5e9825f70182.

Co-authored-by: Wadim Klincov wadim.klincov@siemens.com (7a13b9b)

Features

  • feat(merge_request_approvals): add support for deleting MR approval rules (85a734f)

  • feat(artifacts): add support for project artifacts delete API (c01c034)

  • feat(mixins): allow deleting resources without IDs (0717517)

  • feat(objects): add a complete artifacts manager (c8c2fa7)

Testing

  • test(unit): clean up MR approvals fixtures (0eb4f7f)

  • test(runners): add test for deleting runners by auth token (14b88a1)

  • test(functional): fix GitLab configuration to support pagination

When pagination occurs python-gitlab uses the URL provided by the GitLab server to use for the next request.

We had previously set the GitLab server configuraiton to say its URL was http://gitlab.test which is not in DNS. Set the hostname in the URL to http://127.0.0.1:8080 which is the correct URL for the GitLab server to be accessed while doing functional tests.

Closes: #1877 (5b7d00d)

  • test(services): add functional tests for services (2fea2e6)

  • test(objects): add tests for project artifacts (8ce0336)

Unknown

  • Merge pull request #1882 from python-gitlab/jlvillal/custom_warn

chore: create a custom warnings.warn wrapper (5beda3b)

  • Merge pull request #1881 from python-gitlab/jlvillal/easy2

test(functional): fix GitLab configuration to support pagination (4cb7d92)

  • Merge pull request #1880 from python-gitlab/jlvillal/easy

chore: correct type-hints for per_page attrbute (5e19694)

  • Merge pull request #1876 from emirot/patch-1

docs: add transient errors retry info (9897c98)

  • Merge pull request #1871 from python-gitlab/jlvillal/copy_dict

chore: require kwargs for utils.copy_dict() (2adf31d)

  • Merge pull request #1868 from python-gitlab/jlvillal/delete_label

fix: remove custom delete method for labels (0ab0fc1)

  • Merge pull request #1866 from python-gitlab/jlvillal/arrays_2

chore: create new ArrayAttribute class (7646360)

v3.1.1 (2022-01-28)

Bug Fixes

  • fix(cli): make ‘per_page’ and ‘page’ type explicit (d493a5e)

  • fix(cli): make ‘timeout’ type explicit (bbb7df5)

  • fix(cli): allow custom methods in managers (8dfed0c)

  • fix(objects): make resource access tokens and repos available in CLI (e0a3a41)

Chores

  • chore: use dataclass for RequiredOptional (30117a3)

  • chore: remove redundant list comprehension (271cfd3)

  • chore: consistently use open() encoding and file descriptor (dc32d54)

  • chore: don’t explicitly pass args to super() (618267c)

  • chore: always use context manager for file IO (e8031f4)

  • chore: remove old-style classes (ae2a015)

  • chore: rename types.ListAttribute to types.CommaSeparatedListAttribute

This name more accurately describes what the type is. Also this is the first step in a series of steps of our goal to add full support for the GitLab API data types[1]:

  • array

  • hash

  • array of hashes

[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types (5127b15)

  • chore: rename gitlab/__version__.py -> gitlab/_version.py

It is confusing to have a gitlab/__version__.py because we also create a variable gitlab.__version__ which can conflict with gitlab/__version__.py.

For example in gitlab/const.py we have to know that gitlab.__version__ is a module and not the variable due to the ordering of imports. But in most other usage gitlab.__version__ is a version string.

To reduce confusion make the name of the version file gitlab/_version.py. (b981ce7)

  • chore: create return type-hints for get_id() & encoded_id

Create return type-hints for RESTObject.get_id() and RESTObject.encoded_id. Previously was saying they return Any. Be more precise in saying they can return either: None, str, or int. (0c3a1d1)

  • chore(tests): use method projects.transfer()

When doing the functional tests use the new function projects.transfer instead of the deprecated function projects.transfer_project() (e5af2a7)

Code Style

  • style: use f-strings where applicable (cfed622)

  • style: use literals to declare data structures (019a40f)

Documentation

  • docs: enhance release docs for CI_JOB_TOKEN usage (5d973de)

  • docs(changelog): add missing changelog items (01755fb)

Testing

  • test: add a meta test to make sure that v4/objects/ files are imported

Add a test to make sure that all of the gitlab/v4/objects/ files are imported in gitlab/v4/objects/__init__.py (9c8c804)

  • test: convert usage of match_querystring to match

In the responses library the usage of match_querystring is deprecated. Convert to using match (d16e41b)

  • test: remove usage of httpmock library

Convert all usage of the httpmock library to using the responses library. (5254f19)

  • test: use ‘responses’ in test_mixins_methods.py

Convert from httmock to responses in test_mixins_methods.py

This leaves only one file left to convert (208da04)

Unknown

  • Merge pull request #1862 from thomasgl-orange/cli-fix-timeout

fix(cli): make ‘timeout’, ‘per_page’ and ‘page’ type explicit (3fb4486)

  • Merge pull request #1858 from python-gitlab/jlvillal/attribute_rename

chore: rename types.ListAttribute to types.CommaSeparatedListAttribute (39e7435)

  • Merge pull request #1848 from python-gitlab/jlvillal/objects_imported

test: add a meta test to make sure that v4/objects/ files are imported (07539c9)

  • Merge pull request #1854 from MRigal/docs/small-releases-additions

Enhance releases API docs for CI_JOB_TOKEN usage (ff04900)

  • Merge pull request #1845 from python-gitlab/jlvillal/rm_httmock

Remove usage of httmock and clean up deprecations (ff4b1cc)

  • Merge pull request #1838 from python-gitlab/jlvillal/version_mv

chore: rename gitlab/__version__.py to gitlab/_version.py (8af403c)

  • Merge pull request #1843 from python-gitlab/jlvillal/rm_httmock

test: use ‘responses’ in test_mixins_methods.py (fe14dd5)

  • Merge pull request #1841 from python-gitlab/jlvillal/get_id

chore: create return type-hints for get_id() & encoded_id (1ac982a)

  • Merge pull request #1840 from python-gitlab/docs/missing-changelog-items

docs(changelog): add missing changelog items (a1dbe86)

  • Merge pull request #1839 from python-gitlab/jlvillal/catch_warnings

chore(tests): use method projects.transfer() (48b06a9)

v3.1.0 (2022-01-14)

Bug Fixes

  • fix: use url-encoded ID in all paths

Make sure all usage of the ID in the URL path is encoded. Normally it isn’t an issue as most IDs are integers or strings which don’t contain a slash (‘/’). But when the ID is a string with a slash character it will break things.

Add a test case that shows this fixes wikis issue with subpages which use the slash character.

Closes: #1079 (12435d7)

  • fix(members): use new *All objects for *AllManager managers

Change it so that:

GroupMemberAllManager uses GroupMemberAll object ProjectMemberAllManager uses ProjectMemberAll object

Create GroupMemberAll and ProjectMemberAll objects that do not support any Mixin type methods. Previously we were using GroupMember and ProjectMember which support the save() and delete() methods but those methods will not work with objects retrieved using the /members/all/ API calls.

list() API calls: [1] GET /groups/:id/members/all GET /projects/:id/members/all

get() API calls: [2] GET /groups/:id/members/all/:user_id GET /projects/:id/members/all/:user_id

Closes: #1825 Closes: #848

[1] https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project-including-inherited-and-invited-members [2] https://docs.gitlab.com/ee/api/members.html#get-a-member-of-a-group-or-project-including-inherited-and-invited-members (755e0a3)

  • fix(cli): add missing list filters for environments (6f64d40)

  • fix(api): services: add missing lazy parameter

Commit 8da0b758c589f608a6ae4eeb74b3f306609ba36d added the lazy parameter to the services get() method but missed then using the lazy parameter when it called super(...).get(...)

Closes: #1828 (888f332)

  • fix: broken URL for FAQ about attribute-error-list

The URL was missing a ‘v’ before the version number and thus the page did not exist.

Previously the URL for python-gitlab 3.0.0 was: https://python-gitlab.readthedocs.io/en/3.0.0/faq.html#attribute-error-list

Which does not exist.

Change it to: https://python-gitlab.readthedocs.io/en/v3.0.0/faq.html#attribute-error-list add the ‘v’ ————————–^ (1863f30)

  • fix: remove custom URL encoding

We were using str.replace() calls to take care of URL encoding issues.

Switch them to use our utils._url_encode() function which itself uses urllib.parse.quote()

Closes: #1356 (3d49e5e)

  • fix: remove default arguments for mergerequests.merge()

The arguments should_remove_source_branch and merge_when_pipeline_succeeds are optional arguments. We should not be setting any default value for them.

https://docs.gitlab.com/ee/api/merge_requests.html#accept-mr

Closes: #1750 (8e589c4)

  • fix(cli): url-encode path components of the URL

In the CLI we need to make sure the components put into the path portion of the URL are url-encoded. Otherwise they will be interpreted as part of the path. For example can specify the project ID as a path, but in the URL it must be url-encoded or it doesn’t work.

Also stop adding the components of the path as query parameters in the URL.

Closes: #783 Closes: #1498 (ac1c619)

  • fix: change to http_list for some ProjectCommit methods

Fix the type-hints and use http_list() for the ProjectCommits methods:

  • diff()

  • merge_requests()

  • refs()

This will enable using the pagination support we have for lists.

Closes: #1805 Closes: #1231 (497e860)

Chores

  • chore(groups): use encoded_id for group path (868f243)

  • chore(objects): use self.encoded_id where applicable

Updated a few remaining usages of self.id to use self.encoded_id as for the most part we shouldn’t be using self.id

There are now only a few (4 lines of code) remaining uses of self.id, most of which seem that they should stay that way. (75758bf)

  • chore(objects): use self.encoded_id where could be a string

Updated a few remaining usages of self.id to use self.encoded_id where it could be a string value. (c3c3a91)

  • chore(projects): fix typing for transfer method

Co-authored-by: John Villalovos john@sodarock.com (0788fe6)

  • chore: ignore intermediate coverage artifacts (110ae91)

  • chore: replace usage of utils._url_encode() with utils.EncodedId()

utils.EncodedId() has basically the same functionalityy of using utils._url_encode(). So remove utils._url_encode() as we don’t need it. (b07eece)

  • chore: add EncodedId string class to use to hold URL-encoded paths

Add EncodedId string class. This class returns a URL-encoded string but ensures it will only URL-encode it once even if recursively called.

Also added some functional tests of ‘lazy’ objects to make sure they work. (a2e7c38)

  • chore: add pprint() and pformat() methods to RESTObject

This is useful in debugging and testing. As can easily print out the values from an instance in a more human-readable form. (d69ba04)

  • chore: add logging to tests/functional/conftest.py

I have found trying to debug issues in the functional tests can be difficult. Especially when trying to figure out failures in the CI running on Github.

Add logging to tests/functional/conftest.py to have a better understanding of what is happening during a test run which is useful when trying to troubleshoot issues in the CI. (a1ac9ae)

  • chore: fix functional test failure if config present

Previously c8256a5933d745f70c7eea0a7d6230b51bac0fbc was done to fix this but it missed two other failures. (c9ed3dd)

  • chore(docs): use admonitions consistently (55c67d1)

  • chore(dist): add docs *.md files to sdist

build_sphinx to fail due to setup.cfg warning-is-error (d9457d8)

  • chore: fix missing comma

There was a missing comma which meant the strings were concatenated instead of being two separate strings. (7c59fac)

  • chore: add a stale workflow

Use the stale action to close issues and pull-requests with no activity.

Issues: It will mark them as stale after 60 days and then close them once they have been stale for 15 days.

Pull-Requests: It will mark pull-requests as stale after 90 days and then close them once they have been stale for 15 days.

https://github.com/actions/stale

Closes: #1649 (2c036a9)

  • chore: add functional test of mergerequest.get()

Add a functional test of test mergerequest.get() and mergerequest.get(…, lazy=True)

Closes: #1425 (a92b55b)

  • chore: add temporary banner for v3 (a349793)

Continuous Integration

  • ci: don’t fail CI if unable to upload the code coverage data

If a CI job can’t upload coverage results to codecov.com it causes the CI to fail and code can’t be merged. (d5b3744)

Documentation

  • docs: update project access token API reference link (73ae955)

  • docs(cli): make examples more easily navigable by generating TOC (f33c523)

Features

  • feat: add support for Groups API method transfer() (0007006)

  • feat(api): add project.transfer() and deprecate transfer_project() (259668a)

  • feat(api): return result from SaveMixin.save()

Return the new object data when calling SaveMixin.save().

Also remove check for None value when calling self.manager.update() as that method only returns a dictionary.

Closes: #1081 (e6258a4)

  • feat: add support for Group Access Token API

See https://docs.gitlab.com/ee/api/group_access_tokens.html (c01b7c4)

Testing

  • test(groups): enable group transfer tests (57bb67a)

Unknown

  • Merge pull request #1836 from python-gitlab/jlvillal/id_to_encodedid

chore(objects): use self.encoded_id where applicable (2c62d91)

  • Merge pull request #1835 from python-gitlab/jlvillal/id_to_encodedid

chore(objects): use self.encoded_id where could be a string (34110dd)

  • Merge pull request #1832 from python-gitlab/jlvillal/return_save

feat(api): return result from SaveMixin.save() (27e0742)

  • Merge pull request #1834 from python-gitlab/jlvillal/cover_no_fail

ci: don’t fail CI if unable to upload the code coverage data (da30753)

  • Merge pull request #1831 from python-gitlab/chore/ignore-coverage

chore: ignore intermediate coverage artifacts (8b14ff0)

  • Merge pull request #1819 from python-gitlab/jlvillal/encoded_id

fix: use url-encoded ID in all paths (bc48840)

  • Merge pull request #1827 from python-gitlab/jlvillal/all_objects

fix: members: use new *All objects for *AllManager managers (58e5b25)

  • Merge pull request #1829 from python-gitlab/jlvillal/lazy_service

fix(api): services: add missing lazy parameter (824151c)

  • Merge pull request #1823 from python-gitlab/jlvillal/fix_url

fix: broken URL for FAQ about attribute-error-list (4a000b6)

  • Merge pull request #1812 from python-gitlab/jlvillal/pprint

chore: add pprint() and pformat() methods to RESTObject (bdc19b1)

  • Merge pull request #1786 from python-gitlab/jlvillal/logging

test: add logging to tests/functional/conftest.py (ac81272)

  • Merge pull request #1816 from python-gitlab/jlvillal/remove_replace

fix: remove custom URL encoding (24d2766)

  • Merge pull request #1818 from python-gitlab/jlvillal/merge_request_merge_defaults

fix: remove default arguments for mergerequests.merge() (0dba899)

  • Merge pull request #1790 from python-gitlab/jlvillal/parent_attrs

fix(cli): url-encode path components of the URL (22a1516)

  • Merge pull request #1809 from python-gitlab/jlvillal/list_api

fix: change to http_list for some ProjectCommit methods (d45b59e)

  • Merge pull request #1813 from derekschrock/missing-dist

chore(dist): add docs *.md files to sdist (4861883)

  • Merge pull request #1814 from python-gitlab/jlvillal/missing_comma

chore: fix missing comma (fd523b3)

  • Merge pull request #1789 from python-gitlab/jlvillal/stale

chore: add a stale workflow (9896340)

  • Merge pull request #1803 from python-gitlab/jlvillal/test_1425

chore: add functional test of mergerequest.get() (bc6c6e6)

v3.0.0 (2022-01-05)

Breaking

  • feat(cli): allow options from args and environment variables

BREAKING-CHANGE: The gitlab CLI will now accept CLI arguments and environment variables for its global options in addition to configuration file options. This may change behavior for some workflows such as running inside GitLab CI and with certain environment variables configured. (ca58008)

  • fix: stop encoding ‘.’ to ‘%2E’

Forcing the encoding of ‘.’ to ‘%2E’ causes issues. It also goes against the RFC: https://datatracker.ietf.org/doc/html/rfc3986.html#section-2.3

From the RFC: For consistency, percent-encoded octets in the ranges of ALPHA (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers…

Closes #1006 Related #1356 Related #1561

BREAKING CHANGE: stop encoding ‘.’ to ‘%2E’. This could potentially be a breaking change for users who have incorrectly configured GitLab servers which don’t handle period ‘.’ characters correctly. (702e41d)

  • feat(cli): do not require config file to run CLI

BREAKING CHANGE: A config file is no longer needed to run the CLI. python-gitlab will default to https://gitlab.com with no authentication if there is no config file provided. python-gitlab will now also only look for configuration in the provided PYTHON_GITLAB_CFG path, instead of merging it with user- and system-wide config files. If the environment variable is defined and the file cannot be opened, python-gitlab will now explicitly fail. (92a893b)

  • feat: remove support for Python 3.6, require 3.7 or higher

Python 3.6 is End-of-Life (EOL) as of 2021-12 as stated in https://www.python.org/dev/peps/pep-0494/

By dropping support for Python 3.6 and requiring Python 3.7 or higher it allows python-gitlab to take advantage of new features in Python 3.7, which are documented at: https://docs.python.org/3/whatsnew/3.7.html

Some of these new features that may be useful to python-gitlab are:

  • PEP 563, postponed evaluation of type annotations.

  • dataclasses: PEP 557 – Data Classes

  • importlib.resources

  • PEP 562, customization of access to module attributes.

  • PEP 560, core support for typing module and generic types.

  • PEP 565, improved DeprecationWarning handling

BREAKING CHANGE: As of python-gitlab 3.0.0, Python 3.6 is no longer supported. Python 3.7 or higher is required. (414009d)

  • chore: rename master branch to main

BREAKING CHANGE: As of python-gitlab 3.0.0, the default branch for development has changed from master to main. (545f8ed)

  • refactor(objects): remove deprecated branch protect methods

BREAKING CHANGE: remove deprecated branch protect methods in favor of the more complete protected branches API. (9656a16)

  • fix(api): replace deprecated attribute in delete_in_bulk() (#1536)

BREAKING CHANGE: The deprecated name_regex attribute has been removed in favor of name_regex_delete. (see https://gitlab.com/gitlab-org/gitlab/-/commit/ce99813cf54) (c59fbdb)

  • fix(objects): rename confusing to_project_id argument

BREAKING CHANGE: rename confusing to_project_id argument in transfer_project to project_id (--project-id in CLI). This is used for the source project, not for the target namespace. (ce4bc0d)

  • refactor(objects): remove deprecated constants defined in objects

BREAKING CHANGE: remove deprecated constants defined in gitlab.v4.objects, and use only gitlab.const module (3f320af)

  • refactor(objects): remove deprecated tag release API

BREAKING CHANGE: remove deprecated tag release API. This was removed in GitLab 14.0 (2b8a94a)

  • refactor(objects): remove deprecated project.issuesstatistics

BREAKING CHANGE: remove deprecated project.issuesstatistics in favor of project.issues_statistics (ca7777e)

  • refactor(objects): remove deprecated members.all() method

BREAKING CHANGE: remove deprecated members.all() method in favor of members_all.list() (4d7b848)

  • refactor(objects): remove deprecated pipelines() method

BREAKING CHANGE: remove deprecated pipelines() methods in favor of pipelines.list() (c4f5ec6)

  • feat: default to gitlab.com if no URL given

BREAKING CHANGE: python-gitlab will now default to gitlab.com if no URL is given (8236281)

  • fix!: raise error if there is a 301/302 redirection

Before we raised an error if there was a 301, 302 redirect but only from an http URL to an https URL. But we didn’t raise an error for any other redirects.

This caused two problems:

  1. PUT requests that are redirected get changed to GET requests which don’t perform the desired action but raise no error. This is because the GET response succeeds but since it wasn’t a PUT it doesn’t update. See issue: https://github.com/python-gitlab/python-gitlab/issues/1432

  2. POST requests that are redirected also got changed to GET requests. They also caused hard to debug tracebacks for the user. See issue: https://github.com/python-gitlab/python-gitlab/issues/1477

Correct this by always raising a RedirectError exception and improve the exception message to let them know what was redirected.

Closes: #1485 Closes: #1432 Closes: #1477 (d56a434)

Bug Fixes

  • fix: handle situation where GitLab does not return values

If a query returns more than 10,000 records than the following values are NOT returned: x.total_pages x.total

Modify the code to allow no value to be set for these values. If there is not a value returned the functions will now return None.

Update unit test so no longer xfail

https://docs.gitlab.com/ee/user/gitlab_com/index.html#pagination-response-headers

Closes #1686 (cb824a4)

  • fix(build): do not include docs in wheel package (68a97ce)

  • fix(api): delete invalid ‘project-runner get’ command (#1628)

  • fix(api): delete ‘group-runner get’ and ‘group-runner delete’ commands

Co-authored-by: Léo GATELLIER git@leogatellier.fr (905781b)

  • fix(build): do not package tests in wheel (969dccc)

Chores

  • chore: fix typo in MR documentation (2254222)

  • chore(deps): update dependency argcomplete to v2 (c6d7e9a)

  • chore(deps): update dependency requests to v2.27.0 (f8c3d00)

  • chore: add test case to show branch name with period works

Add a test case to show that a branch name with a period can be fetched with a get()

Closes: #1715 (ea97d7a)

  • chore(deps): update typing dependencies (1f95613)

  • chore(deps): update dependency mypy to v0.930 (ccf8190)

  • chore(deps): upgrade mypy pre-commit hook (e19e4d7)

  • chore: fix functional test failure if config present

Fix functional test failure if config present and configured with token.

Closes: #1791 (c8256a5)

  • chore: ensure reset_gitlab() succeeds

Ensure reset_gitlab() succeeds by waiting to make sure everything has been deleted as expected. If the timeout is exceeded fail the test.

Not using wait_for_sidekiq as it didn’t work. During testing I didn’t see any sidekiq processes as being busy even though not everything was deleted. (0aa0b27)

  • chore: skip a functional test if not using >= py3.9

One of the tests requires Python 3.9 or higher to run. Mark the test to be skipped if running Python less than 3.9. (ac9b595)

  • chore: update version in docker-compose.yml

When running with docker-compose on Ubuntu 20.04 I got the error:

$ docker-compose up ERROR: The Compose file ‘./docker-compose.yml’ is invalid because: networks.gitlab-network value Additional properties are not allowed (‘name’ was unexpected)

Changing the version in the docker-compose.yml file fro ‘3’ to ‘3.5’ resolved the issue. (79321aa)

  • chore: generate artifacts for the docs build in the CI

When building the docs store the created documentation as an artifact so that it can be viewed.

This will create a html-docs.zip file which can be downloaded containing the contents of the build/sphinx/html/ directory. It can be downloaded, extracted, and then viewed. This can be useful in reviewing changes to the documentation.

See https://github.com/actions/upload-artifact for more information on how this works. (85b43ae)

  • chore: add and document optional parameters for get MR

Add and document (some of the) optional parameters that can be done for a project.merge_requests.get()

Closes #1775 (bfa3dbe)

  • chore(deps): update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v6 (fb9110b)

  • chore: remove ‘# type: ignore’ for new mypy version

mypy 0.920 now understands the type of ‘http.client.HTTPConnection.debuglevel’ so we remove the ‘type: ignore’ comment to make mypy pass (34a5f22)

  • chore(deps): update dependency mypy to v0.920 (a519b2f)

  • chore(deps): update pre-commit hook pycqa/flake8 to v4 (98a5592)

  • chore(deps): update pre-commit hook psf/black to v21 (b86e819)

  • chore(deps): update pre-commit hook pycqa/isort to v5.10.1 (8ac4f4a)

  • chore(ci): enable renovate for pre-commit (1ac4329)

  • chore: fix unit test if config file exists locally

Closes #1764 (c80b3b7)

  • chore: add .env as a file that search tools should not ignore

The .env file was not set as a file that should not be ignored by search tools. We want to have the search tools search any .env files. (c9318a9)

  • chore(deps): update dependency sphinx to v4.3.2 (2210e56)

  • chore(deps): update dependency types-requests to v2.26.2 (ac7e329)

  • chore: add Python 3.11 testing

Add a unit test for Python 3.11. This will use the latest version of Python 3.11 that is available from https://github.com/actions/python-versions/

At this time it is 3.11.0-alpha.2 but will move forward over time until the final 3.11 release and updates. So 3.11.0, 3.11.1, … will be matched. (b5ec192)

  • chore(api): temporarily remove topic delete endpoint

It is not yet available upstream. (e3035a7)

  • chore: fix renovate setup for gitlab docker image (49af15b)

  • chore: add get() methods for GetWithoutIdMixin based classes

Add the get() methods for the GetWithoutIdMixin based classes.

Update the tests/meta/test_ensure_type_hints.py tests to check to ensure that the get methods are defined with the correct return type. (d27c50a)

  • chore: github workflow: cancel prior running jobs on new push

If new new push is done to a pull-request, then cancel any already running github workflow jobs in order to conserve resources. (fd81569)

  • chore: add running unit tests on windows/macos

Add running the unit tests on windows-latest and macos-latest with Python 3.10. (ad5d60c)

  • chore: fix pylint error “expression-not-assigned”

Fix pylint error “expression-not-assigned” and remove check from the disabled list.

And I personally think it is much more readable now and is less lines of code. (a90eb23)

  • chore: set pre-commit mypy args to empty list

https://github.com/pre-commit/mirrors-mypy/blob/master/.pre-commit-hooks.yaml

Sets some default args which seem to be interfering with things. Plus we set all of our args in the pyproject.toml file. (b67a6ad)

  • chore: run pre-commit on changes to the config file

If .pre-commit-config.yaml or .github/workflows/pre_commit.yml are updated then run pre-commit. (5f10b3b)

  • chore: add initial pylint check

Initial pylint check is added. A LONG list of disabled checks is also added. In the future we should work through the list and resolve the errors or disable them on a more granular level. (041091f)

  • chore: enable ‘warn_redundant_casts’ for mypy

Enable ‘warn_redundant_casts’for mypy and resolve one issue. (f40e9b3)

  • chore: enable subset of the ‘mypy –strict’ options that work

Enable the subset of the ‘mypy –strict’ options that work with no changes to the code. (a86d049)

  • chore(deps): update dependency black to v21.12b0 (ab841b8)

  • chore(docs): link to main, not master (af0cb4d)

  • chore(docs): use builtin autodoc hints (5e9c943)

  • chore(docs): load autodoc-typehints module (bd366ab)

  • chore: attempt to be more informative for missing attributes

A commonly reported issue from users on Gitter is that they get an AttributeError for an attribute that should be present. This is often caused due to the fact that they used the list() method to retrieve the object and objects retrieved this way often only have a subset of the full data.

Add more details in the AttributeError message that explains the situation to users. This will hopefully allow them to resolve the issue.

Update the FAQ in the docs to add a section discussing the issue.

Closes #1138 (1839c9e)

  • chore: use constants from gitlab.const module

Have code use constants from the gitlab.const module instead of from the top-level gitlab module. (6b8067e)

  • chore(tests): apply review suggestions (381c748)

  • chore(deps): update dependency sphinx to v4.3.1 (93a3893)

  • chore: remove pytest-console-scripts specific config

Remove the pytest-console-scripts specific config from the global ‘[pytest]’ config section.

Use the command line option --script-launch-mode=subprocess

Closes #1713 (e80dcb1)

  • chore(deps): update typing dependencies (8d4c953)

  • chore: remove duplicate/no-op tests from meta/test_ensure_type_hints

Before we were generating 725 tests for the meta/test_ensure_type_hints.py tests. Which isn’t a huge concern as it was fairly fast. But when we had a failure we would usually get two failures for each problem as the same test was being run multiple times.

Changed it so that:

  1. Don’t add tests that are not for *Manager classes

  2. Use a set so that we don’t have duplicate tests.

After doing that our generated test count in meta/test_ensure_type_hints.py went from 725 to 178 tests.

Additionally removed the parsing of pyproject.toml to generate files to ignore as we have finished adding type-hints to all files in gitlab/v4/objects/. This also means we no longer use the toml library so remove installation of types-toml.

To determine the test count the following command was run: $ tox -e py39 – -k test_ensure_type_hints (a2f59f4)

  • chore: add type-hints to gitlab/v4/objects/files.py (0c22bd9)

  • chore: add type-hints to gitlab/v4/objects/labels.py (d04e557)

  • chore: add type-hints to gitlab/v4/objects/sidekiq.py (a91a303)

  • chore: add type-hints to gitlab/v4/objects/services.py (8da0b75)

  • chore: add type-hints to gitlab/v4/objects/repositories.py (00d7b20)

  • chore: add type-hints to gitlab/v4/objects/pipelines.py (cb3ad6c)

  • chore: add type-hints to gitlab/v4/objects/milestones.py (8b6078f)

  • chore: add type-hints to gitlab/v4/objects/jobs.py (e8884f2)

  • chore: add type-hints to gitlab/v4/objects/issues.py (93e39a2)

  • chore: add type-hints to gitlab/v4/objects/geo_nodes.py (13243b7)

  • chore: add type-hints to gitlab/v4/objects/epics.py (d4adf8d)

  • chore: fix issue with adding type-hints to ‘manager’ attribute

When attempting to add type-hints to the the ‘manager’ attribute into a RESTObject derived class it would break things.

This was because our auto-manager creation code would automatically add the specified annotated manager to the ‘manager’ attribute. This breaks things.

Now check in our auto-manager creation if our attribute is called ‘manager’. If so we ignore it. (9a451a8)

  • chore(deps): update dependency types-setuptools to v57.4.3 (ec2c68b)

  • chore(deps): update dependency black to v21 (5bca87c)

  • chore: enable mypy for tests/meta/* (ba7707f)

  • chore: have renovate upgrade black version (#1700)

renovate is not upgrading the black package. There is an open issue[1] about this.

Also change .commitlintrc.json to allow 200 character footer lines in the commit message. Otherwise would be forced to split the URL across multiple lines making it un-clickable :(

Use suggested work-arounds from: https://github.com/renovatebot/renovate/issues/7167#issuecomment-904106838 https://github.com/scop/bash-completion/blob/e7497f6ee8232065ec11450a52a1f244f345e2c6/renovate.json#L34-L38

[1] https://github.com/renovatebot/renovate/issues/7167 (21228cd)

  • chore: correct test_groups.py test

The test was checking twice if the same group3 was not in the returned list. Should have been checking for group3 and group4.

Also added a test that only skipped one group and checked that the group was not in the returned list and a non-skipped group was in the list. (9c878a4)

  • chore: add type-hints to gitlab/v4/objects/merge_request_approvals.py (cf3a99a)

  • chore: check setup.py with mypy

Prior commit 06184daafd5010ba40bb39a0768540b7e98bd171 fixed the type-hints for setup.py. But missed removing ‘setup’ from the exclude list in pyproject.toml for mypy checks.

Remove ‘setup’ from the exclude list in pyproject.toml from mypy checks. (77cb7a8)

  • chore: ensure get() methods have correct type-hints

Fix classes which don’t have correct ‘get()’ methods for classes derived from GetMixin.

Add a unit test which verifies that classes have the correct return type in their ‘get()’ method. (46773a8)

  • chore: create a ‘tests/meta/’ directory and put test_mro.py in it

The ‘test_mro.py’ file is not really a unit test but more of a ‘meta’ check on the validity of the code base. (94feb8a)

  • chore: add type-hints to setup.py and check with mypy (06184da)

  • chore: add type-hints to gitlab/v4/objects/snippets.py (f256d4f)

  • chore(deps): update dependency types-pyyaml to v6.0.1 (a544cd5)

  • chore(deps): update dependency sphinx to v4.3.0 (57283fc)

  • chore(deps): update dependency types-requests to v2.26.0 (7528d84)

  • chore(deps): update dependency isort to v5.10.1 (2012975)

  • chore(deps): update dependency types-requests to v2.25.12 (205ad5f)

  • chore: enforce type-hints on most files in gitlab/v4/objects/

    • Add type-hints to some of the files in gitlab/v4/objects/

    • Fix issues detected when adding type-hints

    • Changed mypy exclusion to explicitly list the 13 files that have not yet had type-hints added. (7828ba2)

  • chore: add type hints for gitlab/v4/objects/commits.py (dc096a2)

  • chore(ci): add workflow to lock old issues (a7d64fe)

  • chore: add type-hints to multiple files in gitlab/v4/objects/

Add and/or check type-hints for the following files gitlab.v4.objects.access_requests gitlab.v4.objects.applications gitlab.v4.objects.broadcast_messages gitlab.v4.objects.deployments gitlab.v4.objects.keys gitlab.v4.objects.merge_trains gitlab.v4.objects.namespaces gitlab.v4.objects.pages gitlab.v4.objects.personal_access_tokens gitlab.v4.objects.project_access_tokens gitlab.v4.objects.tags gitlab.v4.objects.templates gitlab.v4.objects.triggers

Add a ‘get’ method with the correct type for Managers derived from GetMixin. (8b75a77)

  • chore: add type-hints to gitlab/v4/objects/groups.py

  • Add type-hints to gitlab/v4/objects/groups.py

  • Have share() function update object attributes.

  • Add ‘get()’ method so that type-checkers will understand that getting a group is of type Group. (94dcb06)

  • chore: add type-hints to gitlab/v4/objects/merge_requests.py

  • Add type-hints to gitlab/v4/objects/merge_requests.py

  • Add return value to cancel_merge_when_pipeline_succeeds() function as GitLab docs show it returns a value.

  • Add return value to approve() function as GitLab docs show it returns a value.

  • Add ‘get()’ method so that type-checkers will understand that getting a project merge request is of type ProjectMergeRequest. (f9c0ad9)

  • chore(deps): update dependency isort to v5.10.0 (ae62468)

  • chore(ci): wait for all coverage jobs before posting comment (c7fdad4)

  • chore(deps): update dependency types-pyyaml to v6 (0b53c0a)

  • chore(deps): update typing dependencies (4170dbe)

  • chore(deps): update dependency flake8 to v4 (79785f0)

  • chore(deps): update typing dependencies (4eb8ec8)

  • chore(deps): upgrade gitlab-ce to 14.3.2-ce.0 (5a1678f)

  • chore(objects): remove non-existing trigger ownership method (8dc7f40)

  • chore: add type-hints to gitlab/v4/objects/users.py

Adding type-hints to gitlab/v4/objects/users.py (88988e3)

  • chore(deps): update dependency types-requests to v2.25.9 (e3912ca)

  • chore: fix type-check issue shown by new requests-types

types-requests==2.25.9 changed a type-hint. Update code to handle this change. (0ee9aa4)

  • chore(deps): update python docker tag to v3.10 (b3d6d91)

  • chore(deps): update dependency sphinx to v4 (73745f7)

  • chore: clean up install docs (a5d8b7f)

  • chore: attempt to fix flaky functional test

Add an additional check to attempt to solve the flakiness of the test_merge_request_should_remove_source_branch() test. (487b9a8)

  • chore: convert to using type-annotations for managers

Convert our manager usage to be done via type annotations.

Now to define a manager to be used in a RESTObject subclass can simply do: class ExampleClass(CRUDMixin, RESTObject): my_manager: MyManager

Any type-annotation that annotates it to be of type *Manager (with the exception of RESTManager) will cause the manager to be created on the object. (d8de4dc)

  • chore: improve type-hinting for managers

The ‘managers’ are dynamically created. This unfortunately means that we don’t have any type-hints for them and so editors which understand type-hints won’t know that they are valid attributes.

  • Add the type-hints for the managers we define.

  • Add a unit test that makes sure that the type-hints and the ‘_managers’ attribute are kept in sync with each other.

  • Add unit test that makes sure specified managers in ‘_managers’ have a name ending in ‘Managers’ to keep with current convention.

  • Make RESTObject._managers always present with a default value of None.

  • Fix a type-issue revealed now that mypy knows what the type is (c9b5d3b)

  • chore(deps): update dependency types-pyyaml to v5.4.10 (bdb6cb9)

Documentation

  • docs: switch to Furo and refresh introduction pages (ee6b024)

  • docs: correct documentation for updating discussion note

Closes #1777 (ee66f4a)

  • docs: rename documentation files to match names of code files

Rename the merge request related documentation files to match the code files. This will make it easier to find the documentation quickly.

Rename: docs/gl_objects/mrs.rst -> docs/gl_objects/merge_requests.rst   docs/gl_objects/mr_approvals.rst -> docs/gl_objects/merge_request_approvals.rst (ee3f865)

  • docs(project): remove redundant encoding parameter (fed613f)

  • docs: use annotations for return types (79e785e)

  • docs: only use type annotations for documentation (b7dde0d)

  • docs: update docs to use gitlab.const for constants

Update the docs to use gitlab.const to access constants. (b3b0b5f)

  • docs: add links to the GitLab API docs

Add links to the GitLab API docs for merge_requests.py as it contains code which spans two different API documentation pages. (e3b5d27)

  • docs: fix API delete key example (b31bb05)

  • docs(pipelines): document take_ownership method (69461f6)

  • docs(api): document the update method for project variables (7992911)

  • docs(api): clarify job token usage with auth()

See issue #1620 (3f423ef)

  • docs: fix a few typos

There are small typos in:

  • docs/gl_objects/deploy_tokens.rst

  • gitlab/base.py

  • gitlab/mixins.py

  • gitlab/v4/objects/features.py

  • gitlab/v4/objects/groups.py

  • gitlab/v4/objects/packages.py

  • gitlab/v4/objects/projects.py

  • gitlab/v4/objects/sidekiq.py

  • gitlab/v4/objects/todos.py

Fixes:

  • Should read treatment rather than reatment.

  • Should read transferred rather than transfered.

  • Should read registered rather than registred.

  • Should read occurred rather than occured.

  • Should read overridden rather than overriden.

  • Should read marked rather than maked.

  • Should read instantiate rather than instanciate.

  • Should read function rather than fonction. (7ea4ddc)

  • docs: consolidate changelogs and remove v3 API docs (90da8ba)

  • docs: correct documented return type

repository_archive() returns ‘bytes’ not ‘str’

https://docs.gitlab.com/ee/api/repositories.html#get-file-archive

Fixes: #1584 (acabf63)

Features

  • feat(docker): remove custom entrypoint from image

This is no longer needed as all of the configuration is handled by the CLI and can be passed as arguments. (80754a1)

  • feat(api): support file format for repository archive (83dcabf)

  • feat: add support for squash_option in Projects

There is an optional squash_option parameter which can be used when creating Projects and UserProjects.

Closes #1744 (a246ce8)

  • feat(api): add support for Topics API (e7559bf)

  • feat: add delete on package_file object (124667b)

  • feat(api): add support for epic notes

Added support for notes on group epics

Signed-off-by: Raimund Hook raimund.hook@exfo.com (7f4edb5)

  • feat: add support for projects.groups.list()

Add support for projects.groups.list() endpoint.

Closes #1717 (68ff595)

  • feat(api): add merge trains

Add support for merge trains (fd73a73)

  • feat(api): add project milestone promotion

Adds promotion to Project Milestones

Signed-off-by: Raimund Hook raimund.hook@exfo.com (f068520)

  • feat(api): add merge request approval state

Add support for merge request approval state (f41b093)

  • feat(api): add project label promotion

Adds a mixin that allows the /promote endpoint to be called.

Signed-off-by: Raimund Hook raimund.hook@exfo.com (6d7c88a)

  • feat(objects): support delete package files API (4518046)

  • feat(objects): list starred projects of a user (47a5606)

  • feat(build): officially support and test python 3.10 (c042ddc)

  • feat(objects): support Create and Revoke personal access token API (e19314d)

  • feat: allow global retry_transient_errors setup

retry_transient_errors can now be set through the Gitlab instance and global configuration

Documentation for API usage has been updated and missing tests have been added. (3b1d3a4)

Refactoring

  • refactor: deprecate accessing constants from top-level namespace

We are planning on adding enumerated constants into gitlab/const.py, but if we do that than they will end up being added to the top-level gitlab namespace. We really want to get users to start using gitlab.const. to access the constant values in the future.

Add the currently defined constants to a list that should not change. Use a module level getattr function so that we can deprecate access to the top-level constants.

Add a unit test which verifies we generate a warning when accessing the top-level constants. (c0aa0e1)

  • refactor: use new-style formatting for named placeholders (c0d8810)

  • refactor: use f-strings for string formatting (7925c90)

Testing

  • test: reproduce missing pagination headers in tests (501f9a1)

  • test: drop httmock dependency in test_gitlab.py (c764bee)

  • test(api): fix current user mail count in newer gitlab (af33aff)

  • test(cli): improve basic CLI coverage (6b892e3)

  • test(build): add smoke tests for sdist & wheel package (b8a47ba)

Unknown

  • Merge pull request #1804 from mlegner/patch-1

chore: fix typo in MR documentation (1582387)

  • Merge pull request #1800 from python-gitlab/jlvillal/dot_branch

chore: add test case to show branch name with period works (896a8c7)

  • Merge pull request #1799 from python-gitlab/renovate/mypy-0.x

chore(deps): update dependency mypy to v0.930 (2323a7c)

  • Merge pull request #1792 from python-gitlab/jlvillal/cli_test

chore: fix functional test failure if config present (2ac2a68)

  • Merge pull request #1773 from python-gitlab/jlvillal/pagination

fix: handle situation where gitlab.com does not return values (a3eafab)

  • Merge pull request #1783 from python-gitlab/jlvillal/sidekiq

chore: ensure reset_gitlab() succeeds (f26bf7d)

  • Merge pull request #1782 from python-gitlab/jlvillal/repository_func_tests

chore: skip a functional test if not using >= py3.9 (d65ce36)

  • Merge pull request #1781 from python-gitlab/jlvillal/docker_compose

chore: update version in docker-compose.yml (171df89)

  • Merge pull request #1774 from python-gitlab/jlvillal/doc_artifacts

chore: generate artifacts for the docs build in the CI (3cb2352)

  • Merge pull request #1776 from python-gitlab/jlvillal/rebase_in_progress

Add some docs for getting the status of a merge_request rebase (e7d4d91)

  • Merge pull request #1766 from python-gitlab/jlvillal/leave_dot

fix: stop encoding ‘.’ to ‘%2E’ (eef8059)

  • Merge pull request #1770 from python-gitlab/renovate/alessandrojcm-commitlint-pre-commit-hook-6.x

chore(deps): update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v6 (182ab92)

  • Merge pull request #1753 from python-gitlab/renovate/mypy-0.x

chore(deps): update dependency mypy to v0.920 (5ea5392)

  • Merge pull request #1765 from python-gitlab/jlvillal/unit_test_config

chore: fix unit test if config file exists locally (ccefe80)

  • Merge pull request #1757 from python-gitlab/jlvillal/gitignore

chore: add .env as a file that search tools should not ignore (3ee061c)

  • Merge pull request #1746 from python-gitlab/jlvillal/squash_option

feat: add support for squash_option in Projects (7799cb9)

  • Merge pull request #1743 from python-gitlab/feat/cli-without-config-file

feat(cli): do not require config file to run CLI (170a4d9)

  • Merge pull request #1742 from python-gitlab/jlvillal/py311_alpha

chore: add Python 3.11 testing (74d4e4b)

  • Merge pull request #1710 from python-gitlab/jlvillal/get_without_id

chore: add get() methods for GetWithoutIdMixin based classes (ac5defa)

  • Merge pull request #1733 from simonisateur/fix-package-file-delete

feat: package file delete on package file object (2f37ccb)

  • Merge pull request #1736 from python-gitlab/jlvillal/workflow

chore: github workflow: cancel prior running jobs on new push (4945353)

  • Merge pull request #1726 from python-gitlab/jlvillal/windows

chore: add running unit tests on windows/macos (83f36d6)

  • Merge pull request #1738 from python-gitlab/jlvillal/pylint_fixes

chore: fix pylint error “expression-not-assigned” (3679591)

  • Merge pull request #1729 from python-gitlab/jlvillal/pylint

chore: add initial pylint check (3a7d6f6)

  • Merge pull request #1727 from python-gitlab/jlvillal/mypy_strict_two_steps

Enable more strict mypy checking (1c33080)

  • Merge pull request #1709 from python-gitlab/docs/sphinx-annotations

docs: only use type annotations for documentation (2708f91)

  • Merge pull request #1702 from python-gitlab/jlvillal/attribute_help

chore: attempt to be more informative for missing attributes (387e59f)

  • Merge pull request #1694 from python-gitlab/jlvillal/const_explicit

refactor: explicitly import gitlab.const values into top-level namespace (e6582a3)

  • Merge pull request #1721 from python-gitlab/test/cli-coverage

test(cli): improve basic CLI coverage (09a973e)

  • Merge pull request #1714 from python-gitlab/jlvillal/pytest_script_launch_mode

chore: remove pytest-console-scripts specific config (1badfeb)

  • Merge pull request #1712 from StingRayZA/Epicnotes

feat(api): add support for epic notes (70b9870)

  • Merge pull request #1718 from python-gitlab/jlvillal/project_groups

feat: add support for projects.groups.list() (64f2360)

  • Merge pull request #1707 from python-gitlab/jlvillal/reduce_meta_tests

chore: remove duplicate/no-op tests from meta/test_ensure_type_hints (3225f2c)

  • Merge pull request #1695 from python-gitlab/jlvillal/mypy_epics

chore: add type-hints to remaining gitlab/v4/objects/*.py files (7ba5995)

  • Merge pull request #1705 from python-gitlab/jlvillal/drop_py_36

feat: remove support for Python 3.6, require 3.7 or higher (a390ec3)

  • Merge pull request #1693 from python-gitlab/jlvillay/mypy_test_meta

chore: enable mypy for tests/meta/* (9b78c10)

  • Merge pull request #1701 from python-gitlab/jlvillal/func_test

chore: correct test_groups.py test (178ec1a)

  • Merge pull request #1696 from python-gitlab/jlvillal/mypy_merge_request_approvals

chore: add type-hints to gitlab/v4/objects/merge_request_approvals.py (2cd15ac)

  • Merge pull request #1692 from python-gitlab/jlvillal/mypy_setup

chore: check setup.py with mypy (500895a)

  • Merge pull request #1681 from python-gitlab/jlvillal/mypy_ensure_type_hints

Ensure get() methods have correct type-hints (0951989)

  • Merge pull request #1683 from python-gitlab/jlvillal/mypy_setup

chore: add type-hints to setup.py and check with mypy (a553ee7)

  • Merge pull request #1691 from python-gitlab/jlvillal/mypy_snippets

chore: add type-hints to gitlab/v4/objects/snippets.py (f775668)

  • Merge pull request #1680 from python-gitlab/jlvillal/mypy_small_files_1

chore: enforce type-hints on most files in gitlab/v4/objects/ (472b300)

  • Merge pull request #1678 from python-gitlab/jlvillal/mypy_commits

chore: add type hints for gitlab/v4/objects/commits.py (9a2f54c)

  • Merge pull request #1677 from python-gitlab/chore/ci-lock-threads

chore(ci): add workflow to lock old issues (0e6fb5e)

  • Merge pull request #1674 from python-gitlab/jlvillal/mypy_small_files_1

chore: add type-hints to multiple files in gitlab/v4/objects/ (cf801d8)

  • Merge pull request #1668 from python-gitlab/jlvillal/mypy_groups

chore: add type-hints to gitlab/v4/objects/groups.py (f3688dc)

  • Merge pull request #1673 from python-gitlab/jlvillal/mypy_merge_requests

chore: add type-hints to gitlab/v4/objects/merge_requests.py (32ea954)

  • Merge pull request #1670 from python-gitlab/jlvillal/merge_requests_api

docs: add links to the GitLab API docs (4ab9e92)

  • Merge pull request #1665 from python-gitlab/renovate/isort-5.x

chore(deps): update dependency isort to v5.10.0 (f51d9be)

  • Merge pull request #1646 from JacobHenner/add-merge-trains

feat(api): add merge trains (ed88bce)

  • Merge pull request #1655 from StingRayZA/add-milestone-promote

feat(api): add project milestone promotion (5ce3b17)

  • Merge pull request #1641 from JacobHenner/add-merge-request-approval-state

feat(api): add merge request approval state (422309f)

  • Merge pull request #1610 from StingRayZA/add-label-promote

feat(api): add project label promotion (853d850)

  • Merge pull request #1629 from python-gitlab/chore/master-to-main

chore: rename master branch to main (63b2070)

  • Merge pull request #1616 from lmmx/patch-1

Document the update method for project variables (e851eed)

  • Merge pull request #1624 from axl89/docs-clarification

Clarified CI Job Token auth() caveats (49fae96)

  • Merge pull request #1515 from JohnVillalovos/jlvillal/mypy_v4_obj_users

chore: add type-hints to gitlab/v4/objects/users.py (7753fa2)

  • Merge pull request #1621 from JohnVillalovos/jlvillal/mypy_dep

chore: fix type-check issue shown by new requests-types (e93f84b)

  • Merge pull request #1619 from python-gitlab/renovate/python-3.x

chore(deps): update python docker tag to v3.10 (d97f79d)

  • Merge pull request #1617 from python-gitlab/feat/support-3.10

feat(build): officially support and test python 3.10 (5c17c36)

  • Merge pull request #1450 from python-gitlab/renovate/sphinx-4.x

chore(deps): update dependency sphinx to v4 (6ce56c2)

  • Merge pull request #1603 from timgates42/bugfix_typos

docs: fix a few typos (227607c)

  • Merge pull request #1486 from JohnVillalovos/jlvillal/prohibit_redirection

fix!: raise error if there is a 301/302 redirection (3742405)

  • Merge pull request #1512 from JohnVillalovos/jlvillal/type_managers

chore: improve type-hinting for managers (5247e8b)

  • Merge pull request #1585 from JohnVillalovos/jlvillal/archive_type

docs: correct documented return type (557c7d2)

  • Merge pull request #1565 from javatarz/master

feat: allow global retry_transient_errors (d98d948)

v2.10.1 (2021-08-28)

Bug Fixes

  • fix(mixins): improve deprecation warning

Also note what should be changed (57e0187)

  • fix(deps): upgrade requests to 2.25.0 (see CVE-2021-33503) (ce995b2)

Chores

  • chore(deps): update dependency types-pyyaml to v5.4.8 (2ae1dd7)

  • chore(deps): update dependency types-pyyaml to v5.4.7 (ec8be67)

  • chore(deps): update codecov/codecov-action action to v2 (44f4fb7)

  • chore(deps): update typing dependencies (34fc210)

  • chore: define root dir in mypy, not tox (7a64e67)

  • chore(deps): group typing requirements with mypy additional_dependencies (38597e7)

  • chore: fix mypy pre-commit hook (bd50df6)

  • chore(deps): update dependency types-requests to v2.25.2 (4782678)

  • chore(deps): update wagoid/commitlint-github-action action to v4 (ae97196)

  • chore(deps): update dependency types-requests to v2.25.1 (a2d133a)

  • chore(deps): update precommit hook pycqa/isort to v5.9.3 (e1954f3)

  • chore(deps): update dependency isort to v5.9.3 (ab46e31)

Documentation

  • docs(mergequests): gl.mergequests.list documentation was missleading (5b5a7bc)

Unknown

  • Merge pull request #1550 from python-gitlab/renovate/codecov-codecov-action-2.x

chore(deps): update codecov/codecov-action action to v2 (e54832a)

  • Merge pull request #1566 from Psycojoker/doc/mergequest_list_missleading_doc

docs(mergerequests): gl.mergerequests.list documentation was misleading (8e27721)

  • Merge pull request #1571 from python-gitlab/fix-mixings-improve-deprecation-warning

fix(mixins): improve deprecation warning (e2fdfbb)

v2.10.0 (2021-07-28)

Bug Fixes

  • fix(api): do not require Release name for creation

Stop requiring a name attribute for creating a Release, since a release name has not been required since GitLab 12.5. (98cd03b)

Chores

  • chore(deps): update dependency requests to v2.26.0 (d3ea203)

  • chore(deps): update precommit hook pycqa/isort to v5.9.2 (521cddd)

  • chore(deps): update dependency isort to v5.9.2 (d5dcf1c)

Documentation

  • docs(readme): move contributing docs to CONTRIBUTING.rst

Move the Contributing section of README.rst to CONTRIBUTING.rst, so it is recognized by GitHub and shown when new contributors make pull requests. (edf49a3)

  • docs: add example for mr.merge_ref

Signed-off-by: Matej Focko mfocko@redhat.com (b30b8ac)

  • docs(project): add example on getting a single project using name with namespace (ef16a97)

Features

  • feat(api): add merge_ref for merge requests

Support merge_ref on merge requests that returns commit of attempted merge of the MR.

Signed-off-by: Matej Focko mfocko@redhat.com (1e24ab2)

  • feat(api): add name_regex_keep attribute in delete_in_bulk() (e49ff3f)

Testing

  • test(functional): add mr.merge_ref tests

  • Add test for using merge_ref on non-merged MR

  • Add test for using merge_ref on MR with conflicts

Signed-off-by: Matej Focko mfocko@redhat.com (a9924f4)

Unknown

  • Merge pull request #1537 from antti-mikael/feat/registry-deleteinbulk-keepregex

feat(api): add name_regex_keep attribute in delete_in_bulk() (85713bb)

v2.9.0 (2021-06-28)

Chores

  • chore: skip EE test case in functional tests (953f207)

  • chore(deps): update dependency types-requests to v2 (a81a926)

  • chore(deps): update dependency mypy to v0.910 (02a56f3)

  • chore(deps): update precommit hook pycqa/isort to v5.9.1 (c57ffe3)

  • chore(deps): update dependency isort to v5.9.1 (0479dba)

  • chore(deps): update dependency types-requests to v0.1.13 (c3ddae2)

  • chore(deps): update dependency types-requests to v0.1.12 (f84c2a8)

  • chore(deps): update dependency types-pyyaml to v5 (5c22634)

  • chore(deps): update dependency types-pyyaml to v0.1.9 (1f5b3c0)

  • chore(deps): update dependency types-pyyaml to v0.1.8 (e566767)

  • chore(deps): update dependency types-requests to v0.1.11 (6ba629c)

  • chore(deps): update dependency mypy to v0.902 (19c9736)

  • chore: add new required type packages for mypy

New version of mypy flagged errors for missing types. Install the recommended type-* packages that resolve the issues. (a7371e1)

  • chore: add type-hints to gitlab/v4/objects/projects.py

Adding type-hints to gitlab/v4/objects/projects.py (872dd6d)

Documentation

  • docs(tags): remove deprecated functions (1b1a827)

  • docs(release): add update example (6254a5f)

  • docs: make Gitlab class usable for intersphinx (8753add)

Features

  • feat(api): add group hooks (4a7e9b8)

  • feat(release): allow to update release

Release API now supports PUT. (b4c4787)

  • feat(api): remove responsibility for API inconsistencies for MR reviewers (3d985ee)

  • feat(api): add support for creating/editing reviewers in project merge requests (676d1f6)

  • feat(api): add MR pipeline manager in favor of pipelines() method (954357c)

Testing

  • test(releases): integration for release PUT (13bf61d)

  • test(releases): add unit-tests for release update (5b68a5a)

Unknown

  • Merge pull request #1533 from sugonyak/add-group-hooks

feat(api): add group hooks (6abf13a)

  • Merge pull request #1522 from PPaques/1521-releases-edit

Support Release Update API (33d3428)

  • Merge pull request #1396 from spyoungtech/merge_request_reviewers

feat(api): add support for creating/editing reviewers in project MRs (2c86003)

  • Merge pull request #1528 from python-gitlab/renovate/types-requests-2.x

chore(deps): update dependency types-requests to v2 (af7aae7)

  • Merge pull request #1323 from python-gitlab/feat/mr-pipeline-manager

feat(api): add merge request pipeline manager and deprecate mr.pipelines() method (e77554c)

  • Merge pull request #1513 from python-gitlab/renovate/types-pyyaml-0.x

chore(deps): update dependency types-pyyaml to v0.1.8 (e3aa023)

  • Merge pull request #1514 from python-gitlab/renovate/types-requests-0.x

chore(deps): update dependency types-requests to v0.1.11 (82973ce)

  • Merge pull request #1504 from python-gitlab/renovate/mypy-0.x

chore(deps): update dependency mypy to v0.902 (387e147)

  • Merge pull request #1505 from JohnVillalovos/jlvillal/mypy-deps

chore: add new required type packages for mypy (5446423)

  • Merge pull request #1511 from JohnVillalovos/jlvillal/testing-type-hints

chore: add type-hints to gitlab/v4/objects/projects.py (8e6aaf5)

v2.8.0 (2021-06-10)

Bug Fixes

  • fix: catch invalid type used to initialize RESTObject

Sometimes we have errors where we don’t get a dictionary passed to RESTObject.init() method. This breaks things but in confusing ways.

Check in the init() method and raise an exception if it occurs. (c7bcc25)

  • fix: functional project service test (#1500)

chore: fix functional project service test (093db9d)

  • fix: ensure kwargs are passed appropriately for ObjectDeleteMixin (4e690c2)

  • fix(cli): add missing list filter for jobs (b3d1c26)

  • fix: change mr.merge() to use ‘post_data’

MR https://github.com/python-gitlab/python-gitlab/pull/1121 changed mr.merge() to use ‘query_data’. This appears to have been wrong.

From the Gitlab docs they state it should be sent in a payload body https://docs.gitlab.com/ee/api/README.html#request-payload since mr.merge() is a PUT request.

Request Payload

API Requests can use parameters sent as query strings or as a payload body. GET requests usually send a query string, while PUT or POST requests usually send the payload body

Fixes: #1452 Related to: #1120 (cb6a3c6)

  • fix(cli): fix parsing CLI objects to classnames (4252070)

  • fix(objects): allow lists for filters for in all objects (603a351)

  • fix(objects): return server data in cancel/retry methods (9fed061)

  • fix(objects): add missing group attributes (d20ff4f)

  • fix: iids not working as a list in projects.issues.list()

Set the ‘iids’ values as type ListAttribute so it will pass the list as a comma-separated string, instead of a list.

Add a functional test.

Closes: #1407 (45f806c)

  • fix: add a check to ensure the MRO is correct

Add a check to ensure the MRO (Method Resolution Order) is correct for classes in gitlab.v4.objects when doing type-checking.

An example of an incorrect definition: class ProjectPipeline(RESTObject, RefreshMixin, ObjectDeleteMixin): ^^^^^^^^^^ This should be at the end.

Correct way would be: class ProjectPipeline(RefreshMixin, ObjectDeleteMixin, RESTObject): Correctly at the end ^^^^^^^^^^

Also fix classes which have the issue. (565d548)

Chores

  • chore(ci): use admin PAT for release workflow (d175d41)

  • chore: sync create and update attributes for Projects

Sync the create attributes with: https://docs.gitlab.com/ee/api/projects.html#create-project

Sync the update attributes with documentation at: https://docs.gitlab.com/ee/api/projects.html#edit-project

As a note the ordering of the attributes was done to match the ordering of the attributes in the documentation.

Closes: #1497 (0044bd2)

  • chore: add missing linters to pre-commit and pin versions (85bbd1a)

  • chore: add type-hints to gitlab/v4/cli.py

    • Add type-hints to gitlab/v4/cli.py

    • Add required type-hints to other files based on adding type-hints to gitlab/v4/cli.py (2673af0)

  • chore: add missing optional create parameter for approval_rules

Add missing optional create parameter (‘protected_branch_ids’) to the project approvalrules.

https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-project-level-rule (06a6001)

  • chore: apply typing suggestions

Co-authored-by: John Villalovos john@sodarock.com (a11623b)

  • chore(ci): ignore .python-version from pyenv (149953d)

  • chore: apply suggestions (fe7d19d)

  • chore: clean up tox, pre-commit and requirements (237b97c)

  • chore: make certain dotfiles searchable by ripgrep

By explicitly NOT excluding the dotfiles we care about to the .gitignore file we make those files searchable by tools like ripgrep.

By default dotfiles are ignored by ripgrep and other search tools (not grep) (e4ce078)

  • chore: use built-in function issubclass() instead of getmro()

Code was using inspect.getmro() to replicate the functionality of the built-in function issubclass()

Switch to using issubclass() (81f6386)

  • chore: move ‘gitlab/tests/’ dir to ‘tests/unit/’

Move the ‘gitlab/tests/’ directory to ‘tests/unit/’ so we have all the tests located under the ‘tests/’ directory. (1ac0722)

  • chore: correct a type-hint (046607c)

  • chore: rename ‘tools/functional/’ to ‘tests/functional/’

Rename the ‘tools/functional/’ directory to ‘tests/functional/’

This makes more sense as these are functional tests and not tools.

This was dicussed in: https://github.com/python-gitlab/python-gitlab/discussions/1468 (502715d)

  • chore: add a merge_request() pytest fixture and use it

Added a pytest.fixture for merge_request(). Use this fixture in tools/functional/api/test_merge_requests.py (8be2838)

  • chore: simplify functional tests

Add a helper function to have less code duplication in the functional testing. (df9b5f9)

  • chore: add functional test mr.merge() with long commit message

Functional test to show that https://github.com/python-gitlab/python-gitlab/issues/1452 is fixed.

Added a functional test to ensure that we can use large commit message (10_000+ bytes) in mr.merge()

Related to: #1452 (cd5993c)

  • chore: add a functional test for issue #1120

Going to switch to putting parameters from in the query string to having them in the ‘data’ body section. Add a functional test to make sure that we don’t break anything.

https://github.com/python-gitlab/python-gitlab/issues/1120 (7d66115)

  • chore: fix import ordering using isort

Fix the import ordering using isort.

https://pycqa.github.io/isort/ (f3afd34)

  • chore: add an isort tox environment and run isort in CI

    • Add an isort tox environment

    • Run the isort tox environment using –check in the Github CI

https://pycqa.github.io/isort/ (dda646e)

  • chore(deps): update precommit hook alessandrojcm/commitlint-pre-commit-hook to v5 (9ff349d)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.11.4-ce.0 (4223269)

  • chore(deps): update dependency docker-compose to v1.29.2 (fc241e1)

  • chore(ci): automate releases (0ef497e)

  • chore(ci): ignore debug and type_checking in coverage (885b608)

  • chore: mypy: Disallow untyped definitions

Be more strict and don’t allow untyped definitions on the files we check.

Also this adds type-hints for two of the decorators so that now functions/methods decorated by them will have their types be revealed correctly. (6aef2da)

  • chore(docs): fix import order for readthedocs build (c3de1fb)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.11.3-ce.0 (f0b52d8)

  • chore: have black run at the top-level

This will ensure everything is formatted with black, including setup.py. (429d6c5)

  • chore: have flake8 check the entire project

Have flake8 run at the top-level of the projects instead of just the gitlab directory. (ab343ef)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.11.2-ce.0 (434d15d)

  • chore: remove commented-out print (0357c37)

  • chore: make Get.*Mixin._optional_get_attrs always present

Always create GetMixin/GetWithoutIdMixin._optional_get_attrs attribute with a default value of tuple()

This way we don’t need to use hasattr() and we will know the type of the attribute. (3c1a0b3)

Code Style

  • style: clean up test run config (dfa40c1)

Documentation

  • docs: fix typo in http_delete docstring (5226f09)

  • docs(api): add behavior in local attributes when updating objects (38f65e8)

  • docs: fail on warnings during sphinx build

This is useful when docs aren’t included in the toctree and don’t show up on RTD. (cbd4d52)

Features

  • feat: add keys endpoint (a81525a)

  • feat(objects): add support for Group wikis (#1484)

feat(objects): add support for Group wikis (74f5e62)

  • feat(objects): add support for generic packages API (79d88bd)

  • feat(api): add deployment mergerequests interface (fbbc0d4)

  • feat(objects): support all issues statistics endpoints (f731707)

  • feat(objects): add support for descendant groups API (1b70580)

  • feat(objects): add pipeline test report support (ee9f96e)

  • feat(objects): add support for billable members (fb0b083)

  • feat: add feature to get inherited member for project/group (e444b39)

  • feat: add code owner approval as attribute

The python API was missing the field code_owner_approval_required as implemented in the GitLab REST API. (fdc46ba)

  • feat: indicate that we are a typed package

By adding the file: py.typed it indicates that python-gitlab is a typed package and contains type-hints.

https://www.python.org/dev/peps/pep-0561/ (e4421ca)

  • feat: add support for lists of integers to ListAttribute

Previously ListAttribute only support lists of integers. Now be more flexible and support lists of items which can be coerced into strings, for example integers.

This will help us fix issue #1407 by using ListAttribute for the ‘iids’ field. (115938b)

Testing

  • test(functional): force delete users on reset

Timing issues between requesting group deletion and GitLab enacting that deletion resulted in errors while attempting to delete a user which was the sole owner of said group (see: test_groups). Pass the ‘hard_delete’ parameter to ensure user deletion. (8f81456)

  • test(api): fix issues test

Was incorrectly using the issue ‘id’ vs ‘iid’. (8e5b0de)

  • test(functional): explicitly remove deploy tokens on reset

Deploy tokens would remain in the instance if the respective project or group was deleted without explicitly revoking the deploy tokens first. (19a55d8)

  • test(cli): replace assignment expression

This is a feature added in 3.8, removing it allows for the test to run with lower python versions. (11ae11b)

  • test(functional): optionally keep containers running post-tests

Additionally updates token creation to make use of first_or_create(), to avoid errors from the script caused by GitLab constraints preventing duplicate tokens with the same value. (4c475ab)

  • test(cli): add more real class scenarios (8cf5031)

  • test(functional): start tracking functional test coverage (f875786)

  • test(functional): add test for skip_groups list filter (a014774)

Unknown

  • Merge pull request #1487 from JohnVillalovos/jlvillal/check_attrs

fix: catch invalid type used to initialize RESTObject (600a2c1)

  • Merge pull request #1489 from python-gitlab/chore/release-action-gh-token

chore(ci): use PAT for release workflow (161bb0b)

  • Merge pull request #1499 from JohnVillalovos/jlvillal/projects_attrs

chore: sync create and update attributes for Projects (f91b72a)

  • Merge pull request #1490 from benjamb/benbrown/keys

feat: add keys endpoint (d3fac50)

  • Merge pull request #1478 from benjamb/benbrown/keep-containers

Optionally keep containers after running integration tests (d981956)

  • Merge pull request #1483 from JohnVillalovos/jlvillal/mypy_cli

chore: add type-hints to gitlab/v4/cli.py (55ae61a)

  • Merge pull request #1488 from JohnVillalovos/jlvillal/add_missing_option

chore: add missing optional create parameter for approval_rules (ac92205)

  • Merge pull request #1249 from rmonat/master

feat: add pipeline test report support (fb7174e)

  • Merge pull request #1475 from JohnVillalovos/jlvillal/gitignore

chore: make certain dotfiles searchable by ripgrep (861d3d2)

  • Merge pull request #1481 from JohnVillalovos/jlvillal/no_getmro

chore: use built-in function issubclass() instead of getmro() (489b0d3)

  • Merge pull request #1474 from JohnVillalovos/jlvillal/mv_unit_tests

chore: move ‘gitlab/tests/’ dir to ‘tests/unit/’ (56770ce)

  • Merge pull request #1480 from JohnVillalovos/jlvillal/fix_hint

chore: correct a type-hint (8eb911d)

  • Merge pull request #1469 from JohnVillalovos/jlvillal/test_directory

chore: rename ‘tools/functional/’ to ‘tests/functional/’ (90ecf2f)

  • Merge pull request #1465 from JohnVillalovos/jlvillal/fix_1452_query_parameters

Switch mr.merge() to use post_data (was using query_data) (9beff0d)

  • Merge pull request #1456 from python-gitlab/feat/billable-members

feat(objects): add support for billable members (184b94b)

  • Merge pull request #1463 from JohnVillalovos/jlvillal/isort

chore: add isort as a checker (7824811)

  • Merge pull request #1290 from python-gitlab/fix/parse-cli-objects-camelcase

fix(cli): fix parsing CLI objects to classnames (1508eb7)

  • Merge pull request #1459 from python-gitlab/renovate/alessandrojcm-commitlint-pre-commit-hook-5.x

chore(deps): update precommit hook alessandrojcm/commitlint-pre-commit-hook to v5 (ce0e642)

  • Merge pull request #1376 from Shkurupii/feat-get-inherited-members

feat: get inherited member for project/group (f35c73e)

  • Merge pull request #1455 from python-gitlab/renovate/gitlab-gitlab-ce-13.x

chore(deps): update gitlab/gitlab-ce docker tag to v13.11.4-ce.0 (c4979a8)

  • Merge pull request #1451 from python-gitlab/renovate/docker-compose-1.x

chore(deps): update dependency docker-compose to v1.29.2 (3628949)

  • Merge pull request #1427 from python-gitlab/chore/automate-releases

chore(ci): automate releases (25695d9)

  • Merge pull request #1448 from python-gitlab/docs/local-object-attributes

docs(api): add behavior in local attributes when updating objects (b0b2113)

  • Merge pull request #1449 from python-gitlab/chore/ignore-typing-coverage

chore(ci): ignore debug and type_checking in coverage (62b544d)

  • Merge pull request #1440 from python-gitlab/test/functional-test-coverage

test(functional): start tracking functional test coverage (0d3b8ae)

  • Merge pull request #1420 from python-gitlab/fix/missing-list-attributes

fix(objects): make lists work for filters in all objects (45edae9)

  • Merge pull request #1444 from python-gitlab/fix/return-retry-cancel-output

fix(objects): return server data in cancel/retry methods (1ddb54a)

  • Merge pull request #1409 from JohnVillalovos/jlvillal/untyped_defs

chore: mypy: Disallow untyped definitions (562fbbd)

  • Merge pull request #1442 from python-gitlab/chore/fix-readthedocs

chore(docs): fix import order for readthedocs build (b563cdc)

  • Merge pull request #1441 from python-gitlab/docs/no-manpages-warnings

docs: fail on warnings during sphinx build (e46cacf)

  • Merge pull request #1438 from python-gitlab/fix/missing-group-attributes

fix(objects): add missing group attributes (5061972)

  • Merge pull request #1434 from python-gitlab/renovate/docker-gitlab-gitlab-ce-13.x

chore(deps): update gitlab/gitlab-ce docker tag to v13.11.3-ce.0 (1e6305e)

  • Merge pull request #1437 from daniellanner/feat/api-code-owner-approval

feat: add code owner approval as attribute (d61e669)

  • Merge pull request #1433 from JohnVillalovos/jlvillal/black

chore: have black run at the top-level (09ef8d4)

  • Merge pull request #1429 from JohnVillalovos/jlvillal/flake8

chore: have flake8 check the entire project (b498ebd)

  • Merge pull request #1421 from JohnVillalovos/jlvillal/typed_gitlab

feat: indicate that we are a typed package (98891eb)

  • Merge pull request #1413 from JohnVillalovos/jlvillal/1407

fix: iids not working as a list in projects.issues.list() (a6b6cd4)

  • Merge pull request #1352 from JohnVillalovos/jlvillal/fix_mro

fix: add a check to ensure the MRO is correct (909aa9a)

  • Merge pull request #1415 from JohnVillalovos/jlvillal/list_attribute_int

feat: add support for lists of integers to ListAttribute (dde01c7)

  • Merge pull request #1412 from JohnVillalovos/jlvillal/optional_get_attrs

chore: make Get.*Mixin._optional_get_attrs always present (5b81d7d)

v2.7.1 (2021-04-26)

Bug Fixes

  • fix(files): do not url-encode file paths twice (8e25cec)

Unknown

  • Merge pull request #1418 from python-gitlab/fix/urlencode-file-paths

fix(files): do not url-encode filepaths twice (37af229)

v2.7.0 (2021-04-25)

Bug Fixes

  • fix: only append kwargs as query parameters

Some arguments to http_request were being read from kwargs, but kwargs is where this function creates query parameters from, by default. In the absence of a query_parameters param, the function would construct URLs with query parameters such as retry_transient_errors=True despite those parameters having no meaning to the API to which the request was sent.

This change names those arguments that are specific to http_request so that they do not end up as query parameters read from kwargs. (b9ecc9a)

  • fix: only add query_parameters to GitlabList once

Fixes #1386 (ca2c3c9)

  • fix: correct ProjectFile.decode() documentation

ProjectFile.decode() returns ‘bytes’ and not ‘str’.

Update the method’s doc-string and add a type-hint.

ProjectFile.decode() returns the result of a call to base64.b64decode()

The docs for that function state it returns ‘bytes’: https://docs.python.org/3/library/base64.html#base64.b64decode

Fixes: #1403 (b180baf)

  • fix: update user’s bool data and avatar

If we want to update email, avatar and do not send email confirmation change (skip_reconfirmation = True), MultipartEncoder will try to encode everything except None and bytes. So it tries to encode bools. Casting bool’s values to their stringified int representation fix it. (3ba27ff)

  • fix(types): prevent dir from producing duplicates (5bf7525)

  • fix: correct some type-hints in gitlab/mixins.py

Commit baea7215bbbe07c06b2ca0f97a1d3d482668d887 introduced type-hints for gitlab/mixins.py.

After starting to add type-hints to gitlab/v4/objects/users.py discovered a few errors.

Main error was using ‘=’ instead of ‘:’. For example: _parent = Optional[…] should be _parent: Optional[…]

Resolved those issues. (8bd3124)

  • fix: argument type was not a tuple as expected

While adding type-hints mypy flagged this as an issue. The third argument to register_custom_action is supposed to be a tuple. It was being passed as a string rather than a tuple of strings. (062f8f6)

  • fix: handling config value in _get_values_from_helper (9dfb4cd)

  • fix: update doc for token helper (3ac6fa1)

  • fix: let the homedir be expanded in path of helper (fc7387a)

  • fix: make secret helper more user friendly (fc2798f)

  • fix: linting issues and test (b04dd2c)

  • fix: better real life token lookup example (9ef8311)

  • fix(objects): add single get endpoint for instance audit events (c3f0a6f)

  • fix: checking if RESTManager._from_parent_attrs is set

Prior to commit 3727cbd21fc40b312573ca8da56e0f6cf9577d08 RESTManager._from_parent_attrs did not exist unless it was explicitly set. But commit 3727cbd21fc40b312573ca8da56e0f6cf9577d08 set it to a default value of {}.

So the checks using hasattr() were no longer valid.

Update the checks to check if RESTManager._from_parent_attrs has a value. (8224b40)

  • fix: handle tags like debian/2%2.6-21 as identifiers

Git refnames are relatively free-form and can contain all sort for special characters, not just / and #, see http://git-scm.com/docs/git-check-ref-format

In particular, Debian’s DEP-14 standard for storing packaging in git repositories mandates the use of the % character in tags in some cases like debian/2%2.6-21.

Unfortunately python-gitlab currently only escapes / to %2F and in some cases # to %23. This means that when using the commit API to retrieve information about the debian/2%2.6-21 tag only the slash is escaped before being inserted in the URL path and the % is left untouched, resulting in something like /api/v4/projects/123/repository/commits/debian%2F2%2.6-21. When urllib3 seees that it detects the invalid % escape and then urlencodes the whole string, resulting in /api/v4/projects/123/repository/commits/debian%252F2%252.6-21, where the original / got escaped twice and produced %252F.

To avoid the issue, fully urlencode identifiers and parameters to avoid the urllib3 auto-escaping in all cases.

Signed-off-by: Emanuele Aina emanuele.aina@collabora.com (b4dac5c)

  • fix: remove duplicate class definitions in v4/objects/users.py

The classes UserStatus and UserStatusManager were each declared twice. Remove the duplicate declarations. (7c4e625)

  • fix: wrong variable name

Discovered this when I ran flake8 on the file. Unfortunately I was the one who introduced this wrong variable name :( (15ec41c)

  • fix: tox pep8 target, so that it can run

Previously running the pep8 target would fail as flake8 was not installed.

Now install flake8 for the pep8 target.

NOTE: Running the pep8 target fails as there are many warnings/errors. But it does allow us to run it and possibly work on reducing these warnings/errors in the future.

In addition, add two checks to the ignore list as black takes care of formatting. The two checks added to the ignore list are:

  • E501: line too long

  • W503: line break before binary operator (f518e87)

  • fix: undefined name errors

Discovered that there were some undefined names. (48ec9e0)

  • fix: extend wait timeout for test_delete_user()

Have been seeing intermittent failures of the test_delete_user() functional test. Have made the following changes to hopefully resolve the issue and if it still fails to know better why the failure occurred.

  • Extend the wait timeout for test_delete_user() from 30 to 60 tries of 0.5 seconds each.

  • Modify wait_for_sidekiq() to return True if sidekiq process terminated. Return False if the timeout expired.

  • Modify wait_for_sidekiq() to loop through all processes instead of assuming there is only one process. If all processes are not busy then return.

  • Modify wait_for_sidekiq() to sleep at least once before checking for processes being busy.

  • Check for True being returned in test_delete_user() call to wait_for_sidekiq() (19fde8e)

  • fix: test_update_group() dependency on ordering

Since there are two groups we can’t depend on the one we changed to always be the first one returned.

Instead fetch the group we want and then test our assertion against that group. (e78a8d6)

  • fix: honor parameter value passed

Gitlab allows setting the defaults for MR to delete the source. Also the inline help of the CLI suggest that a boolean is expected, but no matter what value you set, it will always delete. (c2f8f0e)

Chores

  • chore: bump version to 2.7.0 (34c4052)

  • chore: make ListMixin._list_filters always present

Always create ListMixin._list_filters attribute with a default value of tuple().

This way we don’t need to use hasattr() and we will know the type of the attribute. (8933113)

  • chore: make RESTObject._short_print_attrs always present

Always create RESTObject._short_print_attrs with a default value of None.

This way we don’t need to use hasattr() and we will know the type of the attribute. (6d55120)

  • chore(objects): remove noisy deprecation warning for audit events

It’s mostly an internal thing anyway and can be removed in 3.0.0 (2953642)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.11.1-ce.0 (3088714)

  • chore: fix F841 errors reported by flake8

Local variable name is assigned to but never used

https://www.flake8rules.com/rules/F841.html (40f4ab2)

  • chore: fix F401 errors reported by flake8

F401: Module imported but unused

https://www.flake8rules.com/rules/F401.html (ff21eb6)

  • chore: fix E711 error reported by flake8

E711: Comparison to none should be ‘if cond is none:’

https://www.flake8rules.com/rules/E711.html (630901b)

  • chore: fix E712 errors reported by flake8

E712: Comparison to true should be ‘if cond is true:’ or ‘if cond:’

https://www.flake8rules.com/rules/E712.html (83670a4)

  • chore: fix E741/E742 errors reported by flake8

Fixes to resolve errors for: https://www.flake8rules.com/rules/E741.html Do not use variables named ‘I’, ‘O’, or ‘l’ (E741)

https://www.flake8rules.com/rules/E742.html
  Do not define classes named 'I', 'O', or 'l' (E742) ([`380f227`](https://github.com/python-gitlab/python-gitlab/commit/380f227a1ecffd5e22ae7aefed95af3b5d830994))
  • chore(deps): update gitlab/gitlab-ce docker tag to v13.11.0-ce.0 (711896f)

  • chore: remove unused function sanitize_parameters()

The function sanitize_parameters() was used when the v3 API was in use. Since v3 API support has been removed there are no more users of this function. (443b934)

  • chore: fix typo in mr events (c5e6fb3)

  • chore(config): allow simple commands without external script (91ffb8e)

  • chore: make lint happy (7a7c9fd)

  • chore: make lint happy (b5f43c8)

  • chore: make lint happy (732e49c)

  • chore: add test (f8cf1e1)

  • chore: remove usage of getattr()

Remove usage of getattr(self, “_update_uses_post”, False)

Instead add it to class and set default value to False.

Add a tests that shows it is set to True for the ProjectMergeRequestApprovalManager and ProjectApprovalManager classes. (2afd18a)

  • chore: have _create_attrs & _update_attrs be a namedtuple

Convert _create_attrs and _update_attrs to use a NamedTuple (RequiredOptional) to help with code readability. Update all code to use the NamedTuple. (aee1f49)

  • chore(deps): update dependency docker-compose to v1.29.1 (a89ec43)

  • chore(deps): update dependency sphinx to v3.5.4 (a886d28)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.10.3-ce.0 (eabe091)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.10.1-ce.0 (1995361)

  • chore: import audit events in objects (35a190c)

  • chore(deps): update dependency docker-compose to v1.28.6 (46b05d5)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.10.0-ce.0 (5221e33)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.9.4-ce.0 (939f769)

  • chore: fix package file test naming (8c80268)

  • chore: add _create_attrs & _update_attrs to RESTManager

Add the attributes: _create_attrs and _update_attrs to the RESTManager class. This is so that we stop using getattr() if we don’t need to.

This also helps with type-hints being available for these attributes. (147f05d)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.9.3-ce.0 (2ddf45f)

  • chore: make _types always present in RESTManager

We now create _types = {} in RESTManager class.

By making _types always present in RESTManager it makes the code simpler. We no longer have to do: types = getattr(self, “_types”, {})

And the type checker now understands the type. (924f83e)

  • chore: add type-hints for gitlab/mixins.py

    • Added type-hints for gitlab/mixins.py

    • Changed use of filter with a lambda expression to list-comprehension. mypy was not able to understand the previous code. Also list-comprehension is better :) (baea721)

  • chore: add type hints to gitlab/base.py:RESTManager

Add some additional type hints to gitlab/base.py (9c55593)

  • chore: put assert statements inside ‘if TYPE_CHECKING:’

To be safe that we don’t assert while running, put the assert statements, which are used by mypy to check that types are correct, inside an ‘if TYPE_CHECKING:’ block.

Also, instead of asserting that the item is a dict, instead assert that it is not a requests.Response object. Theoretically the JSON could return as a list or dict, though at this time we are assuming a dict. (b562458)

  • chore(deps): update dependency sphinx to v3.5.2 (9dee5c4)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.9.2-ce.0 (933ba52)

  • chore: del ‘import *’ in gitlab/v4/objects/project_access_tokens.py

Remove usage of ‘import *’ in gitlab/v4/objects/project_access_tokens.py. (9efbe12)

  • chore: disallow incomplete type defs

Don’t allow a partially annotated function definition. Either none of the function is annotated or all of it must be.

Update code to ensure no-more partially annotated functions.

Update gitlab/cli.py with better type-hints. Changed Tuple[Any, …] to Tuple[str, …] (907634f)

  • chore(api): move repository endpoints into separate module (1ed154c)

  • chore: add and fix some type-hints in gitlab/client.py

Was able to figure out better type-hints for gitlab/client.py (8837207)

  • chore: add additional type-hints for gitlab/base.py

Add type-hints for the variables which are set via self.dict

mypy doesn’t see them when they are assigned via self.dict. So declare them in the class definition. (ad72ef3)

  • chore: add type-hints to gitlab/client.py

Adding some initial type-hints to gitlab/client.py (c9e5b4f)

  • chore: remove import of gitlab.utils from init.py

Initially when extracting out the gitlab/client.py code we tried to remove this but functional tests failed.

Later we fixed the functional test that was failing, so now remove the unneeded import. (39b9183)

  • chore: improve type-hints for gitlab/base.py

Determined the base class for obj_cls and adding type-hints for it. (cbd43d0)

  • chore: add type-hints to gitlab/cli.py (10b7b83)

  • chore(deps): update dependency docker-compose to v1.28.5 (f4ab558)

  • chore(deps): update wagoid/commitlint-github-action action to v3 (b3274cf)

  • chore: add type-hints to gitlab/const.py (a10a777)

  • chore: add type hints to gitlab/utils.py (acd9294)

  • chore: add type-hints to gitlab/config.py (213e563)

  • chore: remove usage of ‘from … import *’

In gitlab/v4/objects/*.py remove usage of:

  • from gitlab.base import *

  • from gitlab.mixins import *

Change them to:

  • from gitlab.base import CLASS_NAME

  • from gitlab.mixins import CLASS_NAME

Programmatically update code to explicitly import needed classes only.

After the change the output of: $ flake8 gitlab/v4/objects/*py | grep ‘REST|Mixin’

Is empty. Before many messages about unable to determine if it was a valid name. (c83eaf4)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.9.1-ce.0 (f6fd995)

  • chore: remove unused function _construct_url()

The function _construct_url() was used by the v3 API. All usage of the function was removed in commit fe89b949922c028830dd49095432ba627d330186 (009d369)

  • chore: add type hints to gitlab/base.py (3727cbd)

  • chore: remove usage of ‘from … import *’ in client.py

In gitlab/client.py remove usage of:

  • from gitlab.const import *

  • from gitlab.exceptions import *

Change them to:

  • import gitlab.const

  • import gitlab.exceptions

Update code to explicitly reference things in gitlab.const and gitlab.exceptions

A flake8 run no longer lists any undefined variables. Before it listed possible undefined variables. (bf0c8c5)

  • chore: explicitly import gitlab.v4.objects/cli

As we only support the v4 Gitlab API, explicitly import gitlab.v4.objects and gitlab.v4.clie instead of dynamically importing it depending on the API version.

This has the added benefit of mypy being able to type check the Gitlab init() function as currently it will fail if we enable type checking of init() it will fail.

Also, this also helps by not confusing tools like pyinstaller/cx_freeze with dynamic imports so you don’t need hooks for standalone executables. And according to https://docs.gitlab.com/ee/api/,

"GraphQL co-exists with the current v4 REST API. If we have a v5 API, this
should be a compatibility layer on top of GraphQL." ([`233b79e`](https://github.com/python-gitlab/python-gitlab/commit/233b79ed442aac66faf9eb4b0087ea126d6dffc5))
  • chore(deps): update gitlab/gitlab-ce docker tag to v13.9.0-ce.0 (3aef19c)

  • chore(objects): make Project refreshable

Helps getting the real state of the project from the server. (958a6aa)

  • chore(deps): update dependency docker-compose to v1.28.4 (8938484)

  • chore(tests): remove unused URL segment (66f0b6c)

  • chore(deps): update dependency docker-compose to v1.28.3 (2358d48)

  • chore: remove unused ALLOWED_KEYSET_ENDPOINTS variable

The variable ALLOWED_KEYSET_ENDPOINTS was added in commit f86ef3bbdb5bffa1348a802e62b281d3f31d33ad.

Then most of that commit was removed in commit e71fe16b47835aa4db2834e98c7ffc6bdec36723, but ALLOWED_KEYSET_ENDPOINTS was missed. (3d5d5d8)

  • chore(deps): update dependency sphinx to v3.5.1 (f916f09)

  • chore: remove Python 2 code

httplib is a Python 2 library. It was renamed to http.client in Python 3.

https://docs.python.org/2.7/library/httplib.html (b5d4e40)

  • chore(deps): update dependency sphinx to v3.5.0 (188c5b6)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.8.4-ce.0 (832cb88)

  • chore(ci): deduplicate PR jobs (63918c3)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.8.3-ce.0 (e6c20f1)

  • chore(deps): update precommit hook alessandrojcm/commitlint-pre-commit-hook to v4 (505a8b8)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.8.2-ce.0 (7c12038)

  • chore(deps): update dependency sphinx to v3.4.3 (37c992c)

Documentation

  • docs(api): add examples for resource state events (4d00c12)

  • docs: add information about the gitter community

Add a section in the README.rst about the gitter community. The badge already exists and is useful but very easy to miss. (6ff67e7)

  • docs(api): add release links API docs (36d65f0)

  • docs: add docs and examples for custom user agent (a69a214)

  • docs: change travis-ci badge to githubactions (2ba5ba2)

Features

  • feat(objects): add support for resource state events API (d4799c4)

  • feat: option to add a helper to lookup token (8ecf559)

  • feat(objects): add support for group audit events API (2a0fbdf)

  • feat: add ProjectPackageFile

Add ProjectPackageFile and the ability to list project package package_files.

Fixes #1372 (b9d469b)

  • feat(users): add follow/unfollow API (e456869)

  • feat(projects): add project access token api (1becef0)

  • feat: add an initial mypy test to tox.ini

Add an initial mypy test to test gitlab/base.py and gitlab/init.py (fdec039)

  • feat(objects): add Release Links API support (28d7518)

  • feat: add project audit endpoint (6660dbe)

  • feat: add personal access token API

See: https://docs.gitlab.com/ee/api/personal_access_tokens.html (2bb16fa)

  • feat(issues): add missing get verb to IssueManager (f78ebe0)

  • feat: import from bitbucket server

I’d like to use this libary to automate importing Bitbucket Server repositories into GitLab. There is a GitLab API endpoint to do this, but it is not exposed through this library.

  • Add an import_bitbucket_server method to the ProjectManager. This method calls this GitLab API endpoint: https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-server

  • Modify import_gitlab method docstring for python3 compatibility

  • Add a skipped stub test for the existing import_github method (ff3013a)

  • feat(api,cli): make user agent configurable (4bb201b)

Refactoring

  • refactor(objects): move instance audit events where they belong (48ba88f)

  • refactor: move Gitlab and GitlabList to gitlab/client.py

Move the classes Gitlab and GitlabList from gitlab/init.py to the newly created gitlab/client.py file.

Update one test case that was depending on requests being defined in gitlab/init.py (53a7645)

  • refactor(api): explicitly export classes for star imports (f05c287)

  • refactor(v4): split objects and managers per API resource (a5a48ad)

Testing

  • test(object): add test for dir duplicates (a8e591f)

  • test(objects): add tests for resource state events (10225cf)

  • test(objects): add unit test for instance audit events (84e3247)

  • test: don’t add duplicate fixture

Co-authored-by: Nejc Habjan hab.nejc@gmail.com (5d94846)

  • test(api): add functional test for release links API (ab2a1c8)

  • test(api,cli): add tests for custom user agent (c5a37e7)

Unknown

  • Merge pull request #1408 from python-gitlab/chore/bump-to-2-7-0

chore: bump version to 2.7.0 (e37de18)

  • Merge pull request #1411 from JohnVillalovos/jlvillal/list_filters

chore: make ListMixin._list_filters always present (62c75b5)

  • Merge pull request #1410 from JohnVillalovos/jlvillal/short_print_attr

chore: make RESTObject._short_print_attrs always present (09522b3)

  • Merge pull request #1414 from python-gitlab/chore/remove-noisy-deprecation-warning

chore(objects): remove noisy deprecation warning for audit events (0a0fcaf)

  • Merge pull request #1392 from bbatliner/patch-1

Improvements to HTTP requests (cfc42d2)

  • Merge pull request #1406 from python-gitlab/renovate/docker-gitlab-gitlab-ce-13.x

chore(deps): update gitlab/gitlab-ce docker tag to v13.11.1-ce.0 (4f79dff)

  • Merge pull request #1405 from JohnVillalovos/jlvillal/returns_bytes

fix: correct ProjectFile.decode() documentation (c055de0)

  • Merge pull request #1397 from JohnVillalovos/jlvillal/flake8

Fix all issues reported by running: tox -e pep8 and enable pep8 as a linter check (976e14d)

  • Merge pull request #1404 from DylannCordel/fix-upd-user-bool-data-and-avatar

fix: update user’s bool data and avatar (5fac07a)

  • Merge pull request #1383 from spyoungtech/dirfix

fix(types): prevent dir in RestObject from producing duplicates (60c5fd8)

  • Merge pull request #1400 from JohnVillalovos/jlvillal/sanitize

chore: remove unused function sanitize_parameters() (dd236a0)

  • Merge pull request #1398 from JohnVillalovos/jlvillal/mypy_mixins

fix: correct some type-hints in gitlab/mixins.py (5b18d20)

  • Merge pull request #1399 from JohnVillalovos/jlvillal/fix_custom_action

fix: argument type was not a tuple as expected (fc4f7fd)

  • Merge pull request #1364 from python-gitlab/feat/resource-state-events

feat: add support for resource state events API (916a7fe)

  • Merge pull request #1359 from klorenz/feat_token_lookup

feat(config): allow using a credential helper to lookup tokens (af781c1)

  • Merge pull request #1375 from JohnVillalovos/jlvillal/update_uses_post

chore: remove usage of getattr() (d236267)

  • Merge pull request #1366 from JohnVillalovos/jlvillal/create_attrs

chore: have _create_attrs & _update_attrs be a namedtuple (d1697d4)

  • Merge pull request #1391 from python-gitlab/renovate/docker-compose-1.x

chore(deps): update dependency docker-compose to v1.29.1 (a6d3556)

  • Merge pull request #1380 from python-gitlab/renovate/sphinx-3.x

chore(deps): update dependency sphinx to v3.5.4 (6b86878)

  • Merge pull request #1363 from python-gitlab/feat/all-audit-events

Feat: cover all audit events (02ce49e)

  • Merge pull request #1382 from python-gitlab/renovate/docker-compose-1.x

chore(deps): update dependency docker-compose to v1.28.6 (e798c9b)

  • Merge pull request #1373 from JacobHenner/jacobhenner/add-package_files

feat: add support for Project Package Files (8ace76a)

  • Merge pull request #1371 from JohnVillalovos/jlvillal/create_attrs_1

chore: add _create_attrs & _update_attrs to RESTManager (8603248)

  • Merge pull request #1369 from python-gitlab/renovate/docker-gitlab-gitlab-ce-13.x

chore(deps): update gitlab/gitlab-ce docker tag to v13.9.3-ce.0 (6fde243)

  • Merge pull request #1367 from JohnVillalovos/jlvillal/from_parent_attrs

fix: checking if RESTManager._from_parent_attrs is set (f93b9b5)

  • Merge pull request #1365 from JohnVillalovos/jlvillal/getattr

chore: make _types always present in RESTManager (de73ea7)

  • Merge pull request #1336 from em-/fix/quote-everything

fix: handle tags like debian/2%2.6-21 as identifiers (48fc907)

  • Merge pull request #1344 from JohnVillalovos/jlvillal/mixins

chore: add type-hints for gitlab/mixins.py (63ecd2e)

  • Merge pull request #1353 from JohnVillalovos/jlvillal/mypy_base

chore: add type hints to gitlab/base.py:RESTManager (ebdfec7)

  • Merge pull request #1350 from JohnVillalovos/jlvillal/isinstance

chore: Put assert statements inside ‘if TYPE_CHECKING:’ (c530f75)

  • Merge pull request #1361 from python-gitlab/renovate/sphinx-3.x

chore(deps): update dependency sphinx to v3.5.2 (c7a0669)

  • Merge pull request #1358 from python-gitlab/renovate/docker-gitlab-gitlab-ce-13.x

chore(deps): update gitlab/gitlab-ce docker tag to v13.9.2-ce.0 (aa13214)

  • Merge pull request #1351 from JohnVillalovos/jlvillal/import_start

chore: del ‘import *’ in gitlab/v4/objects/project_access_tokens.py (96d2805)

  • Merge pull request #1342 from JohnVillalovos/jlvillal/mypy_incomplete

chore: disallow incomplete type defs (5f23ed9)

  • Merge pull request #1347 from python-gitlab/chore/split-repository-methods

chore(api): move repository endpoints into separate module (d8b8a0a)

  • Merge pull request #1343 from JohnVillalovos/jlvillal/mypy_testing_things

chore: add and fix some type-hints in gitlab/client.py (f5a65f0)

  • Merge pull request #1345 from JohnVillalovos/jlvillal/mypy_base_fixes

chore: add additional type-hints for gitlab/base.py (7441455)

  • Merge pull request #1333 from python-gitlab/feat/user-follow-api

feat(users): add follow/unfollow API (5bc158d)

  • Merge pull request #1339 from JohnVillalovos/jlvillal/mypy_client_py

chore: add type-hints to gitlab/client.py (b0d75d9)

  • Merge pull request #1341 from JohnVillalovos/jlvillal/gitter

doc: add information about the gitter community (adab83a)

  • Merge pull request #1340 from JohnVillalovos/jlvillal/gitlab_init

chore: remove import of gitlab.utils from init.py (d0eb1b5)

  • Merge pull request #1338 from JohnVillalovos/jlvillal/mypy_base

Improve type-hints for gitlab/base.py (cbd4f1e)

  • Merge pull request #1334 from JohnVillalovos/jlvillal/mypy_cli

chore: add type-hints to gitlab/cli.py (f909cae)

  • Merge pull request #1337 from python-gitlab/renovate/docker-compose-1.x

chore(deps): update dependency docker-compose to v1.28.5 (bd62fed)

  • Merge pull request #1335 from JohnVillalovos/jlvillal/remove_dup_classes

fix: remove duplicate class definitions in v4/objects/users.py (ecb686d)

  • Merge pull request #1328 from python-gitlab/renovate/wagoid-commitlint-github-action-3.x

chore(deps): update wagoid/commitlint-github-action action to v3 (6662252)

  • Merge pull request #1329 from JohnVillalovos/jlvillal/mypy_const

Add type-hints to gitlab/const.py (ca4c1d9)

  • Merge pull request #1330 from JohnVillalovos/jlvillal/mypy_utils

chore: add type hints to gitlab/utils.py (a1a8bfe)

  • Merge pull request #1331 from JohnVillalovos/jlvillal/mypy_config

chore: add type-hints to gitlab/config.py (d207074)

  • Merge pull request #1332 from JohnVillalovos/jlvillal/fix_variable

chore: fix wrong variable name in cli.py (665c0c3)

  • Merge pull request #1319 from JohnVillalovos/jlvillal/import_star

chore: remove usage of ‘from … import *’ (0b67ca2)

  • Merge pull request #1327 from python-gitlab/feat/project-access-token-api

feat(projects): add project access token api (e06c51b)

  • Merge pull request #1325 from JohnVillalovos/jlvillal/pep8

fix: tox pep8 target, so that it can run (bb227d3)

  • Merge pull request #1322 from JohnVillalovos/jlvillal/missing_vars

fix: undefined name errors in v4 objects (a7ec67f)

  • Merge pull request #1321 from JohnVillalovos/jlvillal/remove_cruft

chore: remove unused function _construct_url() (d90be1e)

  • Merge pull request #1299 from JohnVillalovos/mypy

Enable mypy type checking and add type hints to gitlab/base.py (a18bc5c)

  • Merge pull request #1318 from JohnVillalovos/jlvillal/testing

chore: remove usage of ‘from … import *’ in client.py (d9fdf1d)

  • Merge pull request #1310 from JohnVillalovos/jlvillal/v4_only

chore: explicitly import gitlab.v4.objects/cli (8c58b07)

  • Merge pull request #1316 from JohnVillalovos/jlvillal/test_wait

test: extend wait timeout for test_delete_user() (5cc60d5)

  • Merge pull request #1314 from python-gitlab/feat/release-links

feat: add release links API support (2b29776)

  • Merge pull request #1311 from JohnVillalovos/jlvillal/fix_functional

fix: test_update_group() dependency on ordering (3381700)

  • Merge pull request #1307 from python-gitlab/renovate/docker-compose-1.x

chore(deps): update dependency docker-compose to v1.28.4 (649385c)

  • Merge pull request #1308 from Sineaggi/add-project-audit-endpoint

feat: add project audit endpoint (0c5a23e)

  • Merge pull request #1301 from JohnVillalovos/refactor_jlvillal

refactor: move Gitlab and GitlabList to gitlab/client.py (2c4fcf8)

  • Merge pull request #1305 from python-gitlab/renovate/docker-compose-1.x

chore(deps): update dependency docker-compose to v1.28.3 (d4e7a03)

  • Merge pull request #1304 from python-gitlab/feat/personal-access-token-api

feat: add personal access token API (ef8fcf7)

  • Merge pull request #1300 from JohnVillalovos/remove_cruft

chore: remove unused ALLOWED_KEYSET_ENDPOINTS variable (bec2094)

  • Merge pull request #1303 from python-gitlab/renovate/sphinx-3.x

chore(deps): update dependency sphinx to v3.5.1 (9f6691d)

  • Merge pull request #1271 from allcloud-jonathan/feature/honor-bool-for-delete-source

fix: honor parameter value passed (1552eb5)

  • Merge pull request #1298 from JohnVillalovos/master

Remove Python 2 code (07edafe)

  • Merge pull request #1288 from python-gitlab/refactor/split-objects

refactor(v4): split objects and managers per API resource (9fcd962)

  • Merge pull request #1295 from python-gitlab/renovate/sphinx-3.x

chore(deps): update dependency sphinx to v3.5.0 (76e6f87)

  • Merge pull request #1292 from python-gitlab/renovate/docker-gitlab-gitlab-ce-13.x

chore(deps): update gitlab/gitlab-ce docker tag to v13.8.4-ce.0 (45fc49e)

  • Merge pull request #1223 from python-gitlab/feat/single-issue-api

feat(issues): add missing get verb to IssueManager (9d6c188)

  • Merge pull request #1287 from python-gitlab/chore/deduplicate-pr-jobs

chore(ci): deduplicate PR jobs (9fe506f)

  • Merge pull request #1283 from fajpunk/import_bitbucket

feat: import from bitbucket server (b48563f)

  • Merge pull request #1244 from python-gitlab/renovate/alessandrojcm-commitlint-pre-commit-hook-4.x

chore(deps): update precommit hook alessandrojcm/commitlint-pre-commit-hook to v4 (3935baf)

  • Merge pull request #1281 from python-gitlab/renovate/docker-gitlab-gitlab-ce-13.x

chore(deps): update gitlab/gitlab-ce docker tag to v13.8.2-ce.0 (1d9155c)

  • Merge pull request #1225 from python-gitlab/renovate/sphinx-3.x

chore(deps): update dependency sphinx to v3.4.3 (a985c34)

  • Merge pull request #1277 from python-gitlab/feat/override-user-agent

feat(api,cli): make user agent configurable (643454c)

  • Merge pull request #1276 from python-gitlab/bufferoverflow-patch-1

docs: switch from travis-ci.org to GitHub Actions (071d699)

v2.6.0 (2021-01-29)

Bug Fixes

  • fix(api): use RetrieveMixin for ProjectLabelManager

Allows to get a single label from a project, which was missing before even though the GitLab API has the ability to. (1a14395)

  • fix(base): really refresh object

This fixes and error, where deleted attributes would not show up

Fixes #1155 (e1e0d8c)

  • fix(cli): write binary data to stdout buffer (0733ec6)

  • fix: docs changed using the consts (650b65c)

  • fix: typo (9baa905)

  • fix(cli): add missing args for project lists (c73e237)

  • fix(api): add missing runner access_level param (92669f2)

Chores

  • chore: offically support and test 3.9 (62dd07d)

  • chore(deps): pin dependency requests-toolbelt to ==0.9.1 (4d25f20)

  • chore(deps): update dependency requests to v2.25.1 (9c2789e)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.8.1-ce.0 (9854d6d)

  • chore(ci): add coverage and docs jobs (2de64cf)

  • chore(ci): force colors in pytest runs (1502079)

  • chore(ci): pin docker-compose install for tests

This ensures python-dotenv with expected behavior for .env processing (1f7a2ab)

  • chore(ci): pin os version (cfa27ac)

  • chore(ci): fix typo in matrix (5e1547a)

  • chore(ci): fix copy/paste oopsie (c6241e7)

  • chore(ci): add pytest PR annotations (8f92230)

  • chore(ci): replace travis with Actions (8bb73a3)

  • chore: move .env into docker-compose dir (55cbd1c)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.5.4-ce.0 (265dbbd)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.5.3-ce.0 (d1b0b08)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.5.2-ce.0 (4a6831c)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.5.1-ce.0 (348e860)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.5.0-ce.0 (fc205cc)

  • chore(docs): always edit the file directly on master

There is no way to edit the raw commit (35e43c5)

  • chore(cli): remove python2 code (1030e0a)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.4.3-ce.0 (bc17889)

  • chore: simplified search scope constants (16fc048)

  • chore: added docs for search scopes constants (7565bf0)

  • chore: added constants for search API (8ef53d6)

  • chore: apply suggestions (65ce026)

  • chore(deps): update python docker tag to v3.9 (1fc65e0)

  • chore: use helper fixtures for test directories (40ec2f5)

  • chore: allow overriding docker-compose env vars for tag (27109ca)

  • chore: remove unnecessary random function (d4ee0a6)

  • chore(deps): pin dependencies (14d8f77)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.3.6-ce.0 (57b5782)

  • chore(test): remove hacking dependencies (9384493)

  • chore(ci): add .readthedocs.yml (0ad441e)

  • chore(ci): reduce renovate PR noise (f4d7a55)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.3.5-ce.0 (c88d870)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.3.4-ce.0 (e94c4c6)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.3.3-ce.0 (667bf01)

Documentation

  • docs(cli-usage): fixed term (d282a99)

  • docs(readme): update supported Python versions (20b1e79)

  • docs(cli): use inline anonymous references for external links

There doesn’t seem to be an obvious way to use an alias for identical text labels that link to different targets. With inline links we can work around this shortcoming. Until we know better. (f2cf467)

  • docs(groups): add example for creating subgroups (92eb4e3)

  • docs: clean up grammar and formatting in documentation (aff9bc7)

  • docs: add Project Merge Request approval rule documentation (449fc26)

  • docs(issues): add admin, project owner hint

Closes #1101 (609c03b)

  • docs(readme): also add hint to delete gitlab-runner-test

Otherwise the whole testsuite will refuse to run (8894f2d)

  • docs(projects): correct fork docs

Closes #1126 (54921db)

  • docs(cli): add example for job artifacts download (375b29d)

  • docs(cli): add auto-generated CLI reference (6c21fc8)

Features

  • feat: support multipart uploads (2fa3004)

  • feat: add MINIMAL_ACCESS constant

A “minimal access” access level was introduced in GitLab 13.5. (49eb3ca)

  • feat(tests): test label getter (a41af90)

  • feat: adds support for project merge request approval rules (#1199) (c6fbf39)

  • feat: unit tests added (f37ebf5)

  • feat: added support for pipeline bridges (05cbdc2)

  • feat(api): added wip filter param for merge requests (d6078f8)

  • feat(api): added wip filter param for merge requests (aa6e80d)

  • feat(api): add support for user identity provider deletion (e78e121)

Refactoring

  • refactor(tests): split functional tests (61e43eb)

Testing

  • test: ignore failing test for now (4b4e253)

  • test: add test_project_merge_request_approvals.py (9f6335f)

  • test(cli): add test for job artifacts download (f4e7950)

  • test(env): replace custom scripts with pytest and docker-compose (79489c7)

  • test: add unit tests for badges API (2720b73)

  • test: add unit tests for resource label events API (e9a211c)

Unknown

  • Merge pull request #1273 from python-gitlab/chore/python3-9

chore: offically support and test 3.9 (48cb89b)

  • Merge pull request #1230 from manuel-91/patch-1

cli-usage readme: fixed term (55c8c96)

  • Merge pull request #1238 from atombrella/install_version_doc

Updated supported Python versions in install doc (d037a71)

  • Merge pull request #1255 from bittner/docs/fix-external-links-tokens

Use inline anonymous references for external links (762f959)

  • Merge pull request #1251 from hchouraria/patch-1

docs(groups): add example for creating subgroups (5ac309a)

  • Merge pull request #1272 from python-gitlab/renovate/pin-dependencies

chore(deps): pin dependency requests-toolbelt to ==0.9.1 (b567522)

  • Merge pull request #1233 from python-gitlab/renovate/requests-2.x

chore(deps): update dependency requests to v2.25.1 (78a02ce)

  • Merge pull request #1243 from python-gitlab/renovate/docker-gitlab-gitlab-ce-13.x

chore(deps): update gitlab/gitlab-ce docker tag to v13.8.1-ce.0 (cc2dd0c)

  • Merge pull request #1252 from python-gitlab/feat/multipart-uploads

feat: support multipart uploads (4f8d901)

  • Merge pull request #1269 from nejch/fix/test-env

chore(ci): bring test environment back to life (fd179d4)

  • Merge pull request #1250 from JacobHenner/feature/add-minimal-access

feat: Add MINIMAL_ACCESS constant (fac0874)

  • Merge pull request #1263 from ePirat/epirat-fix-get-label

fix(api): add missing GetMixin to ProjectLabelManager (e61a0f2)

  • Merge pull request #1200 from robinson96/feature/project_merge_request_approval_rules

Feature/project merge request approval rules (6035ca8)

  • Merge pull request #1213 from python-gitlab/fix/delete-attr

fix(base): really refresh object (af965d4)

  • Merge pull request #1212 from python-gitlab/chore/docs-edit-on-master

chore(docs): always edit the file directly on master (ce8460f)

  • Merge pull request #1211 from python-gitlab/docs/admin-project-owner

docs(issues): add admin, project owner hint (e5b047d)

  • Merge pull request #1214 from python-gitlab/docs/readme-gitlab-runner-test

docs(readme): also add hint to delete gitlab-runner-test (53b4c2f)

  • Merge pull request #1210 from python-gitlab/docs/projects-correct-fork

docs(projects): correct fork docs (77ac8c3)

  • Merge pull request #1202 from python-gitlab/fix/cli-binary-data

fix(cli): write binary data to stdout buffer (3a38c6d)

  • Merge pull request #1209 from python-gitlab/docs/cli-reference-page

docs(cli): add auto-generated CLI reference (9054a3b)

  • Merge pull request #1131 from valentingregoire/master

feat: added constants for search API (8cb8040)

  • Merge pull request #1205 from python-gitlab/refactor/split-functional-tests

refactor(tests): split functional tests (68a4162)

  • Merge pull request #1204 from python-gitlab/renovate/docker-python-3.x

chore(deps): update python docker tag to v3.9 (2002098)

  • Merge pull request #1203 from intostern/feat/bridge

Added support for pipeline bridges (c303dab)

  • Merge pull request #1206 from python-gitlab/fix/cli-project-list-args

fix(cli): add missing args for project lists (be0afdd)

  • Merge pull request #1178 from python-gitlab/test/cleanup-env

test(env): replace custom scripts with pytest and docker-compose (266030a)

  • Merge pull request #1177 from python-gitlab/renovate/pin-dependencies

chore(deps): pin dependencies (0d89a6e)

  • Merge pull request #1189 from python-gitlab/chore/test-hacking-dependency

chore(test): remove hacking dependencies (d51042a)

  • Merge pull request #1180 from Shkurupii/add-unittests-for-project-badges

test: add unit tests for badges API (6bdb7f8)

  • Merge pull request #1184 from python-gitlab/fix/runner-access-level

fix(api): add missing runner access_level param (a7c20ca)

  • Merge pull request #1182 from jlpospisil/allow-mr-search-by-wip

Added MR wip filter param (74c1e4f)

  • Merge pull request #1181 from python-gitlab/feat/delete-user-identities

feat(api): add support for user identity provider deletion (35f9cb8)

  • Merge pull request #1179 from python-gitlab/chore/readthedocs-yml

chore(ci): add .readthedocs.yml (49a0032)

  • Merge pull request #1175 from python-gitlab/chore/noisy-renovate

chore(ci): reduce renovate PR noise (8d662ab)

  • Merge pull request #1174 from Shkurupii/add-unittests-for-resource-label-events

Add unit tests for resource label events API (b1c2045)

  • Merge pull request #1173 from python-gitlab/renovate/docker-gitlab-gitlab-ce-13.x

chore(deps): update gitlab/gitlab-ce docker tag to v13.3.5-ce.0 (24fdbef)

  • Merge pull request #1172 from python-gitlab/renovate/docker-gitlab-gitlab-ce-13.x

chore(deps): update gitlab/gitlab-ce docker tag to v13.3.4-ce.0 (2a6801e)

  • Merge pull request #1171 from python-gitlab/renovate/docker-gitlab-gitlab-ce-13.x

chore(deps): update gitlab/gitlab-ce docker tag to v13.3.3-ce.0 (769367c)

v2.5.0 (2020-09-01)

Bug Fixes

  • fix: wrong reconfirmation parameter when updating user’s email

Since version 10.3 (and later), param to not send (re)confirmation when updating an user is skip_reconfirmation (and not skip_confirmation).

See:

  • https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/15175?tab=

  • https://docs.gitlab.com/11.11/ee/api/users.html#user-modification

  • https://docs.gitlab.com/ee/api/users.html#user-modification (b5c267e)

  • fix: tests fail when using REUSE_CONTAINER option

Fixes #1146 (0078f89)

  • fix: implement Gitlab’s behavior change for owned=True (9977799)

Chores

  • chore: bump python-gitlab to 2.5.0 (56fef01)

  • chore(deps): update python docker tag to v3.8 (a8070f2)

  • chore(test): use pathlib for paths (5a56b6b)

  • chore(deps): update gitlab/gitlab-ce docker tag to v13.3.2-ce.0 (9fd778b)

  • chore(ci): pin gitlab-ce version for renovate (cb79fb7)

  • chore(env): add pre-commit and commit-msg hooks (82070b2)

  • chore(ci): use fixed black version (9565684)

  • chore: make latest black happy with existing code (6961479)

  • chore: update tools dir for latest black version (c2806d8)

  • chore: remove unnecessary import (f337b7a)

  • chore: make latest black happy with existing code (4039c8c)

  • chore: update tools dir for latest black version (f245ffb)

  • chore: make latest black happy with existing code (d299753)

  • chore: run unittest2pytest on all unit tests (11383e7)

  • chore: remove remnants of python2 imports (402566a)

Documentation

  • docs(variables): add docs for instance-level variables (ad4b87c)

  • docs(api): add example for latest pipeline job artifacts (d20f022)

  • docs(packages): add examples for Packages API and cli usage (a47dfcd)

  • docs(cli): add examples for group-project list (af86dcd)

  • docs: additional project file delete example

Showing how to delete without having to pull the file (9e94b75)

Features

  • feat(api): add support for instance variables (4492fc4)

  • feat: add support to resource milestone events

Fixes #1154 (88f8cc7)

  • feat(api): add endpoint for latest ref artifacts (b7a07fc)

  • feat(api): add support for Packages API (71495d1)

  • feat: add share/unshare group with group (7c6e541)

Refactoring

  • refactor: turn objects module into a package (da8af6f)

  • refactor: rewrite unit tests for objects with responses (204782a)

  • refactor: split unit tests by GitLab API resources (76b2cad)

Testing

  • test(api): add tests for variables API (66d108d)

  • test: add unit tests for resource milestone events API

Fixes #1154 (1317f4b)

  • test(packages): add tests for Packages API (7ea178b)

Unknown

  • Merge pull request #1170 from python-gitlab/chore/bump-to-2-5-0

chore: bump python-gitlab to 2.5.0 (784cba6)

  • Merge pull request #1168 from python-gitlab/renovate/docker-python-3.x

chore(deps): update python docker tag to v3.8 (cf32499)

  • Merge pull request #1163 from python-gitlab/feat/instance-variables-api

Feat: add support for instance variables API (723ca88)

  • Merge pull request #1167 from python-gitlab/renovate/docker-gitlab-gitlab-ce-13.x

chore(deps): update gitlab/gitlab-ce docker tag to v13.3.2-ce.0 (6e1ed68)

  • Merge pull request #1165 from DylannCordel/fix-user-email-reconfirmation

fix: wrong reconfirmation parameter when updating user’s email (97e1dcc)

  • Merge pull request #1164 from nejch/master

chore(ci): pin gitlab-ce version for renovate (e6a9ba9)

  • Merge pull request #1162 from python-gitlab/chore/pre-commit-config

chore(env): add pre-commit and commit-msg hooks (97d8261)

  • Merge pull request #1161 from python-gitlab/chore/ci-fixed-black-version

chore(ci): use fixed black version (28aa17e)

  • Merge pull request #1157 from Shkurupii/issue-1154

Add support to resource milestone events (750f4ee)

  • Merge branch ‘master’ into issue-1154 (fa899d7)

  • Merge pull request #1159 from python-gitlab/feat/project-artifacts

Feat: Project job artifacts for latest successful pipeline (26f95f3)

  • Merge pull request #1160 from python-gitlab/feat/packages-api

Feat: Add support for packages API (0f42e32)

  • Merge pull request #1156 from python-gitlab/docs/group-projects-list-cli

docs(cli): add examples for group-project list (a038e95)

  • Merge pull request #1078 from python-gitlab/refactor/split-unit-tests

Refactor: split unit tests by API resources (a7e44a0)

  • Merge pull request #1147 from ericfrederich/fix-1146

fix: tests fail when using REUSE_CONTAINER option (e2dc9ec)

  • Merge pull request #1139 from sathieu/share_group_with_group

feat: add share/unshare the group with a group (cfa8097)

  • Merge pull request #1152 from matthew-a-dunlap/doc-project-file-delete-example

docs: additional project file delete example (5b92de8)

v2.4.0 (2020-07-09)

Bug Fixes

  • fix: do not check if kwargs is none

Co-authored-by: Traian Nedelea tron1point0@pm.me (a349b90)

  • fix: make query kwargs consistent between call in init and next (72ffa01)

  • fix: pass kwargs to subsequent queries in gitlab list (1d011ac)

  • fix: add masked parameter for variables command (b6339bf)

  • fix(merge): parse arguments as query_data (878098b)

Chores

  • chore: bump version to 2.4.0 (1606310)

Documentation

  • docs(pipelines): simplify download

This uses a context instead of inventing your own stream handler which makes the code simpler and should be fine for most use cases.

Signed-off-by: Paul Spooren mail@aparcar.org (9a068e0)

Features

  • feat: added NO_ACCESS const

This constant is useful for cases where no access is granted, e.g. when creating a protected branch.

The NO_ACCESS const corresponds to the definition in https://docs.gitlab.com/ee/api/protected_branches.html (dab4d0a)

Unknown

  • Merge pull request #1108 from stuartgunter/master

Added NO_ACCESS const (3a76d91)

  • Merge pull request #1092 from aparcar/aparcar-patch-1

Update pipelines_and_jobs.rst (12a40cc)

  • Merge pull request #1124 from tyates-indeed/fix-1123

Pass kwargs to subsequent queries in GitlabList (fixes: #1123) (424a8cb)

  • Merge pull request #1127 from gervasek/master

Add masked parameter for project-variable and group-variable (bfb5034)

  • Merge pull request #1121 from ferhat-aram/fix/bad-merge-request-arg-parsing

fix(merge): parse arguments as query_data (1d82310)

v2.3.1 (2020-06-09)

Bug Fixes

  • fix: disable default keyset pagination

Instead we set pagination to offset on the other paths (e71fe16)

Chores

  • chore: bump version to 2.3.1 (870e7ea)

Unknown

  • Merge pull request #1115 from python-gitlab/fix/keyset-pagination-revert

Fix/keyset pagination revert (3f585ad)

v2.3.0 (2020-06-08)

Bug Fixes

  • fix: use keyset pagination by default for /projects > 50000

Workaround for https://gitlab.com/gitlab-org/gitlab/-/issues/218504. Remove this in 13.1 (f86ef3b)

  • fix(config): fix duplicate code

Fixes #1094 (ee2df6f)

  • fix(project): add missing project parameters (ad8c67d)

Chores

  • chore: correctly render rst (f674bf2)

  • chore: bump to 2.3.0 (01ff865)

  • chore(ci): add codecov integration to Travis (e230568)

  • chore(test): remove outdated token test (e6c9fe9)

  • chore: bring commit signatures up to date with 12.10 (dc382fe)

  • chore: fix typo in docstring (c20f5f1)

  • chore: remove old builds-email service (c60e2df)

  • chore(services): update available service attributes (7afc357)

  • chore: use pytest for unit tests and coverage (9787a40)

Continuous Integration

  • ci: lint fixes (930122b)

  • ci: add a test for creating and triggering pipeline schedule (9f04560)

Documentation

  • docs(remote_mirrors): fix create command (bab91fe)

  • docs(remote_mirrors): fix create command (1bb4e42)

  • docs: update authors (ac0c84d)

  • docs(readme): add codecov badge for master (e21b2c5)

  • docs(readme): update test docs (6e2b1ec)

Features

  • feat: add group runners api (4943991)

  • feat: add play command to project pipeline schedules

fix: remove version from setup

feat: add pipeline schedule play error exception

docs: add documentation for pipeline schedule play (07b9988)

  • feat(api): added support in the GroupManager to upload Group avatars (28eb7ea)

  • feat(services): add project service list API

Can be used to list available services It was introduced in GitLab 12.7 (fc52221)

  • feat: allow an environment variable to specify config location

It can be useful (especially in scripts) to specify a configuration location via an environment variable. If the “PYTHON_GITLAB_CFG” environment variable is defined, treat its value as the path to a configuration file and include it in the set of default configuration locations. (401e702)

  • feat(types): add dir to RESTObject to expose attributes (cad134c)

Testing

  • test: disable test until Gitlab 13.1 (63ae77a)

  • test(runners): add all runners unit tests (127fa5a)

  • test(cli): convert shell tests to pytest test cases (c4ab4f5)

Unknown

  • Merge pull request #1112 from python-gitlab/fix/rst-renderer

chore: correctly render rst (1f7dbc8)

  • Merge pull request #1111 from python-gitlab/chore/bump-version-2-3-0

chore: bump to 2.3.0 (a16ff3f)

  • Merge pull request #1110 from python-gitlab/fix/keyset-pagination

Fix keyset pagination in 13.0 (f10dd38)

  • Merge pull request #1102 from dotenorio/master

Update doc for remote_mirrors (ef6181b)

  • Merge branch ‘master’ of github.com:dotenorio/python-gitlab (f5f4e12)

  • Merge pull request #1089 from python-gitlab/feat/group-runners

feat: add group runners api (38e9fde)

  • Merge pull request #1087 from python-gitlab/docs/update-authors

docs: update authors (89007c9)

  • Merge pull request #1099 from python-gitlab/fix/duplicate-code

fix(config): fix duplicate code (242cf65)

  • Merge pull request #1086 from python-gitlab/test/pytest-cli-tests

test(cli): convert CLI shell tests to pytest test cases (74b3ddc)

  • Merge pull request #1085 from python-gitlab/chore/codecov-travis

chore(ci): add codecov integration to Travis (91c1c27)

  • Merge pull request #1082 from python-gitlab/chore/signature-gpg-x509

chore: bring commit signatures up to date with 12.10 (5a75310)

  • Merge pull request #1069 from zillow/feat/add-custom-pipeline-schedule-play

feat: Add play command to project pipeline schedules (9d66cb3)

  • Merge pull request #1077 from Flor1an-dev/master

feat(api): added support in the GroupManager to upload Group avatars (7907e5a)

  • Merge pull request #1075 from python-gitlab/feat/available-services

feat(services): add project service list API (dad505c)

  • Merge pull request #1074 from jeremycline/environment-variable

feat: Allow an environment variable to specify config location (0c3b717)

  • Merge pull request #1073 from python-gitlab/docs/readme-test-docs

docs(readme): update test docs (70cefe4)

  • Merge pull request #1072 from spyoungtech/feat/restobject-dir

feat(types): add dir to RESTObject to expose attributes (c7c431a)

  • Merge pull request #1066 from nejch/chore/pytest-for-unit-tests

chore: use pytest to run unit tests and coverage (efc6182)

  • Merge pull request #1067 from python-gitlab/fix/missing-project-attributes

fix(project): add missing project parameters (29fd95e)

v2.2.0 (2020-04-07)

Bug Fixes

  • fix(types): do not split single value string in ListAttribute (a26e585)

  • fix: add missing import_project param (9b16614)

Chores

  • chore: bump to 2.2.0 (22d4b46)

  • chore: use raise..from for chained exceptions (#939) (79fef26)

  • chore: rename ExportMixin to DownloadMixin (847da60)

  • chore(mixins): factor out export download into ExportMixin (6ce5d1f)

  • chore(group): update group_manager attributes (#1062)

  • chore(group): update group_manager attributes

Co-Authored-By: Nejc Habjan hab.nejc@gmail.com (fa34f5e)

  • chore: fix typo in allow_failures (265bbdd)

  • chore: pass environment variables in tox (e06d33c)

  • chore: improve and document testing against different images (98d3f77)

  • chore: remove references to python2 in test env (6e80723)

  • chore: clean up for black and flake8 (4fede5d)

  • chore: flatten test_import_github (b8ea96c)

  • chore: move test_import_github into TestProjectImport (a881fb7)

Documentation

  • docs: add docs for Group Import/Export API (8c3d744)

  • docs: fix comment of prev_page()

Co-Authored-By: Nejc Habjan hab.nejc@gmail.com (b066b41)

  • docs: fix comment of prev_page()

Co-Authored-By: Nejc Habjan hab.nejc@gmail.com (ac6b2da)

  • docs: fix comment of prev_page() (7993c93)

Features

  • feat(api): add support for Gitlab Deploy Token API (01de524)

  • feat(api): add support for remote mirrors API (#1056) (4cfaa2f)

  • feat(api): add support for Group Import/Export API (#1037) (6cb9d92)

  • feat: add create from template args to ProjectManager

This commit adds the v4 Create project attributes necessary to create a project from a project, instance, or group level template as documented in https://docs.gitlab.com/ee/api/projects.html#create-project (f493b73)

  • feat: add support for commit GPG signature API (da7a809)

Testing

  • test(api): add tests for group export/import API (e7b2d6c)

  • test(types): reproduce get_for_api splitting strings (#1057) (babd298)

  • test: create separate module for commit tests (8c03771)

  • test: move mocks to top of module (0bff713)

  • test: add unit tests for Project Import (f7aad5f)

  • test: add unit tests for Project Export (600dc86)

  • test: prepare base project test class for more tests (915587f)

Unknown

  • Merge pull request #1059 from python-gitlab/fix/raise-from

chore: use raise..from for chained exceptions (#939) (6749859)

  • Merge pull request #1052 from machine424/deploy-tokens-support

feat(api): add support for Gitlab Deploy Token API (5979750)

  • Merge pull request #1064 from python-gitlab/feat/project-remote-mirrors

feat(api): add support for remote mirrors API (#1056) (3396aa5)

  • Merge pull request #1063 from python-gitlab/feat/group-import-export

Feat: support for group import/export API (c161852)

  • Merge pull request #1058 from python-gitlab/fix/listattribute-get-api-splits-string

Fix: ListAttribute get_for_api() splits strings (50fcd12)

  • Merge pull request #1053 from lassimus/master

feat: add create from template args to ProjectManager (c5904c4)

  • Merge pull request #1054 from nejch/chore/cleanup-test-env

chore: improve test environment for upcoming features (8173021)

  • Merge pull request #1055 from nejch/feat/commit-gpg-signature

feat: add support for commit GPG signature (1b8e748)

  • Merge pull request #1049 from donhui/typo-fix

  • docs: fix comment of prev_page() (82deb7d)

  • Merge pull request #1040 from nejch/test/project-export-import

test: update tests and params for project export/import (4ffaf1d)

v2.1.2 (2020-03-09)

Chores

  • chore: bump version to 2.1.2 (ad7e2bf)

Unknown

  • Merge pull request #1045 from python-gitlab/revert-1003-feat/all-keyset-pagination

Revert “feat: use keyset pagination by default for all=True” (6d941bd)

  • Revert “feat: use keyset pagination by default for all=True” (6f843b6)

v2.1.1 (2020-03-09)

Bug Fixes

  • fix(docs): additional project statistics example (5ae5a06)

Chores

  • chore: bump version to 2.1.1 (6c5458a)

  • chore(user): update user attributes to 12.8 (666f880)

Unknown

  • Merge pull request #1043 from python-gitlab/chore/update-user-attributes

chore(user): update user attributes to 12.8 (8c44bb6)

  • Merge pull request #1042 from khuedoan98/patch-1

fix(docs): additional project statistics example (be5b15e)

v2.1.0 (2020-03-08)

Bug Fixes

  • fix(projects): correct copy-paste error (adc9101)

  • fix(objects): add default name data and use http post

Updating approvers new api needs a POST call. Also It needs a name of the new rule, defaulting this to ‘name’. (70c0cfb)

  • fix: do not require empty data dict for create() (99d959f)

  • fix(docs): fix typo in user memberships example (33889bc)

  • fix: remove trailing slashes from base URL (#913) (2e396e4)

  • fix: return response with commit data (b77b945)

  • fix(docs): update to new set approvers call for # of approvers

to set the # of approvers for an MR you need to use the same function as for setting the approvers id. (8e0c526)

  • fix(objects): update set_approvers function call

Added a miss paramter update to the set_approvers function (65ecadc)

  • fix(docs and tests): update docs and tests for set_approvers

Updated the docs with the new set_approvers arguments, and updated tests with the arg as well. (2cf12c7)

  • fix(objects): update to new gitlab api for path, and args

Updated the gitlab path for set_approvers to approvers_rules, added default arg for rule type, and added arg for # of approvals required. (e512cdd)

  • fix: remove null values from features POST data, because it fails with HTTP 500 (1ec1816)

Chores

  • chore: bump version to 2.1.0 (47cb58c)

  • chore: fix broken requests links

Another case of the double slash rewrite. (b392c21)

  • chore: ensure developers use same gitlab image as Travis (fab17fc)

Code Style

  • style: fix black violations (ad3e833)

Documentation

  • docs: add reference for REQUESTS_CA_BUNDLE (37e8d5d)

  • docs(pagination): clear up pagination docs

Co-Authored-By: Mitar mitar.git@tnode.com (1609824)

Features

  • feat(api): add support for GitLab OAuth Applications API (4e12356)

  • feat: use keyset pagination by default for all=True (99b4484)

  • feat: add support for user memberships API (#1009) (c313c2b)

  • feat: add support for commit revert API (#991) (5298964)

  • feat: add capability to control GitLab features per project or group (7f192b4)

Performance Improvements

  • perf: prepare environment when gitlab is reconfigured (3834d9c)

Testing

  • test: add unit tests for base URLs with trailing slashes (32844c7)

  • test: remove duplicate resp_get_project (cb43695)

  • test: use lazy object in unit tests (31c6562)

  • test: add unit tests for revert commit API (d7a3066)

Unknown

  • Merge pull request #1039 from python-gitlab/fix/set-approvers

Fix/set approvers (481bd4f)

  • Merge pull request #1038 from nejch/fix/allow-empty-create-data

Fix: do not require empty data dict for create() (ca37d23)

  • Merge pull request #1034 from filipowm/feat/api-oauth-applications

feat(api): add support for GitLab OAuth Applications using Applications API (e5afb55)

  • Merge pull request #1032 from nejch/docs/requests-ca-bundle

docs: add reference to REQUESTS_CA_BUNDLE usage (fbcc820)

  • Merge pull request #1003 from python-gitlab/feat/all-keyset-pagination

feat: use keyset pagination by default for all=True (3aa9873)

  • Merge pull request #1022 from nejch/chore/ensure-latest-image

chore: ensure developers use same gitlab image as CI (745bdf7)

  • Merge pull request #1023 from nejch/perf/wait-gitlab-reconfigure

perf: wait for gitlab to reconfigure instead of using hardcoded sleep (2b3871d)

  • Merge pull request #1026 from nejch/feat/user-memberships

feat: add support for user memberships API (#1009) (f071390)

  • Merge pull request #1027 from nejch/fix/base-url-trailing-slash

Fix: remove trailing slash in base URL (292dfff)

  • Merge pull request #1020 from nejch/feat/revert-commit-api

feat: add support for commit revert API (#991) (e8f0921)

  • Merge pull request #1005 from charlesfayal/fix_set_approvers

change path for set_approvers to new api, with defaulted rule_type an… (19242c3)

  • Merge pull request #1008 from filipowm/feature/feature-flags-additional-config

Add capability to control GitLab features per project or group (066fc9b)

v2.0.1 (2020-02-05)

Chores

  • chore: revert to 2.0.1

I’ve misread the tag (272db26)

  • chore: bump to 2.1.0

There are a few more features in there (a6c0660)

  • chore: bump version to 2.0.1 (8287a0d)

  • chore(user): update user attributes

This also workarounds an GitLab issue, where private_profile, would reset to false if not supplied (27375f6)

Documentation

  • docs(auth): remove email/password auth (c9329bb)

Unknown

  • Merge pull request #1007 from python-gitlab/chore/user-update

chore(user): update user attributes (f6d9858)

  • Merge pull request #1000 from matusf/update-auth-docs

Update auth docs (7843ace)

v2.0.0 (2020-01-26)

Bug Fixes

  • fix(projects): adjust snippets to match the API (e104e21)

Chores

  • chore: build_sphinx needs sphinx >= 1.7.6

Stepping thru Sphinx versions from 1.6.5 to 1.7.5 build_sphinx fails. Once Sphinx == 1.7.6 build_sphinx finished. (528dfab)

  • chore: enforce python version requirements (70176db)

  • chore: bump to 2.0.0

Dropping support for legacy python requires a new major version (c817dcc)

  • chore: drop legacy python tests

Support dropped for: 2.7, 3.4, 3.5 (af8679a)

  • chore: add PyYaml as extra require (7ecd518)

  • chore: bump minimum required requests version

for security reasons (3f78aa3)

Documentation

  • docs: fix snippet get in project (3a4ff2f)

  • docs(projects): add raw file download docs

Fixes #969 (939e9d3)

Features

  • feat: add global order_by option to ease pagination (d187925)

  • feat: support keyset pagination globally (0b71ba4)

  • feat: add appearance API (4c4ac5c)

  • feat: add autocompletion support (973cb8b)

Refactoring

  • refactor: support new list filters

This is most likely only useful for the CLI (bded2de)

  • refactor: remove six dependency (9fb4645)

Testing

  • test: adjust functional tests for project snippets (ac0ea91)

  • test: add project snippet tests (0952c55)

Unknown

  • Merge pull request #1001 from python-gitlab/feat/keyset-pagination

Feat/keyset pagination (df485a9)

  • Merge pull request #996 from python-gitlab/feat/appearance

feat: add appearance API (7fd3226)

  • Merge pull request #988 from jgroom33/patch-3

docs: fix snippet get in project (afdc43f)

  • Merge pull request #984 from derekschrock/patch-1

chore: build_sphinx needs sphinx >= 1.7.6 (fc2ed13)

  • Merge pull request #982 from python-gitlab/chore/version-requirements

chore: enforce python version requirements (83fcd1b)

  • Merge pull request #980 from python-gitlab/refactor/cleanup-upgrade

Refactor/cleanup upgrade (5fa0e16)

  • Merge pull request #979 from python-gitlab/fix/project-snippets

Fix/project snippets (5a10eb3)

  • Merge pull request #941 from mchlumsky/feat/autocompletion

feat: add autocompletion support (ec6e04c)

v1.15.0 (2019-12-16)

Bug Fixes

  • fix: ignore all parameter, when as_list=True

Closes #962 (137d72b)

Chores

  • chore: bump version to 1.15.0 (2a01326)

  • chore(ci): use correct crane ci (18913dd)

Code Style

  • style: format with the latest black version (06a8050)

Documentation

  • docs(projects): fix file deletion docs

The function file.delete() requires branch argument in addition to commit_message. (1c4f1c4)

  • docs: added docs for statistics (8c84cbf)

Features

  • feat: allow cfg timeout to be overrided via kwargs

On startup, the timeout parameter is loaded from config and stored on the base gitlab object instance. This instance parameter is used as the timeout for all API requests (it’s passed into the session object when making HTTP calls).

This change allows any API method to specify a timeout argument to **kwargs that will override the global timeout value. This was somewhat needed / helpful for the import_github method.

I have also updated the docs accordingly. (e9a8289)

  • feat: add support for /import/github

Addresses python-gitlab/python-gitlab#952

This adds a method to the ProjectManager called import_github, which maps to the /import/github API endpoint. Calling import_github will trigger an import operation from <repo_id> into <target_namespace>, using <personal_access_token> to authenticate against github. In practice a gitlab server may take many 10’s of seconds to respond to this API call, so we also take the liberty of increasing the default timeout (only for this method invocation).

Unfortunately since import is a protected keyword in python, I was unable to follow the endpoint structure with the manager namespace. I’m open to suggestions on a more sensible interface.

I’m successfully using this addition to batch-import hundreds of github repositories into gitlab. (aa4d41b)

  • feat: nicer stacktrace (697cda2)

  • feat: add variable_type/protected to projects ci variables

This adds the ci variables types and protected flag for create/update requests.

See https://docs.gitlab.com/ee/api/project_level_variables.html#create-variable (4724c50)

  • feat: add variable_type to groups ci variables

This adds the ci variables types for create/update requests.

See https://docs.gitlab.com/ee/api/group_level_variables.html#create-variable (0986c93)

  • feat: access project’s issues statistics

Fixes #966 (482e57b)

  • feat: adding project stats

Fixes #967 (db0b00a)

  • feat: retry transient HTTP errors

Fixes #970 (59fe271)

Testing

  • test: added tests for statistics (8760efc)

  • test: test that all is ignored, when as_list=False (b5e88f3)

Unknown

  • Merge pull request #959 from andrew-littlebits/feat/import-github

feat: add support for /import/github (97e1fca)

  • Merge pull request #973 from mitar/patch-1

Nicer stacktrace (61eaad2)

  • Merge pull request #971 from jooola/ci_vars_type

feat: add more options for project/group ci variables manipulation (938fc0a)

  • Merge pull request #974 from python-gitlab/docs/file-deletion-docs

docs(projects): fix file deletion docs (59af4e4)

  • Merge pull request #968 from mitar/stats

Stats (62b0b62)

  • Merge pull request #972 from mitar/http-retry

Retry transient HTTP errors (36bbd37)

  • Merge pull request #963 from python-gitlab/fix/as_list

Fix/as list (3e2d694)

v1.14.0 (2019-12-07)

Bug Fixes

  • fix(project-fork): copy create fix from ProjectPipelineManager (516307f)

  • fix(project-fork): correct path computation for project-fork list (44a7c27)

  • fix(labels): ensure label.save() works

Otherwise, we get: File “gitlabracadabra/mixins/labels.py”, line 67, in _process_labels current_label.save() File “gitlab/exceptions.py”, line 267, in wrapped_f return f(*args, **kwargs) File “gitlab/v4/objects.py”, line 896, in save self._update_attrs(server_data) File “gitlab/base.py”, line 131, in _update_attrs self.dict[“_attrs”].update(new_attrs) TypeError: ‘NoneType’ object is not iterable

Because server_data is None. (727f536)

  • fix: added missing attributes for project approvals

Reference: https://docs.gitlab.com/ee/api/merge_request_approvals.html#change-configuration

Missing attributes:

  • merge_requests_author_approval

  • merge_requests_disable_committers_approval (460ed63)

Chores

  • chore: bump version to 1.14.0 (164fa4f)

  • chore(ci): switch to crane docker image (#944) (e0066b6)

Documentation

  • docs(readme): fix Docker image reference

v1.8.0 is not available.

Unable to find image 'registry.gitlab.com/python-gitlab/python-gitlab:v1.8.0' locally
docker: Error response from daemon: manifest for registry.gitlab.com/python-gitlab/python-gitlab:v1.8.0 not found: manifest unknown: manifest unknown.
``` ([`b9a40d8`](https://github.com/python-gitlab/python-gitlab/commit/b9a40d822bcff630a4c92c395c134f8c002ed1cb))

* docs(snippets): fix snippet docs

Fixes #954 ([`bbaa754`](https://github.com/python-gitlab/python-gitlab/commit/bbaa754673c4a0bffece482fe33e4875ddadc2dc))

* docs: fix typo ([`d9871b1`](https://github.com/python-gitlab/python-gitlab/commit/d9871b148c7729c9e401f43ff6293a5e65ce1838))

* docs: add project and group cluster examples ([`d15801d`](https://github.com/python-gitlab/python-gitlab/commit/d15801d7e7742a43ad9517f0ac13b6dba24c6283))

* docs(changelog): add notice for release-notes on Github (#938) ([`de98e57`](https://github.com/python-gitlab/python-gitlab/commit/de98e572b003ee4cf2c1ef770a692f442c216247))

* docs(pipelines_and_jobs): add pipeline custom variables usage example ([`b275eb0`](https://github.com/python-gitlab/python-gitlab/commit/b275eb03c5954ca24f249efad8125d1eacadd3ac))

### Features

* feat: add audit endpoint ([`2534020`](https://github.com/python-gitlab/python-gitlab/commit/2534020b1832f28339ef466d6dd3edc21a521260))

* feat: add project and group clusters ([`ebd053e`](https://github.com/python-gitlab/python-gitlab/commit/ebd053e7bb695124c8117a95eab0072db185ddf9))

* feat: add support for include_subgroups filter ([`adbcd83`](https://github.com/python-gitlab/python-gitlab/commit/adbcd83fa172af2f3929ba063a0e780395b102d8))

### Unknown

* Merge pull request #949 from idanbensha/add_audit_events

feat: add audit endpoint ([`98e1b0a`](https://github.com/python-gitlab/python-gitlab/commit/98e1b0ae77a627d21ce971ee4df813e1955f69a0))

* Merge pull request #958 from vvv/fix-docker-ref

README.rst: fix the upstream Docker image reference ([`f6f5178`](https://github.com/python-gitlab/python-gitlab/commit/f6f5178c1dc7aeb3fdbee19b1768e30b2be4f4f4))

* Merge pull request #955 from python-gitlab/fix/snippet-docs

docs(snippets): fix snippet docs ([`9961aaa`](https://github.com/python-gitlab/python-gitlab/commit/9961aaa1508e08a567c8c66cb194385788b8113e))

* Merge pull request #953 from bmwiedemann/master

Fix doc typo ([`267a9a1`](https://github.com/python-gitlab/python-gitlab/commit/267a9a151ba9f2338f50fbb118513807ebce9704))

* Merge pull request #947 from lundbird/master

docs: add project and group cluster examples ([`e4cad49`](https://github.com/python-gitlab/python-gitlab/commit/e4cad490b9cd16aa20ea84bb4bd24a6d25b19411))

* Merge pull request #946 from lundbird/master

feat: add project and group clusters ([`da557c9`](https://github.com/python-gitlab/python-gitlab/commit/da557c931fa6c6d50c373fc022d88acf1431c24a))

* Merge pull request #943 from choyrim/942-project-fork-list-404

#942: fix up path computation for project-fork list ([`ecad2c8`](https://github.com/python-gitlab/python-gitlab/commit/ecad2c83635c5e5f7003f61502391446ebc631c9))

* Merge pull request #937 from sathieu/fix_labels_save

fix(labels): ensure label.save() works ([`c937338`](https://github.com/python-gitlab/python-gitlab/commit/c937338b0119b08b358f97b4716c56777ee7bb80))

* Merge pull request #934 from tymonx/fix-missing-attribute-for-project-approvals

Added missing attributes for project approvals ([`9608886`](https://github.com/python-gitlab/python-gitlab/commit/960888628617beae75392dcdcb6ef5a66abd976d))

* Merge pull request #929 from SVLay/docs/pipeline-variables

docs(pipelines_and_jobs): add pipeline custom variables usage example ([`4efa6e6`](https://github.com/python-gitlab/python-gitlab/commit/4efa6e6e5b9b57a3c4eda9ef20a4194b384055dc))

* Merge pull request #932 from ConorNevin/master

Add support for include_subgroups filter ([`1f18230`](https://github.com/python-gitlab/python-gitlab/commit/1f182302c206502f5202d1707fef69adf527fea7))


## v1.13.0 (2019-11-02)

### Bug Fixes

* fix(projects): support `approval_rules` endpoint for projects

The `approvers` API endpoint is deprecated [1]. GitLab instead uses
the `approval_rules` API endpoint to modify approval settings for
merge requests. This adds the functionality for project-level
merge request approval settings.

Note that there does not exist an endpoint to 'get' a single
approval rule at this moment - only 'list'.

[1] https://docs.gitlab.com/ee/api/merge_request_approvals.html ([`2cef2bb`](https://github.com/python-gitlab/python-gitlab/commit/2cef2bb40b1f37b97bb2ee9894ab3b9970cef231))

### Chores

* chore: bump version to 1.13.0 ([`d0750bc`](https://github.com/python-gitlab/python-gitlab/commit/d0750bc01ed12952a4d259a13b3917fa404fd435))

* chore(setup): we support 3.8 (#924)

* chore(setup): we support 3.8

* style: format with black ([`6048175`](https://github.com/python-gitlab/python-gitlab/commit/6048175ef2c21fda298754e9b07515b0a56d66bd))

* chore(ci): update latest docker image for every tag ([`01cbc7a`](https://github.com/python-gitlab/python-gitlab/commit/01cbc7ad04a875bea93a08c0ce563ab5b4fe896b))

* chore(dist): add test data

Closes #907 ([`3133ed7`](https://github.com/python-gitlab/python-gitlab/commit/3133ed7d1df6f49de380b35331bbcc67b585a61b))

### Documentation

* docs: projects get requires id

Also, add an example value for project_id to the other projects.get()
example. ([`5bd8947`](https://github.com/python-gitlab/python-gitlab/commit/5bd8947bd16398aed218f07458aef72e67f2d130))

* docs(project): fix group project example

GroupManager.search is removed since 9a66d78, use list(search='keyword') instead ([`e680943`](https://github.com/python-gitlab/python-gitlab/commit/e68094317ff6905049e464a59731fe4ab23521de))

### Features

* feat: add users activate, deactivate functionality

These were introduced in GitLab 12.4 ([`32ad669`](https://github.com/python-gitlab/python-gitlab/commit/32ad66921e408f6553b9d60b6b4833ed3180f549))

* feat: send python-gitlab version as user-agent ([`c22d49d`](https://github.com/python-gitlab/python-gitlab/commit/c22d49d084d1e03426cfab0d394330f8ab4bd85a))

* feat: add deployment creation

Added in GitLab 12.4

Fixes #917 ([`ca256a0`](https://github.com/python-gitlab/python-gitlab/commit/ca256a07a2cdaf77a5c20e307d334b82fd0fe861))

* feat(test): unused unittest2, type -> isinstance ([`33b1801`](https://github.com/python-gitlab/python-gitlab/commit/33b180120f30515d0f76fcf635cb8c76045b1b42))

* feat(auth): remove deprecated session auth ([`b751cdf`](https://github.com/python-gitlab/python-gitlab/commit/b751cdf424454d3859f3f038b58212e441faafaf))

* feat(doc): remove refs to api v3 in docs ([`6beeaa9`](https://github.com/python-gitlab/python-gitlab/commit/6beeaa993f8931d6b7fe682f1afed2bd4c8a4b73))

### Testing

* test(projects): support `approval_rules` endpoint for projects ([`94bac44`](https://github.com/python-gitlab/python-gitlab/commit/94bac4494353e4f597df0251f0547513c011e6de))

* test: remove warning about open files from test_todo()

When running unittests python warns that the json file from test_todo()
was still open. Use with to open, read, and create encoded json data
that is used by resp_get_todo(). ([`d6419aa`](https://github.com/python-gitlab/python-gitlab/commit/d6419aa86d6ad385e15d685bf47242bb6c67653e))

### Unknown

* Merge pull request #931 from python-gitlab/choree/1-13-0

chore: bump version to 1.13.0 ([`f39c68f`](https://github.com/python-gitlab/python-gitlab/commit/f39c68fd0b180ba72dd11e3cbad932d16d4bb484))

* Merge pull request #919 from appian/project-approval-rules

fix(projects): support `approval_rules` endpoint for projects ([`fddc25a`](https://github.com/python-gitlab/python-gitlab/commit/fddc25adac16a74f61d81871f9ae13c0227d92d6))

* Merge pull request #923 from python-gitlab/feat/users-activate-deactivate

feat: add users activate, deactivate functionality ([`912e16b`](https://github.com/python-gitlab/python-gitlab/commit/912e16b95611715b4df3fae019687f7616af51c1))

* Merge pull request #922 from python-gitlab/chore/latest-docker-image

chore(ci): update latest docker image for every tag ([`ac2266b`](https://github.com/python-gitlab/python-gitlab/commit/ac2266b66553cec11740bd5246e23d649606b5ef))

* Merge pull request #921 from python-gitlab/feat/python-gitlab-agent

feat: send python-gitlab version as user-agent ([`8cb5488`](https://github.com/python-gitlab/python-gitlab/commit/8cb5488142ca7fc7563fac65b434b672a14369fc))

* Merge pull request #920 from python-gitlab/feat/deployment-create

feat: add deployment creation ([`dad6805`](https://github.com/python-gitlab/python-gitlab/commit/dad68050c1269519f35dcdb29dc94a03f47532c5))

* Merge pull request #916 from python-gitlab/chore/add-test-to-dist

chore(dist): add test data ([`e790b1e`](https://github.com/python-gitlab/python-gitlab/commit/e790b1ec40ed690152776a87c15e7f7d5d3b9136))

* Merge pull request #914 from terminalmage/issue913

Remove inaccurate projects.get() example ([`d2c9cee`](https://github.com/python-gitlab/python-gitlab/commit/d2c9ceece5d6473f286e00963252abbcf1a2a17c))

* Merge pull request #911 from xdavidwu/fix-project-doc

docs(project): fix group project example ([`d853a76`](https://github.com/python-gitlab/python-gitlab/commit/d853a767ac8835615e0fded3087f55ca8594c1ed))

* Merge pull request #906 from jouve/test-cleanup

unused unittest2, type -> isinstance ([`42a1ba6`](https://github.com/python-gitlab/python-gitlab/commit/42a1ba6be175a9838c589cb1e40636b3910db505))

* Merge pull request #904 from jouve/remove-cred-auth

remove deprecated session auth ([`67a9c1f`](https://github.com/python-gitlab/python-gitlab/commit/67a9c1f1c62393b02919d25bcc98c3683d92576a))

* Merge pull request #908 from derekschrock/todo-units-test

Remove warning about open files from test_todo() ([`ff808ee`](https://github.com/python-gitlab/python-gitlab/commit/ff808ee94a73d65802a21ff1350090885d4befd5))

* Merge pull request #905 from jouve/doc-v3

remove references to api v3 in docs ([`92ba028`](https://github.com/python-gitlab/python-gitlab/commit/92ba0283b63e562e181061252787e0e46da83a29))


## v1.12.1 (2019-10-07)

### Bug Fixes

* fix: fix not working without auth ([`03b7b5b`](https://github.com/python-gitlab/python-gitlab/commit/03b7b5b07e1fd2872e8968dd6c29bc3161c6c43a))

### Unknown

* Merge pull request #901 from python-gitlab/fix/non-auth

fix: fix not working without auth ([`f4b2927`](https://github.com/python-gitlab/python-gitlab/commit/f4b29278771e48320e2da4bacc4544d263d1754c))


## v1.12.0 (2019-10-06)

### Bug Fixes

* fix(cli): fix cli command user-project list ([`c17d7ce`](https://github.com/python-gitlab/python-gitlab/commit/c17d7ce14f79c21037808894d8c7ba1117779130))

* fix(labels): don't mangle label name on update ([`1fb6f73`](https://github.com/python-gitlab/python-gitlab/commit/1fb6f73f4d501c2b6c86c863d40481e1d7a707fe))

* fix(todo): mark_all_as_done doesn't return anything ([`5066e68`](https://github.com/python-gitlab/python-gitlab/commit/5066e68b398039beb5e1966ba1ed7684d97a8f74))

### Chores

* chore: bump to 1.12.0 ([`4648128`](https://github.com/python-gitlab/python-gitlab/commit/46481283a9985ae1b07fe686ec4a34e4a1219b66))

* chore(ci): build test images on tag ([`0256c67`](https://github.com/python-gitlab/python-gitlab/commit/0256c678ea9593c6371ffff60663f83c423ca872))

### Code Style

* style: format with black ([`fef085d`](https://github.com/python-gitlab/python-gitlab/commit/fef085dca35d6b60013d53a3723b4cbf121ab2ae))

### Documentation

* docs(project): add submodule docs ([`b5969a2`](https://github.com/python-gitlab/python-gitlab/commit/b5969a2dcea77fa608cc29be7a5f39062edd3846))

* docs(projects): add note about project list

Fixes #795 ([`44407c0`](https://github.com/python-gitlab/python-gitlab/commit/44407c0f59b9602b17cfb93b5e1fa37a84064766))

* docs(repository-tags): fix typo

Closes #879 ([`3024c5d`](https://github.com/python-gitlab/python-gitlab/commit/3024c5dc8794382e281b83a8266be7061069e83e))

* docs(todo): correct todo docs ([`d64edcb`](https://github.com/python-gitlab/python-gitlab/commit/d64edcb4851ea62e72e3808daf7d9b4fdaaf548b))

### Features

* feat(project): implement update_submodule ([`4d1e377`](https://github.com/python-gitlab/python-gitlab/commit/4d1e3774706f336e87ebe70e1b373ddb37f34b45))

* feat(ci): improve functionnal tests ([`eefceac`](https://github.com/python-gitlab/python-gitlab/commit/eefceace2c2094ef41d3da2bf3c46a58a450dcba))

* feat(project): add file blame api

https://docs.gitlab.com/ee/api/repository_files.html#get-file-blame-from-repository ([`f5b4a11`](https://github.com/python-gitlab/python-gitlab/commit/f5b4a113a298d33cb72f80c94d85bdfec3c4e149))

* feat: add support for job token

See https://docs.gitlab.com/ee/api/jobs.html#get-job-artifacts for usage ([`cef3aa5`](https://github.com/python-gitlab/python-gitlab/commit/cef3aa51a6928338c6755c3e6de78605fae8e59e))

* feat(user): add status api ([`62c9fe6`](https://github.com/python-gitlab/python-gitlab/commit/62c9fe63a47ddde2792a4a5e9cd1c7aa48661492))

### Refactoring

* refactor: remove obsolete test image

Follow up of #896 ([`a14c02e`](https://github.com/python-gitlab/python-gitlab/commit/a14c02ef85bd4d273b8c7f0f6bd07680c91955fa))

* refactor: remove unused code, simplify string format ([`c7ff676`](https://github.com/python-gitlab/python-gitlab/commit/c7ff676c11303a00da3a570bf2893717d0391f20))

### Testing

* test(submodules): correct test method ([`e59356f`](https://github.com/python-gitlab/python-gitlab/commit/e59356f6f90d5b01abbe54153441b6093834aa11))

* test(func): disable commit test

GitLab seems to be randomly failing here ([`c9c76a2`](https://github.com/python-gitlab/python-gitlab/commit/c9c76a257d2ed3b394f499253d890c2dd9a01e24))

* test(todo): add unittests ([`7715567`](https://github.com/python-gitlab/python-gitlab/commit/77155678a5d8dbbf11d00f3586307694042d3227))

* test(status): add user status test ([`fec4f9c`](https://github.com/python-gitlab/python-gitlab/commit/fec4f9c23b8ba33bb49dca05d9c3e45cb727e0af))

* test: re-enabled py_func_v4 test ([`49d84ba`](https://github.com/python-gitlab/python-gitlab/commit/49d84ba7e95fa343e622505380b3080279b83f00))

### Unknown

* Merge pull request #899 from python-gitlab/chore/package-version

chore: bump to 1.12.0 ([`35cc8c7`](https://github.com/python-gitlab/python-gitlab/commit/35cc8c789fda4977add7f399bf426352b1aa246f))

* Merge pull request #898 from python-gitlab/feat/update_submodule

Feat/update submodule ([`6f4332d`](https://github.com/python-gitlab/python-gitlab/commit/6f4332db37b0a609ec4bd5e2c0b7ffc01717599c))

* Merge pull request #897 from python-gitlab/refactor/remove-obsolete-image

refactor: remove obsolete test image ([`fcea41c`](https://github.com/python-gitlab/python-gitlab/commit/fcea41c61f7776cf57ed5001facbc1e77d2834c4))

* Merge pull request #892 from godaji/remove-unused-code

Remove unused code and simplify string format. ([`214f7ef`](https://github.com/python-gitlab/python-gitlab/commit/214f7ef5f3b6e99b7756982c5b883e40d3b22657))

* Merge pull request #896 from jouve/fix-functionnal-test

improve functionnal tests ([`d7d2260`](https://github.com/python-gitlab/python-gitlab/commit/d7d2260945994a9e73fe3f7f9328f3ec9d9c54d4))

* Merge pull request #894 from minitux/master

feat (project): add file blame api ([`082a624`](https://github.com/python-gitlab/python-gitlab/commit/082a62456deaa68274ed1c44a744c79c5356a622))

* Merge pull request #891 from python-gitlab/docs/project-note-list

docs(projects): add note about project list ([`ba2b60e`](https://github.com/python-gitlab/python-gitlab/commit/ba2b60e32c12cacf18762a286d05e073529b9898))

* Merge pull request #886 from LuckySB/cli_user_project

fix cli command user-project list ([`88b1833`](https://github.com/python-gitlab/python-gitlab/commit/88b183376de5b8c986eac24955ef129ca4d781cc))

* Merge pull request #885 from sathieu/patch-1

Don't mangle label name on update ([`ff10726`](https://github.com/python-gitlab/python-gitlab/commit/ff10726d70a62d32ef39398a431def9656c93927))

* Merge pull request #880 from python-gitlab/docs/tags-fix-typo

docs(repository-tags): fix typo ([`c287bdd`](https://github.com/python-gitlab/python-gitlab/commit/c287bdd0889881d89f991d3929ae513d91b5894c))

* Merge pull request #878 from python-gitlab/test/todo-unit-test

Test/todo unit test ([`040894d`](https://github.com/python-gitlab/python-gitlab/commit/040894d245709c5c2524d59d2b228a21dd74d1a4))

* Merge pull request #876 from sathieu/job_token

Add support for job token ([`8474829`](https://github.com/python-gitlab/python-gitlab/commit/8474829a3fe40aca8f5d4c1c627908f0830a8f59))

* Merge pull request #875 from python-gitlab/feat/status-api

feat(user): add status api ([`b7f3342`](https://github.com/python-gitlab/python-gitlab/commit/b7f33429c75ed2f464ebd9b4d3c56d3479df3faa))

* Merge pull request #874 from python-gitlab/test/py-fun-test

test: re-enabled py_func_v4 test ([`1490b0e`](https://github.com/python-gitlab/python-gitlab/commit/1490b0e7f175d54cc6d35de7aac6d9e45c0e3d51))


## v1.11.0 (2019-08-31)

### Bug Fixes

* fix(projects): avatar uploading for projects ([`558ace9`](https://github.com/python-gitlab/python-gitlab/commit/558ace9b007ff9917734619c05a7c66008a4c3f0))

* fix: remove empty list default arguments

Signed-off-by: Frantisek Lachman <flachman@redhat.com> ([`6e204ce`](https://github.com/python-gitlab/python-gitlab/commit/6e204ce819fc8bdd5359325ed7026a48d63f8103))

* fix: remove empty dict default arguments

Signed-off-by: Frantisek Lachman <flachman@redhat.com> ([`8fc8e35`](https://github.com/python-gitlab/python-gitlab/commit/8fc8e35c63d7ebd80408ae002693618ca16488a7))

* fix: add project and group label update without id to fix cli ([`a3d0d7c`](https://github.com/python-gitlab/python-gitlab/commit/a3d0d7c1e7b259a25d9dc84c0b1de5362c80abb8))

### Chores

* chore: bump package version ([`37542cd`](https://github.com/python-gitlab/python-gitlab/commit/37542cd28aa94ba01d5d289d950350ec856745af))

### Features

* feat: add methods to retrieve an individual project environment ([`29de40e`](https://github.com/python-gitlab/python-gitlab/commit/29de40ee6a20382c293d8cdc8d831b52ad56a657))

* feat: group labels with subscriptable mixin ([`4a9ef9f`](https://github.com/python-gitlab/python-gitlab/commit/4a9ef9f0fa26e01fc6c97cf88b2a162e21f61cce))

### Testing

* test: add group label cli tests ([`f7f24bd`](https://github.com/python-gitlab/python-gitlab/commit/f7f24bd324eaf33aa3d1d5dd12719237e5bf9816))

### Unknown

* Merge pull request #865 from orf/retrieve-environment

feat: add methods to retrieve an individual project environment ([`0389e66`](https://github.com/python-gitlab/python-gitlab/commit/0389e664c0a04021b3df097bacad3940f158607f))

* Merge pull request #861 from ravanscafi/fix-project-avatar

Fix avatar uploading for projects ([`99a9415`](https://github.com/python-gitlab/python-gitlab/commit/99a941526a1845559d92b607fd9e2d86efb7e7b6))

* Merge pull request #860 from lachmanfrantisek/fix-mutable-default-arguments

Fix mutable default arguments ([`e8a3585`](https://github.com/python-gitlab/python-gitlab/commit/e8a3585ed0e7dfa2f64f6c3378a598120f5f8167))

* Merge pull request #847 from sidisel-albertolopez/feat/grouplabels

feat: Add grouplabel support with subscribable mixin ([`edb3359`](https://github.com/python-gitlab/python-gitlab/commit/edb3359fb3a77050d3e162da641445952397279b))


## v1.10.0 (2019-07-22)

### Bug Fixes

* fix: improve pickle support ([`b4b5dec`](https://github.com/python-gitlab/python-gitlab/commit/b4b5decb7e49ac16d98d56547a874fb8f9d5492b))

* fix(cli): allow --recursive parameter in repository tree

Fixes #718
Fixes #731 ([`7969a78`](https://github.com/python-gitlab/python-gitlab/commit/7969a78ce8605c2b0195734e54c7d12086447304))

* fix(cli): don't fail when the short print attr value is None

Fixes #717
Fixes #727 ([`8d1552a`](https://github.com/python-gitlab/python-gitlab/commit/8d1552a0ad137ca5e14fabfc75f7ca034c2a78ca))

* fix(cli): fix update value for key not working ([`b766203`](https://github.com/python-gitlab/python-gitlab/commit/b7662039d191ebb6a4061c276e78999e2da7cd3f))

* fix: convert # to %23 in URLs

Refactor a bit to handle this change, and add unit tests.

Closes #779 ([`14f5385`](https://github.com/python-gitlab/python-gitlab/commit/14f538501bfb47c92e02e615d0817675158db3cf))

* fix: pep8 errors

Errors have not been detected by broken travis runs. ([`334f9ef`](https://github.com/python-gitlab/python-gitlab/commit/334f9efb18c95bb5df3271d26fa0a55b7aec1c7a))

* fix(api): Make *MemberManager.all() return a list of objects

Fixes #699 ([`d74ff50`](https://github.com/python-gitlab/python-gitlab/commit/d74ff506ca0aadaba3221fc54cbebb678240564f))

* fix: use python2 compatible syntax for super ([`b08efcb`](https://github.com/python-gitlab/python-gitlab/commit/b08efcb9d155c20fa938534dd2d912f5191eede6))

* fix: re-add merge request pipelines ([`877ddc0`](https://github.com/python-gitlab/python-gitlab/commit/877ddc0dbb664cd86e870bb81d46ca614770b50e))

* fix(api): Don't try to parse raw downloads

http_get always tries to interpret the retrieved data if the
content-type is json. In some cases (artifact download for instance)
this is not the expected behavior.

This patch changes http_get and download methods to always get the raw
data without parsing.

Closes #683 ([`35a6d85`](https://github.com/python-gitlab/python-gitlab/commit/35a6d85acea4776e9c4ad23ff75259481a6bcf8d))

* fix(api): avoid parameter conflicts with python and gitlab

Provide another way to send data to gitlab with a new `query_parameters`
argument. This parameter can be used to explicitly define the dict of
items to send to the server, so that **kwargs are only used to specify
python-gitlab specific parameters.

Closes #566
Closes #629 ([`4bd027a`](https://github.com/python-gitlab/python-gitlab/commit/4bd027aac41c41f7e22af93c7be0058d2faf7fb4))

* fix: remove decode() on error_message string

The integration tests failed because a test called 'decode()' on a
string-type variable - the GitLabException class handles byte-to-string
conversion already in its __init__. This commit removes the call to
'decode()' in the test.

Traceback (most recent call last): File “./tools/python_test_v4.py”, line 801, in assert ‘Retry later’ in error_message.decode() AttributeError: ‘str’ object has no attribute ‘decode’ ``` (16bda20)

  • fix: handle empty ‘Retry-After’ header from GitLab

When requests are throttled (HTTP response code 429), python-gitlab assumed that ‘Retry-After’ existed in the response headers. This is not always the case and so the request fails due to a KeyError. The change in this commit adds a rudimentary exponential backoff to the ‘http_request’ method, which defaults to 10 retries but can be set to -1 to retry without bound. (7a3724f)

  • fix(api): make reset_time_estimate() work again

Closes #672 (cb388d6)

  • fix: enable use of YAML in the CLI

In order to use the YAML output, PyYaml needs to be installed on the docker image. This commit adds the installation to the dockerfile as a separate layer. (ad0b476)

  • fix: docker entry point argument passing

Fixes the problem of passing spaces in the arguments to the docker entrypoint.

Before this fix, there was virtually no way to pass spaces in arguments such as task description. (67ab637)

  • fix(cli): exit on config parse error, instead of crashing

  • Exit and hint user about possible errors

  • test: adjust test cases to config missing error (6ad9da0)

  • fix(docker): use docker image with current sources (06e8ca8)

  • fix(cli): print help and usage without config file

Fixes #560 (6bb4d17)

Chores

  • chore: bump package version to 1.10.0 (c7c8470)

  • chore(setup): add 3.7 to supported python versions (b1525c9)

  • chore: move checks back to travis (b764525)

  • chore: disable failing travis test (515aa9a)

  • chore(ci): rebuild test image, when something changed (2fff260)

  • chore(ci): update the GitLab version in the test image (c410699)

  • chore(ci): add automatic GitLab image pushes (95c9b6d)

  • chore(ci): fix gitlab PyPI publish (3e37df1)

  • chore: add a tox job to run black

Allow lines to be 88 chars long for flake8. (c27fa48)

  • chore(ci): use reliable ci system (724a672)

  • chore(ci): don’t try to publish existing release (b4e818d)

  • chore: release tags to PyPI automatically

Fixes #609 (3133b48)

  • chore(tests): add rate limit tests (e216f06)

Code Style

  • style: format with black again (22b5082)

Documentation

  • docs(snippets): fix project-snippets layout

Fixes #828 (7feb97e)

  • docs(projects): add mention about project listings

Having exactly 20 internal and 5 private projects in the group spent some time debugging this issue.

Hopefully that helped: https://github.com/python-gitlab/python-gitlab/issues/93

Imho should be definitely mention about all=True parameter. (f604b25)

  • docs(readme): fix six url

six URL was pointing to 404 (0bc30f8)

  • docs: re-order api examples

Pipelines and Jobs and Protected Branches are out of order in contents and sometimes hard to find when looking for examples. (5d149a2)

  • docs: add pipeline deletion (2bb2571)

  • docs(api-usage): fix project group example

Fixes #798 (40a1bf3)

  • docs: remove v3 support (7927663)

  • docs: Add an example of trigger token usage

Closes #752 (ea1eefe)

  • docs(readme): add more info about commitlint, code-format (286f703)

  • docs(readme): provide commit message guidelines

Fixes #660 (bed8e1b)

  • docs(setup): use proper readme on PyPI (6898097)

  • docs(projects): fix typo in code sample

Fixes #630 (b93f2a9)

  • docs(groups): fix typo

Fixes #635 (ac2d65a)

  • docs(cli): add PyYAML requirement notice

Fixes #606 (d29a489)

  • docs(readme): add docs build information (6585c96)

  • docs: add MR approvals in index (0b45afb)

  • docs(api-usage): add rate limit documentation (ad4de20)

  • docs(projects): fix typo (c6bcfe6)

  • docs: trigger_pipeline only accept branches and tags as ref

Fixes #430 (d63748a)

  • docs: fix invalid Raise attribute in docstrings (95a3fe6)

  • docs: add missing = (391417c)

  • docs: remove the build warning about _static (764d3ca)

  • docs: fix “required” attribute (e64d0b9)

  • docs: add missing requiredCreateAttrs (b08d74a)

  • docs: add a note for python 3.5 for file content update

The data passed to the JSON serializer must be a string with python 3. Document this in the exemples.

Fix #175 (ca014f8)

  • docs: improve the pagination section (29e2efe)

  • docs: notes API (3e026d2)

  • docs: snippets API (35b7f75)

  • docs: tags API (dd79eda)

  • docs: system hooks API (5c51bf3)

  • docs: add ApplicationSettings API (ab7d794)

  • docs: repository files API (f00340f)

  • docs: project repository API (71a2a4f)

  • docs: add milestones API (7411907)

  • docs: add MR API (5614a7c)

  • docs: add licenses API (4540614)

  • docs: add labales API (31882b8)

  • docs: add deploy keys API (ea089e0)

  • docs: issues API (41cbc32)

  • docs: commits API (07c5594)

  • docs: groups API documentation (4d871aa)

  • docs: Add builds-related API docs (8e6a944)

  • docs: fork relationship API (21f48b3)

  • docs: project search API (e4cd04c)

  • docs: document hooks API (b21dca0)

  • docs: add project members doc (dcf31a4)

  • docs: document projects API (967595f)

  • docs: crossref improvements (6f9f42b)

  • docs: start a FAQ (c305459)

  • docs: do not use the :option: markup (368017c)

Features

  • feat: add mr rebase method (bc4280c)

  • feat: get artifact by ref and job (cda1174)

  • feat: add support for issue.related_merge_requests

Closes #794 (90a3631)

  • feat: add support for board update

Closes #801 (908d79f)

  • feat: bump version to 1.9.0 (aaed448)

  • feat: implement artifacts deletion

Closes #744 (76b6e1f)

  • feat: add endpoint to get the variables of a pipeline

It adds a new endpoint which was released in the Gitlab CE 11.11.

Signed-off-by: Agustin Henze tin@redhat.com (564de48)

  • feat(GitLab Update): delete ProjectPipeline (#736)

  • feat(GitLab Update): delete ProjectPipeline

As of Gitlab 11.6 it is now possible to delete a pipeline - https://docs.gitlab.com/ee/api/pipelines.html#delete-a-pipeline (768ce19)

  • feat: Added approve & unapprove method for Mergerequests

Offical GitLab API supports this for GitLab EE (53f7de7)

  • feat: obey the rate limit

done by using the retry-after header

Fixes #166 (2abf9ab)

Refactoring

  • refactor: format everything black (318d277)

  • refactor: rename MASTER_ACCESS

to MAINTAINER_ACCESS to follow GitLab 11.0 docs

See: https://docs.gitlab.com/ce/user/permissions.html#project-members-permissions (c38775a)

Testing

  • test: minor test fixes (3b523f4)

  • test: add project releases test

Fixes #762 (8ff8af0)

  • test: increase speed by disabling the rate limit faster (497f56c)

  • test: always use latest version to test (82b0fc6)

  • test: update the tests for GitLab 11.11

Changes in GitLab make the functional tests fail:

  • Some actions add new notes and discussions: do not use hardcoded values in related listing asserts

  • The feature flag API is buggy (errors 500): disable the tests for now (622854f)

Unknown

  • Merge pull request #842 from python-gitlab/chore/bump-package-version

chore: bump package version to 1.10.0 (2c1ea56)

  • Merge pull request #841 from python-gitlab/docs/project-snippets

docs(snippets): fix project-snippets layout (29d102f)

  • Merge pull request #840 from python-gitlab/docs/project-docs

docs(projects): add mention about project listings (de19296)

  • Merge pull request #838 from python-gitlab/pickle-fix

fix: improve pickle support (f0e3daa)

  • Merge pull request #839 from python-gitlab/dajsn-fix-readme-six-url

docs(readme): fix six url (8d54cf5)

  • Merge pull request #837 from python-gitlab/PR-bugfix-718

fix(cli): allow –recursive parameter in repository tree (27b9706)

  • Merge pull request #836 from python-gitlab/test/project-releases

test: add project releases test (262b222)

  • Merge pull request #835 from python-gitlab/bugfix-717

fix(cli): don’t fail when the short print attr value is None (0b0a60f)

  • Merge pull request #833 from python-gitlab/project-variable-update

fix(cli): fix update value for key not working (6c673c6)

  • Merge pull request #834 from python-gitlab/chore/setup-supported-versions

chore(setup): add 3.7 to supported python versions (8306ef2)

  • Merge pull request #832 from python-gitlab/test/always-latest

test: always use latest version to test (8f1ed93)

  • Merge pull request #823 from jeroen92/rebase-mr

Resolve #822, add mr rebase (b9877b4)

  • Merge pull request #831 from python-gitlab/chore/move-back-to-travis

chore: move checks back to travis (c8a7e31)

  • Merge pull request #830 from python-gitlab/chore/ci-disable-py-func

Chore/ci disable py func (2e42e28)

  • Merge pull request #827 from ahaynssen/master

docs: re-order api examples (5492b71)

  • Merge pull request #824 from python-gitlab/feat/add-ref-artifacts

feat: get artifact by ref and job (4a8503d)

  • Merge pull request #803 from python-gitlab/feat/related_mr

feat: add support for issue.related_merge_requests (ad1c0dd)

  • Merge pull request #804 from python-gitlab/feat/update_board

feat: add support for board update (f539c36)

  • Merge pull request #808 from minitux/patch-1 (2ea8eb8)

  • Merge pull request #805 from python-gitlab/chore/ci-rebuild-image

chore(ci): rebuild test image, when something changed (6625a06)

  • Merge pull request #802 from python-gitlab/chore/gitlab-11.11.3

chore(ci): update the GitLab version in the test image (51751c5)

  • Merge pull request #792 from python-gitlab/chore/enable-gitlab-ci-builds

chore(ci): add automatic GitLab image pushes (50c53c0)

  • Merge pull request #800 from python-gitlab/chore/ci-publish

chore(ci): fix gitlab PyPI publish (722a6ef)

  • Merge pull request #797 from python-gitlab/feat/version-bump

feat: bump version to 1.9.0 (4b04432)

  • Merge pull request #799 from python-gitlab/docs/fix-group-access

docs(api-usage): fix project group example (b5aaa3e)

  • Merge pull request #767 from python-gitlab/fix/744/delete_artifacts

feature: Implement artifacts deletion (4e1dd27)

  • Merge pull request #791 from python-gitlab/tests-for-gl-11.11

test: update the tests for GitLab 11.11 (e45a6e2)

  • Merge pull request #789 from python-gitlab/no-more-v3

docs: remove v3 support (e2115b1)

  • Merge pull request #785 from agustinhenze/add-pipeline-get-variables-endpoint

Add new endpoint to get the variables of a pipeline (463cedc)

  • Merge pull request #768 from python-gitlab/trigger_token_example

docs: Add an example of trigger token usage (5af0b52)

  • Merge pull request #790 from python-gitlab/fix/779

fix: convert # to %23 in URLs (101ccd1)

  • Merge pull request #788 from python-gitlab/black-in-tox

Add a tox job to run black (d135e4e)

  • Merge pull request #778 from python-gitlab/docs/readme-code-format

docs(readme): add more info about commitlint, code-format (794d64c)

  • Merge pull request #775 from python-gitlab/refactor/black

refactor: format everything black (290e5ed)

  • Merge pull request #776 from python-gitlab/revert-760-custom_cli_actions_fix

Revert “Custom cli actions fix” (ef32990)

  • Revert “Custom cli actions fix” (d3a20c5)

  • Merge pull request #760 from kkoralsky/custom_cli_actions_fix

Custom cli actions fix (e8823e9)

  • fix -/_ replacament for *Manager custom actions (6158fd2)

  • dont ask for id attr if this is *Manager originating custom action (adb6305)

  • Merge pull request #759 from kkoralsky/registry_api

registry api implementation (84bcdc0)

  • documentation fix (2d9078e)

  • whitespaces (c91230e)

  • documentation (4d31b9c)

  • fix docstring & improve coding style (3cede7b)

  • register cli action for delete_in_bulk (0b79ce9)

  • fix repository_id marshaling in cli (340cd37)

  • merged new release & registry apis (910c286)

  • Merge pull request #773 from python-gitlab/chore/ci-reliable-system

chore(ci): use reliable ci system (3dc6413)

  • Merge pull request #769 from python-gitlab/pep-fixes

fix: pep8 errors (a730598)

  • Merge pull request #746 from therealgambo/master

add project releases api (16de1b0)

  • Use NoUpdateMixin for now (8e55a3c)

  • add project releases api (3680545)

  • Merge pull request #714 from jaraco/feature/runpy-invoke

Add runpy hook, allowing invocation with ‘python -m gitlab’. (a3a7713)

  • Add runpy hook. Fixes #713.

Allows for invocation with ‘python -m gitlab’ (cd2a14e)

  • Merge pull request #738 from jeroendecroos/Gitlab_from_config_inheritance

Make gitlab.Gitlab.from_config a classmethod (6bd1902)

  • Make gitlab.Gitlab.from_config a classmethod (0b70da3)

  • Merge pull request #732 from hakanf/master

Re-enable command specific help messages (a6e10f9)

  • Use sys.exit as in rest of code (6fe2988)

  • Re-enable command specific help mesaages

This makes sure that the global help message wont be printed instead of the command spedific one unless we fail to read the configuration file (a8caddc)

  • Merge pull request #729 from xarx00/PR-bugfix-716

Fix for #716: %d replaced by %s (bc973d4)

  • Fix for #716: %d replaced by %s (675f879)

  • Merge pull request #725 from python-gitlab/fix/699

fix(api): Make *MemberManager.all() return a list of objects (1792442)

  • Merge pull request #721 from purificant/fix_typo

fix tiny typo (b21fa28)

  • fix tiny typo (2023875)

  • Merge pull request #707 from python-gitlab/fix/python-tests

fix: use python2 compatible syntax for super (e58d2a8)

  • Merge pull request #706 from python-gitlab/chore/ci-existing-release

chore(ci): don’t try to publish existing release (39cb97d)

  • Merge pull request #702 from jpiron/eq_hash

Implement eq and hash methods (a4ea0fe)

  • Implement eq and hash methods

To ease lists and sets manipulations. (3d60850)

  • Merge pull request #705 from python-gitlab/release-1.8.0

Release version 1.8.0 (57fa4e3)

  • Release version 1.8.0 (4fce338)

  • Merge pull request #701 from jpiron/fix_all_behaviour

Fix all kwarg behaviour (8ce4e9e)

  • Fix all kwarg behaviour

all kwarg is used to manage GitlabList generator behaviour. However, as it is not poped from kwargs, it is sent to Gitlab API. Some endpoints such as the project commits one, support a all attribute. This means a call like project.commits.list(all=True, ref_name='master') won’t return all the master commits as one might expect but all the repository’s commits. To prevent confusion, the same kwarg shouldn’t be used for 2 distinct purposes. Moreover according to the documentation, the all project commits API endpoint attribute doesn’t seem supported. (6b2bf5b)

  • Merge pull request #689 from python-gitlab/fix/wrong-rebase

fix: re-add merge request pipelines (31bca2f)

  • Merge pull request #685 from Joustie/master

feat: Added approve method for Mergerequests (641b80a)

  • Merge branch ‘master’ into master (b51d296)

  • Merge pull request #687 from python-gitlab/fix/683/raw_download

fix(api): Don’t try to parse raw downloads (52d7631)

  • Merge pull request #680 from python-gitlab/chore/automatic-deploy

chore: release tags to PyPI automatically (ca8c85c)

  • Merge pull request #681 from python-gitlab/no-param-conflicts

fix(api): avoid parameter conflicts with python and gitlab (572029c)

  • Merge pull request #678 from appian/backoff-requests

Fix missing “Retry-After” header and fix integration tests (89679ce)

  • Merge pull request #673 from python-gitlab/fix/672

fix(api): make reset_time_estimate() work again (ce2c835)

  • Merge pull request #664 from python-gitlab/docs/commit-message

docs(readme): provide commit message guidelines (85ac102)

  • Merge pull request #659 from python-gitlab/docs/readme-pypi

docs(setup): use proper readme on PyPI (9be82e1)

  • Merge pull request #657 from python-gitlab/release-1.7.0

Prepare the 1.7.0 release (704ca51)

  • Prepare the 1.7.0 release (456f3c4)

  • Merge pull request #656 from esabouraud/feature-protectedbranchesoptions

Issue 653 Add access control options to protected branch creation (59e3e45)

  • Add access control options to protected branch creation (cebbbf6)

  • Merge pull request #652 from roozbehf/fix/docker-enable-use-of-yaml

fix: enable use of YAML in the CLI (728f2dd)

  • Merge pull request #651 from roozbehf/fix/docker-entrypoint-arguments

fix: docker entry point argument passing (f945910)

  • Merge pull request #641 from python-gitlab/refactor/excpetion_msg

Improve error message handling in exceptions (7bd41cb)

  • Improve error message handling in exceptions

  • Depending on the request Gitlab has a ‘message’ or ‘error’ attribute in the json data, handle both

  • Add some consistency by converting messages to unicode or str for exceptions (depending on the python version)

Closes #616 (1fb1296)

  • Merge pull request #625 from python-gitlab/fix/611/resource_label_event

Add support to resource label events (20eb7d8)

  • Add support to resource label events

Closes #611 (95d0d74)

  • Merge pull request #642 from python-gitlab/feature/589/member_all

[feature] Add support for members all() method (22536f3)

  • [feature] Add support for members all() method

Closes #589 (ef1523a)

  • Merge pull request #639 from python-gitlab/fix/628/doc_typo

[docs] Fix typo in custom attributes example (011274e)

  • [docs] Fix typo in custom attributes example

Closes #628 (bb251b8)

  • Merge pull request #638 from python-gitlab/fix/633/milestone_filter

[docs] Fix the milestone filetring doc (iid -> iids) (e6df9a8)

  • [docs] Fix the milestone filetring doc (iid -> iids)

Fixes #633 (0c9a00b)

  • Merge pull request #634 from python-gitlab/docs/project-typo

docs(projects): fix typo in code sample

Closes #630 (c8eaeb2)

  • Merge pull request #636 from python-gitlab/docs/groups-fix-typo

docs(groups): fix typo (c72a87a)

  • Merge pull request #627 from nicgrayson/fix-docs-typo

Fix 3 typos in docs (7f09666)

  • Fix 3 typos (a5ab2bb)

  • Merge pull request #624 from python-gitlab/update/docker-image

Use the pythongitlab/test-python-gitlab docker image for tests (742243f)

  • Use the pythongitlab/test-python-gitlab docker image for tests

This images is updated to the latest GitLab CE.

Fix the diff() test to match the change in the API output. (2c6c929)

  • Merge pull request #619 from python-gitlab/issue/595

[docs] Add an example of pipeline schedule vars listing (fcce7a3)

  • [docs] Add an example of pipeline schedule vars listing

Closes #595 (f7fbfca)

  • Merge pull request #626 from python-gitlab/fix/596/maintainer_wanted

[README] Remove the “maintainer(s) wanted” notice (bc6ce04)

  • [README] Remove the “maintainer(s) wanted” notice

Closes #596 (f51fa19)

  • Merge pull request #620 from bittner/patch-1

Add Gitter badge to README (74623cf)

  • Add Gitter badge to README (31d1c5d)

  • Merge pull request #613 from mkosiarc/fixDoc

[docs] fix discussions typo (368a34d)

  • [docs] fix discussions typo (54b6a54)

  • Merge pull request #605 from python-gitlab/fix/docker

fix(docker): use docker image with current sources (c9f7986)

  • Merge pull request #608 from python-gitlab/ci-output-option

docs(cli): add PyYAML requirement notice (156a21e)

  • Merge pull request #607 from python-gitlab/refactor/rename-variable

refactor: rename MASTER_ACCESS (5ff2608)

  • Merge pull request #601 from max-wittig/fix/help-usage

fix(cli): print help and usage without config file (32b5122)

  • Merge pull request #600 from hans-d/docker

more flexible docker (3a8b1a0)

  • Merge branch ‘master’ into docker (756c73c)

  • Add project protected tags management (#581) (ea71f1d)

  • more flexible docker (21d2577)

  • README: add a note about maintainers (77f4d3a)

  • Merge pull request #586 from Halliburton-Landmark/project-issue-create-args

add missing comma in ProjectIssueManager _create_attrs (58d5c0a)

  • add missing comma in ProjectIssueManager _create_attrs

This fixes the argument handling for assignee/milestone ID when for project-issue create (83fb4f9)

  • [docs] Add a note about GroupProject limited API (9e60364)

  • Fix the https redirection test (6f80380)

  • [docs] add a warning about https://

http to https redirection cause problems. Make notes of this in the docs. (042b706)

  • [docs] fix cut and paste leftover (b02c30f)

  • Use https:// for gitlab URL (256518c)

  • [docs] Fix the owned/starred usage documentation

Closes #579 (ccf0c2a)

  • 1.6.0 release (d8c2488)

  • [cli] Fix the project-export download

Closes #559 (facbc8c)

  • Minor doc updates (e9506d1)

  • Add a FAQ (4d4c8ad)

  • Raise an exception on https redirects for PUT/POST

POST and PUT requests are modified by clients when redirections happen. A common problem with python-gitlab is a misconfiguration of the server URL: the http to https redirection breaks some requests.

With this change python-gitlab should detect problematic redirections, and raise a proper exception instead of failing with a cryptic error.

Closes #565 (a221d7b)

  • [docs] Add/updates notes about read-only objects

MR and issues attached to the root API or groups are not editable. Provide notes describing how to manage this. (80a68f9)

  • Merge pull request #572 from btmanm/master

Update projects.rst (ff6ca5d)

  • Update projects.rst (6ada4b0)

  • Merge pull request #569 from mattthias/patch-1

Minor typo “ou” vs. “or” (0a687d3)

  • Minor typo “ou” vs. “or”

This change fixes a minor type in the table of possible values for options in the global section. (a68f459)

  • Add support for project transfers from the projects interface. (#561)

See https://docs.gitlab.com/ee/api/projects.html#transfer-a-project-to-a-new-namespace (a1c79d2)

  • Added support for listing forks of a project (#562) (b325bd7)

  • MR: add the squash attribute for create/update

Closes #557 (35c8c82)

  • Implement MR.pipelines()

Closes #555 (32ae924)

  • Support group and global MR listing

Closes #553 (0379efa)

  • Project import: fix the override_params parameter

Closes #552 (3461904)

  • [cli] Fix the case where we have nothing to print (a139179)

  • [cli] Output: handle bytes in API responses

Closes #548 (bbef1f9)

  • Improve the snippets examples

closes #543 (bdbec67)

  • Merge pull request #542 from tpdownes/patch-1

Fix simple typo in identity modification example (9751ab6)

  • Fix simple typo in identity modification example (35fe227)

  • [docs] don’t use hardcoded values for ids (fe43a28)

  • 1.5.1 release (5e6330f)

  • Improve the protect branch creation example

Closes #536 (590c41a)

  • Fix the ProjectPipelineJob base class

Closes #537 (4cf8118)

  • Prepare the 1.5.0 release (eaa4450)

  • [cli] Fix the non-verbose output of ProjectCommitComment

Closes #433 (d5289fe)

  • Use the same description for **kwargs everywhere (b1c6392)

  • [docs] Add an example for external identities settings

Fixes #528 (21e382b)

  • Revert “make as_list work for all queries”

This reverts commit 8e787612fa77dc945a4c1327e9faa6eee10c48f2.

This change broke the basic generator usage (Fixes #534) (1a04634)

  • Add support for epics API (EE)

Fixes #525 (ba90e30)

  • README update (b2cb700)

  • ProjectPipelineJob objects can only be listed

And they are not directly related to ProjectJob objects.

Fixes #531 (e1af0a0)

  • Add support for the LDAP gorups API (ebf822c)

  • Add support for the EE license API (5183069)

  • Merge pull request #530 from stefancrain/master

Correct session example (3f88ad0)

  • Correct session example (01969c2)

  • Implement MR-level approvals

Fixes #323 (59a19ca)

  • Add push rules tests (8df6de9)

  • Add project push rules configuration (#520) (2c22a34)

  • [docs] projects.all() doesn’t exist in v4

Fixes #526 (617aa64)

  • Pull mirroring doesn’t return data (b610d66)

  • Add support for Project.pull_mirror (EE) (ebd6217)

  • Add support for board creation/deletion (EE) (f4c4e52)

  • Add support for LDAP groups (d6a61af)

  • Merge pull request #514 from jouve/generator

make as_list=False work for all=True queries (a6512f9)

  • make as_list work for all queries (8e78761)

  • Add support for issue links (EE)

Fixes #422 (8873eda)

  • Add geo nodes API support

Fixes #524 (39c8ad5)

  • Merge branch ‘master’ of github.com:python-gitlab/python-gitlab (5a855fd)

  • Merge pull request #522 from beyondliu/master

fix #521 change post_data default value to None (6dd8774)

  • fix #521 change post_data default value to None (d4c1a8c)

  • Add basic testing forr EE endpoints

Today we don’t have a solution for easily deploying an EE instance so using the functional tools is not possible.

This patch provides a testing script that needs to be run against a private EE instance. (c88333b)

  • Add support for project-level MR approval configuration (473dc6f)

  • Merge pull request #519 from jouve/silence

silence logs/warnings in unittests (bbefb99)

  • silence logs/warnings in unittests (3fa24ea)

  • Merge pull request #517 from jouve/dedup

projectpipelinejob was defined twice (92ca5c4)

  • projectpipelinejob was defined twice (17d9354)

  • Use python 2 on travis for now (33c2457)

  • tests: default to python 3

Fix the bytes/str issues (b3df26e)

  • Make ProjectCommitStatus.create work with CLI

Fixes #511 (34c8a03)

  • time_stats(): use an existing attribute if available

A time_stats attribute is returned by GitLab when fetching issues and merge requests (on reasonably recent GitLab versions). Use this info instead of making a new API call if possible.

Fixes #510 (f2223e2)

  • Update time stats docs (f8e6b13)

  • Fix the IssueManager path to avoid redirections (eae1805)

  • Add support for group badges

Also consolidate project/group badges tests, and add some docs

Fixes #469 (9412a5d)

  • Merge pull request #507 from Miouge1/badges

Add support for Project badges (01a41ef)

  • Add support for Project badges (e00cad4)

  • Add support for the gitlab CI lint API (40b9f4d)

  • Update the settings attributes (0cc9828)

  • Implement runner token validation (71368e7)

  • Runners can be created (registered) (782875a)

  • Implement runner jobs listing (0be81cb)

  • Add missing project attributes (096d9ec)

  • Add pipeline listing filters (51718ea)

  • Update MR attributes (2332904)

  • Implement the markdown rendering API

Testing will be enable when GitLab 11.0 is available. (9be50be)

  • Add support for group boards (fbd2010)

  • Fix the participants() decorator (8374bcc)

  • Issues: add missing attributes and methods (e901f44)

  • Update some group attributes (4ec8975)

  • Add feature flags deletion support (f082568)

  • Add support for environment stop() (9c19e06)

  • deploy key: add missing attributes (6779616)

  • Deployment: add list filters (ce7911a)

  • Add commit.merge_requests() support (c19ad90)

  • Enable mr.participant test (3c53f7f)

  • Implement commit.refs() (32569ea)

  • Add missing docs file (63a4c7c)

  • Implement user_agent_detail for snippets

Add a new UserAgentDetail mixin to avoid code duplication. (7025743)

  • Add support for merged branches deletion (590ea0d)

  • Add support for the discussions API

Fixes #501 (4461139)

  • Document the global per_page setting (660f0cf)

  • Merge pull request #505 from jouve/config_per_page

add per_page config option (d981904)

  • add per_page config option (589a9aa)

  • Add support for the search API

Fixes #470 (97c8619)

  • Add support for project import/export

Fixes #471 (b5f9616)

  • pep8 fix (42007ec)

  • Add support for user avatar upload

Fixes #308 (174185b)

  • travis-ci: remove the v3 tests (175abe9)

  • [docs] update the sphinx extension for v4 objects (194ed0b)

  • [docs] Rework the examples pages

  • Get rid of the .py files and bring all the python examples in the RST files

  • Fix a few things (5292ffb)

  • Add release notes for 1.5 (2c34237)

  • Drop GetFromListMixin (09d1ec0)

  • Drop API v3 support

Drop the code, the tests, and update the documentation. (fe89b94)

  • ChangeLog: fix link (7011694)

  • Prepare the 1.4.0 release (3ad706e)

  • pep8 fix (e6ecf65)

  • Deprecate GetFromListMixin

This mixin provides a workaround for get() for GitLab objects that don’t implement a ‘get a single object’ API. We are now getting conflicts because GitLab adds GET methods, and this is against the “Implement only what exists in the API” strategy.

Also use the proper GET API call for objects that support it. (a877514)

  • longer docker image startup timeout for tests (5335788)

  • Add docs for the files arg in http_* (79c4682)

  • Merge pull request #500 from ericfrederich/efficient_get

More efficient .get() for group members. (66d8f30)

  • More efficient .get() for group members.

Fixes #499 (dabfeb3)

  • api-usage: bit more detail for listing with all (4cc9739)

  • prepare release notes for 1.4 (68b798b)

  • [tests] fix functional tests for python3

Fixes #486 (3dc997f)

  • [docs] update service.available() example for API v4

Fixes #482 (6d4ef0f)

  • [docs] add a code example for listing commits of a MR

Fixes #491 (037585c)

  • [docs] move mr samples in rst file (a643763)

  • Merge pull request #484 from Matusf/docs-example-raises-attribute-error

Change method for getting content of snippet (85f2388)

  • Add API v3 example (5c16c8d)

  • Change method for getting content of snippet (505c749)

  • Fix URL encoding on branch methods

Fixes #493 (736fece)

  • Merge pull request #488 from siemens/feat/rate-limit

feat: obey the rate limit (86a8251)

  • Revert “Token scopes are a list”

This reverts commit 32b399af0e506b38a10a2c625338848a03f0b35d. (25ed8e7)

  • Merge pull request #483 from ToonMeynen/patch-2

Update projects.py documentation (2b9ae5c)

  • Update projects.py

Add missing attributes to file.create in order to make it work. (629b1e1)

  • Merge pull request #481 from max-wittig/docs/fix-typo

docs(projects): fix typo (f3533cd)

  • Fix the impersonation token deletion example

Fixes #476 (c5b9676)

  • [docs] Move notes examples in their own file

Fixes #472 (f980707)

  • Expose additional properties for Gitlab objects

  • url: the URL provided by the user (from config or constructor)

  • api_url: the computed base endpoint (URL/api/v?)

Fixes #474 (f09089b)

  • Token scopes are a list (32b399a)

  • [docs] fix GitLab refernce for notes (33b2b1c)

  • Provide a basic issue template (3d8d413)

  • Get rid of _sanitize_data

It was used in one class only, no need for added complexity. (79dc1f1)

  • Implement attribute types to handle special cases

Some attributes need to be parsed/modified to work with the API (for instance lists). This patch provides two attribute types that will simplify parts of the code, and fix some CLI bugs.

Fixes #443 (1940fee)

  • update docs copyright years (455a8fc)

  • [docs] Merge builds.rst and builds.py (78bb6b5)

  • Support downloading a single artifact file

Fixes #432 (9080f69)

  • pep8 fix (9cb6bbe)

  • [cli] Fix listing of strings (cb8ca65)

  • Add basic unit tests for v4 CLI (88391bf)

  • [cli] Restore the –help option behavior

Fixes #381 (7c6be94)

  • Add support for recursive tree listing

Fixes #452 (d35a31d)

  • [cli] Allow to read args from files

With the @/file/path syntax (similar to curl) user can provide values from attributes in files.

Fixes #448 (748d57e)

  • [docs] Commits: add an example of binary file creation

Binary files need to be encoded in base64.

Fixes #427 (c7b3f96)

  • [docs] Fix the time tracking examples

Fixes #449 (4a2ae8a)

  • tests: increase waiting time and hope for the best (2e51332)

  • Merge pull request #426 from tardyp/readmixin

introduce RefreshMixin (ee4591d)

  • introduce RefreshMixin

RefreshMixin allows to update a REST object so that you can poll on it. This is mostly useful for pipelines and jobs, but could be set on most of other objects, with unknown usecases. (3424333)

  • Merge pull request #446 from jwilk-forks/spelling

Fix typos in documentation (6bcc92a)

  • Fix typos in documentation (c976fec)

  • [cli] _id_attr is required on creation (e65dfa3)

  • CLI: display_list need to support **kwargs (5e27bc4)

  • [cli] fix listing for json and yaml output

Fixes #438 (4bdce7a)

  • Merge pull request #445 from esabouraud/feature-unshare

Add support for unsharing projects with groups (6c08266)

  • Add support for unsharing projects to v3 API (untested) (c8c4b42)

  • Add support for unsharing projects to v4 API (5fdd06e)

  • ProjectKeys can be updated

Closes #444 (9a30266)

  • Require requests>=2.4.2

Closes #441 (a7314ec)

  • Prepare the 1.3.0 release (10bd1f4)

  • Add docs for pipeline schedules (ac123df)

  • Move the pipelines doc to builds.rst (d416238)

  • Merge pull request #429 from Miouge1/doc-mr-labels

Add documentation about labels update (0cbd9c6)

  • Add documentation about labels update (eb5c149)

  • pep8 fixes (e7546de)

  • Remove pipeline schedules from v3 (not supported) (0a06779)

  • Merge branch ‘mlq-feature/pipeline-schedules’ (39a0429)

  • Update pipeline schedules code (6a87d38)

  • Project pipeline jobs (b861837)

  • Project pipeline schedules (34e32a0)

  • Project pipeline jobs (fd726cd)

  • Project pipeline schedules (31eb913)

  • Merge pull request #420 from tardyp/patch-2

make trigger_pipeline return the pipeline (70c779c)

  • fix pep8 (8134f84)

  • make trigger_pipeline return the pipeline

Trigger_pipeline returns nothing, which makes it difficult to track the pipeline being trigger.

Next PR will be about updating a pipeline object to get latest status (not sure yet the best way to do it) (72ade19)

  • Merge pull request #419 from tardyp/patch-1

Simplify the example for streamed artifacts (6ea7ab7)

  • add a Simplified example for streamed artifacts

Going through an object adds a lot of complication. Adding example for unzipping on the fly (faeb1c1)

  • Default to API v4 (f276f13)

  • Gitlab can be used as context manager

Fixes #371 (b4f0317)

  • config: support api_version in the global section

Fixes #421 (29bd813)

  • Add Gitlab and User events support

Closes #412 (1ca3080)

  • Add support for getting list of user projects

Fixes #403 (96a1a78)

  • Add support for MR participants API

Fixes #387 (08f19b3)

  • Update the groups documentation

Closes #410 (638da69)

  • Fix wrong tag example

Fixes #416 (e957817)

  • Add manager for jobs within a pipeline. (#413) (bdb6d63)

  • Merge pull request #408 from movermeyer/patch-1

Adding the supported version badge (5149651)

  • Adding the supported version badge (9253661)

  • Merge pull request #409 from movermeyer/patch-2

Clarifying what compatible means (8a953c2)

  • Clarifying what supports means (b980c9f)

  • Prepare v1.2.0 (3a119cd)

  • Respect content of REQUESTS_CA_BUNDLE and *_proxy envvars

Explicitly call the requests session.merge_environment_settings() method, which will use some environment variables to setup the session properly.

Closes #352 (6f50447)

  • Add doc for search by custom attribute (2e2a78d)

  • Add support for user/group/project filter by custom attribute

Closes #367 (65c64eb)

  • Add support for project and group custom variables

implements parts of #367 (fa52024)

  • Add support for features flags

Fixes #360 (f5850d9)

  • Add support for pagesdomains

Closes #362 (c281d95)

  • Add supported python versions in setup.py (6923f11)

  • Add support for subgroups listing

Closes #390 (928865e)

  • Add groups listing attributes (81c9d1f)

  • Merge pull request #406 from ericfrederich/pagination

Allow per_page to be used with generators. (79d2ca4)

  • Allow per_page to be used with generators.

Fixes #405 (3b1d1dd)

  • Update groups tests

Group search in gitlab 10.3 requires a query string with more than 3 characters. Not sure if feature or bug, but let’s handle it. (7efbc30)

  • Minor doc update (variables)

Fixes #400 (70e721f)

  • Update testing tools for /session removal (8ad4a76)

  • Remove now-invalid test (5a5cd74)

  • ProjectFile.create(): don’t modify the input data

Fixes #394 (0a38143)

  • submanagers: allow having undefined parameters

This might happen in CLI context, where recursion to discover parent attributes is not required (URL gets hardcoded)

Fix should fix the CLI CI. (6f36f70)

  • [docs] Add a note about password auth being removed from GitLab

Provide a code snippet demonstrating how to use cookie-based authentication.

Fixes #380 (e08d3fd)

  • Add missing doc file (93f1499)

  • [docstrings] Explicitly documentation pagination arguments

Fixes #393 (b0ce3c8)

  • mixins.py: Avoid sending empty update data to issue.save (#389) (0c3a6cb)

  • Update project services docs for v4

Fixes #396 (4e048e1)

  • Add support for award emojis

Fixes #361 (b33265c)

  • Make todo() raise GitlabTodoError on error (2167409)

  • Add doc to get issue from iid (#321) (b775069)

  • Merge pull request #382 from ptomato/subscribe-response-code

Expected HTTP response for subscribe is 201 (f624d2e)

  • Expected HTTP response for subscribe is 201

It seems that the GitLab API gives HTTP response code 201 (“created”) when successfully subscribing to an object, not 200. (0d5f275)

  • Merge pull request #374 from benjamb/typos

Fix typos in docs (8f3b656)

  • Fix typos in docs (7c886de)

  • Fix link to settings API (be386b8)

  • Update pagination docs for ProjectCommit

In v3 pagination starts at page 0 instead of page 1.

Fixes: #377 (c6c0686)

  • Revert “Add unit tests for mixin exceptions”

This reverts commit 4ee139ad5c58006da1f9af93fdd4e70592e6daa0. (084b905)

  • Add support for project housekeeping

Closes #368 (9ede652)

  • Add unit tests for mixin exceptions (4ee139a)

  • Add a SetMixin

Use it for UserCustomAttribute, will be useful for {Project,Group}CustomAttribute (#367) (a1b097c)

  • Add support for user_agent_detail (issues)

https://docs.gitlab.com/ce/api/issues.html#get-user-agent-details (397d677)

  • Merge pull request #369 from Lujeni/fix_typo_projects_documentation

[docs] Bad arguments in projetcs file documentation (ad35482)

  • [docs] Bad arguments in projetcs file documentation (5ee4e73)

  • update user docs with gitlab URLs (29d8d72)

  • Add support for user activities (44a7ef6)

  • generate coverage reports with tox (7fadf46)

  • typo (2d689f2)

  • Add support for impersonation tokens API

Closes #363 (8fec612)

  • Add missing mocking on unit test (700e84f)

  • Add support for oauth and anonymous auth in config/CLI (0732826)

  • Rework authentication args handling

  • Raise exceptions when conflicting arguments are used

  • Build the auth headers when instanciating Gitlab, not on each request

  • Enable anonymous Gitlab objects (#364)

Add docs and unit tests (e9b1583)

  • Remove deprecated objects/methods (ba6e09e)

  • Oauth token support (#357) (c30121b)

  • Merge branch ‘master’ of github.com:python-gitlab/python-gitlab (3bc3e60)

  • Merge pull request #365 from jeromerobert/master

[doc] Fix project.triggers.create example with v4 API (30b1c03)

  • [doc] Fix project.triggers.create example with v4 API (6c5ee84)

  • Merge pull request #342 from matejzero/mattermost

Add mattermost service support (82897b7)

  • Add mattermost service support (b5e6a46)

  • Add users custome attributes support (4fb2e43)

  • 1.1.0 release (32f7e17)

  • improve comment in release notes (9eff543)

  • [doc] Add sample code for client-side certificates

Closes #23 (fa89746)

  • Module’s base objects serialization (#359)

Make gitlab objects serializable

With current implementation of API v3 and v4 support, some instances have properties of type module and are not serializable. Handle these properties manually with setstate and getstate methods. (226e6ce)

  • Pagination generators: expose more information

Expose the X-* pagination attributes returned by the Gitlab server when requesting lists.

Closes #304 (38d4467)

  • Add a contributed Dockerfile

Thanks oupala!

Closes #295 (fba7730)

  • Fix the CLI for objects without ID (API v4)

Fixes #319 (9dd410f)

  • Update the repository_blob documentation

Fixes #312 (d415cc0)

  • Add support for wiki pages (5082879)

  • Move the ProjectManager class for readability (4744200)

  • Add support for GPG keys

Closes #355 (d0c4118)

  • Add support for group milestones

Closes #349 (aba713a)

  • Move group related code for readability (cf6767c)

  • Update the ssl_verify docstring (4c3aa23)

  • Project: add support for printing_merge_request_link_enabled attr

Closes #353 (3a8c480)

  • ProjectFileManager: custom update() method

Closes #340 (fe5805f)

  • Document the Gitlab session parameter

Provide a proxy setup example.

Closes #341 (1b5d480)

  • [docs] document get_create_attrs in the API tutorial (b23e344)

  • Change ProjectUser and GroupProject base class

python-gitlab shouldn’t try to provide features that are not existing in the Gitlab API: GroupProject and ProjectUser objects should not provide unsupported API methods (no get, no create, no update).

This Closes #346 by making explicit that we don’t support these non-existant methods. (8c9ad29)

  • Remove support for “constructor types” in v4

In v3 we create objects from json dicts when it makes sense. Support for this feature has not been kept in v4, and we didn’t get requests for it so let’s drop the _constructor_types definitions. (32ea62a)

  • Snippet notes support all the CRUD methods

Fixes #343 (dc504ab)

  • ProjectFileManager.create: handle / in file paths

Replace / with %2F as is done in other methods.

Fixes #339 (9d0a479)

  • Add support for listing project users

https://docs.gitlab.com/ce/api/projects.html#get-project-users

Closes #328 (d6fa94e)

  • [docs] improve the labels usage documentation

Closes #329 (5945537)

  • Drop leftover pdb call (316754d)

  • Tags release description: support / in tag names (f3f300c)

  • [docs] update the file upload samples

Closes #335 (72664c4)

  • Make the delete() method handle / in ids

Replace the / with the HTTP %2F as is done with other methods.

Closes #337 (8764903)

  • Fix trigger variables in v4 API (#334)

Fix trigger variables in v4 API

Close #333 (ac430a3)

  • Prepare the 1.0.2 release (9e09cf6)

  • ProjectFile: handle / in path for delete() and save()

Fixes #326 (05656bb)

  • Properly handle the labels attribute in ProjectMergeRequest

This should have made it into e09581fc but something went wrong (probably a PEBCAK).

Closes #325 (69f1045)

  • [docs] remove example usage of submanagers

Closes #324 (9484106)

  • 1.0.1 release (e5f59bd)

  • Add missing doc file (a346f92)

  • Fix a couple listing calls to allow proper pagination

Project.repository_tree and Project.repository_contributors return lists, so use http_list to allow users to use listing features such as all=True.

Closes #314 (80351ca)

  • CommitStatus: sha is parent attribute

Fixes #316 (7d6f3d0)

  • Merge pull request #317 from mion00/patch-1

Fix http_get method in get artifacts and job trace (d321847)

  • Fix http_get method in get artifacts and job trace (bb5a1df)

  • exception message: mimic v3 API (05da7ba)

  • Exceptions: use a proper error message (e35563e)

  • Fix the labels attrs on MR and issues

Fixes #306 (e09581f)

  • Fix password authentication for v4

Fixes #311 (89bf53f)

  • Merge pull request #309 from mkob