diff --git a/.github/workflows/bk-login.yml b/.github/workflows/bk-login.yml index b6f8f7298..e56865335 100644 --- a/.github/workflows/bk-login.yml +++ b/.github/workflows/bk-login.yml @@ -20,17 +20,19 @@ jobs: uses: actions/setup-python@v2 with: python-version: "3.10" + cache: 'pip' + cache-dependency-path: 'src/bk-login/requirements_dev.txt' - name: create idp plugin symbolic link run: | ln -s $(pwd)/src/idp-plugins/idp_plugins $(pwd)/src/bk-login/bklogin + - name: Install dependencies + run: pip install -r src/bk-login/requirements_dev.txt - name: Format & Lint with ruff run: | - pip install ruff==0.5.2 ruff format src/bk-login --config=src/bk-login/pyproject.toml --no-cache ruff check src/bk-login --config=src/bk-login/pyproject.toml --no-cache - name: Lint with mypy run: | - pip install mypy==1.10.1 types-requests==2.31.0.2 types-setuptools==57.4.18 types-dataclasses==0.1.7 types-redis==3.5.18 types-PyMySQL==1.1.0.1 types-six==0.1.9 types-toml==0.1.5 types-pytz==2023.3.0.0 types-urllib3==1.26.25.14 mypy src/bk-login --config-file=src/bk-login/pyproject.toml test: strategy: @@ -54,16 +56,13 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.10" + cache: 'pip' + cache-dependency-path: 'src/bk-login/requirements_dev.txt' - name: create idp plugin symbolic link run: | ln -s $(pwd)/src/idp-plugins/idp_plugins $(pwd)/src/bk-login/bklogin - - name: Set up Poetry - uses: abatilo/actions-poetry@v2.3.0 - with: - poetry-version: "1.6.1" - name: Install dependencies - working-directory: src/bk-login - run: poetry install + run: pip install -r src/bk-login/requirements_dev.txt - name: Run unittest working-directory: src/bk-login run: | @@ -77,4 +76,4 @@ jobs: export MYSQL_PASSWORD=root_pwd export MYSQL_HOST="127.0.0.1" export DJANGO_SETTINGS_MODULE=bklogin.settings - poetry run pytest ./tests + pytest ./tests diff --git a/.github/workflows/bk-user.yml b/.github/workflows/bk-user.yml index 758266289..f17f456de 100644 --- a/.github/workflows/bk-user.yml +++ b/.github/workflows/bk-user.yml @@ -20,17 +20,19 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.10" + cache: 'pip' + cache-dependency-path: 'src/bk-user/requirements_dev.txt' - name: create idp plugin symbolic link run: | ln -s $(pwd)/src/idp-plugins/idp_plugins $(pwd)/src/bk-user/bkuser + - name: Install dependencies + run: pip install -r src/bk-user/requirements_dev.txt - name: Format & Lint with ruff run: | - pip install ruff==0.5.2 ruff format src/bk-user --config=src/bk-user/pyproject.toml --no-cache ruff check src/bk-user --config=src/bk-user/pyproject.toml --no-cache - name: Lint with mypy run: | - pip install mypy==1.10.1 types-requests==2.31.0.2 types-setuptools==57.4.18 types-dataclasses==0.1.7 types-redis==3.5.18 types-PyMySQL==1.1.0.1 types-six==0.1.9 types-toml==0.1.5 types-pytz==2023.3.0.0 types-urllib3==1.26.25.14 mypy src/bk-user --config-file=src/bk-user/pyproject.toml test: strategy: @@ -54,16 +56,13 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.10" + cache: 'pip' + cache-dependency-path: 'src/bk-user/requirements_dev.txt' - name: create idp plugin symbolic link run: | ln -s $(pwd)/src/idp-plugins/idp_plugins $(pwd)/src/bk-user/bkuser - - name: Set up Poetry - uses: abatilo/actions-poetry@v2.3.0 - with: - poetry-version: "1.5.1" - name: Install dependencies - working-directory: src/bk-user - run: poetry install + run: pip install -r src/bk-user/requirements_dev.txt - name: Run unittest working-directory: src/bk-user run: | @@ -79,4 +78,4 @@ jobs: export INITIAL_ADMIN_USERNAME=admin export INITIAL_ADMIN_PASSWORD=admin_pwd export DJANGO_SETTINGS_MODULE=bkuser.settings - poetry run pytest ./tests + pytest ./tests diff --git a/.github/workflows/idp-plugins.yml b/.github/workflows/idp-plugins.yml index 976089054..c0279fa22 100644 --- a/.github/workflows/idp-plugins.yml +++ b/.github/workflows/idp-plugins.yml @@ -18,12 +18,14 @@ jobs: uses: actions/setup-python@v2 with: python-version: "3.10" + cache: 'pip' + cache-dependency-path: 'src/idp-plugins/requirements_dev.txt' + - name: Install dependencies + run: pip install -r src/idp-plugins/requirements_dev.txt - name: Format & Lint with ruff run: | - pip install ruff==0.1.4 ruff format src/idp-plugins --config=src/idp-plugins/pyproject.toml --no-cache ruff src/idp-plugins --config=src/idp-plugins/pyproject.toml --no-cache - name: Lint with mypy run: | - pip install mypy==1.6.1 types-requests==2.31.0.2 types-setuptools==57.4.18 types-dataclasses==0.1.7 types-redis==3.5.18 types-PyMySQL==1.1.0.1 types-six==0.1.9 types-toml==0.1.5 types-pytz==2023.3.0.0 types-urllib3==1.26.25.14 mypy src/idp-plugins --config-file=src/idp-plugins/pyproject.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e614899e6..0f46f897d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,6 +38,7 @@ repos: .*/\.env| .*/poetry\.lock| .*/pyproject\.toml| + .*/requirements_dev\.txt| \.github/workflows/bk-user.yml| \.github/workflows/bk-login.yml| \.github/workflows/idp-plugins.yml| @@ -74,6 +75,18 @@ repos: require_serial: true language: system entry: bash -c "cd src/bk-user && lint-imports" + - id: requirements-export + name: requirements-export + language: system + entry: bash -c "cd src/bk-user && poetry export -f requirements.txt --output requirements.txt --without-hashes" + pass_filenames: false + files: ^src/bk-user/poetry.lock$ + - id: requirements-dev-export + name: requirements-dev-export + language: system + entry: bash -c "cd src/bk-user && poetry export --with dev -f requirements.txt --output requirements_dev.txt --without-hashes" + pass_filenames: false + files: ^src/bk-user/poetry.lock$ - repo: local hooks: - id: format @@ -99,6 +112,18 @@ repos: require_serial: true language: system entry: bash -c "cd src/bk-login && lint-imports" + - id: requirements-export + name: requirements-export + language: system + entry: bash -c "cd src/bk-login && poetry export -f requirements.txt --output requirements.txt --without-hashes" + pass_filenames: false + files: ^src/bk-login/poetry.lock$ + - id: requirements-dev-export + name: requirements-dev-export + language: system + entry: bash -c "cd src/bk-login && poetry export --with dev -f requirements.txt --output requirements_dev.txt --without-hashes" + pass_filenames: false + files: ^src/bk-login/poetry.lock$ - repo: local hooks: - id: format @@ -111,7 +136,7 @@ repos: name: ruff language: python types: [python] - entry: ruff --config=src/idp-plugins/pyproject.toml --fix --no-cache + entry: ruff check --config=src/idp-plugins/pyproject.toml --fix --no-cache files: src/idp-plugins/ - id: mypy name: mypy @@ -119,3 +144,15 @@ repos: types: [python] entry: mypy --config-file=src/idp-plugins/pyproject.toml files: src/idp-plugins/ + - id: requirements-export + name: requirements-export + language: system + entry: bash -c "cd src/idp-plugins && poetry export -f requirements.txt --output requirements.txt --without-hashes" + pass_filenames: false + files: ^src/idp-plugins/poetry.lock$ + - id: requirements-dev-export + name: requirements-dev-export + language: system + entry: bash -c "cd src/idp-plugins && poetry export --with dev -f requirements.txt --output requirements_dev.txt --without-hashes" + pass_filenames: false + files: ^src/idp-plugins/poetry.lock$ diff --git a/src/bk-login/Dockerfile b/src/bk-login/Dockerfile index aba7d8d2c..05b18d3ee 100644 --- a/src/bk-login/Dockerfile +++ b/src/bk-login/Dockerfile @@ -22,12 +22,10 @@ ENV LC_ALL=C.UTF-8 \ LANG=C.UTF-8 RUN pip install --upgrade pip setuptools -RUN pip install poetry==1.5.1 WORKDIR /app -COPY src/bk-login/pyproject.toml /app -COPY src/bk-login/poetry.lock /app -RUN poetry config virtualenvs.create false && poetry install --no-cache --only main +COPY src/bk-login/requirements.txt /app +RUN pip install -r requirements.txt COPY src/bk-login/bklogin /app/bklogin COPY src/bk-login/bin /app/bin diff --git a/src/bk-login/bklogin/component/http.py b/src/bk-login/bklogin/component/http.py index 6a9f38966..3d045b668 100644 --- a/src/bk-login/bklogin/component/http.py +++ b/src/bk-login/bklogin/component/http.py @@ -8,6 +8,7 @@ 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. """ + import logging import time from typing import Dict, Tuple @@ -127,12 +128,15 @@ def _http_request(method: str, url: str, **kwargs) -> Tuple[HttpStatusCode, Dict resp.status_code, content, ) - return INVALID_JSON_STATUS_CODE, { - "error": ( - f"http response body not json, http status code is {resp.status_code}! " - f"{method} {urlparse(url).path}, response.body={content}, error:{e}" - ) - } + return ( + INVALID_JSON_STATUS_CODE, + { + "error": ( + f"http response body not json, http status code is {resp.status_code}! " # type: ignore + f"{method} {urlparse(url).path}, response.body={content}, error:{e}" + ) + }, + ) def _http_request_only_20x(method: str, url: str, **kwargs) -> Tuple[bool, Dict]: diff --git a/src/bk-login/requirements.txt b/src/bk-login/requirements.txt new file mode 100644 index 000000000..a757b2122 --- /dev/null +++ b/src/bk-login/requirements.txt @@ -0,0 +1,77 @@ +--index-url https://mirrors.tencent.com/pypi/simple + +annotated-types==0.7.0 ; python_version >= "3.10" and python_version < "3.11" +asgiref==3.8.1 ; python_version >= "3.10" and python_version < "3.11" +bk-crypto-python-sdk==1.1.1 ; python_version >= "3.10" and python_version < "3.11" +bk-notice-sdk==1.3.2 ; python_version >= "3.10" and python_version < "3.11" +bkapi-client-core==1.2.0 ; python_version >= "3.10" and python_version < "3.11" +blue-krill==2.0.3 ; python_version >= "3.10" and python_version < "3.11" +certifi==2024.7.4 ; python_version >= "3.10" and python_version < "3.11" +cffi==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +charset-normalizer==3.3.2 ; python_version >= "3.10" and python_version < "3.11" +click==8.1.7 ; python_version >= "3.10" and python_version < "3.11" +colorama==0.4.6 ; python_version >= "3.10" and python_version < "3.11" and platform_system == "Windows" +concurrent-log-handler==0.9.25 ; python_version >= "3.10" and python_version < "3.11" +cryptography==43.0.0 ; python_version >= "3.10" and python_version < "3.11" +curlify==2.2.1 ; python_version >= "3.10" and python_version < "3.11" +dacite==1.8.1 ; python_version >= "3.10" and python_version < "3.11" +deprecated==1.2.14 ; python_version >= "3.10" and python_version < "3.11" +django-cors-headers==4.3.0 ; python_version >= "3.10" and python_version < "3.11" +django-environ==0.8.1 ; python_version >= "3.10" and python_version < "3.11" +django-prometheus==2.3.1 ; python_version >= "3.10" and python_version < "3.11" +django==3.2.25 ; python_version >= "3.10" and python_version < "3.11" +gevent==23.9.1 ; python_version >= "3.10" and python_version < "3.11" +googleapis-common-protos==1.63.2 ; python_version >= "3.10" and python_version < "3.11" +greenlet==3.0.3 ; platform_python_implementation == "CPython" and python_version < "3.11" and python_version >= "3.10" +grpcio==1.65.1 ; python_version >= "3.10" and python_version < "3.11" +gunicorn==21.2.0 ; python_version >= "3.10" and python_version < "3.11" +idna==3.7 ; python_version >= "3.10" and python_version < "3.11" +importlib-metadata==7.1.0 ; python_version >= "3.10" and python_version < "3.11" +markupsafe==2.1.5 ; python_version >= "3.10" and python_version < "3.11" +mysqlclient==2.2.4 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-api==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp-proto-common==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp-proto-grpc==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp-proto-http==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-celery==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-dbapi==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-django==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-logging==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-redis==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-requests==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-wsgi==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-proto==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-sdk==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-semantic-conventions==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-util-http==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +packaging==24.1 ; python_version >= "3.10" and python_version < "3.11" +portalocker==2.10.1 ; python_version >= "3.10" and python_version < "3.11" +prometheus-client==0.20.0 ; python_version >= "3.10" and python_version < "3.11" +protobuf==4.25.4 ; python_version >= "3.10" and python_version < "3.11" +pycparser==2.22 ; python_version >= "3.10" and python_version < "3.11" +pycryptodomex==3.20.0 ; python_version >= "3.10" and python_version < "3.11" +pydantic-core==2.6.3 ; python_version >= "3.10" and python_version < "3.11" +pydantic==2.3.0 ; python_version >= "3.10" and python_version < "3.11" +pyjwt==2.8.0 ; python_version >= "3.10" and python_version < "3.11" +python-editor==1.0.4 ; python_version >= "3.10" and python_version < "3.11" +python-json-logger==2.0.7 ; python_version >= "3.10" and python_version < "3.11" +pytz==2024.1 ; python_version >= "3.10" and python_version < "3.11" +pywin32==306 ; python_version >= "3.10" and python_version < "3.11" and platform_system == "Windows" +requests==2.31.0 ; python_version >= "3.10" and python_version < "3.11" +sentry-sdk==1.5.6 ; python_version >= "3.10" and python_version < "3.11" +setuptools==71.1.0 ; python_version >= "3.10" and python_version < "3.11" +six==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +sqlparse==0.5.1 ; python_version >= "3.10" and python_version < "3.11" +toml==0.10.2 ; python_version >= "3.10" and python_version < "3.11" +tongsuopy-crayon==1.0.2b6 ; python_version >= "3.10" and python_version < "3.11" +typing-extensions==4.12.2 ; python_version >= "3.10" and python_version < "3.11" +urllib3==2.2.2 ; python_version >= "3.10" and python_version < "3.11" +watchdog==1.0.2 ; python_version >= "3.10" and python_version < "3.11" +werkzeug==3.0.2 ; python_version >= "3.10" and python_version < "3.11" +whitenoise==6.5.0 ; python_version >= "3.10" and python_version < "3.11" +wrapt==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +zipp==3.19.2 ; python_version >= "3.10" and python_version < "3.11" +zope-event==5.0 ; python_version >= "3.10" and python_version < "3.11" +zope-interface==6.4.post2 ; python_version >= "3.10" and python_version < "3.11" diff --git a/src/bk-login/requirements_dev.txt b/src/bk-login/requirements_dev.txt new file mode 100644 index 000000000..f8447f585 --- /dev/null +++ b/src/bk-login/requirements_dev.txt @@ -0,0 +1,89 @@ +--index-url https://mirrors.tencent.com/pypi/simple + +annotated-types==0.7.0 ; python_version >= "3.10" and python_version < "3.11" +asgiref==3.8.1 ; python_version >= "3.10" and python_version < "3.11" +bk-crypto-python-sdk==1.1.1 ; python_version >= "3.10" and python_version < "3.11" +bk-notice-sdk==1.3.2 ; python_version >= "3.10" and python_version < "3.11" +bkapi-client-core==1.2.0 ; python_version >= "3.10" and python_version < "3.11" +blue-krill==2.0.3 ; python_version >= "3.10" and python_version < "3.11" +certifi==2024.7.4 ; python_version >= "3.10" and python_version < "3.11" +cffi==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +charset-normalizer==3.3.2 ; python_version >= "3.10" and python_version < "3.11" +click==8.1.7 ; python_version >= "3.10" and python_version < "3.11" +colorama==0.4.6 ; python_version >= "3.10" and python_version < "3.11" and (sys_platform == "win32" or platform_system == "Windows") +concurrent-log-handler==0.9.25 ; python_version >= "3.10" and python_version < "3.11" +cryptography==43.0.0 ; python_version >= "3.10" and python_version < "3.11" +curlify==2.2.1 ; python_version >= "3.10" and python_version < "3.11" +dacite==1.8.1 ; python_version >= "3.10" and python_version < "3.11" +deprecated==1.2.14 ; python_version >= "3.10" and python_version < "3.11" +django-cors-headers==4.3.0 ; python_version >= "3.10" and python_version < "3.11" +django-environ==0.8.1 ; python_version >= "3.10" and python_version < "3.11" +django-prometheus==2.3.1 ; python_version >= "3.10" and python_version < "3.11" +django==3.2.25 ; python_version >= "3.10" and python_version < "3.11" +exceptiongroup==1.2.2 ; python_version >= "3.10" and python_version < "3.11" +gevent==23.9.1 ; python_version >= "3.10" and python_version < "3.11" +googleapis-common-protos==1.63.2 ; python_version >= "3.10" and python_version < "3.11" +greenlet==3.0.3 ; platform_python_implementation == "CPython" and python_version < "3.11" and python_version >= "3.10" +grimp==3.4.1 ; python_version >= "3.10" and python_version < "3.11" +grpcio==1.65.1 ; python_version >= "3.10" and python_version < "3.11" +gunicorn==21.2.0 ; python_version >= "3.10" and python_version < "3.11" +idna==3.7 ; python_version >= "3.10" and python_version < "3.11" +import-linter==1.12.1 ; python_version >= "3.10" and python_version < "3.11" +importlib-metadata==7.1.0 ; python_version >= "3.10" and python_version < "3.11" +iniconfig==2.0.0 ; python_version >= "3.10" and python_version < "3.11" +markupsafe==2.1.5 ; python_version >= "3.10" and python_version < "3.11" +mypy-extensions==1.0.0 ; python_version >= "3.10" and python_version < "3.11" +mypy==1.11.0 ; python_version >= "3.10" and python_version < "3.11" +mysqlclient==2.2.4 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-api==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp-proto-common==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp-proto-grpc==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp-proto-http==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-celery==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-dbapi==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-django==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-logging==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-redis==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-requests==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-wsgi==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-proto==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-sdk==1.25.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-semantic-conventions==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-util-http==0.46b0 ; python_version >= "3.10" and python_version < "3.11" +packaging==24.1 ; python_version >= "3.10" and python_version < "3.11" +pluggy==1.5.0 ; python_version >= "3.10" and python_version < "3.11" +portalocker==2.10.1 ; python_version >= "3.10" and python_version < "3.11" +prometheus-client==0.20.0 ; python_version >= "3.10" and python_version < "3.11" +protobuf==4.25.4 ; python_version >= "3.10" and python_version < "3.11" +pycparser==2.22 ; python_version >= "3.10" and python_version < "3.11" +pycryptodomex==3.20.0 ; python_version >= "3.10" and python_version < "3.11" +pydantic-core==2.6.3 ; python_version >= "3.10" and python_version < "3.11" +pydantic==2.3.0 ; python_version >= "3.10" and python_version < "3.11" +pyjwt==2.8.0 ; python_version >= "3.10" and python_version < "3.11" +pytest-django==4.8.0 ; python_version >= "3.10" and python_version < "3.11" +pytest==7.4.4 ; python_version >= "3.10" and python_version < "3.11" +python-editor==1.0.4 ; python_version >= "3.10" and python_version < "3.11" +python-json-logger==2.0.7 ; python_version >= "3.10" and python_version < "3.11" +pytz==2024.1 ; python_version >= "3.10" and python_version < "3.11" +pywin32==306 ; python_version >= "3.10" and python_version < "3.11" and platform_system == "Windows" +requests==2.31.0 ; python_version >= "3.10" and python_version < "3.11" +ruff==0.5.4 ; python_version >= "3.10" and python_version < "3.11" +sentry-sdk==1.5.6 ; python_version >= "3.10" and python_version < "3.11" +setuptools==71.1.0 ; python_version >= "3.10" and python_version < "3.11" +six==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +sqlparse==0.5.1 ; python_version >= "3.10" and python_version < "3.11" +toml==0.10.2 ; python_version >= "3.10" and python_version < "3.11" +tomli==2.0.1 ; python_version >= "3.10" and python_version < "3.11" +tongsuopy-crayon==1.0.2b6 ; python_version >= "3.10" and python_version < "3.11" +types-requests==2.32.0.20240712 ; python_version >= "3.10" and python_version < "3.11" +typing-extensions==4.12.2 ; python_version >= "3.10" and python_version < "3.11" +urllib3==2.2.2 ; python_version >= "3.10" and python_version < "3.11" +watchdog==1.0.2 ; python_version >= "3.10" and python_version < "3.11" +werkzeug==3.0.2 ; python_version >= "3.10" and python_version < "3.11" +whitenoise==6.5.0 ; python_version >= "3.10" and python_version < "3.11" +wrapt==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +zipp==3.19.2 ; python_version >= "3.10" and python_version < "3.11" +zope-event==5.0 ; python_version >= "3.10" and python_version < "3.11" +zope-interface==6.4.post2 ; python_version >= "3.10" and python_version < "3.11" diff --git a/src/bk-user/Dockerfile b/src/bk-user/Dockerfile index 7f423abe1..2d627e477 100644 --- a/src/bk-user/Dockerfile +++ b/src/bk-user/Dockerfile @@ -22,16 +22,14 @@ ENV LC_ALL=C.UTF-8 \ LANG=C.UTF-8 RUN pip install --upgrade pip setuptools -RUN pip install poetry==1.5.1 WORKDIR /app ARG BK_BUILD_VERSION="tag: null, commitID: ^HEAD, buildID: null, buildTime: null" ENV BK_BUILD_VERSION=${BK_BUILD_VERSION} -COPY src/bk-user/pyproject.toml /app -COPY src/bk-user/poetry.lock /app -RUN poetry config virtualenvs.create false && poetry install --no-cache --only main +COPY src/bk-user/requirements.txt /app +RUN pip install -r requirements.txt COPY src/bk-user/bkuser /app/bkuser COPY src/bk-user/bin /app/bin diff --git a/src/bk-user/poetry.lock b/src/bk-user/poetry.lock index bda820c25..80ba1d440 100644 --- a/src/bk-user/poetry.lock +++ b/src/bk-user/poetry.lock @@ -1575,44 +1575,44 @@ reference = "tencent" [[package]] name = "mypy" -version = "1.11.0" +version = "1.10.1" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.11.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a3824187c99b893f90c845bab405a585d1ced4ff55421fdf5c84cb7710995229"}, - {file = "mypy-1.11.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:96f8dbc2c85046c81bcddc246232d500ad729cb720da4e20fce3b542cab91287"}, - {file = "mypy-1.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1a5d8d8dd8613a3e2be3eae829ee891b6b2de6302f24766ff06cb2875f5be9c6"}, - {file = "mypy-1.11.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:72596a79bbfb195fd41405cffa18210af3811beb91ff946dbcb7368240eed6be"}, - {file = "mypy-1.11.0-cp310-cp310-win_amd64.whl", hash = "sha256:35ce88b8ed3a759634cb4eb646d002c4cef0a38f20565ee82b5023558eb90c00"}, - {file = "mypy-1.11.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:98790025861cb2c3db8c2f5ad10fc8c336ed2a55f4daf1b8b3f877826b6ff2eb"}, - {file = "mypy-1.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:25bcfa75b9b5a5f8d67147a54ea97ed63a653995a82798221cca2a315c0238c1"}, - {file = "mypy-1.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bea2a0e71c2a375c9fa0ede3d98324214d67b3cbbfcbd55ac8f750f85a414e3"}, - {file = "mypy-1.11.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d2b3d36baac48e40e3064d2901f2fbd2a2d6880ec6ce6358825c85031d7c0d4d"}, - {file = "mypy-1.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:d8e2e43977f0e09f149ea69fd0556623919f816764e26d74da0c8a7b48f3e18a"}, - {file = "mypy-1.11.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:1d44c1e44a8be986b54b09f15f2c1a66368eb43861b4e82573026e04c48a9e20"}, - {file = "mypy-1.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cea3d0fb69637944dd321f41bc896e11d0fb0b0aa531d887a6da70f6e7473aba"}, - {file = "mypy-1.11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a83ec98ae12d51c252be61521aa5731f5512231d0b738b4cb2498344f0b840cd"}, - {file = "mypy-1.11.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c7b73a856522417beb78e0fb6d33ef89474e7a622db2653bc1285af36e2e3e3d"}, - {file = "mypy-1.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:f2268d9fcd9686b61ab64f077be7ffbc6fbcdfb4103e5dd0cc5eaab53a8886c2"}, - {file = "mypy-1.11.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:940bfff7283c267ae6522ef926a7887305945f716a7704d3344d6d07f02df850"}, - {file = "mypy-1.11.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:14f9294528b5f5cf96c721f231c9f5b2733164e02c1c018ed1a0eff8a18005ac"}, - {file = "mypy-1.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d7b54c27783991399046837df5c7c9d325d921394757d09dbcbf96aee4649fe9"}, - {file = "mypy-1.11.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:65f190a6349dec29c8d1a1cd4aa71284177aee5949e0502e6379b42873eddbe7"}, - {file = "mypy-1.11.0-cp38-cp38-win_amd64.whl", hash = "sha256:dbe286303241fea8c2ea5466f6e0e6a046a135a7e7609167b07fd4e7baf151bf"}, - {file = "mypy-1.11.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:104e9c1620c2675420abd1f6c44bab7dd33cc85aea751c985006e83dcd001095"}, - {file = "mypy-1.11.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f006e955718ecd8d159cee9932b64fba8f86ee6f7728ca3ac66c3a54b0062abe"}, - {file = "mypy-1.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:becc9111ca572b04e7e77131bc708480cc88a911adf3d0239f974c034b78085c"}, - {file = "mypy-1.11.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6801319fe76c3f3a3833f2b5af7bd2c17bb93c00026a2a1b924e6762f5b19e13"}, - {file = "mypy-1.11.0-cp39-cp39-win_amd64.whl", hash = "sha256:c1a184c64521dc549324ec6ef7cbaa6b351912be9cb5edb803c2808a0d7e85ac"}, - {file = "mypy-1.11.0-py3-none-any.whl", hash = "sha256:56913ec8c7638b0091ef4da6fcc9136896914a9d60d54670a75880c3e5b99ace"}, - {file = "mypy-1.11.0.tar.gz", hash = "sha256:93743608c7348772fdc717af4aeee1997293a1ad04bc0ea6efa15bf65385c538"}, + {file = "mypy-1.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e36f229acfe250dc660790840916eb49726c928e8ce10fbdf90715090fe4ae02"}, + {file = "mypy-1.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:51a46974340baaa4145363b9e051812a2446cf583dfaeba124af966fa44593f7"}, + {file = "mypy-1.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:901c89c2d67bba57aaaca91ccdb659aa3a312de67f23b9dfb059727cce2e2e0a"}, + {file = "mypy-1.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0cd62192a4a32b77ceb31272d9e74d23cd88c8060c34d1d3622db3267679a5d9"}, + {file = "mypy-1.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:a2cbc68cb9e943ac0814c13e2452d2046c2f2b23ff0278e26599224cf164e78d"}, + {file = "mypy-1.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bd6f629b67bb43dc0d9211ee98b96d8dabc97b1ad38b9b25f5e4c4d7569a0c6a"}, + {file = "mypy-1.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a1bbb3a6f5ff319d2b9d40b4080d46cd639abe3516d5a62c070cf0114a457d84"}, + {file = "mypy-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8edd4e9bbbc9d7b79502eb9592cab808585516ae1bcc1446eb9122656c6066f"}, + {file = "mypy-1.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6166a88b15f1759f94a46fa474c7b1b05d134b1b61fca627dd7335454cc9aa6b"}, + {file = "mypy-1.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:5bb9cd11c01c8606a9d0b83ffa91d0b236a0e91bc4126d9ba9ce62906ada868e"}, + {file = "mypy-1.10.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d8681909f7b44d0b7b86e653ca152d6dff0eb5eb41694e163c6092124f8246d7"}, + {file = "mypy-1.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:378c03f53f10bbdd55ca94e46ec3ba255279706a6aacaecac52ad248f98205d3"}, + {file = "mypy-1.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bacf8f3a3d7d849f40ca6caea5c055122efe70e81480c8328ad29c55c69e93e"}, + {file = "mypy-1.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:701b5f71413f1e9855566a34d6e9d12624e9e0a8818a5704d74d6b0402e66c04"}, + {file = "mypy-1.10.1-cp312-cp312-win_amd64.whl", hash = "sha256:3c4c2992f6ea46ff7fce0072642cfb62af7a2484efe69017ed8b095f7b39ef31"}, + {file = "mypy-1.10.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:604282c886497645ffb87b8f35a57ec773a4a2721161e709a4422c1636ddde5c"}, + {file = "mypy-1.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37fd87cab83f09842653f08de066ee68f1182b9b5282e4634cdb4b407266bade"}, + {file = "mypy-1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8addf6313777dbb92e9564c5d32ec122bf2c6c39d683ea64de6a1fd98b90fe37"}, + {file = "mypy-1.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5cc3ca0a244eb9a5249c7c583ad9a7e881aa5d7b73c35652296ddcdb33b2b9c7"}, + {file = "mypy-1.10.1-cp38-cp38-win_amd64.whl", hash = "sha256:1b3a2ffce52cc4dbaeee4df762f20a2905aa171ef157b82192f2e2f368eec05d"}, + {file = "mypy-1.10.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fe85ed6836165d52ae8b88f99527d3d1b2362e0cb90b005409b8bed90e9059b3"}, + {file = "mypy-1.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c2ae450d60d7d020d67ab440c6e3fae375809988119817214440033f26ddf7bf"}, + {file = "mypy-1.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6be84c06e6abd72f960ba9a71561c14137a583093ffcf9bbfaf5e613d63fa531"}, + {file = "mypy-1.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2189ff1e39db399f08205e22a797383613ce1cb0cb3b13d8bcf0170e45b96cc3"}, + {file = "mypy-1.10.1-cp39-cp39-win_amd64.whl", hash = "sha256:97a131ee36ac37ce9581f4220311247ab6cba896b4395b9c87af0675a13a755f"}, + {file = "mypy-1.10.1-py3-none-any.whl", hash = "sha256:71d8ac0b906354ebda8ef1673e5fde785936ac1f29ff6987c7483cfbd5a4235a"}, + {file = "mypy-1.10.1.tar.gz", hash = "sha256:1f8f492d7db9e3593ef42d4f115f04e556130f2819ad33ab84551403e97dd4c0"}, ] [package.dependencies] mypy-extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = ">=4.6.0" +typing-extensions = ">=4.1.0" [package.extras] dmypy = ["psutil (>=4.0)"] @@ -3324,4 +3324,4 @@ reference = "tencent" [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.11" -content-hash = "288ea17d6f6a443a4c72ef401129cc6ae339cd485a23027f5750519a41f967c0" +content-hash = "1f3b269c24dff74810b7f1a9f54ffee1eb3b4af33b870d278e2a4c6f2f0bbd0c" diff --git a/src/bk-user/pyproject.toml b/src/bk-user/pyproject.toml index 4e17f6060..257f372c0 100644 --- a/src/bk-user/pyproject.toml +++ b/src/bk-user/pyproject.toml @@ -54,7 +54,7 @@ opentelemetry-instrumentation-logging = "0.45b0" [tool.poetry.group.dev.dependencies] ruff = "^0.5.2" -mypy = "^1.10.1" +mypy = "1.10.1" types-requests = "^2.31.0.1" pytest = "^7.4.0" pytest-django = "^4.5.2" diff --git a/src/bk-user/requirements.txt b/src/bk-user/requirements.txt new file mode 100644 index 000000000..7c07ac8ea --- /dev/null +++ b/src/bk-user/requirements.txt @@ -0,0 +1,109 @@ +--index-url https://mirrors.tencent.com/pypi/simple + +amqp==5.2.0 ; python_version >= "3.10" and python_version < "3.11" +annotated-types==0.7.0 ; python_version >= "3.10" and python_version < "3.11" +asgiref==3.8.1 ; python_version >= "3.10" and python_version < "3.11" +async-timeout==4.0.3 ; python_version >= "3.10" and python_version < "3.11" +billiard==4.2.0 ; python_version >= "3.10" and python_version < "3.11" +bk-crypto-python-sdk==1.1.1 ; python_version >= "3.10" and python_version < "3.11" +bk-notice-sdk==1.3.1 ; python_version >= "3.10" and python_version < "3.11" +bkapi-client-core==1.2.0 ; python_version >= "3.10" and python_version < "3.11" +blue-krill==2.0.3 ; python_version >= "3.10" and python_version < "3.11" +celery==5.3.1 ; python_version >= "3.10" and python_version < "3.11" +certifi==2024.7.4 ; python_version >= "3.10" and python_version < "3.11" +cffi==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +charset-normalizer==3.3.2 ; python_version >= "3.10" and python_version < "3.11" +click-didyoumean==0.3.1 ; python_version >= "3.10" and python_version < "3.11" +click-plugins==1.1.1 ; python_version >= "3.10" and python_version < "3.11" +click-repl==0.3.0 ; python_version >= "3.10" and python_version < "3.11" +click==8.1.7 ; python_version >= "3.10" and python_version < "3.11" +colorama==0.4.6 ; python_version >= "3.10" and python_version < "3.11" and platform_system == "Windows" +concurrent-log-handler==0.9.25 ; python_version >= "3.10" and python_version < "3.11" +cron-descriptor==1.4.3 ; python_version >= "3.10" and python_version < "3.11" +cryptography==43.0.0 ; python_version >= "3.10" and python_version < "3.11" +curlify==2.2.1 ; python_version >= "3.10" and python_version < "3.11" +dacite==1.8.1 ; python_version >= "3.10" and python_version < "3.11" +deprecated==1.2.14 ; python_version >= "3.10" and python_version < "3.11" +django-celery-beat==2.5.0 ; python_version >= "3.10" and python_version < "3.11" +django-celery-results==2.5.1 ; python_version >= "3.10" and python_version < "3.11" +django-cors-headers==4.2.0 ; python_version >= "3.10" and python_version < "3.11" +django-environ==0.8.1 ; python_version >= "3.10" and python_version < "3.11" +django-js-asset==2.2.0 ; python_version >= "3.10" and python_version < "3.11" +django-mptt==0.14.0 ; python_version >= "3.10" and python_version < "3.11" +django-prometheus==2.3.1 ; python_version >= "3.10" and python_version < "3.11" +django-redis==5.3.0 ; python_version >= "3.10" and python_version < "3.11" +django-timezone-field==7.0 ; python_version >= "3.10" and python_version < "3.11" +django==3.2.25 ; python_version >= "3.10" and python_version < "3.11" +djangorestframework==3.14.0 ; python_version >= "3.10" and python_version < "3.11" +drf-yasg==1.21.7 ; python_version >= "3.10" and python_version < "3.11" +et-xmlfile==1.1.0 ; python_version >= "3.10" and python_version < "3.11" +gevent==24.2.1 ; python_version >= "3.10" and python_version < "3.11" +googleapis-common-protos==1.63.2 ; python_version >= "3.10" and python_version < "3.11" +greenlet==3.0.3 ; platform_python_implementation == "CPython" and python_version < "3.11" and python_version >= "3.10" +grpcio==1.65.1 ; python_version >= "3.10" and python_version < "3.11" +gunicorn==20.1.0 ; python_version >= "3.10" and python_version < "3.11" +idna==3.7 ; python_version >= "3.10" and python_version < "3.11" +importlib-metadata==7.0.0 ; python_version >= "3.10" and python_version < "3.11" +inflection==0.5.1 ; python_version >= "3.10" and python_version < "3.11" +jsonref==1.1.0 ; python_version >= "3.10" and python_version < "3.11" +kombu==5.3.7 ; python_version >= "3.10" and python_version < "3.11" +markupsafe==2.1.5 ; python_version >= "3.10" and python_version < "3.11" +mysqlclient==2.2.4 ; python_version >= "3.10" and python_version < "3.11" +openpyxl==3.1.2 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-api==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp-proto-common==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp-proto-grpc==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp-proto-http==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-celery==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-dbapi==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-django==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-logging==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-redis==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-requests==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-wsgi==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-proto==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-sdk==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-semantic-conventions==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-util-http==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +packaging==24.1 ; python_version >= "3.10" and python_version < "3.11" +phonenumbers==8.13.18 ; python_version >= "3.10" and python_version < "3.11" +portalocker==2.10.1 ; python_version >= "3.10" and python_version < "3.11" +prometheus-client==0.20.0 ; python_version >= "3.10" and python_version < "3.11" +prompt-toolkit==3.0.47 ; python_version >= "3.10" and python_version < "3.11" +protobuf==4.25.4 ; python_version >= "3.10" and python_version < "3.11" +pycparser==2.22 ; python_version >= "3.10" and python_version < "3.11" +pycryptodomex==3.20.0 ; python_version >= "3.10" and python_version < "3.11" +pydantic-core==2.4.0 ; python_version >= "3.10" and python_version < "3.11" +pydantic==2.1.1 ; python_version >= "3.10" and python_version < "3.11" +pyjwt==2.8.0 ; python_version >= "3.10" and python_version < "3.11" +python-crontab==3.2.0 ; python_version >= "3.10" and python_version < "3.11" +python-dateutil==2.9.0.post0 ; python_version >= "3.10" and python_version < "3.11" +python-editor==1.0.4 ; python_version >= "3.10" and python_version < "3.11" +python-json-logger==2.0.7 ; python_version >= "3.10" and python_version < "3.11" +pytz==2024.1 ; python_version >= "3.10" and python_version < "3.11" +pywin32==306 ; python_version >= "3.10" and python_version < "3.11" and platform_system == "Windows" +pyyaml==6.0.1 ; python_version >= "3.10" and python_version < "3.11" +redis==4.6.0 ; python_version >= "3.10" and python_version < "3.11" +requests==2.31.0 ; python_version >= "3.10" and python_version < "3.11" +sentry-sdk==1.5.6 ; python_version >= "3.10" and python_version < "3.11" +setuptools==71.1.0 ; python_version >= "3.10" and python_version < "3.11" +six==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +sqlparse==0.5.1 ; python_version >= "3.10" and python_version < "3.11" +toml==0.10.2 ; python_version >= "3.10" and python_version < "3.11" +tongsuopy-crayon==1.0.2b6 ; python_version >= "3.10" and python_version < "3.11" +typing-extensions==4.12.2 ; python_version >= "3.10" and python_version < "3.11" +tzdata==2024.1 ; python_version >= "3.10" and python_version < "3.11" +uritemplate==4.1.1 ; python_version >= "3.10" and python_version < "3.11" +urllib3==2.2.2 ; python_version >= "3.10" and python_version < "3.11" +vine==5.1.0 ; python_version >= "3.10" and python_version < "3.11" +watchdog==1.0.2 ; python_version >= "3.10" and python_version < "3.11" +wcwidth==0.2.13 ; python_version >= "3.10" and python_version < "3.11" +werkzeug==3.0.2 ; python_version >= "3.10" and python_version < "3.11" +whitenoise==6.5.0 ; python_version >= "3.10" and python_version < "3.11" +wrapt==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +zipp==3.19.2 ; python_version >= "3.10" and python_version < "3.11" +zope-event==5.0 ; python_version >= "3.10" and python_version < "3.11" +zope-interface==6.4.post2 ; python_version >= "3.10" and python_version < "3.11" +zxcvbn==4.4.28 ; python_version >= "3.10" and python_version < "3.11" diff --git a/src/bk-user/requirements_dev.txt b/src/bk-user/requirements_dev.txt new file mode 100644 index 000000000..9a651ff06 --- /dev/null +++ b/src/bk-user/requirements_dev.txt @@ -0,0 +1,122 @@ +--index-url https://mirrors.tencent.com/pypi/simple + +amqp==5.2.0 ; python_version >= "3.10" and python_version < "3.11" +annotated-types==0.7.0 ; python_version >= "3.10" and python_version < "3.11" +asgiref==3.8.1 ; python_version >= "3.10" and python_version < "3.11" +async-timeout==4.0.3 ; python_version >= "3.10" and python_version < "3.11" +billiard==4.2.0 ; python_version >= "3.10" and python_version < "3.11" +bk-crypto-python-sdk==1.1.1 ; python_version >= "3.10" and python_version < "3.11" +bk-notice-sdk==1.3.1 ; python_version >= "3.10" and python_version < "3.11" +bkapi-client-core==1.2.0 ; python_version >= "3.10" and python_version < "3.11" +blue-krill==2.0.3 ; python_version >= "3.10" and python_version < "3.11" +celery==5.3.1 ; python_version >= "3.10" and python_version < "3.11" +certifi==2024.7.4 ; python_version >= "3.10" and python_version < "3.11" +cffi==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +charset-normalizer==3.3.2 ; python_version >= "3.10" and python_version < "3.11" +click-didyoumean==0.3.1 ; python_version >= "3.10" and python_version < "3.11" +click-plugins==1.1.1 ; python_version >= "3.10" and python_version < "3.11" +click-repl==0.3.0 ; python_version >= "3.10" and python_version < "3.11" +click==8.1.7 ; python_version >= "3.10" and python_version < "3.11" +colorama==0.4.6 ; python_version >= "3.10" and python_version < "3.11" and (sys_platform == "win32" or platform_system == "Windows") +concurrent-log-handler==0.9.25 ; python_version >= "3.10" and python_version < "3.11" +cron-descriptor==1.4.3 ; python_version >= "3.10" and python_version < "3.11" +cryptography==43.0.0 ; python_version >= "3.10" and python_version < "3.11" +curlify==2.2.1 ; python_version >= "3.10" and python_version < "3.11" +dacite==1.8.1 ; python_version >= "3.10" and python_version < "3.11" +deprecated==1.2.14 ; python_version >= "3.10" and python_version < "3.11" +django-celery-beat==2.5.0 ; python_version >= "3.10" and python_version < "3.11" +django-celery-results==2.5.1 ; python_version >= "3.10" and python_version < "3.11" +django-cors-headers==4.2.0 ; python_version >= "3.10" and python_version < "3.11" +django-environ==0.8.1 ; python_version >= "3.10" and python_version < "3.11" +django-js-asset==2.2.0 ; python_version >= "3.10" and python_version < "3.11" +django-mptt==0.14.0 ; python_version >= "3.10" and python_version < "3.11" +django-prometheus==2.3.1 ; python_version >= "3.10" and python_version < "3.11" +django-redis==5.3.0 ; python_version >= "3.10" and python_version < "3.11" +django-timezone-field==7.0 ; python_version >= "3.10" and python_version < "3.11" +django==3.2.25 ; python_version >= "3.10" and python_version < "3.11" +djangorestframework==3.14.0 ; python_version >= "3.10" and python_version < "3.11" +drf-yasg==1.21.7 ; python_version >= "3.10" and python_version < "3.11" +et-xmlfile==1.1.0 ; python_version >= "3.10" and python_version < "3.11" +exceptiongroup==1.2.2 ; python_version >= "3.10" and python_version < "3.11" +gevent==24.2.1 ; python_version >= "3.10" and python_version < "3.11" +googleapis-common-protos==1.63.2 ; python_version >= "3.10" and python_version < "3.11" +greenlet==3.0.3 ; platform_python_implementation == "CPython" and python_version < "3.11" and python_version >= "3.10" +grimp==3.4.1 ; python_version >= "3.10" and python_version < "3.11" +grpcio==1.65.1 ; python_version >= "3.10" and python_version < "3.11" +gunicorn==20.1.0 ; python_version >= "3.10" and python_version < "3.11" +idna==3.7 ; python_version >= "3.10" and python_version < "3.11" +import-linter==1.12.1 ; python_version >= "3.10" and python_version < "3.11" +importlib-metadata==7.0.0 ; python_version >= "3.10" and python_version < "3.11" +inflection==0.5.1 ; python_version >= "3.10" and python_version < "3.11" +iniconfig==2.0.0 ; python_version >= "3.10" and python_version < "3.11" +jsonref==1.1.0 ; python_version >= "3.10" and python_version < "3.11" +kombu==5.3.7 ; python_version >= "3.10" and python_version < "3.11" +markupsafe==2.1.5 ; python_version >= "3.10" and python_version < "3.11" +mypy-extensions==1.0.0 ; python_version >= "3.10" and python_version < "3.11" +mypy==1.10.1 ; python_version >= "3.10" and python_version < "3.11" +mysqlclient==2.2.4 ; python_version >= "3.10" and python_version < "3.11" +openpyxl==3.1.2 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-api==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp-proto-common==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp-proto-grpc==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp-proto-http==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-exporter-otlp==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-celery==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-dbapi==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-django==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-logging==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-redis==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-requests==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation-wsgi==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-instrumentation==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-proto==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-sdk==1.24.0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-semantic-conventions==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +opentelemetry-util-http==0.45b0 ; python_version >= "3.10" and python_version < "3.11" +packaging==24.1 ; python_version >= "3.10" and python_version < "3.11" +phonenumbers==8.13.18 ; python_version >= "3.10" and python_version < "3.11" +pluggy==1.5.0 ; python_version >= "3.10" and python_version < "3.11" +portalocker==2.10.1 ; python_version >= "3.10" and python_version < "3.11" +prometheus-client==0.20.0 ; python_version >= "3.10" and python_version < "3.11" +prompt-toolkit==3.0.47 ; python_version >= "3.10" and python_version < "3.11" +protobuf==4.25.4 ; python_version >= "3.10" and python_version < "3.11" +pycparser==2.22 ; python_version >= "3.10" and python_version < "3.11" +pycryptodomex==3.20.0 ; python_version >= "3.10" and python_version < "3.11" +pydantic-core==2.4.0 ; python_version >= "3.10" and python_version < "3.11" +pydantic==2.1.1 ; python_version >= "3.10" and python_version < "3.11" +pyjwt==2.8.0 ; python_version >= "3.10" and python_version < "3.11" +pytest-django==4.8.0 ; python_version >= "3.10" and python_version < "3.11" +pytest==7.4.4 ; python_version >= "3.10" and python_version < "3.11" +python-crontab==3.2.0 ; python_version >= "3.10" and python_version < "3.11" +python-dateutil==2.9.0.post0 ; python_version >= "3.10" and python_version < "3.11" +python-editor==1.0.4 ; python_version >= "3.10" and python_version < "3.11" +python-json-logger==2.0.7 ; python_version >= "3.10" and python_version < "3.11" +pytz==2024.1 ; python_version >= "3.10" and python_version < "3.11" +pywin32==306 ; python_version >= "3.10" and python_version < "3.11" and platform_system == "Windows" +pyyaml==6.0.1 ; python_version >= "3.10" and python_version < "3.11" +redis==4.6.0 ; python_version >= "3.10" and python_version < "3.11" +requests==2.31.0 ; python_version >= "3.10" and python_version < "3.11" +ruff==0.5.4 ; python_version >= "3.10" and python_version < "3.11" +sentry-sdk==1.5.6 ; python_version >= "3.10" and python_version < "3.11" +setuptools==71.1.0 ; python_version >= "3.10" and python_version < "3.11" +six==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +sqlparse==0.5.1 ; python_version >= "3.10" and python_version < "3.11" +toml==0.10.2 ; python_version >= "3.10" and python_version < "3.11" +tomli==2.0.1 ; python_version >= "3.10" and python_version < "3.11" +tongsuopy-crayon==1.0.2b6 ; python_version >= "3.10" and python_version < "3.11" +types-pytz==2023.4.0.20240130 ; python_version >= "3.10" and python_version < "3.11" +types-requests==2.32.0.20240712 ; python_version >= "3.10" and python_version < "3.11" +typing-extensions==4.12.2 ; python_version >= "3.10" and python_version < "3.11" +tzdata==2024.1 ; python_version >= "3.10" and python_version < "3.11" +uritemplate==4.1.1 ; python_version >= "3.10" and python_version < "3.11" +urllib3==2.2.2 ; python_version >= "3.10" and python_version < "3.11" +vine==5.1.0 ; python_version >= "3.10" and python_version < "3.11" +watchdog==1.0.2 ; python_version >= "3.10" and python_version < "3.11" +wcwidth==0.2.13 ; python_version >= "3.10" and python_version < "3.11" +werkzeug==3.0.2 ; python_version >= "3.10" and python_version < "3.11" +whitenoise==6.5.0 ; python_version >= "3.10" and python_version < "3.11" +wrapt==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +zipp==3.19.2 ; python_version >= "3.10" and python_version < "3.11" +zope-event==5.0 ; python_version >= "3.10" and python_version < "3.11" +zope-interface==6.4.post2 ; python_version >= "3.10" and python_version < "3.11" +zxcvbn==4.4.28 ; python_version >= "3.10" and python_version < "3.11" diff --git a/src/idp-plugins/idp_plugins/http.py b/src/idp-plugins/idp_plugins/http.py index 2048f00e8..49a87a6da 100644 --- a/src/idp-plugins/idp_plugins/http.py +++ b/src/idp-plugins/idp_plugins/http.py @@ -130,7 +130,7 @@ def _http_request(method: str, url: str, **kwargs) -> Tuple[HttpStatusCode, Dict ) return INVALID_JSON_STATUS_CODE, { "error": ( - f"http response body not json, http status code is {resp.status_code}! " + f"http response body not json, http status code is {resp.status_code}! " # type: ignore f"{method} {urlparse(url).path}, response.body={content}, error:{e}" ) } diff --git a/src/idp-plugins/requirements.txt b/src/idp-plugins/requirements.txt new file mode 100644 index 000000000..e0d6497af --- /dev/null +++ b/src/idp-plugins/requirements.txt @@ -0,0 +1,33 @@ +--index-url https://mirrors.tencent.com/pypi/simple + +annotated-types==0.6.0 ; python_version >= "3.10" and python_version < "3.11" +asgiref==3.7.2 ; python_version >= "3.10" and python_version < "3.11" +bk-crypto-python-sdk==1.1.1 ; python_version >= "3.10" and python_version < "3.11" +blue-krill==2.0.3 ; python_version >= "3.10" and python_version < "3.11" +certifi==2023.7.22 ; python_version >= "3.10" and python_version < "3.11" +cffi==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +charset-normalizer==3.3.0 ; python_version >= "3.10" and python_version < "3.11" +click==8.1.7 ; python_version >= "3.10" and python_version < "3.11" +colorama==0.4.6 ; python_version >= "3.10" and python_version < "3.11" and platform_system == "Windows" +cryptography==42.0.5 ; python_version >= "3.10" and python_version < "3.11" +curlify==2.2.1 ; python_version >= "3.10" and python_version < "3.11" +dacite==1.8.1 ; python_version >= "3.10" and python_version < "3.11" +django-environ==0.8.1 ; python_version >= "3.10" and python_version < "3.11" +django==3.2.25 ; python_version >= "3.10" and python_version < "3.11" +idna==3.4 ; python_version >= "3.10" and python_version < "3.11" +pycparser==2.21 ; python_version >= "3.10" and python_version < "3.11" +pycryptodomex==3.20.0 ; python_version >= "3.10" and python_version < "3.11" +pydantic-core==2.6.3 ; python_version >= "3.10" and python_version < "3.11" +pydantic==2.3.0 ; python_version >= "3.10" and python_version < "3.11" +pyjwt==2.8.0 ; python_version >= "3.10" and python_version < "3.11" +python-editor==1.0.4 ; python_version >= "3.10" and python_version < "3.11" +pytz==2023.3.post1 ; python_version >= "3.10" and python_version < "3.11" +requests==2.31.0 ; python_version >= "3.10" and python_version < "3.11" +six==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +sqlparse==0.4.4 ; python_version >= "3.10" and python_version < "3.11" +toml==0.10.2 ; python_version >= "3.10" and python_version < "3.11" +tongsuopy-crayon==1.0.2b6 ; python_version >= "3.10" and python_version < "3.11" +typing-extensions==4.8.0 ; python_version >= "3.10" and python_version < "3.11" +urllib3==2.2.1 ; python_version >= "3.10" and python_version < "3.11" +watchdog==1.0.2 ; python_version >= "3.10" and python_version < "3.11" +wrapt==1.15.0 ; python_version >= "3.10" and python_version < "3.11" diff --git a/src/idp-plugins/requirements_dev.txt b/src/idp-plugins/requirements_dev.txt new file mode 100644 index 000000000..d2d98d2b4 --- /dev/null +++ b/src/idp-plugins/requirements_dev.txt @@ -0,0 +1,46 @@ +--index-url https://mirrors.tencent.com/pypi/simple + +annotated-types==0.6.0 ; python_version >= "3.10" and python_version < "3.11" +asgiref==3.7.2 ; python_version >= "3.10" and python_version < "3.11" +bk-crypto-python-sdk==1.1.1 ; python_version >= "3.10" and python_version < "3.11" +blue-krill==2.0.3 ; python_version >= "3.10" and python_version < "3.11" +certifi==2023.7.22 ; python_version >= "3.10" and python_version < "3.11" +cffi==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +charset-normalizer==3.3.0 ; python_version >= "3.10" and python_version < "3.11" +click==8.1.7 ; python_version >= "3.10" and python_version < "3.11" +colorama==0.4.6 ; python_version >= "3.10" and python_version < "3.11" and (sys_platform == "win32" or platform_system == "Windows") +cryptography==42.0.5 ; python_version >= "3.10" and python_version < "3.11" +curlify==2.2.1 ; python_version >= "3.10" and python_version < "3.11" +dacite==1.8.1 ; python_version >= "3.10" and python_version < "3.11" +django-environ==0.8.1 ; python_version >= "3.10" and python_version < "3.11" +django==3.2.25 ; python_version >= "3.10" and python_version < "3.11" +exceptiongroup==1.1.3 ; python_version >= "3.10" and python_version < "3.11" +grimp==3.1 ; python_version >= "3.10" and python_version < "3.11" +idna==3.4 ; python_version >= "3.10" and python_version < "3.11" +import-linter==1.12.0 ; python_version >= "3.10" and python_version < "3.11" +iniconfig==2.0.0 ; python_version >= "3.10" and python_version < "3.11" +mypy-extensions==1.0.0 ; python_version >= "3.10" and python_version < "3.11" +mypy==1.6.1 ; python_version >= "3.10" and python_version < "3.11" +packaging==23.2 ; python_version >= "3.10" and python_version < "3.11" +pluggy==1.3.0 ; python_version >= "3.10" and python_version < "3.11" +pycparser==2.21 ; python_version >= "3.10" and python_version < "3.11" +pycryptodomex==3.20.0 ; python_version >= "3.10" and python_version < "3.11" +pydantic-core==2.6.3 ; python_version >= "3.10" and python_version < "3.11" +pydantic==2.3.0 ; python_version >= "3.10" and python_version < "3.11" +pyjwt==2.8.0 ; python_version >= "3.10" and python_version < "3.11" +pytest-django==4.5.2 ; python_version >= "3.10" and python_version < "3.11" +pytest==7.4.3 ; python_version >= "3.10" and python_version < "3.11" +python-editor==1.0.4 ; python_version >= "3.10" and python_version < "3.11" +pytz==2023.3.post1 ; python_version >= "3.10" and python_version < "3.11" +requests==2.31.0 ; python_version >= "3.10" and python_version < "3.11" +ruff==0.1.4 ; python_version >= "3.10" and python_version < "3.11" +six==1.16.0 ; python_version >= "3.10" and python_version < "3.11" +sqlparse==0.4.4 ; python_version >= "3.10" and python_version < "3.11" +toml==0.10.2 ; python_version >= "3.10" and python_version < "3.11" +tomli==2.0.1 ; python_version >= "3.10" and python_version < "3.11" +tongsuopy-crayon==1.0.2b6 ; python_version >= "3.10" and python_version < "3.11" +types-requests==2.31.0.10 ; python_version >= "3.10" and python_version < "3.11" +typing-extensions==4.8.0 ; python_version >= "3.10" and python_version < "3.11" +urllib3==2.2.1 ; python_version >= "3.10" and python_version < "3.11" +watchdog==1.0.2 ; python_version >= "3.10" and python_version < "3.11" +wrapt==1.15.0 ; python_version >= "3.10" and python_version < "3.11"