From e83ae2f733b45d0e96b625d2d6c53ab3408b0728 Mon Sep 17 00:00:00 2001 From: Mario Gonzalez Date: Tue, 25 Jun 2024 17:41:04 -0400 Subject: [PATCH 1/3] Updating Copyright 2021-2024 --- pg_backup_api/news.md | 2 +- pg_backup_api/news.yml | 2 +- pg_backup_api/pg_backup_api/__init__.py | 2 +- pg_backup_api/pg_backup_api/__main__.py | 2 +- pg_backup_api/pg_backup_api/app.py | 2 +- pg_backup_api/pg_backup_api/logic/__init__.py | 2 +- pg_backup_api/pg_backup_api/logic/utility_controller.py | 2 +- pg_backup_api/pg_backup_api/run.py | 2 +- pg_backup_api/pg_backup_api/server_operation.py | 2 +- pg_backup_api/pg_backup_api/tests/test_main.py | 2 +- pg_backup_api/pg_backup_api/tests/test_run.py | 2 +- pg_backup_api/pg_backup_api/tests/test_server_operation.py | 2 +- pg_backup_api/pg_backup_api/tests/test_utility_controller.py | 2 +- pg_backup_api/pg_backup_api/tests/test_utils.py | 2 +- pg_backup_api/pg_backup_api/utils.py | 2 +- pg_backup_api/scripts/changelogs.py | 2 +- pg_backup_api/scripts/templates/news.md.jinja2 | 2 +- pg_backup_api/setup.py | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/pg_backup_api/news.md b/pg_backup_api/news.md index b1be5e8..f7e0184 100644 --- a/pg_backup_api/news.md +++ b/pg_backup_api/news.md @@ -1,6 +1,6 @@ # pg-backup-api release notes -© Copyright EnterpriseDB UK Limited 2021-2023 - All rights reserved. +© Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. ## 2.1.0 (2024-01-25) diff --git a/pg_backup_api/news.yml b/pg_backup_api/news.yml index 277a4a1..943dc9f 100644 --- a/pg_backup_api/news.yml +++ b/pg_backup_api/news.yml @@ -1,4 +1,4 @@ -# © Copyright EnterpriseDB UK Limited 2021-2023 - All rights reserved. +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # pg-backup-api News - History of user-visible changes diff --git a/pg_backup_api/pg_backup_api/__init__.py b/pg_backup_api/pg_backup_api/__init__.py index a0797cd..b8b94c8 100644 --- a/pg_backup_api/pg_backup_api/__init__.py +++ b/pg_backup_api/pg_backup_api/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2021-2023 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # diff --git a/pg_backup_api/pg_backup_api/__main__.py b/pg_backup_api/pg_backup_api/__main__.py index f57ce50..ad576d2 100644 --- a/pg_backup_api/pg_backup_api/__main__.py +++ b/pg_backup_api/pg_backup_api/__main__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2021-2023 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # diff --git a/pg_backup_api/pg_backup_api/app.py b/pg_backup_api/pg_backup_api/app.py index 0ce4bde..31f90c6 100644 --- a/pg_backup_api/pg_backup_api/app.py +++ b/pg_backup_api/pg_backup_api/app.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2021-2023 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # diff --git a/pg_backup_api/pg_backup_api/logic/__init__.py b/pg_backup_api/pg_backup_api/logic/__init__.py index bd439bb..e580e51 100644 --- a/pg_backup_api/pg_backup_api/logic/__init__.py +++ b/pg_backup_api/pg_backup_api/logic/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2021-2023 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # diff --git a/pg_backup_api/pg_backup_api/logic/utility_controller.py b/pg_backup_api/pg_backup_api/logic/utility_controller.py index 5b9d97d..fe17481 100644 --- a/pg_backup_api/pg_backup_api/logic/utility_controller.py +++ b/pg_backup_api/pg_backup_api/logic/utility_controller.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2021-2023 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # diff --git a/pg_backup_api/pg_backup_api/run.py b/pg_backup_api/pg_backup_api/run.py index 419fab2..c673a05 100644 --- a/pg_backup_api/pg_backup_api/run.py +++ b/pg_backup_api/pg_backup_api/run.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2021-2023 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # diff --git a/pg_backup_api/pg_backup_api/server_operation.py b/pg_backup_api/pg_backup_api/server_operation.py index 154887a..545fd53 100644 --- a/pg_backup_api/pg_backup_api/server_operation.py +++ b/pg_backup_api/pg_backup_api/server_operation.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2021-2023 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # diff --git a/pg_backup_api/pg_backup_api/tests/test_main.py b/pg_backup_api/pg_backup_api/tests/test_main.py index fc3d558..943a39b 100644 --- a/pg_backup_api/pg_backup_api/tests/test_main.py +++ b/pg_backup_api/pg_backup_api/tests/test_main.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2021-2023 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # diff --git a/pg_backup_api/pg_backup_api/tests/test_run.py b/pg_backup_api/pg_backup_api/tests/test_run.py index f4d7d91..5aa7729 100644 --- a/pg_backup_api/pg_backup_api/tests/test_run.py +++ b/pg_backup_api/pg_backup_api/tests/test_run.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2021-2023 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # diff --git a/pg_backup_api/pg_backup_api/tests/test_server_operation.py b/pg_backup_api/pg_backup_api/tests/test_server_operation.py index 38b403e..ae2d6bd 100644 --- a/pg_backup_api/pg_backup_api/tests/test_server_operation.py +++ b/pg_backup_api/pg_backup_api/tests/test_server_operation.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2021-2023 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # diff --git a/pg_backup_api/pg_backup_api/tests/test_utility_controller.py b/pg_backup_api/pg_backup_api/tests/test_utility_controller.py index b8600c9..038e874 100644 --- a/pg_backup_api/pg_backup_api/tests/test_utility_controller.py +++ b/pg_backup_api/pg_backup_api/tests/test_utility_controller.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2021-2023 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # diff --git a/pg_backup_api/pg_backup_api/tests/test_utils.py b/pg_backup_api/pg_backup_api/tests/test_utils.py index 9746edb..4f58827 100644 --- a/pg_backup_api/pg_backup_api/tests/test_utils.py +++ b/pg_backup_api/pg_backup_api/tests/test_utils.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2021-2023 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # diff --git a/pg_backup_api/pg_backup_api/utils.py b/pg_backup_api/pg_backup_api/utils.py index 736c3e4..5bf679d 100644 --- a/pg_backup_api/pg_backup_api/utils.py +++ b/pg_backup_api/pg_backup_api/utils.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2021-2023 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # diff --git a/pg_backup_api/scripts/changelogs.py b/pg_backup_api/scripts/changelogs.py index d388e90..46d9e69 100755 --- a/pg_backup_api/scripts/changelogs.py +++ b/pg_backup_api/scripts/changelogs.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# © Copyright EnterpriseDB UK Limited 2021-2023 - All rights reserved. +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # """ Generate news.md from a source yaml file using Jinja templates. diff --git a/pg_backup_api/scripts/templates/news.md.jinja2 b/pg_backup_api/scripts/templates/news.md.jinja2 index 01ab9fb..25a02dc 100644 --- a/pg_backup_api/scripts/templates/news.md.jinja2 +++ b/pg_backup_api/scripts/templates/news.md.jinja2 @@ -1,6 +1,6 @@ # pg-backup-api release notes -© Copyright EnterpriseDB UK Limited 2021-2023 - All rights reserved. +© Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. {% for release in data["pg-backup-api release notes"] %} {# ## v22.9 (2022-02-24) #} diff --git a/pg_backup_api/setup.py b/pg_backup_api/setup.py index 74ed781..76241d7 100644 --- a/pg_backup_api/setup.py +++ b/pg_backup_api/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © Copyright EnterpriseDB UK Limited 2013-2021 +# © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. # # This file is part of Postgres Backup API. # From d7db6aa760e073077c5223b6bb49fd7406fc82ee Mon Sep 17 00:00:00 2001 From: Israel Barth Rubio Date: Fri, 28 Jun 2024 13:15:33 -0300 Subject: [PATCH 2/3] Please `pyright` `pyright` was complaining about the `exec_diagnose`. That issue occurs because based on the Barman module version that is installed in the virtual environemnt, the signature of that method would have either 2 or 4 parameters. We had 2 options to handle that issue: * Add `pyright: ignore` directives to the source code where `exec_diagnose` is called; or * Change the implementation so instead of relying on `AttributeError` exception, it would handle the version for the Barman module. We chose the first option for now, so we unblock the release. The code with `AttributeError` exception has already been tested. If we were to go with the second option now, that would require changing the code, changing the unit tests and performing more tests, thus dealying the release. Signed-off-by: Israel Barth Rubio --- .../pg_backup_api/logic/utility_controller.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pg_backup_api/pg_backup_api/logic/utility_controller.py b/pg_backup_api/pg_backup_api/logic/utility_controller.py index fe17481..0c688e2 100644 --- a/pg_backup_api/pg_backup_api/logic/utility_controller.py +++ b/pg_backup_api/pg_backup_api/logic/utility_controller.py @@ -82,15 +82,20 @@ def diagnose() -> 'Response': for model in available_models: # pyright: ignore model_dict[model] = barman.__config__.get_model(model) - barman_diagnose.exec_diagnose(server_dict, - model_dict, - errors_list, - show_config_source=False) + barman_diagnose.exec_diagnose( + server_dict, + model_dict, + errors_list, + show_config_source=False, + ) # pyright: ignore [reportCallIssue] # An attribute error is thown when calling `model_names()` if using Barman # older than 3.10, in which case models are not yet implemented, so we fall # back to the old signature of diagnose command. except AttributeError: - barman_diagnose.exec_diagnose(server_dict, errors_list) + barman_diagnose.exec_diagnose( + server_dict, + errors_list, + ) # pyright: ignore [reportCallIssue] # new outputs are appended, so grab the last one stored_output = json.loads(output._writer.json_output["_INFO"][-1]) From 9efe47653fad111fd83fe2ec1ab34a9789fe0616 Mon Sep 17 00:00:00 2001 From: Mario Gonzalez Date: Tue, 25 Jun 2024 17:42:35 -0400 Subject: [PATCH 3/3] Prepare release 2.1.1 --- pg_backup_api/news.md | 6 ++++++ pg_backup_api/news.yml | 6 ++++++ pg_backup_api/version.txt | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pg_backup_api/news.md b/pg_backup_api/news.md index f7e0184..6cfec49 100644 --- a/pg_backup_api/news.md +++ b/pg_backup_api/news.md @@ -2,6 +2,12 @@ © Copyright EnterpriseDB UK Limited 2021-2024 - All rights reserved. +## 2.1.1 (2024-06-29) + +### Buxfixes + +- Functions/methods signatures updates to fix regression with Barman <= 3.9 + ## 2.1.0 (2024-01-25) ### Notable changes diff --git a/pg_backup_api/news.yml b/pg_backup_api/news.yml index 943dc9f..b9c639c 100644 --- a/pg_backup_api/news.yml +++ b/pg_backup_api/news.yml @@ -3,6 +3,12 @@ # pg-backup-api News - History of user-visible changes pg-backup-api release notes: + - version: "2.1.1" + date: "20240629" + changes: + Buxfixes: + - Functions/methods signatures updates to fix regression with Barman <= 3.9 + - version: "2.1.0" date: "20240125" changes: diff --git a/pg_backup_api/version.txt b/pg_backup_api/version.txt index 7ec1d6d..3e3c2f1 100644 --- a/pg_backup_api/version.txt +++ b/pg_backup_api/version.txt @@ -1 +1 @@ -2.1.0 +2.1.1