testgres.common 0.0.3__tar.gz → 1.0.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.
@@ -0,0 +1,9 @@
1
+ testgres is released under the PostgreSQL License, a liberal Open Source license, similar to the BSD or MIT licenses.
2
+
3
+ Copyright (c) 2016-2026, Postgres Professional
4
+
5
+ Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.
6
+
7
+ IN NO EVENT SHALL POSTGRES PROFESSIONAL BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF POSTGRES PROFESSIONAL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8
+
9
+ POSTGRES PROFESSIONAL SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND POSTGRES PROFESSIONAL HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.4
2
+ Name: testgres.common
3
+ Version: 1.0.0
4
+ Summary: Testgres common code
5
+ Author-email: Postgres Professional <testgres@postgrespro.ru>
6
+ License: PostgreSQL
7
+ Project-URL: HomePage, https://github.com/postgrespro/testgres.common
8
+ Keywords: testgres
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Operating System :: Unix
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Classifier: Topic :: Software Development :: Testing
22
+ Requires-Python: >=3.7.17
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Dynamic: license-file
26
+
27
+ [![Build Status](https://app.travis-ci.com/postgrespro/testgres.common.svg?token=HgEMhyw9n7RCQkHCis4T&branch=master)](https://app.travis-ci.com/postgrespro/testgres.common)
28
+ [![PyPI package version](https://badge.fury.io/py/testgres_common.svg)](https://badge.fury.io/py/testgres.common)
29
+ [![PyPI python versions](https://img.shields.io/pypi/pyversions/testgres_common)](https://pypi.org/project/testgres.common)
30
+ [![PyPI downloads](https://img.shields.io/pypi/dm/testgres_common)](https://pypi.org/project/testgres.common)
31
+
32
+ # testgres - common
33
+
34
+ Common code of testgres.
35
+
36
+ ## Authors
37
+
38
+ [Postgres Professional](https://postgrespro.ru/about)
@@ -0,0 +1,12 @@
1
+ [![Build Status](https://app.travis-ci.com/postgrespro/testgres.common.svg?token=HgEMhyw9n7RCQkHCis4T&branch=master)](https://app.travis-ci.com/postgrespro/testgres.common)
2
+ [![PyPI package version](https://badge.fury.io/py/testgres_common.svg)](https://badge.fury.io/py/testgres.common)
3
+ [![PyPI python versions](https://img.shields.io/pypi/pyversions/testgres_common)](https://pypi.org/project/testgres.common)
4
+ [![PyPI downloads](https://img.shields.io/pypi/dm/testgres_common)](https://pypi.org/project/testgres.common)
5
+
6
+ # testgres - common
7
+
8
+ Common code of testgres.
9
+
10
+ ## Authors
11
+
12
+ [Postgres Professional](https://postgrespro.ru/about)
@@ -0,0 +1,53 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [tool.setuptools.package-dir]
6
+ "testgres.common" = "src"
7
+
8
+ [tool.flake8]
9
+ extend-ignore = ["E501"]
10
+ exclude = [".git", "__pycache__", "env", "venv"]
11
+
12
+ [project]
13
+ name = "testgres.common"
14
+ version = "1.0.0"
15
+
16
+ description = "Testgres common code"
17
+ readme = "README.md"
18
+
19
+ # [2026-01-05]
20
+ # This old format is used to ensure compatibility with Python 3.7.
21
+ license = {text = "PostgreSQL"}
22
+
23
+ authors = [
24
+ {name = "Postgres Professional", email = "testgres@postgrespro.ru"},
25
+ ]
26
+
27
+ keywords = [
28
+ 'testgres',
29
+ ]
30
+
31
+ requires-python = ">=3.7.17"
32
+
33
+ classifiers = [
34
+ "Intended Audience :: Developers",
35
+ "Operating System :: Unix",
36
+ "Programming Language :: Python :: 3 :: Only",
37
+ "Programming Language :: Python :: 3.7",
38
+ "Programming Language :: Python :: 3.8",
39
+ "Programming Language :: Python :: 3.9",
40
+ "Programming Language :: Python :: 3.10",
41
+ "Programming Language :: Python :: 3.11",
42
+ "Programming Language :: Python :: 3.12",
43
+ "Programming Language :: Python :: 3.13",
44
+ "Programming Language :: Python :: 3.14",
45
+ "Topic :: Software Development :: Libraries",
46
+ "Topic :: Software Development :: Testing",
47
+ ]
48
+
49
+ dependencies = [
50
+ ]
51
+
52
+ [project.urls]
53
+ "HomePage" = "https://github.com/postgrespro/testgres.common"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,56 @@
1
+ # coding: utf-8
2
+ import typing
3
+
4
+
5
+ class TestgresException(Exception):
6
+ @property
7
+ def message(self) -> str:
8
+ assert isinstance(self, TestgresException)
9
+ r = super().__str__()
10
+ assert r is not None
11
+ assert type(r) == str # noqa: E721
12
+ return r
13
+
14
+ @property
15
+ def source(self) -> typing.Optional[str]:
16
+ assert isinstance(self, TestgresException)
17
+ return None
18
+
19
+ def __str__(self) -> str:
20
+ r = self.message
21
+ assert type(r) == str # noqa: E721
22
+ return r
23
+
24
+
25
+ class InvalidOperationException(TestgresException):
26
+ _message: str
27
+ _source: typing.Optional[str]
28
+
29
+ def __init__(self, message: str, source: typing.Optional[str] = None):
30
+ assert type(message) == str # noqa: E721
31
+ assert source is None or type(source) == str # noqa: E721
32
+ super().__init__()
33
+ self._message = message
34
+ self._source = source
35
+ return
36
+
37
+ @property
38
+ def message(self) -> str:
39
+ assert type(self._message) == str # noqa: E721
40
+ return self._message
41
+
42
+ @property
43
+ def source(self) -> str:
44
+ assert self._source is None or type(self._source) == str # noqa: E721
45
+ return self._source
46
+
47
+ def __repr__(self) -> str:
48
+ # It must be overrided!
49
+ assert type(self) == InvalidOperationException # noqa: E721
50
+ r = "{}({}, {})".format(
51
+ __class__.__name__,
52
+ repr(self._message),
53
+ repr(self._source),
54
+ )
55
+ assert type(r) == str # noqa: E721
56
+ return r
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.4
2
+ Name: testgres.common
3
+ Version: 1.0.0
4
+ Summary: Testgres common code
5
+ Author-email: Postgres Professional <testgres@postgrespro.ru>
6
+ License: PostgreSQL
7
+ Project-URL: HomePage, https://github.com/postgrespro/testgres.common
8
+ Keywords: testgres
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Operating System :: Unix
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Classifier: Topic :: Software Development :: Testing
22
+ Requires-Python: >=3.7.17
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Dynamic: license-file
26
+
27
+ [![Build Status](https://app.travis-ci.com/postgrespro/testgres.common.svg?token=HgEMhyw9n7RCQkHCis4T&branch=master)](https://app.travis-ci.com/postgrespro/testgres.common)
28
+ [![PyPI package version](https://badge.fury.io/py/testgres_common.svg)](https://badge.fury.io/py/testgres.common)
29
+ [![PyPI python versions](https://img.shields.io/pypi/pyversions/testgres_common)](https://pypi.org/project/testgres.common)
30
+ [![PyPI downloads](https://img.shields.io/pypi/dm/testgres_common)](https://pypi.org/project/testgres.common)
31
+
32
+ # testgres - common
33
+
34
+ Common code of testgres.
35
+
36
+ ## Authors
37
+
38
+ [Postgres Professional](https://postgrespro.ru/about)
@@ -1,6 +1,6 @@
1
+ LICENSE
1
2
  README.md
2
- setup.cfg
3
- setup.py
3
+ pyproject.toml
4
4
  src/exceptions.py
5
5
  testgres.common.egg-info/PKG-INFO
6
6
  testgres.common.egg-info/SOURCES.txt
@@ -1,26 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: testgres.common
3
- Version: 0.0.3
4
- Summary: Testgres common code
5
- Home-page: https://github.com/postgrespro/testgres.common
6
- Author: Postgres Professional
7
- Author-email: testgres@postgrespro.ru
8
- License: PostgreSQL
9
- Keywords: testgres
10
- Description-Content-Type: text/markdown
11
- Dynamic: author
12
- Dynamic: author-email
13
- Dynamic: description
14
- Dynamic: description-content-type
15
- Dynamic: home-page
16
- Dynamic: keywords
17
- Dynamic: license
18
- Dynamic: summary
19
-
20
- # testgres - common
21
-
22
- Common code of testgres.
23
-
24
- ## Authors
25
-
26
- [Postgres Professional](https://postgrespro.ru/about)
@@ -1,7 +0,0 @@
1
- # testgres - common
2
-
3
- Common code of testgres.
4
-
5
- ## Authors
6
-
7
- [Postgres Professional](https://postgrespro.ru/about)
@@ -1,11 +0,0 @@
1
- [metadata]
2
- description_file = README.md
3
-
4
- [flake8]
5
- ignore = E501
6
- exclude = .git,__pycache__,env,venv
7
-
8
- [egg_info]
9
- tag_build =
10
- tag_date = 0
11
-
@@ -1,25 +0,0 @@
1
- try:
2
- from setuptools import setup
3
- except ImportError:
4
- from distutils.core import setup
5
-
6
- # Get contents of README file
7
- with open("README.md", "r") as f:
8
- readme = f.read()
9
-
10
- setup(
11
- version="0.0.3",
12
- name="testgres.common",
13
- packages=[
14
- "testgres.common",
15
- ],
16
- package_dir={"testgres.common": "src"},
17
- description='Testgres common code',
18
- url='https://github.com/postgrespro/testgres.common',
19
- long_description=readme,
20
- long_description_content_type='text/markdown',
21
- license='PostgreSQL',
22
- author='Postgres Professional',
23
- author_email='testgres@postgrespro.ru',
24
- keywords=['testgres'],
25
- )
@@ -1,10 +0,0 @@
1
- # coding: utf-8
2
-
3
-
4
- class TestgresException(Exception):
5
- pass
6
-
7
-
8
- class InvalidOperationException(TestgresException):
9
- pass
10
-
@@ -1,26 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: testgres.common
3
- Version: 0.0.3
4
- Summary: Testgres common code
5
- Home-page: https://github.com/postgrespro/testgres.common
6
- Author: Postgres Professional
7
- Author-email: testgres@postgrespro.ru
8
- License: PostgreSQL
9
- Keywords: testgres
10
- Description-Content-Type: text/markdown
11
- Dynamic: author
12
- Dynamic: author-email
13
- Dynamic: description
14
- Dynamic: description-content-type
15
- Dynamic: home-page
16
- Dynamic: keywords
17
- Dynamic: license
18
- Dynamic: summary
19
-
20
- # testgres - common
21
-
22
- Common code of testgres.
23
-
24
- ## Authors
25
-
26
- [Postgres Professional](https://postgrespro.ru/about)