From 99950c21d35b99b21c4e029a4e00815c414a8c7a Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Sun, 14 Sep 2025 23:07:20 +0300 Subject: [PATCH 01/11] new token for testres.common --- setup.py | 2 +- tests/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 60e7963..8a11cfa 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ install_requires = [ "psutil", "six>=1.9.0", - "testgres.common @ git+https://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@github.com/postgrespro/testgres.common.git", + "testgres.common @ git+https://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@github.com/postgrespro/testgres.common.git", ] setup( diff --git a/tests/requirements.txt b/tests/requirements.txt index 05aefec..dd967cf 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,6 +2,6 @@ pytest pytest-xdist psutil six -git+https://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@github.com/postgrespro/testgres.common.git@master +git+https://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@github.com/postgrespro/testgres.common.git@master black flake8 From 17edd08381e17557543cdc0ef656256ccae9a6e9 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Mon, 22 Sep 2025 23:22:37 +0300 Subject: [PATCH 02/11] new token for testres.common --- setup.py | 2 +- tests/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8a11cfa..a30c0bb 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ install_requires = [ "psutil", "six>=1.9.0", - "testgres.common @ git+https://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@github.com/postgrespro/testgres.common.git", + "testgres.common @ git+https://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@github.com/postgrespro/testgres.common.git", ] setup( diff --git a/tests/requirements.txt b/tests/requirements.txt index dd967cf..4f058e2 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,6 +2,6 @@ pytest pytest-xdist psutil six -git+https://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@github.com/postgrespro/testgres.common.git@master +git+https://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@github.com/postgrespro/testgres.common.git@master black flake8 From 416c3c8d60608f8cf63df50284520eb342e04145 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Thu, 25 Sep 2025 23:00:13 +0300 Subject: [PATCH 03/11] [BUG] Bug in LocalOperations::rmdirs is fixed --- src/local_ops.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/local_ops.py b/src/local_ops.py index 1f9e26a..a55270b 100644 --- a/src/local_ops.py +++ b/src/local_ops.py @@ -333,24 +333,24 @@ def rmdirs(self, path, ignore_errors=True, attempts=3, delay=1): assert attempts > 0 assert delay >= 0 - attempt = 0 + a = 0 while True: - assert attempt < attempts - attempt += 1 + assert a < attempts + a += 1 try: rmtree(path) except FileNotFoundError: pass except Exception as e: - if attempt < attempt: + if a < attempts: errMsg = "Failed to remove directory {0} on attempt {1} ({2}): {3}".format( - path, attempt, type(e).__name__, e + path, a, type(e).__name__, e ) logging.warning(errMsg) time.sleep(delay) continue - assert attempt == attempts + assert a == attempts if not ignore_errors: raise From 242aaeab8d7bbf67f9e7d6db186ed186afa6e3ee Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Tue, 30 Sep 2025 12:02:01 +0300 Subject: [PATCH 04/11] testgres.common is public now. --- setup.py | 2 +- tests/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a30c0bb..f829748 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ install_requires = [ "psutil", "six>=1.9.0", - "testgres.common @ git+https://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@github.com/postgrespro/testgres.common.git", + "testgres.common @ git+https://github.com/postgrespro/testgres.common.git", ] setup( diff --git a/tests/requirements.txt b/tests/requirements.txt index 4f058e2..7bdda1b 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,6 +2,6 @@ pytest pytest-xdist psutil six -git+https://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@github.com/postgrespro/testgres.common.git@master +git+https://github.com/postgrespro/testgres.common.git@master black flake8 From 2ae53328f9d9abfd40dcfb25955c374cf3eba9e3 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Wed, 1 Oct 2025 00:16:39 +0300 Subject: [PATCH 05/11] exceptions: fixed typo (#290) [thanks to Maksim Korotkov] It is implied that command_s should be a string, but now it is a tuple due to a typo. Signed-off-by: Maksim Korotkov --- src/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exceptions.py b/src/exceptions.py index e1e0a9d..b5fb0d8 100644 --- a/src/exceptions.py +++ b/src/exceptions.py @@ -22,7 +22,7 @@ def __str__(self): msg.append(self.message) if self.command: - command_s = ' '.join(self.command) if isinstance(self.command, list) else self.command, + command_s = ' '.join(self.command) if isinstance(self.command, list) else self.command msg.append(u'Command: {}'.format(command_s)) if self.exit_code: From cd94551fcd9ac3ac98f3c3758241fe45016c437d Mon Sep 17 00:00:00 2001 From: vshepard Date: Thu, 23 Oct 2025 12:59:13 +0200 Subject: [PATCH 06/11] Prepare for pulish to PyPi --- setup.cfg | 2 +- setup.py | 2 +- src/__init__.py | 0 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 src/__init__.py diff --git a/setup.cfg b/setup.cfg index ba6a57f..0843c61 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,4 +3,4 @@ description-file = README.md [flake8] ignore = E501 -exclude = .git,__pycache__,env,venv,testgres/__init__.py +exclude = .git,__pycache__,env,venv diff --git a/setup.py b/setup.py index f829748..038d07e 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ install_requires = [ "psutil", "six>=1.9.0", - "testgres.common @ git+https://github.com/postgrespro/testgres.common.git", + "testgres.common==0.0.1", ] setup( diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..e69de29 From 7c1b242e90eda0731613b74cae2c4508a6f5d957 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Sat, 1 Nov 2025 12:08:33 +0300 Subject: [PATCH 07/11] Revert "Prepare for pulish to PyPi" (__init__.py) This reverts commit cd94551fcd9ac3ac98f3c3758241fe45016c437d. --- src/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/__init__.py diff --git a/src/__init__.py b/src/__init__.py deleted file mode 100644 index e69de29..0000000 From 3ffa6f45e144a9cc305fd1be4f3e3af33f696094 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Sat, 1 Nov 2025 12:10:43 +0300 Subject: [PATCH 08/11] req: testgres.common>=0.0.2,<1.0.0 --- setup.py | 2 +- tests/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 038d07e..91750f1 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ install_requires = [ "psutil", "six>=1.9.0", - "testgres.common==0.0.1", + "testgres.common>=0.0.2,<1.0.0", ] setup( diff --git a/tests/requirements.txt b/tests/requirements.txt index 7bdda1b..83532f5 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,6 +2,6 @@ pytest pytest-xdist psutil six -git+https://github.com/postgrespro/testgres.common.git@master +testgres.common>=0.0.2,<1.0.0 black flake8 From 023936a8dcec0612fd7a7c3e6aeb75216b7080ab Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Sat, 1 Nov 2025 14:55:41 +0300 Subject: [PATCH 09/11] setup.cfg is updated (description_file) --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 0843c61..dbf5638 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [metadata] -description-file = README.md +description_file = README.md [flake8] ignore = E501 From 900fe1bf74a3af8c9c2743ea1284c4fca1b4cdb0 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Sat, 1 Nov 2025 14:56:43 +0300 Subject: [PATCH 10/11] version 0.0.2 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 91750f1..116dbcf 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ ] setup( - version="0.0.1", + version="0.0.2", name="testgres.os_ops", packages=[ "testgres.operations", From 4bbbcd141a383d5a010aa69a84da28005f1d3fcb Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Sat, 1 Nov 2025 15:48:01 +0300 Subject: [PATCH 11/11] setup.py is updated (readme) --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 116dbcf..2e6905f 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,10 @@ except ImportError: from distutils.core import setup +# Get contents of README file +with open("README.md", "r") as f: + readme = f.read() + # Basic dependencies install_requires = [ "psutil", @@ -19,6 +23,7 @@ package_dir={"testgres.operations": "src"}, description='Testgres subsystem to work with OS', url='https://github.com/postgrespro/testgres.os_ops', + long_description=readme, long_description_content_type='text/markdown', license='PostgreSQL', author='Postgres Professional',