fix: faster CLI on Python 3.15 (#2797)
* chore: lazy imports Signed-off-by: Henry Schreiner <henryfs@princeton.edu> * chore: bump flake8-lazy, rerun Signed-off-by: Henry Schreiner <henryfs@princeton.edu> * chore: include android Signed-off-by: Henry Schreiner <henryfs@princeton.edu> * fix: after rebase Assisted-by: ClaudeCode:claude-sonnet-4.6 Signed-off-by: Henry Schreiner <henryfs@princeton.edu> * chore: autofix __lazy_modules__ Signed-off-by: Henry Schreiner <henryfs@princeton.edu> * chore: avoid touching resources Signed-off-by: Henry Schreiner <henryfs@princeton.edu> * chore: bump flake8-lazy to v0.8.2, rerun Assisted-by: ClaudeCode:claude-sonnet-4-6 --------- Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
This commit is contained in:
@@ -77,6 +77,14 @@ repos:
|
|||||||
files: '^(README\.md|docs/changelog\.md|docs/options\.md|bin/readme.*)$'
|
files: '^(README\.md|docs/changelog\.md|docs/options\.md|bin/readme.*)$'
|
||||||
additional_dependencies: [cogapp>=3.5]
|
additional_dependencies: [cogapp>=3.5]
|
||||||
|
|
||||||
|
- repo: https://github.com/henryiii/flake8-lazy
|
||||||
|
rev: 65b94e97b1091634368592d98072160842265fe4 # frozen: v0.8.2
|
||||||
|
hooks:
|
||||||
|
- id: flake8-lazy
|
||||||
|
args: ["--apply=set"]
|
||||||
|
files: '^cibuildwheel'
|
||||||
|
exclude: "^cibuildwheel/resources/"
|
||||||
|
|
||||||
- repo: https://github.com/codespell-project/codespell
|
- repo: https://github.com/codespell-project/codespell
|
||||||
rev: 2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a # frozen: v2.4.2
|
rev: 2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a # frozen: v2.4.2
|
||||||
hooks:
|
hooks:
|
||||||
|
|||||||
@@ -1,5 +1,30 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"argparse",
|
||||||
|
"cibuildwheel._compat",
|
||||||
|
"cibuildwheel._compat.tarfile",
|
||||||
|
"cibuildwheel.architecture",
|
||||||
|
"cibuildwheel.ci",
|
||||||
|
"cibuildwheel.logger",
|
||||||
|
"cibuildwheel.options",
|
||||||
|
"cibuildwheel.platforms",
|
||||||
|
"cibuildwheel.selector",
|
||||||
|
"cibuildwheel.typing",
|
||||||
|
"cibuildwheel.util",
|
||||||
|
"cibuildwheel.util.file",
|
||||||
|
"cibuildwheel.util.helpers",
|
||||||
|
"cibuildwheel.util.resources",
|
||||||
|
"contextlib",
|
||||||
|
"functools",
|
||||||
|
"io",
|
||||||
|
"pathlib",
|
||||||
|
"shutil",
|
||||||
|
"tempfile",
|
||||||
|
"textwrap",
|
||||||
|
"traceback",
|
||||||
|
}
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import contextlib
|
import contextlib
|
||||||
import dataclasses
|
import dataclasses
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {"platform", "re", "shutil", "subprocess"}
|
||||||
|
|
||||||
import platform as platform_module
|
import platform as platform_module
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
|
|||||||
@@ -1,5 +1,16 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"cibuildwheel.logger",
|
||||||
|
"cibuildwheel.util",
|
||||||
|
"cibuildwheel.util.cmd",
|
||||||
|
"cibuildwheel.util.helpers",
|
||||||
|
"cibuildwheel.util.packaging",
|
||||||
|
"cibuildwheel.venv",
|
||||||
|
"pathlib",
|
||||||
|
"subprocess",
|
||||||
|
}
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {"bashlex", "subprocess"}
|
||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
__lazy_modules__ = {"cibuildwheel.util", "cibuildwheel.util.helpers"}
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {"bashlex", "bashlex.errors"}
|
||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
from typing import Protocol
|
from typing import Protocol
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ a different return code, by defining them all here, we can ensure that they're
|
|||||||
semantically clear and unique.
|
semantically clear and unique.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
__lazy_modules__ = {"textwrap"}
|
||||||
|
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ These are utilities for the `/bin` scripts, not for the `cibuildwheel` program.
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {"io", "json", "urllib", "urllib.error", "urllib.request"}
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
import typing
|
import typing
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {"cibuildwheel.util", "cibuildwheel.util.helpers", "shlex"}
|
||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import shlex
|
import shlex
|
||||||
import typing
|
import typing
|
||||||
|
|||||||
@@ -1,5 +1,17 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"cibuildwheel.ci",
|
||||||
|
"contextlib",
|
||||||
|
"functools",
|
||||||
|
"hashlib",
|
||||||
|
"humanize",
|
||||||
|
"io",
|
||||||
|
"pathlib",
|
||||||
|
"re",
|
||||||
|
"textwrap",
|
||||||
|
}
|
||||||
|
|
||||||
import codecs
|
import codecs
|
||||||
import contextlib
|
import contextlib
|
||||||
import dataclasses
|
import dataclasses
|
||||||
|
|||||||
@@ -1,5 +1,23 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"cibuildwheel.ci",
|
||||||
|
"cibuildwheel.errors",
|
||||||
|
"cibuildwheel.logger",
|
||||||
|
"cibuildwheel.util",
|
||||||
|
"cibuildwheel.util.cmd",
|
||||||
|
"cibuildwheel.util.helpers",
|
||||||
|
"contextlib",
|
||||||
|
"io",
|
||||||
|
"json",
|
||||||
|
"platform",
|
||||||
|
"shlex",
|
||||||
|
"shutil",
|
||||||
|
"subprocess",
|
||||||
|
"textwrap",
|
||||||
|
"uuid",
|
||||||
|
}
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import io
|
import io
|
||||||
|
|||||||
@@ -1,5 +1,29 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"cibuildwheel.architecture",
|
||||||
|
"cibuildwheel.environment",
|
||||||
|
"cibuildwheel.frontend",
|
||||||
|
"cibuildwheel.logger",
|
||||||
|
"cibuildwheel.oci_container",
|
||||||
|
"cibuildwheel.projectfiles",
|
||||||
|
"cibuildwheel.selector",
|
||||||
|
"cibuildwheel.typing",
|
||||||
|
"cibuildwheel.util",
|
||||||
|
"cibuildwheel.util.helpers",
|
||||||
|
"cibuildwheel.util.packaging",
|
||||||
|
"collections",
|
||||||
|
"configparser",
|
||||||
|
"contextlib",
|
||||||
|
"difflib",
|
||||||
|
"packaging",
|
||||||
|
"packaging.specifiers",
|
||||||
|
"pathlib",
|
||||||
|
"shlex",
|
||||||
|
"textwrap",
|
||||||
|
"tomllib",
|
||||||
|
}
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
import configparser
|
import configparser
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|||||||
@@ -1,5 +1,33 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"build",
|
||||||
|
"build.env",
|
||||||
|
"cibuildwheel.architecture",
|
||||||
|
"cibuildwheel.audit",
|
||||||
|
"cibuildwheel.frontend",
|
||||||
|
"cibuildwheel.logger",
|
||||||
|
"cibuildwheel.util.cmd",
|
||||||
|
"cibuildwheel.util.file",
|
||||||
|
"cibuildwheel.util.helpers",
|
||||||
|
"cibuildwheel.util.packaging",
|
||||||
|
"cibuildwheel.util.python_build_standalone",
|
||||||
|
"cibuildwheel.venv",
|
||||||
|
"filelock",
|
||||||
|
"packaging",
|
||||||
|
"packaging.utils",
|
||||||
|
"pathlib",
|
||||||
|
"platform",
|
||||||
|
"pprint",
|
||||||
|
"re",
|
||||||
|
"runpy",
|
||||||
|
"shlex",
|
||||||
|
"shutil",
|
||||||
|
"subprocess",
|
||||||
|
"textwrap",
|
||||||
|
"typing",
|
||||||
|
}
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
|
|||||||
@@ -1,5 +1,28 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"cibuildwheel.audit",
|
||||||
|
"cibuildwheel.frontend",
|
||||||
|
"cibuildwheel.logger",
|
||||||
|
"cibuildwheel.platforms.macos",
|
||||||
|
"cibuildwheel.util",
|
||||||
|
"cibuildwheel.util.cmd",
|
||||||
|
"cibuildwheel.util.file",
|
||||||
|
"cibuildwheel.util.helpers",
|
||||||
|
"cibuildwheel.util.packaging",
|
||||||
|
"cibuildwheel.venv",
|
||||||
|
"filelock",
|
||||||
|
"packaging",
|
||||||
|
"packaging.version",
|
||||||
|
"pathlib",
|
||||||
|
"platform",
|
||||||
|
"shlex",
|
||||||
|
"shutil",
|
||||||
|
"subprocess",
|
||||||
|
"textwrap",
|
||||||
|
"typing",
|
||||||
|
}
|
||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"cibuildwheel.audit",
|
||||||
|
"cibuildwheel.frontend",
|
||||||
|
"cibuildwheel.logger",
|
||||||
|
"cibuildwheel.util",
|
||||||
|
"cibuildwheel.util.file",
|
||||||
|
"cibuildwheel.util.helpers",
|
||||||
|
"cibuildwheel.util.packaging",
|
||||||
|
"collections",
|
||||||
|
"contextlib",
|
||||||
|
"pathlib",
|
||||||
|
"shutil",
|
||||||
|
"subprocess",
|
||||||
|
"textwrap",
|
||||||
|
"typing",
|
||||||
|
}
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import shutil
|
import shutil
|
||||||
|
|||||||
@@ -1,5 +1,27 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"cibuildwheel.audit",
|
||||||
|
"cibuildwheel.ci",
|
||||||
|
"cibuildwheel.frontend",
|
||||||
|
"cibuildwheel.logger",
|
||||||
|
"cibuildwheel.util",
|
||||||
|
"cibuildwheel.util.cmd",
|
||||||
|
"cibuildwheel.util.file",
|
||||||
|
"cibuildwheel.util.helpers",
|
||||||
|
"cibuildwheel.util.packaging",
|
||||||
|
"cibuildwheel.venv",
|
||||||
|
"filelock",
|
||||||
|
"inspect",
|
||||||
|
"packaging",
|
||||||
|
"packaging.version",
|
||||||
|
"pathlib",
|
||||||
|
"platform",
|
||||||
|
"re",
|
||||||
|
"shutil",
|
||||||
|
"subprocess",
|
||||||
|
}
|
||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import functools
|
import functools
|
||||||
import inspect
|
import inspect
|
||||||
|
|||||||
@@ -1,5 +1,26 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"cibuildwheel.architecture",
|
||||||
|
"cibuildwheel.audit",
|
||||||
|
"cibuildwheel.frontend",
|
||||||
|
"cibuildwheel.logger",
|
||||||
|
"cibuildwheel.util",
|
||||||
|
"cibuildwheel.util.cmd",
|
||||||
|
"cibuildwheel.util.file",
|
||||||
|
"cibuildwheel.util.helpers",
|
||||||
|
"cibuildwheel.util.packaging",
|
||||||
|
"cibuildwheel.util.python_build_standalone",
|
||||||
|
"cibuildwheel.venv",
|
||||||
|
"filelock",
|
||||||
|
"json",
|
||||||
|
"pathlib",
|
||||||
|
"shutil",
|
||||||
|
"subprocess",
|
||||||
|
"tempfile",
|
||||||
|
"tomllib",
|
||||||
|
}
|
||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import functools
|
import functools
|
||||||
import json
|
import json
|
||||||
|
|||||||
@@ -1,5 +1,25 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"cibuildwheel.architecture",
|
||||||
|
"cibuildwheel.audit",
|
||||||
|
"cibuildwheel.frontend",
|
||||||
|
"cibuildwheel.logger",
|
||||||
|
"cibuildwheel.util",
|
||||||
|
"cibuildwheel.util.cmd",
|
||||||
|
"cibuildwheel.util.file",
|
||||||
|
"cibuildwheel.util.helpers",
|
||||||
|
"cibuildwheel.util.packaging",
|
||||||
|
"cibuildwheel.venv",
|
||||||
|
"filelock",
|
||||||
|
"pathlib",
|
||||||
|
"platform",
|
||||||
|
"shutil",
|
||||||
|
"subprocess",
|
||||||
|
"textwrap",
|
||||||
|
"typing",
|
||||||
|
}
|
||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import os
|
import os
|
||||||
import platform as platform_module
|
import platform as platform_module
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {"configparser", "contextlib", "dependency_groups"}
|
||||||
|
|
||||||
import ast
|
import ast
|
||||||
import configparser
|
import configparser
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {"cibuildwheel.util", "json"}
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from cibuildwheel.util import resources
|
from cibuildwheel.util import resources
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {"bracex", "fnmatch", "itertools", "packaging", "packaging.version"}
|
||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import itertools
|
import itertools
|
||||||
from enum import StrEnum
|
from enum import StrEnum
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {"cibuildwheel.errors", "shlex", "shutil", "subprocess"}
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import shlex
|
import shlex
|
||||||
import shutil
|
import shutil
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"certifi",
|
||||||
|
"cibuildwheel.errors",
|
||||||
|
"hashlib",
|
||||||
|
"shutil",
|
||||||
|
"ssl",
|
||||||
|
"tarfile",
|
||||||
|
"typing",
|
||||||
|
"urllib",
|
||||||
|
"urllib.request",
|
||||||
|
"zipfile",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {"collections", "itertools", "re", "shlex", "textwrap"}
|
||||||
|
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import itertools
|
import itertools
|
||||||
import re
|
import re
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"cibuildwheel.util.cmd",
|
||||||
|
"cibuildwheel.util.helpers",
|
||||||
|
"packaging",
|
||||||
|
"packaging.utils",
|
||||||
|
"shlex",
|
||||||
|
}
|
||||||
|
|
||||||
import shlex
|
import shlex
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from pathlib import Path, PurePath
|
from pathlib import Path, PurePath
|
||||||
|
|||||||
@@ -1,5 +1,16 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"cibuildwheel.util.file",
|
||||||
|
"cibuildwheel.util.resources",
|
||||||
|
"filelock",
|
||||||
|
"fnmatch",
|
||||||
|
"hashlib",
|
||||||
|
"json",
|
||||||
|
"platform",
|
||||||
|
"subprocess",
|
||||||
|
}
|
||||||
|
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import functools
|
import functools
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {"tomllib"}
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
import tomllib
|
import tomllib
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|||||||
@@ -1,5 +1,20 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
__lazy_modules__ = {
|
||||||
|
"cibuildwheel.util",
|
||||||
|
"cibuildwheel.util.cmd",
|
||||||
|
"cibuildwheel.util.file",
|
||||||
|
"contextlib",
|
||||||
|
"filelock",
|
||||||
|
"packaging",
|
||||||
|
"packaging.markers",
|
||||||
|
"packaging.requirements",
|
||||||
|
"packaging.version",
|
||||||
|
"pathlib",
|
||||||
|
"shutil",
|
||||||
|
"tomllib",
|
||||||
|
}
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
import functools
|
import functools
|
||||||
import os
|
import os
|
||||||
|
|||||||
Reference in New Issue
Block a user