diff --git a/.github/workflows/fossologytests.yml b/.github/workflows/fossologytests.yml index 47d7376..038829c 100644 --- a/.github/workflows/fossologytests.yml +++ b/.github/workflows/fossologytests.yml @@ -10,7 +10,7 @@ on: jobs: test-latest: - name: Integration Tests (latest Fossology - 4.4.0) + name: Integration Tests (latest Fossology - 4.4.0-rc2) runs-on: ubuntu-latest container: @@ -20,7 +20,7 @@ jobs: services: fossology: - image: fossology/fossology:4.4.0 + image: fossology/fossology:4.4.0-rc2 ports: - 8081:80 volumes: diff --git a/README.rst b/README.rst index a05878a..11fff55 100644 --- a/README.rst +++ b/README.rst @@ -26,12 +26,14 @@ A simple wrapper for the Fossology REST API. See `the OpenAPI specification `_ used to implement this library. -Current release is compatible with **Fossology version 4.4.0** - API version 2.0.0 (not all endpoints are supported) +Current release is compatible with **Fossology version 4.4.0-rc2** - API version 2.0.0 (not all endpoints are supported) `See release notes `_ for all details. If you miss an API Endpoint, please open a new issue or contribute a pull request. + API v1 is supported too, it needs to be specified explicitly. + Documentation ============= @@ -61,17 +63,19 @@ Using the API from fossology import fossology_token from fossology.enum import TokenScope - FOSSOLOGY_SERVER = "https://fossology.example.com/repo" # Note the absense of the trailing slash, otherwise the token generation will fail + FOSSOLOGY_SERVER = "https://fossology.example.com/repo" # Note the absence of the trailing slash, otherwise the token generation will fail FOSSOLOGY_USER = "fossy" FOSSOLOGY_PASSWORD = "fossy" TOKEN_NAME = "fossy_token" + # By default version v2 of the token generation API will be used token = fossology_token( FOSSOLOGY_SERVER, FOSSOLOGY_USER, FOSSOLOGY_PASSWORD, TOKEN_NAME, TokenScope.WRITE + version="v2" ) - Start using the API: @@ -80,8 +84,8 @@ Using the API from fossology import Fossology - # Starting from API version 1.2.3, the `FOSSOLOGY_USER` option is not needed anymore - foss = Fossology(FOSSOLOGY_SERVER, token, FOSSOLOGY_USER) + # By default version v2 of the API will be used + foss = Fossology(FOSSOLOGY_SERVER, token, FOSSOLOGY_USER, version="v2") print(f"Logged in as user {foss.user.name}") diff --git a/docs-source/conf.py b/docs-source/conf.py index 6ac2f57..a93f4da 100644 --- a/docs-source/conf.py +++ b/docs-source/conf.py @@ -22,7 +22,7 @@ copyright = "2021, Siemens AG" # The full version, including major/minor/patch tags -release = "3.1.1" +release = "3.2.0" # -- General configuration --------------------------------------------------- diff --git a/fossology/uploads.py b/fossology/uploads.py index 3c2e349..20b9bf7 100644 --- a/fossology/uploads.py +++ b/fossology/uploads.py @@ -777,7 +777,6 @@ def upload_permissions( :raises AuthorizationError: if the REST call is not authorized """ response = self.session.get(f"{self.api}/uploads/{upload.id}/perm-groups") - print(response.request.url) if response.status_code == 200: return UploadPermGroups.from_json(response.json()) diff --git a/pyproject.toml b/pyproject.toml index 33cf935..77707d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fossology" -version = "3.1.1" +version = "3.2.0" description = "A library to automate Fossology from Python scripts" authors = ["Marion Deveaud "] license = "MIT License" diff --git a/tests/test_upload_permissions.py b/tests/test_upload_permissions.py index 1b2f5f5..5a28e31 100644 --- a/tests/test_upload_permissions.py +++ b/tests/test_upload_permissions.py @@ -41,7 +41,7 @@ def test_get_upload_permissions_if_upload_does_not_exists_raise_api_error( upload = Upload( 1, "non-existing-folder", - secrets.randbelow(192), + secrets.randbelow(1092), "non-existing upload", "none", "2023-08-07",