diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 95ee9dce62..723f21b6fa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -55,7 +55,6 @@ jobs: # NOTE: We need to use full Python version as part of Python deps cache key otherwise # setup virtualenv step will fail. python: - - {version-short: '3.8', version: '3.8.18'} - {version-short: '3.9', version: '3.9.21'} - {version-short: '3.10', version: '3.10.16'} - {version-short: '3.11', version: '3.11.11'} @@ -117,7 +116,7 @@ jobs: fail-fast: false matrix: python: - - {version-short: '3.8', version: '3.8.18'} + - {version-short: '3.10', version: '3.10.16'} services: mongo: image: mongo:7.0 @@ -231,13 +230,6 @@ jobs: ln -s ${GITHUB_WORKSPACE}/virtualenv/bin/st2 /usr/local/bin/st2 ln -s ${GITHUB_WORKSPACE}/st2common/bin/st2-run-pack-tests /usr/local/bin/st2-run-pack-tests - - name: Install st2client - timeout-minutes: 5 - run: | - cd ./st2client - pip3 install --upgrade pip - python3 setup.py develop - - name: Run self-verification script env: ST2_CONF: /home/runner/work/st2/st2/conf/st2.ci.conf @@ -272,7 +264,6 @@ jobs: # NOTE: To speed the CI run, we split unit and integration tests into multiple jobs where # each job runs subset of tests. python: - - {version-short: '3.8', version: '3.8.18'} - {version-short: '3.9', version: '3.9.21'} - {version-short: '3.10', version: '3.10.16'} - {version-short: '3.11', version: '3.11.11'} @@ -408,7 +399,7 @@ jobs: # NOTE: We only generate and submit coverage report for master and version branches and # only when the build succeeds (default on GitHub Actions, this was not the case on Travis # so we had to explicitly check success) - if: "${{ success() && (env.ENABLE_COVERAGE == 'yes') && (env.PYTHON_VERSION_SHORT == '3.8')}}" + if: "${{ success() && (env.ENABLE_COVERAGE == 'yes') && (env.PYTHON_VERSION_SHORT == '3.10')}}" run: | ./scripts/ci/submit-codecov-coverage.sh env: @@ -427,7 +418,6 @@ jobs: # NOTE: To speed-up the CI run, we split unit and integration tests into multiple jobs where # each job runs subset of tests. python: - - {version-short: '3.8', version: '3.8.18'} - {version-short: '3.9', version: '3.9.21'} - {version-short: '3.10', version: '3.10.16'} - {version-short: '3.11', version: '3.11.11'} @@ -577,7 +567,7 @@ jobs: - name: Codecov # NOTE: We only generate and submit coverage report for master and version branches and only when the build succeeds (default on GitHub Actions, this was not the case on Travis so we had to explicitly check success) - if: "${{ success() && (env.ENABLE_COVERAGE == 'yes') && (env.TASK == 'ci-integration') && (env.PYTHON_VERSION_SHORT == '3.8')}}" + if: "${{ success() && (env.ENABLE_COVERAGE == 'yes') && (env.TASK == 'ci-integration') && (env.PYTHON_VERSION_SHORT == '3.10')}}" run: | ./scripts/ci/submit-codecov-coverage.sh env: diff --git a/.github/workflows/microbenchmarks.yaml b/.github/workflows/microbenchmarks.yaml index f03c9e06ca..4009c6e928 100644 --- a/.github/workflows/microbenchmarks.yaml +++ b/.github/workflows/microbenchmarks.yaml @@ -44,7 +44,6 @@ jobs: # NOTE: We need to use full Python version as part of Python deps cache key otherwise # setup virtualenv step will fail. python: - - {version-short: '3.8', version: '3.8.18'} - {version-short: '3.9', version: '3.9.21'} - {version-short: '3.10', version: '3.10.16'} - {version-short: '3.11', version: '3.11.11'} diff --git a/.github/workflows/orquesta-integration-tests.yaml b/.github/workflows/orquesta-integration-tests.yaml index 185ff8d42f..599fd6f861 100644 --- a/.github/workflows/orquesta-integration-tests.yaml +++ b/.github/workflows/orquesta-integration-tests.yaml @@ -55,7 +55,6 @@ jobs: # NOTE: We need to use full Python version as part of Python deps cache key otherwise # setup virtualenv step will fail. python: - - {version-short: '3.8', version: '3.8.18'} - {version-short: '3.9', version: '3.9.21'} - {version-short: '3.10', version: '3.10.16'} - {version-short: '3.11', version: '3.11.11'} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index bb3c40e7dd..aa50e8e825 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -128,7 +128,6 @@ jobs: # NOTE: We need to use full Python version as part of Python deps cache key otherwise # setup virtualenv step will fail. python: - - {version-short: '3.8', version: '3.8.18'} - {version-short: '3.9', version: '3.9.21'} - {version-short: '3.10', version: '3.10.16'} - {version-short: '3.11', version: '3.11.11'} @@ -225,7 +224,6 @@ jobs: # NOTE: We need to use full Python version as part of Python deps cache key otherwise # setup virtualenv step will fail. python: - - {version-short: '3.8', version: '3.8.18'} - {version-short: '3.9', version: '3.9.21'} - {version-short: '3.10', version: '3.10.16'} - {version-short: '3.11', version: '3.11.11'} @@ -314,7 +312,6 @@ jobs: # NOTE: We need to use full Python version as part of Python deps cache key otherwise # setup virtualenv step will fail. python: - - {version-short: '3.8', version: '3.8.18'} - {version-short: '3.9', version: '3.9.21'} - {version-short: '3.10', version: '3.10.16'} - {version-short: '3.11', version: '3.11.11'} @@ -435,7 +432,6 @@ jobs: # NOTE: We need to use full Python version as part of Python deps cache key otherwise # setup virtualenv step will fail. python: - - {version-short: '3.8', version: '3.8.18'} - {version-short: '3.9', version: '3.9.21'} - {version-short: '3.10', version: '3.10.16'} - {version-short: '3.11', version: '3.11.11'} @@ -555,7 +551,6 @@ jobs: # NOTE: We need to use full Python version as part of Python deps cache key otherwise # setup virtualenv step will fail. python: - - {version-short: '3.8', version: '3.8.18'} - {version-short: '3.9', version: '3.9.21'} - {version-short: '3.10', version: '3.10.16'} - {version-short: '3.11', version: '3.11.11'} diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bfc3a1f2b3..0a90bfe4cf 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -33,6 +33,7 @@ Fixed * Fix Popen.pid typo in st2tests. #6184 * Bump tooz package to `6.2.0` to fix TLS. #6220 (@jk464) * Shells via `pywinrm` are initialized with the 65001 codepage to ensure raw string responses are UTF-8. #6034 (@stealthii) +* Fix integration test required clean rabbit queue; bump pip, pyproject.toml fixes; bump setuptool; remove unneeded PY3 checks (@guzzijones12) Changed ~~~~~~~ diff --git a/Makefile b/Makefile index de4787198e..8af1778ad9 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ ST2TESTS_REDIS_PORT := 6379 # Pin common pip version here across all the targets # Note! Periodic maintenance pip upgrades are required to be up-to-date with the latest pip security fixes and updates PIP_VERSION ?= 25.0.1 -SETUPTOOLS_VERSION ?= 75.3.2 +SETUPTOOLS_VERSION ?= 80.9.0 PIP_OPTIONS := $(ST2_PIP_OPTIONS) ifndef PYLINT_CONCURRENCY @@ -537,7 +537,7 @@ flake8: requirements .flake8 $(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)" $(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "setuptools==$(SETUPTOOLS_VERSION)" - $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_DIR)/bin/python setup.py install ; cd .. + $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install . ; cd .. $(VIRTUALENV_ST2CLIENT_DIR)/bin/st2 --version $(VIRTUALENV_ST2CLIENT_DIR)/bin/python -c "import st2client" diff --git a/contrib/runners/action_chain_runner/dist_utils.py b/contrib/runners/action_chain_runner/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/contrib/runners/action_chain_runner/dist_utils.py +++ b/contrib/runners/action_chain_runner/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/contrib/runners/announcement_runner/dist_utils.py b/contrib/runners/announcement_runner/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/contrib/runners/announcement_runner/dist_utils.py +++ b/contrib/runners/announcement_runner/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/contrib/runners/http_runner/dist_utils.py b/contrib/runners/http_runner/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/contrib/runners/http_runner/dist_utils.py +++ b/contrib/runners/http_runner/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/contrib/runners/inquirer_runner/dist_utils.py b/contrib/runners/inquirer_runner/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/contrib/runners/inquirer_runner/dist_utils.py +++ b/contrib/runners/inquirer_runner/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/contrib/runners/local_runner/dist_utils.py b/contrib/runners/local_runner/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/contrib/runners/local_runner/dist_utils.py +++ b/contrib/runners/local_runner/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/contrib/runners/noop_runner/dist_utils.py b/contrib/runners/noop_runner/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/contrib/runners/noop_runner/dist_utils.py +++ b/contrib/runners/noop_runner/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/contrib/runners/orquesta_runner/dist_utils.py b/contrib/runners/orquesta_runner/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/contrib/runners/orquesta_runner/dist_utils.py +++ b/contrib/runners/orquesta_runner/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/contrib/runners/orquesta_runner/requirements.txt b/contrib/runners/orquesta_runner/requirements.txt index a93eba892d..388784dee0 100644 --- a/contrib/runners/orquesta_runner/requirements.txt +++ b/contrib/runners/orquesta_runner/requirements.txt @@ -6,4 +6,4 @@ # in-requirements.txt for that component and then run 'make requirements' to # update the component requirements.txt orquesta@ git+https://github.com/StackStorm/orquesta.git@5ba1467614b2ef8b4709b2ca89e68baa671e8975 -setuptools<78 +setuptools diff --git a/contrib/runners/python_runner/dist_utils.py b/contrib/runners/python_runner/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/contrib/runners/python_runner/dist_utils.py +++ b/contrib/runners/python_runner/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/contrib/runners/remote_runner/dist_utils.py b/contrib/runners/remote_runner/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/contrib/runners/remote_runner/dist_utils.py +++ b/contrib/runners/remote_runner/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/contrib/runners/winrm_runner/dist_utils.py b/contrib/runners/winrm_runner/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/contrib/runners/winrm_runner/dist_utils.py +++ b/contrib/runners/winrm_runner/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/fixed-requirements.txt b/fixed-requirements.txt index 411a0508a1..3dbf8b7bf4 100644 --- a/fixed-requirements.txt +++ b/fixed-requirements.txt @@ -10,7 +10,7 @@ amqp==5.3.1 apscheduler==3.11.0 chardet==5.2.0 cffi==1.17.1 -cryptography==43.0.3 +cryptography==45.0.7 eventlet==0.39.1 flex==6.14.1 # Note: installs gitpython==3.1.37 (security fixed) under py3.8 and gitpython==3.1.18 (latest available, vulnerable) under py3.6 @@ -74,7 +74,6 @@ tooz==6.3.0 virtualenv==20.34.0 # This setuptools version number is in the Makefile, but CircleCI builds are pulling a version # that is incompatible with our logshipper fork. -setuptools<78 webob==1.8.9 webtest==3.0.1 zake==0.2.2 diff --git a/lockfiles/st2.lock b/lockfiles/st2.lock index e506db1705..833a837d9e 100644 --- a/lockfiles/st2.lock +++ b/lockfiles/st2.lock @@ -5694,7 +5694,7 @@ "artifacts": [ { "algorithm": "sha256", - "hash": "d34d5cbb539182553ec8b35a0763decb6b66bd37aa51f3a61db1eb30449f6f10", + "hash": "f445faec6e5f55437f379be08dd78aa2f1181ed9dbd04fe19bddfb6f4c2fe911", "url": "git+https://github.com/StackStorm/st2-rbac-backend.git@master" } ], diff --git a/pyproject.toml b/pyproject.toml index 4afc22331c..0a70f8eab6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,3 +16,6 @@ exclude = ''' [tool.pytest.ini_options] minversion = "6.0" addopts = "-l" + +[tool.setuptools] +py-modules = [] diff --git a/requirements.txt b/requirements.txt index d2dd4bf19d..2213b18914 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ bcrypt==4.3.0 cffi==1.17.1 chardet==5.2.0 ciso8601 -cryptography==43.0.3 +cryptography==45.0.7 decorator==5.2.1 dnspython editor==1.6.6 @@ -61,7 +61,7 @@ requests==2.32.4 retrying==1.4.2 routes==2.5.1 semver==3.0.4 -setuptools<78 +setuptools simplejson six==1.17.0 sseclient-py==1.8.0 diff --git a/scripts/dist_utils.py b/scripts/dist_utils.py index d5014beb00..090b0f8495 100644 --- a/scripts/dist_utils.py +++ b/scripts/dist_utils.py @@ -18,7 +18,6 @@ import os import re -import sys # // NOTE: After you update this script, please run: # // @@ -40,12 +39,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/scripts/github/prepare-integration.sh b/scripts/github/prepare-integration.sh index 0db023ff07..90825a809f 100755 --- a/scripts/github/prepare-integration.sh +++ b/scripts/github/prepare-integration.sh @@ -27,7 +27,7 @@ echo "" # install st2 client if [ ! -x "${VIRTUALENV_DIR}/bin/st2" ] || ! st2 --version >/dev/null 2>&1; then - python ./st2client/setup.py develop + pip install -e ./st2client/ fi st2 --version diff --git a/st2actions/dist_utils.py b/st2actions/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/st2actions/dist_utils.py +++ b/st2actions/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/st2actions/requirements.txt b/st2actions/requirements.txt index 07e1665435..0a6be0cac1 100644 --- a/st2actions/requirements.txt +++ b/st2actions/requirements.txt @@ -22,6 +22,6 @@ python-dateutil==2.9.0.post0 python-json-logger pyyaml==6.0.2 requests==2.32.4 -setuptools<78 +setuptools six==1.17.0 urllib3==2.2.3 diff --git a/st2api/dist_utils.py b/st2api/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/st2api/dist_utils.py +++ b/st2api/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/st2auth/dist_utils.py b/st2auth/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/st2auth/dist_utils.py +++ b/st2auth/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/st2client/dist_utils.py b/st2client/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/st2client/dist_utils.py +++ b/st2client/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/st2client/pyproject.toml b/st2client/pyproject.toml new file mode 100644 index 0000000000..1b68d94ecd --- /dev/null +++ b/st2client/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/st2client/requirements.txt b/st2client/requirements.txt index 9751f730c7..5c351b3a78 100644 --- a/st2client/requirements.txt +++ b/st2client/requirements.txt @@ -8,7 +8,7 @@ argcomplete==3.6.2 cffi==1.17.1 chardet==5.2.0 -cryptography==43.0.3 +cryptography==45.0.7 editor==1.6.6 importlib-metadata==7.1.0 jsonpath-rw==1.4.0 diff --git a/st2client/setup.py b/st2client/setup.py index 1fe8ec1af3..f2ff985744 100644 --- a/st2client/setup.py +++ b/st2client/setup.py @@ -15,6 +15,10 @@ # limitations under the License. import os.path +import sys + +# Add the current directory to the module search path +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from setuptools import setup, find_packages @@ -46,16 +50,18 @@ author="StackStorm", author_email="info@stackstorm.com", url="https://stackstorm.com/", + license="Apache-2.0", classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Information Technology", "Intended Audience :: Developers", "Intended Audience :: System Administrators", - "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ], install_requires=install_reqs, dependency_links=dep_links, diff --git a/st2common/dist_utils.py b/st2common/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/st2common/dist_utils.py +++ b/st2common/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/st2common/requirements.txt b/st2common/requirements.txt index 7c2e0901e7..aa3bb14761 100644 --- a/st2common/requirements.txt +++ b/st2common/requirements.txt @@ -11,7 +11,7 @@ backports.zoneinfo[tzdata]; python_version<"3.9" cffi==1.17.1 chardet==5.2.0 ciso8601 -cryptography==43.0.3 +cryptography==45.0.7 decorator==5.2.1 dnspython eventlet==0.39.1 diff --git a/st2reactor/dist_utils.py b/st2reactor/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/st2reactor/dist_utils.py +++ b/st2reactor/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/st2reactor/tests/integration/test_sensor_watcher.py b/st2reactor/tests/integration/test_sensor_watcher.py index b7991dab42..f21c6aafeb 100644 --- a/st2reactor/tests/integration/test_sensor_watcher.py +++ b/st2reactor/tests/integration/test_sensor_watcher.py @@ -34,10 +34,16 @@ def setUpClass(cls): def setUp(self): super().setUp() # pre-condition: Make sure there is no test pollution + # Delete any leftover queues from previous failed test runs + self.rabbit_client = self._get_client() + self._delete_sensor_watcher_amqp_queues( + queue_name="st2.sensor.watch.covfefe", rabbit_client=self.rabbit_client + ) + + # Verify queues are deleted sw_queues = self._get_sensor_watcher_amqp_queues( - queue_name="st2.sensor.watch.covfefe" + queue_name="st2.sensor.watch.covfefe", rabbit_client=self.rabbit_client ) - # TODO: Maybe just delete any leftover queues from previous failed test runs. self.assertTrue(len(sw_queues) == 0) def test_sensor_watch_queue_gets_deleted_on_stop(self): @@ -55,7 +61,7 @@ def delete_handler(sensor_db): ) sensor_watcher.start() sw_queues = self._get_sensor_watcher_amqp_queues( - queue_name="st2.sensor.watch.covfefe" + queue_name="st2.sensor.watch.covfefe", rabbit_client=self.rabbit_client ) start = monotonic() @@ -63,22 +69,51 @@ def delete_handler(sensor_db): while not done: concurrency.sleep(0.01) sw_queues = self._get_sensor_watcher_amqp_queues( - queue_name="st2.sensor.watch.covfefe" + queue_name="st2.sensor.watch.covfefe", rabbit_client=self.rabbit_client ) done = len(sw_queues) > 0 or ((monotonic() - start) < 5) sensor_watcher.stop() sw_queues = self._get_sensor_watcher_amqp_queues( - queue_name="st2.sensor.watch.covfefe" + queue_name="st2.sensor.watch.covfefe", rabbit_client=self.rabbit_client ) self.assertTrue(len(sw_queues) == 0) - @staticmethod - def _list_amqp_queues(): + def _get_client(self): rabbit_client = Client("localhost:15672", "guest", "guest") + return rabbit_client + + def _list_amqp_queues(self, rabbit_client): + """ + :param rabbit_client: Client + """ queues = [q["name"] for q in rabbit_client.get_queues()] return queues - def _get_sensor_watcher_amqp_queues(self, queue_name): - all_queues = self._list_amqp_queues() + def _get_sensor_watcher_amqp_queues(self, queue_name, rabbit_client): + """ + :param rabbit_client: Client + """ + all_queues = self._list_amqp_queues(rabbit_client) return set([q_name for q_name in all_queues if queue_name in q_name]) + + def _delete_sensor_watcher_amqp_queues(self, queue_name, rabbit_client): + """ + Delete all queues containing the specified queue_name pattern. + + :param string queue_name: Pattern to match in queue names + :param rabbit_client: Client + :returns: None + """ + # Get all queues matching the pattern + queues_to_delete = self._get_sensor_watcher_amqp_queues( + queue_name=queue_name, rabbit_client=rabbit_client + ) + + if not queues_to_delete: + return + + # Create a rabbit client and delete each queue + for queue in queues_to_delete: + # Use default vhost "/" + rabbit_client.delete_queue("/", queue) diff --git a/st2stream/dist_utils.py b/st2stream/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/st2stream/dist_utils.py +++ b/st2stream/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/st2tests/dist_utils.py b/st2tests/dist_utils.py index 6e4d75de43..e7054ef982 100644 --- a/st2tests/dist_utils.py +++ b/st2tests/dist_utils.py @@ -22,7 +22,6 @@ import os import re -import sys # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # @@ -36,12 +35,6 @@ # for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. -PY3 = sys.version_info[0] == 3 - -if PY3: - text_type = str -else: - text_type = unicode # noqa # pylint: disable=E0602 GET_PIP = "curl https://bootstrap.pypa.io/get-pip.py | python" diff --git a/st2tests/integration/orquesta/test_wiring_cancel.py b/st2tests/integration/orquesta/test_wiring_cancel.py index 0e4edaf918..99b7fd15a6 100644 --- a/st2tests/integration/orquesta/test_wiring_cancel.py +++ b/st2tests/integration/orquesta/test_wiring_cancel.py @@ -139,7 +139,7 @@ def test_cancellation_cascade_up_from_subworkflow(self): subwf_ex = self._wait_for_state(subwf_ex, ac_const.LIVEACTION_STATUS_CANCELING) # Assert main workflow is canceling. - ex = self._wait_for_state(ex, ac_const.LIVEACTION_STATUS_CANCELING) + ex = self._wait_for_state(ex, ac_const.LIVEACTION_STATUS_CANCELED) # Delete the temporary file. os.remove(path)