Skip to content

Commit 7ac51d4

Browse files
Merge branch 'main' into main
2 parents d6136ba + c79275d commit 7ac51d4

10 files changed

Lines changed: 27 additions & 16 deletions

File tree

scripts/create_baseline_stubs.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,18 @@ async def get_upstream_repo_url(project: str) -> str | None:
105105
# Remove `www.`; replace `http://` with `https://`
106106
url = re.sub(r"^(https?://)?(www\.)?", "https://", url_to_check)
107107
netloc = urllib.parse.urlparse(url).netloc
108-
if netloc in {"gitlab.com", "github.com", "bitbucket.org", "foss.heptapod.net"}:
109-
# truncate to https://site.com/user/repo
110-
upstream_repo_url = "/".join(url.split("/")[:5])
111-
async with session.get(upstream_repo_url) as response:
112-
if response.status == HTTPStatus.OK:
113-
return upstream_repo_url
108+
if netloc not in {"gitlab.com", "github.com", "bitbucket.org", "foss.heptapod.net"}:
109+
continue
110+
# truncate to https://site.com/user/repo
111+
upstream_repo_url = "/".join(url.split("/")[:5])
112+
async with session.get(upstream_repo_url, allow_redirects=True) as response:
113+
if response.status != HTTPStatus.OK:
114+
continue
115+
# final url after redirects
116+
final_url = str(response.url)
117+
# normalize again (in case redirect added extra path)
118+
final_repo_url = "/".join(final_url.split("/")[:5])
119+
return final_repo_url
114120
return None
115121

116122

stubs/Authlib/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version = "1.6.6"
2-
upstream_repository = "https://github.com/lepture/authlib"
2+
upstream_repository = "https://github.com/authlib/authlib"
33
requires = ["cryptography"]

stubs/Deprecated/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version = "~=1.3.1"
2-
upstream_repository = "https://github.com/tantale/deprecated"
2+
upstream_repository = "https://github.com/laurent-laporte-pro/deprecated"
33
requires = []

stubs/fpdf2/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version = "2.8.4"
2-
upstream_repository = "https://github.com/PyFPDF/fpdf2"
2+
upstream_repository = "https://github.com/py-pdf/fpdf2"
33
requires = ["Pillow>=10.3.0"]
44

55
[tool.stubtest]

stubs/netaddr/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "1.3.*"
2-
upstream_repository = "https://github.com/drkjam/netaddr"
2+
upstream_repository = "https://github.com/netaddr/netaddr"

stubs/psutil/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "7.2.1"
1+
version = "7.2.2"
22
upstream_repository = "https://github.com/giampaolo/psutil"
33

44
[tool.stubtest]

stubs/psutil/psutil/_psposix.pyi

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,21 @@ class Negsignal(enum.IntEnum):
5858
SIGSTKFLT = -16
5959

6060
def negsig_to_enum(num: int) -> int: ...
61-
def wait_pid(
61+
def convert_exit_code(status: int) -> int: ...
62+
def wait_pid_posix(
6263
pid: int,
6364
timeout: float | None = None,
64-
proc_name: str | None = None,
6565
_waitpid: Unused = ...,
6666
_timer: Callable[[], float] = ...,
6767
_min: Callable[..., Incomplete] = ...,
6868
_sleep: Callable[[float], None] = ...,
6969
_pid_exists: Callable[[int], bool] = ...,
7070
) -> int | None: ...
71+
def wait_pid_pidfd_open(pid: int, timeout: float | None = None) -> int | None: ...
72+
def wait_pid_kqueue(pid: int, timeout: float | None = None) -> int | None: ...
73+
def can_use_pidfd_open() -> bool: ...
74+
def can_use_kqueue() -> bool: ...
75+
def wait_pid(pid: int, timeout: float | None = None) -> int | None: ...
7176

7277
if sys.platform == "darwin":
7378
def disk_usage(path: StrOrBytesPath) -> ntp.sdiskusage: ...

stubs/ttkthemes/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "3.3.*"
2-
upstream_repository = "https://github.com/RedFantom/ttkthemes"
2+
upstream_repository = "https://github.com/TkinterEP/ttkthemes"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "0.9.*"
2-
upstream_repository = "https://github.com/alexsdutton/www-authenticate"
2+
upstream_repository = "https://github.com/alexdutton/www-authenticate"

stubs/yt-dlp/yt_dlp/YoutubeDL.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class YoutubeDL:
8989
def dl(self, name: str, info: _InfoDict, subtitle: bool = False, test: bool = False) -> bool: ...
9090
def existing_file(self, filepaths: Iterable[str], *, default_overwrite: bool = True) -> str | None: ...
9191
def process_info(self, info_dict: _InfoDict) -> None: ...
92-
def download(self, url_list: Collection[str]) -> None: ...
92+
def download(self, url_list: Collection[str]) -> int: ...
9393
def download_with_info_file(self, info_filename: str) -> int: ...
9494
@staticmethod
9595
def sanitize_info(info_dict: _InfoDict, remove_private_keys: bool = False) -> _InfoDict | None: ...

0 commit comments

Comments
 (0)