From eb725d0f28b27c5253e0db2f31a68be7c3c75fe7 Mon Sep 17 00:00:00 2001 From: Maciej Urbanski Date: Thu, 19 Oct 2023 09:38:41 +0200 Subject: [PATCH 1/3] move stable 3.12 changelog note to proper place --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48c3dcfed..6d918c8a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed * `--quiet` now will implicitly set `--noProgress` option as well +### Infrastructure +* Use stable Python 3.12 in CI + ## [3.11.0] - 2023-10-04 ### Added @@ -20,7 +23,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Infrastructure * Fix gathering licenses of typeshed libraries * Fix spellcheck erroring out on LICENSE file -* Use stable Python 3.12 in CI ## [3.10.1] - 2023-09-27 From f54ecf726a151b4dfa7b3d0047e508923823e3dd Mon Sep 17 00:00:00 2001 From: Maciej Urbanski Date: Thu, 19 Oct 2023 09:33:49 +0200 Subject: [PATCH 2/3] fix buildthedocs config --- .readthedocs.yml | 6 +++++- CHANGELOG.md | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 0a21741ea..e9c277f57 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,6 +5,11 @@ # Required version: 2 +build: + os: ubuntu-22.04 + tools: + python: "3.11" + # Build documentation in the docs/ directory with Sphinx sphinx: configuration: doc/source/conf.py @@ -14,7 +19,6 @@ formats: all # Optionally set the version of Python and requirements required to build your docs python: - version: 3.11 install: - requirements: requirements.txt - method: pip diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d918c8a8..f2bdf4c2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Infrastructure * Use stable Python 3.12 in CI +* Fix readthedocs build by updating to v2 configuration schema ## [3.11.0] - 2023-10-04 From 24f0cac1215b0033d94bafce2733398d7bf05f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Nowacki?= Date: Wed, 25 Oct 2023 12:04:46 +0200 Subject: [PATCH 3/3] fix pypy integration tests --- CHANGELOG.md | 1 + test/integration/helpers.py | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48c3dcfed..19c3069c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed * `--quiet` now will implicitly set `--noProgress` option as well +* pypy integration tests ## [3.11.0] - 2023-10-04 diff --git a/test/integration/helpers.py b/test/integration/helpers.py index 8195116b0..61a55e22d 100644 --- a/test/integration/helpers.py +++ b/test/integration/helpers.py @@ -442,6 +442,12 @@ def should_succeed( assert any(p.match(line) for p in self.EXPECTED_STDERR_PATTERNS), \ f'Unexpected stderr line: {repr(line)}' + if platform.python_implementation().lower() == 'pypy': + # TODO: remove after pypy removes the leftover print and resolve + # https://github.com/Backblaze/B2_Command_Line_Tool/issues/936 + while stdout.startswith('/'): + stdout = stdout.split('\n', 1)[-1] + if expected_pattern is not None: assert re.search(expected_pattern, stdout), \ f'did not match pattern="{expected_pattern}", stdout="{stdout}"' @@ -454,7 +460,12 @@ def should_succeed_json(self, args, additional_env: Optional[dict] = None): if there was an error; otherwise, treats the stdout as JSON and returns the data in it. """ - return json.loads(self.should_succeed(args, additional_env=additional_env)) + result = self.should_succeed(args, additional_env=additional_env) + try: + loaded_result = json.loads(result) + except json.JSONDecodeError: + raise ValueError(f'{result} is not a valid json') + return loaded_result def should_fail(self, args, expected_pattern, additional_env: Optional[dict] = None): """ @@ -464,6 +475,12 @@ def should_fail(self, args, expected_pattern, additional_env: Optional[dict] = N status, stdout, stderr = run_command(self.command, args, additional_env) assert status != 0, 'ERROR: should have failed' + if platform.python_implementation().lower() == 'pypy': + # TODO: remove after pypy removes the leftover print and resolve + # https://github.com/Backblaze/B2_Command_Line_Tool/issues/936 + while stdout.startswith('/'): + stdout = stdout.split('\n', 1)[-1] + assert re.search(expected_pattern, stdout + stderr), \ f'did not match pattern="{expected_pattern}", stdout="{stdout}", stderr="{stderr}"'