diff --git a/CHANGELOG.md b/CHANGELOG.md index 69ac112..e40f5a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,8 +25,11 @@ For reference, the possible headings are: * **Known Issues** * **Notes** +## [Unreleased] - 2023-15-02 +* **Changed** migrated dependency management to poetry + ## [2.2.3] - 2023-14-02 -* **fixed** fixed voting/election backward compatibility issue (using planetmint-transactions >= 0.7.0) on the 2.2 main branch +* **Fixed** fixed voting/election backward compatibility issue (using planetmint-transactions >= 0.7.0) on the 2.2 main branch ## [2.2.2] - 2023-31-01 * **Fixed** catching tarantool exceptions in case tarantool drivers throw execeptions due to concurrency issues. This issue got idenitfied during the testing of the planetmint-driver-ts. diff --git a/Dockerfile b/Dockerfile index 2f55c19..cf552cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,5 +32,5 @@ ENV PLANETMINT_CI_ABCI ${abci_status} RUN mkdir -p /usr/src/app COPY . /usr/src/app/ WORKDIR /usr/src/app -RUN pip install -e .[dev] -RUN pip install flask-cors +RUN pip install poetry +RUN poetry install --with dev diff --git a/Dockerfile-dev b/Dockerfile-dev index 2f55c19..cf552cd 100644 --- a/Dockerfile-dev +++ b/Dockerfile-dev @@ -32,5 +32,5 @@ ENV PLANETMINT_CI_ABCI ${abci_status} RUN mkdir -p /usr/src/app COPY . /usr/src/app/ WORKDIR /usr/src/app -RUN pip install -e .[dev] -RUN pip install flask-cors +RUN pip install poetry +RUN poetry install --with dev diff --git a/poetry.lock b/poetry.lock index 7456f09..f51d5cd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -630,7 +630,7 @@ files = [ cffi = ">=1.12" [package.extras] -docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx_rtd_theme"] +docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] docstest = ["doc8", "pyenchant (>=1.6.11)", "sphinxcontrib-spelling (>=4.0.1)", "twine (>=1.12.0)"] pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] sdist = ["setuptools-rust (>=0.11.4)"] @@ -1783,14 +1783,14 @@ sha3 = ["pysha3"] [[package]] name = "planetmint-transactions" -version = "0.6.0" +version = "0.7.0" description = "Python implementation of the planetmint transactions spec" category = "main" optional = false python-versions = ">=3.9,<4.0" files = [ - {file = "planetmint_transactions-0.6.0-py3-none-any.whl", hash = "sha256:a181cd13c26f0f97cf86629ad2bb3b8c2037f809f7d08b0d214568ba751caa88"}, - {file = "planetmint_transactions-0.6.0.tar.gz", hash = "sha256:974d59d5df91ee1d95f1a2f5919dbbba2f8fd4364ddacc5545a4ebc424fd5b71"}, + {file = "planetmint_transactions-0.7.0-py3-none-any.whl", hash = "sha256:a665cfe300fc0701cbde4f14f60de0af3d7fdf5e38eac3b6cae3224dd1e947d4"}, + {file = "planetmint_transactions-0.7.0.tar.gz", hash = "sha256:33acceb3bb181db3bc3490f9f2aac5e5a5bf358e9ba3cad87885e92b9d7013cc"}, ] [package.dependencies] @@ -2019,18 +2019,7 @@ category = "main" optional = false python-versions = "*" files = [ - {file = "pyasn1-0.4.8-py2.4.egg", hash = "sha256:fec3e9d8e36808a28efb59b489e4528c10ad0f480e57dcc32b4de5c9d8c9fdf3"}, - {file = "pyasn1-0.4.8-py2.5.egg", hash = "sha256:0458773cfe65b153891ac249bcf1b5f8f320b7c2ce462151f8fa74de8934becf"}, - {file = "pyasn1-0.4.8-py2.6.egg", hash = "sha256:5c9414dcfede6e441f7e8f81b43b34e834731003427e5b09e4e00e3172a10f00"}, - {file = "pyasn1-0.4.8-py2.7.egg", hash = "sha256:6e7545f1a61025a4e58bb336952c5061697da694db1cae97b116e9c46abcf7c8"}, {file = "pyasn1-0.4.8-py2.py3-none-any.whl", hash = "sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d"}, - {file = "pyasn1-0.4.8-py3.1.egg", hash = "sha256:78fa6da68ed2727915c4767bb386ab32cdba863caa7dbe473eaae45f9959da86"}, - {file = "pyasn1-0.4.8-py3.2.egg", hash = "sha256:08c3c53b75eaa48d71cf8c710312316392ed40899cb34710d092e96745a358b7"}, - {file = "pyasn1-0.4.8-py3.3.egg", hash = "sha256:03840c999ba71680a131cfaee6fab142e1ed9bbd9c693e285cc6aca0d555e576"}, - {file = "pyasn1-0.4.8-py3.4.egg", hash = "sha256:7ab8a544af125fb704feadb008c99a88805126fb525280b2270bb25cc1d78a12"}, - {file = "pyasn1-0.4.8-py3.5.egg", hash = "sha256:e89bf84b5437b532b0803ba5c9a5e054d21fec423a89952a74f87fa2c9b7bce2"}, - {file = "pyasn1-0.4.8-py3.6.egg", hash = "sha256:014c0e9976956a08139dc0712ae195324a75e142284d5f87f1a87ee1b068a359"}, - {file = "pyasn1-0.4.8-py3.7.egg", hash = "sha256:99fcc3c8d804d1bc6d9a099921e39d827026409a58f2a720dcdb89374ea0c776"}, {file = "pyasn1-0.4.8.tar.gz", hash = "sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba"}, ] @@ -2128,7 +2117,6 @@ files = [ {file = "pymongo-3.11.4-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:ad31f184dcd3271de26ab1f9c51574afb99e1b0e484ab1da3641256b723e4994"}, {file = "pymongo-3.11.4-cp39-cp39-win32.whl", hash = "sha256:5e606846c049ed40940524057bfdf1105af6066688c0e6a1a3ce2038589bae70"}, {file = "pymongo-3.11.4-cp39-cp39-win_amd64.whl", hash = "sha256:3491c7de09e44eded16824cb58cf9b5cc1dc6f066a0bb7aa69929d02aa53b828"}, - {file = "pymongo-3.11.4-py2.7-macosx-10.14-intel.egg", hash = "sha256:506a6dab4c7ffdcacdf0b8e70bd20eb2e77fa994519547c9d88d676400fcad58"}, {file = "pymongo-3.11.4.tar.gz", hash = "sha256:539d4cb1b16b57026999c53e5aab857fe706e70ae5310cc8c232479923f932e6"}, ] @@ -2175,7 +2163,7 @@ cffi = ">=1.4.1" six = "*" [package.extras] -docs = ["sphinx (>=1.6.5)", "sphinx_rtd_theme"] +docs = ["sphinx (>=1.6.5)", "sphinx-rtd-theme"] tests = ["hypothesis (>=3.27.0)", "pytest (>=3.2.1,!=3.3.0)"] [[package]] @@ -3308,4 +3296,4 @@ testing = ["func-timeout", "jaraco.itertools", "pytest (>=6)", "pytest-black (>= [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "4a4fa3c7e175c562625651710adcc30047d0651ef92d7ff741f0b56dab2566e5" +content-hash = "a899d074fc76585196c67770560b14ce6a4ac3ec329783cef27abcef3f442f08" diff --git a/pyproject.toml b/pyproject.toml index 52e9f2d..743d4bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ protobuf = "3.20.2" planetmint-ipld = ">=0.0.3" pyasn1 = ">=0.4.8" python-decouple = "^3.7" -planetmint-transactions = ">=0.6.0" +planetmint-transactions = ">=0.7.0" [tool.poetry.group.dev.dependencies] aafigure = "0.6" diff --git a/setup.py b/setup.py deleted file mode 100644 index 411f423..0000000 --- a/setup.py +++ /dev/null @@ -1,180 +0,0 @@ -# Copyright © 2020 Interplanetary Database Association e.V., -# Planetmint and IPDB software contributors. -# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) -# Code is Apache-2.0 and docs are CC-BY-4.0 - -""" -Planetmint: The Blockchain Database - -For full docs visit https://docs.planetmint.com - -""" - -import sys -from setuptools import setup, find_packages - -if sys.version_info < (3, 9): - sys.exit("Please use Python version 3.9 or higher.") - -with open("README.md") as readme_file: - readme = readme_file.read() - -# get the version -version = {} -with open("planetmint/version.py") as fp: - exec(fp.read(), version) - - -def check_setuptools_features(): - """Check if setuptools is up to date.""" - import pkg_resources - - try: - list(pkg_resources.parse_requirements("foo~=1.0")) - except ValueError: - sys.exit( - "Your Python distribution comes with an incompatible version " - "of `setuptools`. Please run:\n" - " $ pip3 install --upgrade setuptools\n" - "and then run this command again" - ) - - -import pathlib -import pkg_resources - -docs_require = [ - "aafigure==0.6", - "alabaster==0.7.12", - "Babel==2.10.1", - "certifi==2022.12.7", - "charset-normalizer==2.0.12", - "commonmark==0.9.1", - "docutils==0.17.1", - "idna==2.10", # version conflict with requests lib (required version <3) - "imagesize==1.3.0", - "importlib-metadata==4.11.3", - "Jinja2==3.0.0", - "markdown-it-py==2.1.0", - "MarkupSafe==2.1.1", - "mdit-py-plugins==0.3.0", - "mdurl==0.1.1", - "myst-parser==0.17.2", - "packaging>=22.0", - "pockets==0.9.1", - "Pygments==2.12.0", - "pyparsing==3.0.8", - "pytz==2022.1", - "PyYAML>=5.4.0", - "requests>=2.25.1", - "six==1.16.0", - "snowballstemmer==2.2.0", - "Sphinx==4.5.0", - "sphinx-rtd-theme==1.0.0", - "sphinxcontrib-applehelp==1.0.2", - "sphinxcontrib-devhelp==1.0.2", - "sphinxcontrib-htmlhelp==2.0.0", - "sphinxcontrib-httpdomain==1.8.0", - "sphinxcontrib-jsmath==1.0.1", - "sphinxcontrib-napoleon==0.7", - "sphinxcontrib-qthelp==1.0.3", - "sphinxcontrib-serializinghtml==1.1.5", - "urllib3==1.26.9", - "wget==3.2", - "zipp==3.8.0", - "nest-asyncio==1.5.5", - "sphinx-press-theme==0.8.0", - "sphinx-documatt-theme", -] - -check_setuptools_features() - -dev_require = ["ipdb", "ipython", "watchdog", "logging_tree", "pre-commit", "twine", "ptvsd"] - -tests_require = [ - "coverage", - "pep8", - "black>=23.1.0", - "hypothesis>=5.3.0", - "pytest>=3.0.0", - "pytest-cov==2.8.1", - "pytest-mock", - "pytest-xdist", - "pytest-flask", - "pytest-aiohttp", - "pytest-asyncio", -] + docs_require - -install_requires = [ - "chardet==3.0.4", - "base58==2.1.1", - "aiohttp==3.8.1", - "abci==0.8.3", - "flask-cors==3.0.10", - "flask-restful==0.3.9", - "flask==2.1.2", - "gunicorn==20.1.0", - "jsonschema==4.16.0", - "logstats==0.3.0", - "packaging>=22.0", - "pymongo==3.11.4", - "tarantool==0.7.1", - "python-rapidjson>=1.0", - "pyyaml==6.0.0", - "requests==2.25.1", - "setproctitle==1.2.2", - "werkzeug==2.0.3", - "nest-asyncio==1.5.5", - "protobuf==3.20.2", - "planetmint-ipld>=0.0.3", - "pyasn1>=0.4.8", - "python-decouple", - "planetmint-transactions>=0.7.0", -] - -setup( - name="Planetmint", - version=version["__version__"], - description="Planetmint: The Blockchain Database", - long_description=readme, - long_description_content_type="text/markdown", - url="https://github.com/Planetmint/planetmint/", - author="Planetmint Contributors", - author_email="contact@ipdb.global", - license="AGPLv3", - zip_safe=False, - python_requires=">=3.9", - classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Topic :: Database", - "Topic :: Database :: Database Engines/Servers", - "Topic :: Software Development", - "Natural Language :: English", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3.9", - "Operating System :: MacOS :: MacOS X", - "Operating System :: POSIX :: Linux", - ], - packages=find_packages(exclude=["tests*"]), - scripts=["pkg/scripts/planetmint-monit-config"], - entry_points={ - "console_scripts": ["planetmint=planetmint.commands.planetmint:main"], - }, - install_requires=install_requires, - setup_requires=["pytest-runner"], - tests_require=tests_require, - extras_require={ - "test": tests_require, - "dev": dev_require + tests_require + docs_require, - "docs": docs_require, - }, - package_data={ - "transactions.common.schema": [ - "v1.0/*.yaml", - "v2.0/*.yaml", - "v3.0/*.yaml", - ], - "planetmint.backend.tarantool": ["*.lua"], - }, -)