-
Notifications
You must be signed in to change notification settings - Fork 727
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devel/py-poetry: Fix build after fa2d4aa
- Bump PORTREVISION for dependency and package change Obtained from: python-poetry/poetry@fca3d5d
- Loading branch information
Showing
2 changed files
with
154 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
- # <https://github.com/python-poetry/poetry/issues/6030#issuecomment-1189383875>. | ||
- # | ||
- # 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 |