Skip to content

Commit b55b4e7

Browse files
Poetry v2 (apache#898)
* PEP 621 and Poetry v2 * PEP 621 and Poetry v2 * Update min python to 3.9 * Add back flask8 for apache#1096
1 parent 4d0f258 commit b55b4e7

File tree

7 files changed

+27
-235
lines changed

7 files changed

+27
-235
lines changed

client/python/.gitlab-ci.yml

-49
This file was deleted.

client/python/.travis.yml

-35
This file was deleted.

client/python/pyproject.toml

+24-61
Original file line numberDiff line numberDiff line change
@@ -17,75 +17,38 @@
1717
# under the License.
1818
#
1919

20-
[tool.poetry]
20+
[project]
2121
name = "polaris"
2222
version = "1.0.0"
2323
description = "Apache Polaris Management Service"
24-
authors = ["Apache Software Foundation <[email protected]>"]
25-
license = "Apache License 2.0"
24+
authors = [
25+
{name = "Apache Software Foundation", email = "[email protected]"}
26+
]
2627
readme = "README.md"
27-
repository = "https://github.com/apache/polaris/"
28+
requires-python = ">=3.9,<4.0"
29+
license = "Apache-2.0"
2830
keywords = ["Polaris", "Polaris Management Service"]
29-
include = ["polaris.management/py.typed"]
30-
package-mode = true
31+
dynamic = ["classifiers"]
32+
dependencies = [
33+
"urllib3>=1.25.3,<2.0",
34+
"python-dateutil>=2.8.2",
35+
"pydantic>=2.0.0",
36+
"typing-extensions>=4.7.1",
37+
"boto3==1.37.37",
38+
]
3139

32-
[tool.poetry.dependencies]
33-
python = "^3.8"
40+
[project.urls]
41+
homepage = "https://polaris.apache.org/"
42+
repository = "https://github.com/apache/polaris/"
3443

35-
urllib3 = "^1.25.3"
36-
python-dateutil = ">=2.8.2"
37-
pydantic = ">=2"
38-
typing-extensions = ">=4.7.1"
39-
boto3 = "==1.37.37"
44+
[tool.poetry]
45+
requires-poetry = ">=2.1"
46+
packages = [{ include = "polaris" }]
4047

41-
[tool.poetry.dev-dependencies]
42-
pytest = ">=7.2.1"
48+
[tool.poetry.group.test.dependencies]
4349
flake8 = ">=4.0.0"
44-
types-python-dateutil = ">=2.8.19.14"
45-
mypy = "1.14.1"
46-
50+
pytest = ">=7.2.1"
4751

4852
[build-system]
49-
requires = ["setuptools"]
50-
build-backend = "setuptools.build_meta"
51-
52-
[tool.pylint.'MESSAGES CONTROL']
53-
extension-pkg-whitelist = "pydantic"
54-
55-
[tool.mypy]
56-
files = [
57-
"polaris",
58-
#"test", # auto-generated tests
59-
"tests", # hand-written tests
60-
]
61-
# TODO: enable "strict" once all these individual checks are passing
62-
# strict = true
63-
64-
# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
65-
warn_unused_configs = true
66-
warn_redundant_casts = true
67-
warn_unused_ignores = true
68-
69-
## Getting these passing should be easy
70-
strict_equality = true
71-
strict_concatenate = true
72-
73-
## Strongly recommend enabling this one as soon as you can
74-
check_untyped_defs = true
75-
76-
## These shouldn't be too much additional work, but may be tricky to
77-
## get passing if you use a lot of untyped libraries
78-
disallow_subclassing_any = true
79-
disallow_untyped_decorators = true
80-
disallow_any_generics = true
81-
82-
### These next few are various gradations of forcing use of type annotations
83-
#disallow_untyped_calls = true
84-
#disallow_incomplete_defs = true
85-
#disallow_untyped_defs = true
86-
#
87-
### This one isn't too hard to get passing, but return on investment is lower
88-
#no_implicit_reexport = true
89-
#
90-
### This one can be tricky to get passing if you use a lot of untyped libraries
91-
#warn_return_any = true
53+
requires = ["poetry-core>=2.0.0,<3.0.0"]
54+
build-backend = "poetry.core.masonry.api"

client/python/setup.cfg

-21
This file was deleted.

client/python/setup.py

-67
This file was deleted.

regtests/pyspark-setup.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ fi
2727
pip install -r requirements.txt
2828

2929
cd ../client/python
30-
python3 -m poetry install
30+
python3 -m poetry install --with test
31+
3132
deactivate

regtests/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
# under the License.
1818
#
1919

20-
poetry==1.8.5
20+
poetry==2.1.1

0 commit comments

Comments
 (0)