Fullscreen eingestellt.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,6 +3,7 @@
|
||||
Contains interface (MultiDomainBasicAuth) and associated glue code for
|
||||
providing credentials in the context of network requests.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
@@ -47,12 +48,12 @@ class KeyRingBaseProvider(ABC):
|
||||
has_keyring: bool
|
||||
|
||||
@abstractmethod
|
||||
def get_auth_info(self, url: str, username: Optional[str]) -> Optional[AuthInfo]:
|
||||
...
|
||||
def get_auth_info(
|
||||
self, url: str, username: Optional[str]
|
||||
) -> Optional[AuthInfo]: ...
|
||||
|
||||
@abstractmethod
|
||||
def save_auth_info(self, url: str, username: str, password: str) -> None:
|
||||
...
|
||||
def save_auth_info(self, url: str, username: str, password: str) -> None: ...
|
||||
|
||||
|
||||
class KeyRingNullProvider(KeyRingBaseProvider):
|
||||
@@ -151,7 +152,7 @@ class KeyRingCliProvider(KeyRingBaseProvider):
|
||||
env["PYTHONIOENCODING"] = "utf-8"
|
||||
subprocess.run(
|
||||
[self.keyring, "set", service_name, username],
|
||||
input=f"{password}{os.linesep}".encode("utf-8"),
|
||||
input=f"{password}{os.linesep}".encode(),
|
||||
env=env,
|
||||
check=True,
|
||||
)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"""Download files with progress indicators.
|
||||
"""
|
||||
|
||||
import email.message
|
||||
import logging
|
||||
import mimetypes
|
||||
|
||||
@@ -3,6 +3,7 @@ network request configuration and behavior.
|
||||
"""
|
||||
|
||||
import email.utils
|
||||
import functools
|
||||
import io
|
||||
import ipaddress
|
||||
import json
|
||||
@@ -106,6 +107,7 @@ def looks_like_ci() -> bool:
|
||||
return any(name in os.environ for name in CI_ENVIRONMENT_VARIABLES)
|
||||
|
||||
|
||||
@functools.lru_cache(maxsize=1)
|
||||
def user_agent() -> str:
|
||||
"""
|
||||
Return a string representing the user agent.
|
||||
@@ -230,7 +232,7 @@ class LocalFSAdapter(BaseAdapter):
|
||||
# to return a better error message:
|
||||
resp.status_code = 404
|
||||
resp.reason = type(exc).__name__
|
||||
resp.raw = io.BytesIO(f"{resp.reason}: {exc}".encode("utf8"))
|
||||
resp.raw = io.BytesIO(f"{resp.reason}: {exc}".encode())
|
||||
else:
|
||||
modified = email.utils.formatdate(stats.st_mtime, usegmt=True)
|
||||
content_type = mimetypes.guess_type(pathname)[0] or "text/plain"
|
||||
|
||||
Reference in New Issue
Block a user