python-gitlab 4.1.0__tar.gz → 4.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/CHANGELOG.md +20 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/MANIFEST.in +1 -1
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/PKG-INFO +1 -1
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/users.rst +3 -3
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/wikis.rst +38 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/_version.py +1 -1
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/const.py +15 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/mixins.py +70 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/projects.py +5 -54
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/wikis.py +5 -3
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/python_gitlab.egg-info/PKG-INFO +1 -1
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/python_gitlab.egg-info/SOURCES.txt +1 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/requirements-lint.txt +5 -5
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/requirements-test.txt +3 -3
- python-gitlab-4.2.0/tests/functional/api/test_wikis.py +62 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/smoke/test_dists.py +9 -1
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/mixins/test_mixin_methods.py +95 -1
- python-gitlab-4.2.0/tests/unit/objects/__init__.py +0 -0
- python-gitlab-4.1.0/tests/functional/api/test_wikis.py +0 -14
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/AUTHORS +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/COPYING +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/README.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/Makefile +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/__init__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/_static/js/gitter.js +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/api/gitlab.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/api/gitlab.v4.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/api-levels.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/api-objects.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/api-usage-advanced.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/api-usage.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/changelog.md +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/cli-examples.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/cli-objects.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/cli-usage.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/conf.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/ext/__init__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/ext/docstrings.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/ext/manager_tmpl.j2 +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/faq.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/access_requests.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/appearance.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/applications.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/badges.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/boards.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/branches.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/bulk_imports.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/ci_lint.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/clusters.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/commits.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/deploy_keys.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/deploy_tokens.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/deployments.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/discussions.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/emojis.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/environments.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/epics.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/events.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/features.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/geo_nodes.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/group_access_tokens.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/groups.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/invitations.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/issues.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/iterations.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/job_token_scope.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/keys.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/labels.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/merge_request_approvals.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/merge_requests.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/merge_trains.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/messages.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/milestones.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/namespaces.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/notes.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/notifications.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/packages.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/pagesdomains.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/personal_access_tokens.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/pipelines_and_jobs.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/project_access_tokens.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/projects.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/protected_branches.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/protected_environments.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/releases.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/remote_mirrors.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/repositories.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/repository_tags.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/resource_groups.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/runners.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/search.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/secure_files.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/settings.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/sidekiq.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/snippets.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/statistics.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/system_hooks.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/templates.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/todos.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/topics.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/gl_objects/variables.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/index.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/make.bat +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/docs/release-notes.rst +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/__init__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/__main__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/_backends/__init__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/_backends/protocol.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/_backends/requests_backend.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/base.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/cli.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/client.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/config.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/exceptions.py +0 -0
- /python-gitlab-4.1.0/gitlab/v4/__init__.py → /python-gitlab-4.2.0/gitlab/py.typed +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/types.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/utils.py +0 -0
- {python-gitlab-4.1.0/tests → python-gitlab-4.2.0/gitlab/v4}/__init__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/cli.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/__init__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/access_requests.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/appearance.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/applications.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/artifacts.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/audit_events.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/award_emojis.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/badges.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/boards.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/branches.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/broadcast_messages.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/bulk_imports.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/ci_lint.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/clusters.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/commits.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/container_registry.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/custom_attributes.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/deploy_keys.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/deploy_tokens.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/deployments.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/discussions.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/environments.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/epics.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/events.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/export_import.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/features.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/files.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/geo_nodes.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/group_access_tokens.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/groups.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/hooks.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/integrations.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/invitations.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/issues.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/iterations.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/job_token_scope.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/jobs.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/keys.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/labels.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/ldap.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/members.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/merge_request_approvals.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/merge_requests.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/merge_trains.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/milestones.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/namespaces.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/notes.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/notification_settings.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/packages.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/pages.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/personal_access_tokens.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/pipelines.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/project_access_tokens.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/push_rules.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/releases.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/repositories.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/resource_groups.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/runners.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/secure_files.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/settings.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/sidekiq.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/snippets.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/statistics.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/tags.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/templates.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/todos.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/topics.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/triggers.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/users.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/gitlab/v4/objects/variables.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/pyproject.toml +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/python_gitlab.egg-info/dependency_links.txt +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/python_gitlab.egg-info/entry_points.txt +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/python_gitlab.egg-info/requires.txt +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/python_gitlab.egg-info/top_level.txt +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/requirements-docker.txt +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/requirements-docs.txt +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/requirements-precommit.txt +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/requirements.txt +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/setup.cfg +0 -0
- {python-gitlab-4.1.0/tests/functional → python-gitlab-4.2.0/tests}/__init__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/conftest.py +0 -0
- {python-gitlab-4.1.0/tests/functional/api → python-gitlab-4.2.0/tests/functional}/__init__.py +0 -0
- {python-gitlab-4.1.0/tests/functional/cli → python-gitlab-4.2.0/tests/functional/api}/__init__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_boards.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_branches.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_bulk_imports.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_current_user.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_deploy_keys.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_deploy_tokens.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_epics.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_gitlab.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_groups.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_import_export.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_issues.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_keys.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_lazy_objects.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_merge_requests.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_packages.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_projects.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_push_rules.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_releases.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_repository.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_services.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_snippets.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_statistics.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_topics.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_users.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/api/test_variables.py +0 -0
- {python-gitlab-4.1.0/tests/functional/fixtures → python-gitlab-4.2.0/tests/functional/cli}/__init__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/cli/conftest.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/cli/test_cli.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/cli/test_cli_artifacts.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/cli/test_cli_packages.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/cli/test_cli_projects.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/cli/test_cli_repository.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/cli/test_cli_resource_access_tokens.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/cli/test_cli_users.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/cli/test_cli_v4.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/cli/test_cli_variables.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/conftest.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/ee-test.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/fixtures/.env +0 -0
- {python-gitlab-4.1.0/tests/smoke → python-gitlab-4.2.0/tests/functional/fixtures}/__init__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/fixtures/avatar.png +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/fixtures/create_license.rb +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/fixtures/docker-compose.yml +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/fixtures/docker.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/fixtures/invalid_auth.cfg +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/fixtures/invalid_version.cfg +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/fixtures/set_token.rb +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/functional/helpers.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/install/test_install.py +0 -0
- {python-gitlab-4.1.0/tests/unit → python-gitlab-4.2.0/tests/smoke}/__init__.py +0 -0
- {python-gitlab-4.1.0/tests/unit/_backends → python-gitlab-4.2.0/tests/unit}/__init__.py +0 -0
- {python-gitlab-4.1.0/tests/unit/meta → python-gitlab-4.2.0/tests/unit/_backends}/__init__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/_backends/test_requests_backend.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/base/test_rest_manager.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/base/test_rest_object.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/conftest.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/helpers.py +0 -0
- {python-gitlab-4.1.0/tests/unit/mixins → python-gitlab-4.2.0/tests/unit/meta}/__init__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/meta/test_ensure_type_hints.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/meta/test_imports.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/meta/test_mro.py +0 -0
- {python-gitlab-4.1.0/tests/unit/objects → python-gitlab-4.2.0/tests/unit/mixins}/__init__.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/mixins/test_meta_mixins.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/mixins/test_object_mixins_attributes.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/conftest.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_appearance.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_applications.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_audit_events.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_badges.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_bridges.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_bulk_imports.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_ci_lint.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_commits.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_deploy_tokens.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_deployments.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_environments.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_group_access_tokens.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_groups.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_hooks.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_invitations.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_issues.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_iterations.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_job_artifacts.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_job_token_scope.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_jobs.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_keys.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_members.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_merge_request_pipelines.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_merge_requests.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_merge_trains.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_packages.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_personal_access_tokens.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_pipeline_schedules.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_pipelines.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_project_access_tokens.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_project_import_export.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_project_merge_request_approvals.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_project_statistics.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_projects.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_registry_repositories.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_releases.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_remote_mirrors.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_repositories.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_resource_groups.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_resource_iteration_events.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_resource_label_events.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_resource_milestone_events.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_resource_state_events.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_runners.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_secure_files.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_services.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_snippets.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_statistics.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_submodules.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_todos.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_topics.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_users.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/objects/test_variables.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/test_cli.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/test_config.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/test_exceptions.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/test_gitlab.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/test_gitlab_auth.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/test_gitlab_http_methods.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/test_types.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tests/unit/test_utils.py +0 -0
- {python-gitlab-4.1.0 → python-gitlab-4.2.0}/tox.ini +0 -0
@@ -2,6 +2,26 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
## v4.1.1 (2023-11-03)
|
6
|
+
|
7
|
+
### Chore
|
8
|
+
|
9
|
+
* chore(ci): add release id to workflow step ([`9270e10`](https://github.com/python-gitlab/python-gitlab/commit/9270e10d94101117bec300c756889e4706f41f36))
|
10
|
+
|
11
|
+
* chore(deps): update all non-major dependencies ([`32954fb`](https://github.com/python-gitlab/python-gitlab/commit/32954fb95dcc000100b48c4b0b137ebe2eca85a3))
|
12
|
+
|
13
|
+
### Documentation
|
14
|
+
|
15
|
+
* docs(users): add missing comma in v4 API create runner examples
|
16
|
+
|
17
|
+
The examples which show usage of new runner registration api endpoint
|
18
|
+
are missing commas. This change adds the missing commas. ([`b1b2edf`](https://github.com/python-gitlab/python-gitlab/commit/b1b2edfa05be8b957c796dc6d111f40c9f753dcf))
|
19
|
+
|
20
|
+
### Fix
|
21
|
+
|
22
|
+
* fix(build): include py.typed in dists ([`b928639`](https://github.com/python-gitlab/python-gitlab/commit/b928639f7ca252e0abb8ded8f9f142316a4dc823))
|
23
|
+
|
24
|
+
|
5
25
|
## v4.1.0 (2023-10-28)
|
6
26
|
|
7
27
|
### Chore
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: python-gitlab
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.2.0
|
4
4
|
Summary: A python wrapper for the GitLab API
|
5
5
|
Author-email: Gauvain Pocentek <gauvain@pocentek.net>
|
6
6
|
Maintainer-email: John Villalovos <john@sodarock.com>, Max Wittig <max.wittig@siemens.com>, Nejc Habjan <nejc.habjan@siemens.com>, Roger Meier <r.meier@siemens.com>
|
@@ -483,7 +483,7 @@ Create an instance-wide runner::
|
|
483
483
|
"description": "My brand new runner",
|
484
484
|
"paused": True,
|
485
485
|
"locked": False,
|
486
|
-
"run_untagged": True
|
486
|
+
"run_untagged": True,
|
487
487
|
"tag_list": ["linux", "docker", "testing"],
|
488
488
|
"access_level": "not_protected"
|
489
489
|
})
|
@@ -496,7 +496,7 @@ Create a group runner::
|
|
496
496
|
"description": "My brand new runner",
|
497
497
|
"paused": True,
|
498
498
|
"locked": False,
|
499
|
-
"run_untagged": True
|
499
|
+
"run_untagged": True,
|
500
500
|
"tag_list": ["linux", "docker", "testing"],
|
501
501
|
"access_level": "not_protected"
|
502
502
|
})
|
@@ -509,7 +509,7 @@ Create a project runner::
|
|
509
509
|
"description": "My brand new runner",
|
510
510
|
"paused": True,
|
511
511
|
"locked": False,
|
512
|
-
"run_untagged": True
|
512
|
+
"run_untagged": True,
|
513
513
|
"tag_list": ["linux", "docker", "testing"],
|
514
514
|
"access_level": "not_protected"
|
515
515
|
})
|
@@ -54,3 +54,41 @@ Update a wiki page::
|
|
54
54
|
Delete a wiki page::
|
55
55
|
|
56
56
|
page.delete()
|
57
|
+
|
58
|
+
|
59
|
+
File uploads
|
60
|
+
============
|
61
|
+
|
62
|
+
Reference
|
63
|
+
---------
|
64
|
+
|
65
|
+
* v4 API:
|
66
|
+
|
67
|
+
+ :attr:`gitlab.v4.objects.ProjectWiki.upload`
|
68
|
+
+ :attr:`gitlab.v4.objects.GrouptWiki.upload`
|
69
|
+
|
70
|
+
|
71
|
+
* Gitlab API for Projects: https://docs.gitlab.com/ee/api/wikis.html#upload-an-attachment-to-the-wiki-repository
|
72
|
+
* Gitlab API for Groups: https://docs.gitlab.com/ee/api/group_wikis.html#upload-an-attachment-to-the-wiki-repository
|
73
|
+
|
74
|
+
Examples
|
75
|
+
--------
|
76
|
+
|
77
|
+
Upload a file into a project wiki using a filesystem path::
|
78
|
+
|
79
|
+
page = project.wikis.get(page_slug)
|
80
|
+
page.upload("filename.txt", filepath="/some/path/filename.txt")
|
81
|
+
|
82
|
+
Upload a file into a project wiki with raw data::
|
83
|
+
|
84
|
+
page.upload("filename.txt", filedata="Raw data")
|
85
|
+
|
86
|
+
Upload a file into a group wiki using a filesystem path::
|
87
|
+
|
88
|
+
page = group.wikis.get(page_slug)
|
89
|
+
page.upload("filename.txt", filepath="/some/path/filename.txt")
|
90
|
+
|
91
|
+
Upload a file into a group wiki using raw data::
|
92
|
+
|
93
|
+
page.upload("filename.txt", filedata="Raw data")
|
94
|
+
|
@@ -72,6 +72,21 @@ class DetailedMergeStatus(GitlabEnum):
|
|
72
72
|
POLICIES_DENIED: str = "policies_denied"
|
73
73
|
|
74
74
|
|
75
|
+
# https://docs.gitlab.com/ee/api/pipelines.html
|
76
|
+
class PipelineStatus(GitlabEnum):
|
77
|
+
CREATED: str = "created"
|
78
|
+
WAITING_FOR_RESOURCE: str = "waiting_for_resource"
|
79
|
+
PREPARING: str = "preparing"
|
80
|
+
PENDING: str = "pending"
|
81
|
+
RUNNING: str = "running"
|
82
|
+
SUCCESS: str = "success"
|
83
|
+
FAILED: str = "failed"
|
84
|
+
CANCELED: str = "canceled"
|
85
|
+
SKIPPED: str = "skipped"
|
86
|
+
MANUAL: str = "manual"
|
87
|
+
SCHEDULED: str = "scheduled"
|
88
|
+
|
89
|
+
|
75
90
|
DEFAULT_URL: str = "https://gitlab.com"
|
76
91
|
|
77
92
|
NO_ACCESS = AccessLevel.NO_ACCESS.value
|
@@ -944,3 +944,73 @@ class PromoteMixin(_RestObjectBase):
|
|
944
944
|
if TYPE_CHECKING:
|
945
945
|
assert not isinstance(result, requests.Response)
|
946
946
|
return result
|
947
|
+
|
948
|
+
|
949
|
+
class UploadMixin(_RestObjectBase):
|
950
|
+
_id_attr: Optional[str]
|
951
|
+
_attrs: Dict[str, Any]
|
952
|
+
_module: ModuleType
|
953
|
+
_parent_attrs: Dict[str, Any]
|
954
|
+
_updated_attrs: Dict[str, Any]
|
955
|
+
_upload_path: str
|
956
|
+
manager: base.RESTManager
|
957
|
+
|
958
|
+
def _get_upload_path(self) -> str:
|
959
|
+
"""Formats _upload_path with object attributes.
|
960
|
+
|
961
|
+
Returns:
|
962
|
+
The upload path
|
963
|
+
"""
|
964
|
+
if TYPE_CHECKING:
|
965
|
+
assert isinstance(self._upload_path, str)
|
966
|
+
data = self.attributes
|
967
|
+
return self._upload_path.format(**data)
|
968
|
+
|
969
|
+
@cli.register_custom_action(("Project", "ProjectWiki"), ("filename", "filepath"))
|
970
|
+
@exc.on_http_error(exc.GitlabUploadError)
|
971
|
+
def upload(
|
972
|
+
self,
|
973
|
+
filename: str,
|
974
|
+
filedata: Optional[bytes] = None,
|
975
|
+
filepath: Optional[str] = None,
|
976
|
+
**kwargs: Any,
|
977
|
+
) -> Dict[str, Any]:
|
978
|
+
"""Upload the specified file.
|
979
|
+
|
980
|
+
.. note::
|
981
|
+
|
982
|
+
Either ``filedata`` or ``filepath`` *MUST* be specified.
|
983
|
+
|
984
|
+
Args:
|
985
|
+
filename: The name of the file being uploaded
|
986
|
+
filedata: The raw data of the file being uploaded
|
987
|
+
filepath: The path to a local file to upload (optional)
|
988
|
+
|
989
|
+
Raises:
|
990
|
+
GitlabAuthenticationError: If authentication is not correct
|
991
|
+
GitlabUploadError: If the file upload fails
|
992
|
+
GitlabUploadError: If ``filedata`` and ``filepath`` are not
|
993
|
+
specified
|
994
|
+
GitlabUploadError: If both ``filedata`` and ``filepath`` are
|
995
|
+
specified
|
996
|
+
|
997
|
+
Returns:
|
998
|
+
A ``dict`` with info on the uploaded file
|
999
|
+
"""
|
1000
|
+
if filepath is None and filedata is None:
|
1001
|
+
raise exc.GitlabUploadError("No file contents or path specified")
|
1002
|
+
|
1003
|
+
if filedata is not None and filepath is not None:
|
1004
|
+
raise exc.GitlabUploadError("File contents and file path specified")
|
1005
|
+
|
1006
|
+
if filepath is not None:
|
1007
|
+
with open(filepath, "rb") as f:
|
1008
|
+
filedata = f.read()
|
1009
|
+
|
1010
|
+
file_info = {"file": (filename, filedata)}
|
1011
|
+
path = self._get_upload_path()
|
1012
|
+
server_data = self.manager.gitlab.http_post(path, files=file_info, **kwargs)
|
1013
|
+
|
1014
|
+
if TYPE_CHECKING:
|
1015
|
+
assert isinstance(server_data, dict)
|
1016
|
+
return server_data
|
@@ -30,6 +30,7 @@ from gitlab.mixins import (
|
|
30
30
|
RefreshMixin,
|
31
31
|
SaveMixin,
|
32
32
|
UpdateMixin,
|
33
|
+
UploadMixin,
|
33
34
|
)
|
34
35
|
from gitlab.types import RequiredOptional
|
35
36
|
|
@@ -158,8 +159,11 @@ class ProjectGroupManager(ListMixin, RESTManager):
|
|
158
159
|
_types = {"skip_groups": types.ArrayAttribute}
|
159
160
|
|
160
161
|
|
161
|
-
class Project(
|
162
|
+
class Project(
|
163
|
+
RefreshMixin, SaveMixin, ObjectDeleteMixin, RepositoryMixin, UploadMixin, RESTObject
|
164
|
+
):
|
162
165
|
_repr_attr = "path_with_namespace"
|
166
|
+
_upload_path = "/projects/{id}/uploads"
|
163
167
|
|
164
168
|
access_tokens: ProjectAccessTokenManager
|
165
169
|
accessrequests: ProjectAccessRequestManager
|
@@ -437,59 +441,6 @@ class Project(RefreshMixin, SaveMixin, ObjectDeleteMixin, RepositoryMixin, RESTO
|
|
437
441
|
path = f"/projects/{self.encoded_id}/housekeeping"
|
438
442
|
self.manager.gitlab.http_post(path, **kwargs)
|
439
443
|
|
440
|
-
# see #56 - add file attachment features
|
441
|
-
@cli.register_custom_action("Project", ("filename", "filepath"))
|
442
|
-
@exc.on_http_error(exc.GitlabUploadError)
|
443
|
-
def upload(
|
444
|
-
self,
|
445
|
-
filename: str,
|
446
|
-
filedata: Optional[bytes] = None,
|
447
|
-
filepath: Optional[str] = None,
|
448
|
-
**kwargs: Any,
|
449
|
-
) -> Dict[str, Any]:
|
450
|
-
"""Upload the specified file into the project.
|
451
|
-
|
452
|
-
.. note::
|
453
|
-
|
454
|
-
Either ``filedata`` or ``filepath`` *MUST* be specified.
|
455
|
-
|
456
|
-
Args:
|
457
|
-
filename: The name of the file being uploaded
|
458
|
-
filedata: The raw data of the file being uploaded
|
459
|
-
filepath: The path to a local file to upload (optional)
|
460
|
-
|
461
|
-
Raises:
|
462
|
-
GitlabConnectionError: If the server cannot be reached
|
463
|
-
GitlabUploadError: If the file upload fails
|
464
|
-
GitlabUploadError: If ``filedata`` and ``filepath`` are not
|
465
|
-
specified
|
466
|
-
GitlabUploadError: If both ``filedata`` and ``filepath`` are
|
467
|
-
specified
|
468
|
-
|
469
|
-
Returns:
|
470
|
-
A ``dict`` with the keys:
|
471
|
-
* ``alt`` - The alternate text for the upload
|
472
|
-
* ``url`` - The direct url to the uploaded file
|
473
|
-
* ``markdown`` - Markdown for the uploaded file
|
474
|
-
"""
|
475
|
-
if filepath is None and filedata is None:
|
476
|
-
raise exc.GitlabUploadError("No file contents or path specified")
|
477
|
-
|
478
|
-
if filedata is not None and filepath is not None:
|
479
|
-
raise exc.GitlabUploadError("File contents and file path specified")
|
480
|
-
|
481
|
-
if filepath is not None:
|
482
|
-
with open(filepath, "rb") as f:
|
483
|
-
filedata = f.read()
|
484
|
-
|
485
|
-
url = f"/projects/{self.encoded_id}/uploads"
|
486
|
-
file_info = {"file": (filename, filedata)}
|
487
|
-
data = self.manager.gitlab.http_post(url, files=file_info, **kwargs)
|
488
|
-
|
489
|
-
if TYPE_CHECKING:
|
490
|
-
assert isinstance(data, dict)
|
491
|
-
return {"alt": data["alt"], "url": data["url"], "markdown": data["markdown"]}
|
492
|
-
|
493
444
|
@cli.register_custom_action("Project")
|
494
445
|
@exc.on_http_error(exc.GitlabRestoreError)
|
495
446
|
def restore(self, **kwargs: Any) -> None:
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from typing import Any, cast, Union
|
2
2
|
|
3
3
|
from gitlab.base import RESTManager, RESTObject
|
4
|
-
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin
|
4
|
+
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin, UploadMixin
|
5
5
|
from gitlab.types import RequiredOptional
|
6
6
|
|
7
7
|
__all__ = [
|
@@ -12,9 +12,10 @@ __all__ = [
|
|
12
12
|
]
|
13
13
|
|
14
14
|
|
15
|
-
class ProjectWiki(SaveMixin, ObjectDeleteMixin, RESTObject):
|
15
|
+
class ProjectWiki(SaveMixin, ObjectDeleteMixin, UploadMixin, RESTObject):
|
16
16
|
_id_attr = "slug"
|
17
17
|
_repr_attr = "slug"
|
18
|
+
_upload_path = "/projects/{project_id}/wikis/attachments"
|
18
19
|
|
19
20
|
|
20
21
|
class ProjectWikiManager(CRUDMixin, RESTManager):
|
@@ -33,9 +34,10 @@ class ProjectWikiManager(CRUDMixin, RESTManager):
|
|
33
34
|
return cast(ProjectWiki, super().get(id=id, lazy=lazy, **kwargs))
|
34
35
|
|
35
36
|
|
36
|
-
class GroupWiki(SaveMixin, ObjectDeleteMixin, RESTObject):
|
37
|
+
class GroupWiki(SaveMixin, ObjectDeleteMixin, UploadMixin, RESTObject):
|
37
38
|
_id_attr = "slug"
|
38
39
|
_repr_attr = "slug"
|
40
|
+
_upload_path = "/groups/{group_id}/wikis/attachments"
|
39
41
|
|
40
42
|
|
41
43
|
class GroupWikiManager(CRUDMixin, RESTManager):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: python-gitlab
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.2.0
|
4
4
|
Summary: A python wrapper for the GitLab API
|
5
5
|
Author-email: Gauvain Pocentek <gauvain@pocentek.net>
|
6
6
|
Maintainer-email: John Villalovos <john@sodarock.com>, Max Wittig <max.wittig@siemens.com>, Nejc Habjan <nejc.habjan@siemens.com>, Roger Meier <r.meier@siemens.com>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
-r requirements.txt
|
2
2
|
argcomplete==2.0.0
|
3
|
-
black==23.
|
3
|
+
black==23.11.0
|
4
4
|
commitizen==3.12.0
|
5
5
|
flake8==6.1.0
|
6
6
|
isort==5.12.0
|
7
|
-
mypy==1.
|
7
|
+
mypy==1.7.1
|
8
8
|
pylint==3.0.2
|
9
|
-
pytest==7.4.
|
10
|
-
responses==0.
|
9
|
+
pytest==7.4.3
|
10
|
+
responses==0.24.1
|
11
11
|
types-PyYAML==6.0.12.12
|
12
12
|
types-requests==2.31.0.10
|
13
|
-
types-setuptools==68.2.0.
|
13
|
+
types-setuptools==68.2.0.2
|
@@ -0,0 +1,62 @@
|
|
1
|
+
"""
|
2
|
+
GitLab API:
|
3
|
+
https://docs.gitlab.com/ee/api/wikis.html
|
4
|
+
"""
|
5
|
+
|
6
|
+
|
7
|
+
def test_project_wikis(project):
|
8
|
+
page = project.wikis.create({"title": "title/subtitle", "content": "test content"})
|
9
|
+
page.content = "update content"
|
10
|
+
page.title = "subtitle"
|
11
|
+
|
12
|
+
page.save()
|
13
|
+
|
14
|
+
page.delete()
|
15
|
+
|
16
|
+
|
17
|
+
def test_project_wiki_file_upload(project):
|
18
|
+
page = project.wikis.create(
|
19
|
+
{"title": "title/subtitle", "content": "test page content"}
|
20
|
+
)
|
21
|
+
filename = "test.txt"
|
22
|
+
file_contents = "testing contents"
|
23
|
+
|
24
|
+
uploaded_file = page.upload(filename, file_contents)
|
25
|
+
|
26
|
+
link = uploaded_file["link"]
|
27
|
+
file_name = uploaded_file["file_name"]
|
28
|
+
file_path = uploaded_file["file_path"]
|
29
|
+
assert file_name == filename
|
30
|
+
assert file_path.startswith("uploads/")
|
31
|
+
assert file_path.endswith(f"/{filename}")
|
32
|
+
assert link["url"] == file_path
|
33
|
+
assert link["markdown"] == f"[{file_name}]({file_path})"
|
34
|
+
|
35
|
+
|
36
|
+
def test_group_wikis(group):
|
37
|
+
page = group.wikis.create({"title": "title/subtitle", "content": "test content"})
|
38
|
+
page.content = "update content"
|
39
|
+
page.title = "subtitle"
|
40
|
+
|
41
|
+
page.save()
|
42
|
+
|
43
|
+
page.delete()
|
44
|
+
|
45
|
+
|
46
|
+
def test_group_wiki_file_upload(group):
|
47
|
+
page = group.wikis.create(
|
48
|
+
{"title": "title/subtitle", "content": "test page content"}
|
49
|
+
)
|
50
|
+
filename = "test.txt"
|
51
|
+
file_contents = "testing contents"
|
52
|
+
|
53
|
+
uploaded_file = page.upload(filename, file_contents)
|
54
|
+
|
55
|
+
link = uploaded_file["link"]
|
56
|
+
file_name = uploaded_file["file_name"]
|
57
|
+
file_path = uploaded_file["file_path"]
|
58
|
+
assert file_name == filename
|
59
|
+
assert file_path.startswith("uploads/")
|
60
|
+
assert file_path.endswith(f"/{filename}")
|
61
|
+
assert link["url"] == file_path
|
62
|
+
assert link["markdown"] == f"[{file_name}]({file_path})"
|
@@ -12,6 +12,7 @@ DOCS_DIR = "docs"
|
|
12
12
|
TEST_DIR = "tests"
|
13
13
|
SDIST_FILE = f"{__title__}-{__version__}.tar.gz"
|
14
14
|
WHEEL_FILE = f"{__title__.replace('-', '_')}-{__version__}-py{sys.version_info.major}-none-any.whl"
|
15
|
+
PY_TYPED = "gitlab/py.typed"
|
15
16
|
|
16
17
|
|
17
18
|
@pytest.fixture(scope="session")
|
@@ -21,19 +22,26 @@ def build(tmp_path_factory: pytest.TempPathFactory):
|
|
21
22
|
return temp_dir
|
22
23
|
|
23
24
|
|
24
|
-
def
|
25
|
+
def test_sdist_includes_correct_files(build: Path) -> None:
|
25
26
|
sdist = tarfile.open(build / SDIST_FILE, "r:gz")
|
26
27
|
sdist_dir = f"{__title__}-{__version__}"
|
27
28
|
|
28
29
|
docs_dir = sdist.getmember(f"{sdist_dir}/{DOCS_DIR}")
|
29
30
|
test_dir = sdist.getmember(f"{sdist_dir}/{TEST_DIR}")
|
30
31
|
readme = sdist.getmember(f"{sdist_dir}/README.rst")
|
32
|
+
py_typed = sdist.getmember(f"{sdist_dir}/{PY_TYPED}")
|
31
33
|
|
32
34
|
assert docs_dir.isdir()
|
33
35
|
assert test_dir.isdir()
|
36
|
+
assert py_typed.isfile()
|
34
37
|
assert readme.isfile()
|
35
38
|
|
36
39
|
|
40
|
+
def test_wheel_includes_correct_files(build: Path) -> None:
|
41
|
+
wheel = zipfile.ZipFile(build / WHEEL_FILE)
|
42
|
+
assert PY_TYPED in wheel.namelist()
|
43
|
+
|
44
|
+
|
37
45
|
def test_wheel_excludes_docs_and_tests(build: Path) -> None:
|
38
46
|
wheel = zipfile.ZipFile(build / WHEEL_FILE)
|
39
47
|
assert not any(file.startswith((DOCS_DIR, TEST_DIR)) for file in wheel.namelist())
|
@@ -1,8 +1,10 @@
|
|
1
|
+
from unittest.mock import mock_open, patch
|
2
|
+
|
1
3
|
import pytest
|
2
4
|
import requests
|
3
5
|
import responses
|
4
6
|
|
5
|
-
from gitlab import base
|
7
|
+
from gitlab import base, GitlabUploadError
|
6
8
|
from gitlab import types as gl_types
|
7
9
|
from gitlab.mixins import (
|
8
10
|
CreateMixin,
|
@@ -15,6 +17,7 @@ from gitlab.mixins import (
|
|
15
17
|
SetMixin,
|
16
18
|
UpdateMethod,
|
17
19
|
UpdateMixin,
|
20
|
+
UploadMixin,
|
18
21
|
)
|
19
22
|
|
20
23
|
|
@@ -502,3 +505,94 @@ def test_set_mixin(gl):
|
|
502
505
|
assert obj.key == "foo"
|
503
506
|
assert obj.value == "bar"
|
504
507
|
assert responses.assert_call_count(url, 1) is True
|
508
|
+
|
509
|
+
|
510
|
+
@responses.activate
|
511
|
+
def test_upload_mixin_with_filepath_and_filedata(gl):
|
512
|
+
class TestClass(UploadMixin, FakeObject):
|
513
|
+
_upload_path = "/tests/{id}/uploads"
|
514
|
+
|
515
|
+
url = "http://localhost/api/v4/tests/42/uploads"
|
516
|
+
responses.add(
|
517
|
+
method=responses.POST,
|
518
|
+
url=url,
|
519
|
+
json={"id": 42, "file_name": "test.txt", "file_content": "testing contents"},
|
520
|
+
status=200,
|
521
|
+
match=[responses.matchers.query_param_matcher({})],
|
522
|
+
)
|
523
|
+
|
524
|
+
mgr = FakeManager(gl)
|
525
|
+
obj = TestClass(mgr, {"id": 42})
|
526
|
+
with pytest.raises(
|
527
|
+
GitlabUploadError, match="File contents and file path specified"
|
528
|
+
):
|
529
|
+
obj.upload("test.txt", "testing contents", "/home/test.txt")
|
530
|
+
|
531
|
+
|
532
|
+
@responses.activate
|
533
|
+
def test_upload_mixin_without_filepath_nor_filedata(gl):
|
534
|
+
class TestClass(UploadMixin, FakeObject):
|
535
|
+
_upload_path = "/tests/{id}/uploads"
|
536
|
+
|
537
|
+
url = "http://localhost/api/v4/tests/42/uploads"
|
538
|
+
responses.add(
|
539
|
+
method=responses.POST,
|
540
|
+
url=url,
|
541
|
+
json={"id": 42, "file_name": "test.txt", "file_content": "testing contents"},
|
542
|
+
status=200,
|
543
|
+
match=[responses.matchers.query_param_matcher({})],
|
544
|
+
)
|
545
|
+
|
546
|
+
mgr = FakeManager(gl)
|
547
|
+
obj = TestClass(mgr, {"id": 42})
|
548
|
+
with pytest.raises(GitlabUploadError, match="No file contents or path specified"):
|
549
|
+
obj.upload("test.txt")
|
550
|
+
|
551
|
+
|
552
|
+
@responses.activate
|
553
|
+
def test_upload_mixin_with_filedata(gl):
|
554
|
+
class TestClass(UploadMixin, FakeObject):
|
555
|
+
_upload_path = "/tests/{id}/uploads"
|
556
|
+
|
557
|
+
url = "http://localhost/api/v4/tests/42/uploads"
|
558
|
+
responses.add(
|
559
|
+
method=responses.POST,
|
560
|
+
url=url,
|
561
|
+
json={"id": 42, "file_name": "test.txt", "file_content": "testing contents"},
|
562
|
+
status=200,
|
563
|
+
match=[responses.matchers.query_param_matcher({})],
|
564
|
+
)
|
565
|
+
|
566
|
+
mgr = FakeManager(gl)
|
567
|
+
obj = TestClass(mgr, {"id": 42})
|
568
|
+
res_only_data = obj.upload("test.txt", "testing contents")
|
569
|
+
assert obj._get_upload_path() == "/tests/42/uploads"
|
570
|
+
assert isinstance(res_only_data, dict)
|
571
|
+
assert res_only_data["file_name"] == "test.txt"
|
572
|
+
assert res_only_data["file_content"] == "testing contents"
|
573
|
+
assert responses.assert_call_count(url, 1) is True
|
574
|
+
|
575
|
+
|
576
|
+
@responses.activate
|
577
|
+
def test_upload_mixin_with_filepath(gl):
|
578
|
+
class TestClass(UploadMixin, FakeObject):
|
579
|
+
_upload_path = "/tests/{id}/uploads"
|
580
|
+
|
581
|
+
url = "http://localhost/api/v4/tests/42/uploads"
|
582
|
+
responses.add(
|
583
|
+
method=responses.POST,
|
584
|
+
url=url,
|
585
|
+
json={"id": 42, "file_name": "test.txt", "file_content": "testing contents"},
|
586
|
+
status=200,
|
587
|
+
match=[responses.matchers.query_param_matcher({})],
|
588
|
+
)
|
589
|
+
|
590
|
+
mgr = FakeManager(gl)
|
591
|
+
obj = TestClass(mgr, {"id": 42})
|
592
|
+
with patch("builtins.open", mock_open(read_data="raw\nfile\ndata")):
|
593
|
+
res_only_path = obj.upload("test.txt", None, "/filepath")
|
594
|
+
assert obj._get_upload_path() == "/tests/42/uploads"
|
595
|
+
assert isinstance(res_only_path, dict)
|
596
|
+
assert res_only_path["file_name"] == "test.txt"
|
597
|
+
assert res_only_path["file_content"] == "testing contents"
|
598
|
+
assert responses.assert_call_count(url, 1) is True
|
File without changes
|
@@ -1,14 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
GitLab API:
|
3
|
-
https://docs.gitlab.com/ee/api/wikis.html
|
4
|
-
"""
|
5
|
-
|
6
|
-
|
7
|
-
def test_wikis(project):
|
8
|
-
page = project.wikis.create({"title": "title/subtitle", "content": "test content"})
|
9
|
-
page.content = "update content"
|
10
|
-
page.title = "subtitle"
|
11
|
-
|
12
|
-
page.save()
|
13
|
-
|
14
|
-
page.delete()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|