From nobody Sun Jul 09 15:33:06 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QzWNz1SV6z4mX7Z; Sun, 9 Jul 2023 15:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QzWNz0r70z4NrW; Sun, 9 Jul 2023 15:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688916787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1lz+ZWByREV+7XmgGSjbqWoSX0nwT9JtEP1NrZNE7wM=; b=dtjYyNMPGN/AgPXBL/UDOdXG++i3dobqtZ+En7iwf2Y9gMDEUDMHE95dW3dDCVCEjM0/V4 NW3XrdrX7jHLJJ8kR741DwcW4ETpzoPy10b/Sk1QEPYwHQUJtskDuz1pnQ+GwDTwT9THG5 lFNX9QTE4tP9wN5dtb0p9Kp2onoY6y+d84d0ZcOmc/Gb/0muI4LZVQfS4la/7KmUY1HyzN Qa8/F1TFlaUKFTkrWsn4aqLPUm3R5x0R+W3KNCXdLNs4qrBwZEuK4g+dTNBB4Qdr/zoVya GxRFjgUs+JKO9kG1klNrd3mGrMjFv21pgtYMjHMU7nMNSphQ4yYnwLm6/3Lvhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688916787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1lz+ZWByREV+7XmgGSjbqWoSX0nwT9JtEP1NrZNE7wM=; b=cGvPtM1KlL0w+HPSP6vPbuyV2Rtn6qM+HTXQOevvfCKBVID9BD8TJMEluT6iGbexdgCLKy VvQkk6Olr+vw2sWvjxpG0t7YqpvrqJ2j21fAOmZVU+JWXHmCSB1YGGhqhfifQ1kTOxmntq f/0irc+7m89m0xLVXq3fp+B+5p7NX0l9cDhluFHdityYngO4UfHz0DWJhZUoYaWYDjVHA7 5KlkNiLQD7xqqxmmnRXAx6FvxJbMZGUR1ehzLQok9uHx7E4+VOZqqlVkLngCklBTpkdlRq U0/RGSLKIZlk/J++7x0Kc99tWrigUyOSnvhq7vU+OeREie5SW7MjJJZ8lJSUSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688916787; a=rsa-sha256; cv=none; b=hY5yQr6O1I/YyqzEFvc/Iuwk7Xhht7s5L6WaAaE5ittUlmoRJTfyoIwwI0FR76csw6jF3v nTzzbG2PSrw3spcW0LDUujoQE7CeMVekFDvOKyRl8C3WcZRWYhtvib9j6QZ0ISYQkS1uFu Pt5navDE3De9JkyzNIb0bEXPrHDug57sSAT41uGXC+Qdi0371MhgMlvBNaD0im2mOBjnal 1w/i1o1hNeabaYZGwvwz+q1fv98jKT0FadyH576UrgGUL4MiA//QxP/57Vqje4ZF+c4FMO 6jbF1PtyQxHt2REETv13mtlqlE/BQjfp1n1d/7CMhU6Zu3KapswelQ/Ze/KdUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QzWNy71KJz17kB; Sun, 9 Jul 2023 15:33:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 369FX663069523; Sun, 9 Jul 2023 15:33:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 369FX6AY069522; Sun, 9 Jul 2023 15:33:06 GMT (envelope-from git) Date: Sun, 9 Jul 2023 15:33:06 GMT Message-Id: <202307091533.369FX6AY069522@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 98ded7cd825c - main - devel/py-poetry: Fix build after fa2d4aa15778abdb828847797f1c11f6292c14d4 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 98ded7cd825c3450f170d10c3d24fdfcf8ea412e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=98ded7cd825c3450f170d10c3d24fdfcf8ea412e commit 98ded7cd825c3450f170d10c3d24fdfcf8ea412e Author: Po-Chuan Hsieh AuthorDate: 2023-07-09 15:32:48 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-07-09 15:32:48 +0000 devel/py-poetry: Fix build after fa2d4aa15778abdb828847797f1c11f6292c14d4 - Bump PORTREVISION for dependency and package change Obtained from: https://github.com/python-poetry/poetry/commit/fca3d5d04fb01bbb3c77e810094a99732b7d024c --- devel/py-poetry/Makefile | 6 +- devel/py-poetry/files/patch-cachecontrol | 152 +++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+), 4 deletions(-) diff --git a/devel/py-poetry/Makefile b/devel/py-poetry/Makefile index 7a139dcb92d6..622aef788774 100644 --- a/devel/py-poetry/Makefile +++ b/devel/py-poetry/Makefile @@ -1,5 +1,6 @@ PORTNAME= poetry PORTVERSION= 1.5.0 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -14,16 +15,14 @@ LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>=1.1.0:devel/py-poetry-core@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}build>=0.10.0<0.11:devel/py-build@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}cachecontrol>=0.12.9<0.13:www/py-cachecontrol@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cachecontrol>=0.13.0<0.14:www/py-cachecontrol@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}cleo>=2.0.0<3:devel/py-cleo@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}crashtest>=0.4.1<0.5:devel/py-crashtest@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dulwich>=0.21.2<0.22:devel/py-dulwich@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}filelock>=3.8.0<4:sysutils/py-filelock@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}html5lib>=1.0<2:www/py-html5lib@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}installer>=0.7.0<0.8:devel/py-installer@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}jsonschema>=4.10.0<5:devel/py-jsonschema@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}keyring>=23.9.0,1<24,1:security/py-keyring@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}lockfile>=0.12.2<0.13:devel/py-lockfile@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>=20.4:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pexpect>=4.7.0<5:misc/py-pexpect@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pkginfo>=1.9.4<2:sysutils/py-pkginfo@${PY_FLAVOR} \ @@ -36,7 +35,6 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}build>=0.10.0<0.11:devel/py-build@${PY_FLAVO ${PYTHON_PKGNAMEPREFIX}shellingham>=1.5<2:devel/py-shellingham@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}tomlkit>=0.11.4<1.0.0:textproc/py-tomlkit@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}trove-classifiers>=2022.5.19:devel/py-trove-classifiers@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}urllib3>=1.26.0,1<2,1:net/py-urllib3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}virtualenv>=20.22.0<21:devel/py-virtualenv@${PY_FLAVOR} USES= python diff --git a/devel/py-poetry/files/patch-cachecontrol b/devel/py-poetry/files/patch-cachecontrol new file mode 100644 index 000000000000..79e6cac6a490 --- /dev/null +++ b/devel/py-poetry/files/patch-cachecontrol @@ -0,0 +1,152 @@ +Obtained from: https://github.com/python-poetry/poetry/commit/fca3d5d04fb01bbb3c77e810094a99732b7d024c + +--- pyproject.toml.orig 2023-05-19 12:27:02 UTC ++++ pyproject.toml +@@ -36,17 +36,15 @@ poetry-core = "1.6.0" + poetry-plugin-export = "^1.3.1" + "backports.cached-property" = { version = "^1.0.2", python = "<3.8" } + build = "^0.10.0" +-cachecontrol = { version = "^0.12.9", extras = ["filecache"] } ++cachecontrol = { version = "^0.13.0", extras = ["filecache"] } + cleo = "^2.0.0" + crashtest = "^0.4.1" + dulwich = "^0.21.2" +-filelock = "^3.8.0" + html5lib = "^1.0" + importlib-metadata = { version = ">=4.4", python = "<3.10" } + installer = "^0.7.0" + jsonschema = "^4.10.0" + keyring = "^23.9.0" +-lockfile = "^0.12.2" + # packaging uses calver, so version is unclamped + packaging = ">=20.4" + pexpect = "^4.7.0" +@@ -62,7 +60,6 @@ tomlkit = ">=0.11.4,<1.0.0" + trove-classifiers = ">=2022.5.19" + virtualenv = "^20.22.0" + xattr = { version = "^0.10.0", markers = "sys_platform == 'darwin'" } +-urllib3 = "^1.26.0" + + [tool.poetry.group.dev.dependencies] + pre-commit = "^2.6" +@@ -189,18 +186,15 @@ warn_unused_ignores = false + + [[tool.mypy.overrides]] + module = [ +- 'cachecontrol.*', + 'cachy.*', + 'deepdiff.*', + 'httpretty.*', + 'keyring.*', +- 'lockfile.*', + 'pexpect.*', + 'requests_toolbelt.*', + 'shellingham.*', + 'virtualenv.*', + 'xattr.*', +- 'zipp.*', + ] + ignore_missing_imports = true + +--- src/poetry/publishing/uploader.py.orig 2023-05-19 12:27:02 UTC ++++ src/poetry/publishing/uploader.py +@@ -11,17 +11,14 @@ import requests + + from poetry.core.masonry.metadata import Metadata + from poetry.core.masonry.utils.helpers import distribution_name +-from requests import adapters + from requests.exceptions import ConnectionError + from requests.exceptions import HTTPError + from requests_toolbelt import user_agent + from requests_toolbelt.multipart import MultipartEncoder + from requests_toolbelt.multipart import MultipartEncoderMonitor +-from urllib3 import util + + from poetry.__version__ import __version__ + from poetry.utils.constants import REQUESTS_TIMEOUT +-from poetry.utils.constants import STATUS_FORCELIST + from poetry.utils.patterns import wheel_file_re + + +@@ -64,18 +61,6 @@ class Uploader: + return agent + + @property +- def adapter(self) -> adapters.HTTPAdapter: +- retry = util.Retry( +- connect=5, +- total=10, +- allowed_methods=["GET"], +- respect_retry_after_header=True, +- status_forcelist=STATUS_FORCELIST, +- ) +- +- return adapters.HTTPAdapter(max_retries=retry) +- +- @property + def files(self) -> list[Path]: + dist = self._poetry.file.path.parent / "dist" + version = self._package.version.to_string() +@@ -97,9 +82,6 @@ class Uploader: + session.auth = auth + + session.headers["User-Agent"] = self.user_agent +- for scheme in ("http://", "https://"): +- session.mount(scheme, self.adapter) +- + return session + + def get_auth(self) -> tuple[str, str] | None: +--- src/poetry/utils/authenticator.py.orig 2023-05-19 12:27:02 UTC ++++ src/poetry/utils/authenticator.py +@@ -12,7 +12,6 @@ from pathlib import Path + from typing import TYPE_CHECKING + from typing import Any + +-import lockfile + import requests + import requests.auth + import requests.exceptions +@@ -20,7 +19,6 @@ import requests.exceptions + from cachecontrol import CacheControlAdapter + from cachecontrol.caches import FileCache + from cachecontrol.caches.file_cache import url_to_file_path +-from filelock import FileLock + + from poetry.config.config import Config + from poetry.exceptions import PoetryException +@@ -38,26 +36,6 @@ if TYPE_CHECKING: + logger = logging.getLogger(__name__) + + +-class FileLockLockFile(lockfile.LockBase): # type: ignore[misc] +- # The default LockFile from the lockfile package as used by cachecontrol can remain +- # locked if a process exits ungracefully. See eg +- # . +- # +- # FileLock from the filelock package does not have this problem, so we use that to +- # construct something compatible with cachecontrol. +- def __init__( +- self, path: str, threaded: bool = True, timeout: float | None = None +- ) -> None: +- super().__init__(path, threaded, timeout) +- self.file_lock = FileLock(self.lock_file) +- +- def acquire(self, timeout: float | None = None) -> None: +- self.file_lock.acquire(timeout=timeout) +- +- def release(self) -> None: +- self.file_lock.release() +- +- + @dataclasses.dataclass(frozen=True) + class RepositoryCertificateConfig: + cert: Path | None = dataclasses.field(default=None) +@@ -149,7 +127,6 @@ class Authenticator: + / (cache_id or "_default_cache") + / "_http" + ), +- lock_class=FileLockLockFile, + ) + if not disable_cache + else None