This is an automated email from the ASF dual-hosted git repository. snazy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push: new b55b4e78e Poetry v2 (#898) b55b4e78e is described below commit b55b4e78e95b91a85d17c45491f77404f909b657 Author: MonkeyCanCode <yongzheng0...@gmail.com> AuthorDate: Tue May 6 10:05:24 2025 -0500 Poetry v2 (#898) * PEP 621 and Poetry v2 * PEP 621 and Poetry v2 * Update min python to 3.9 * Add back flask8 for #1096 --- client/python/.gitlab-ci.yml | 49 ------------------------- client/python/.travis.yml | 35 ------------------ client/python/pyproject.toml | 85 +++++++++++++------------------------------- client/python/setup.cfg | 21 ----------- client/python/setup.py | 67 ---------------------------------- regtests/pyspark-setup.sh | 3 +- regtests/requirements.txt | 2 +- 7 files changed, 27 insertions(+), 235 deletions(-) diff --git a/client/python/.gitlab-ci.yml b/client/python/.gitlab-ci.yml deleted file mode 100644 index 3931b47b7..000000000 --- a/client/python/.gitlab-ci.yml +++ /dev/null @@ -1,49 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=polaris.catalog - -pytest-3.7: - extends: .pytest - image: python:3.13-alpine -pytest-3.8: - extends: .pytest - image: python:3.13-alpine -pytest-3.9: - extends: .pytest - image: python:3.13-alpine -pytest-3.10: - extends: .pytest - image: python:3.13-alpine -pytest-3.11: - extends: .pytest - image: python:3.13-alpine diff --git a/client/python/.travis.yml b/client/python/.travis.yml deleted file mode 100644 index c97e71ecc..000000000 --- a/client/python/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - # uncomment the following if needed - #- "3.11-dev" # 3.11 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=polaris.catalog diff --git a/client/python/pyproject.toml b/client/python/pyproject.toml index 2dc6b3e11..ec269676c 100644 --- a/client/python/pyproject.toml +++ b/client/python/pyproject.toml @@ -17,75 +17,38 @@ # under the License. # -[tool.poetry] +[project] name = "polaris" version = "1.0.0" description = "Apache Polaris Management Service" -authors = ["Apache Software Foundation <d...@polaris.apache.org>"] -license = "Apache License 2.0" +authors = [ + {name = "Apache Software Foundation", email = "d...@polaris.apache.org"} +] readme = "README.md" -repository = "https://github.com/apache/polaris/" +requires-python = ">=3.9,<4.0" +license = "Apache-2.0" keywords = ["Polaris", "Polaris Management Service"] -include = ["polaris.management/py.typed"] -package-mode = true +dynamic = ["classifiers"] +dependencies = [ + "urllib3>=1.25.3,<2.0", + "python-dateutil>=2.8.2", + "pydantic>=2.0.0", + "typing-extensions>=4.7.1", + "boto3==1.37.37", +] -[tool.poetry.dependencies] -python = "^3.8" +[project.urls] +homepage = "https://polaris.apache.org/" +repository = "https://github.com/apache/polaris/" -urllib3 = "^1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" -boto3 = "==1.37.37" +[tool.poetry] +requires-poetry = ">=2.1" +packages = [{ include = "polaris" }] -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" +[tool.poetry.group.test.dependencies] flake8 = ">=4.0.0" -types-python-dateutil = ">=2.8.19.14" -mypy = "1.14.1" - +pytest = ">=7.2.1" [build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" - -[tool.mypy] -files = [ - "polaris", - #"test", # auto-generated tests - "tests", # hand-written tests -] -# TODO: enable "strict" once all these individual checks are passing -# strict = true - -# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options -warn_unused_configs = true -warn_redundant_casts = true -warn_unused_ignores = true - -## Getting these passing should be easy -strict_equality = true -strict_concatenate = true - -## Strongly recommend enabling this one as soon as you can -check_untyped_defs = true - -## These shouldn't be too much additional work, but may be tricky to -## get passing if you use a lot of untyped libraries -disallow_subclassing_any = true -disallow_untyped_decorators = true -disallow_any_generics = true - -### These next few are various gradations of forcing use of type annotations -#disallow_untyped_calls = true -#disallow_incomplete_defs = true -#disallow_untyped_defs = true -# -### This one isn't too hard to get passing, but return on investment is lower -#no_implicit_reexport = true -# -### This one can be tricky to get passing if you use a lot of untyped libraries -#warn_return_any = true +requires = ["poetry-core>=2.0.0,<3.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/client/python/setup.cfg b/client/python/setup.cfg deleted file mode 100644 index ec48b3de4..000000000 --- a/client/python/setup.cfg +++ /dev/null @@ -1,21 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -[flake8] -max-line-length=99 diff --git a/client/python/setup.py b/client/python/setup.py deleted file mode 100644 index 60f6cb2dc..000000000 --- a/client/python/setup.py +++ /dev/null @@ -1,67 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# coding: utf-8 - -""" - Polaris Management Service - - Defines the management APIs for using Polaris to create and manage Iceberg catalogs and their principals - - The version of the OpenAPI document: 0.0.1 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "polaris.management" -VERSION = "1.0.0" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Polaris Management Service", - author="OpenAPI Generator community", - author_email="t...@openapitools.org", - url="", - keywords=["OpenAPI", "OpenAPI-Generator", "Polaris Management Service"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - Defines the management APIs for using Polaris to create and manage Iceberg catalogs and their principals - """, # noqa: E501 - package_data={"polaris.management": ["py.typed"]}, -) diff --git a/regtests/pyspark-setup.sh b/regtests/pyspark-setup.sh index 5033e589d..6a313b319 100755 --- a/regtests/pyspark-setup.sh +++ b/regtests/pyspark-setup.sh @@ -27,5 +27,6 @@ fi pip install -r requirements.txt cd ../client/python -python3 -m poetry install +python3 -m poetry install --with test + deactivate diff --git a/regtests/requirements.txt b/regtests/requirements.txt index 1beb63bca..6e4d46f3f 100644 --- a/regtests/requirements.txt +++ b/regtests/requirements.txt @@ -17,4 +17,4 @@ # under the License. # -poetry==1.8.5 +poetry==2.1.1