From dddccd1405a7edd3a476005bb285e8460dc649e4 Mon Sep 17 00:00:00 2001 From: Matt Broadway Date: Sat, 7 Dec 2024 00:26:56 +0000 Subject: [PATCH] Upgrade maturin (#9) --- .pre-commit-config.yaml | 8 +- src/maturin_import_hook/__main__.py | 10 +- src/maturin_import_hook/_building.py | 2 +- src/maturin_import_hook/_resolve_project.py | 28 +- src/maturin_import_hook/project_importer.py | 4 +- src/maturin_import_hook/rust_file_importer.py | 2 + src/maturin_import_hook/settings.py | 7 +- tests/README.md | 17 +- tests/maturin | 2 +- tests/package_resolver/Cargo.lock | 1417 +++++++++++------ tests/package_resolver/Cargo.toml | 4 +- tests/package_resolver/src/main.rs | 13 +- tests/requirements.txt | 4 +- tests/resolved.json | 3 +- tests/runner.py | 69 +- tests/test_import_hook/common.py | 7 +- tests/test_import_hook/conftest.py | 3 +- .../file_importer_helpers/my_script_1.rs | 2 +- .../file_importer_helpers/my_script_2.rs | 4 +- .../file_importer_helpers/my_script_3.rs | 2 +- .../packages/my_rust_module.rs | 4 +- .../packages/subpackage/my_rust_module.rs | 5 +- .../file_importer_helpers/reload_template.rs | 20 +- .../blank-project/Cargo.lock | 159 +- .../blank-project/Cargo.toml | 2 +- .../logging_reload_helper.py | 3 +- .../reload_template.rs | 12 +- .../test_import_hook/test_project_importer.py | 81 +- .../test_rust_file_importer.py | 10 +- tests/test_import_hook/test_site.py | 1 + tests/test_import_hook/test_utilities.py | 11 +- 31 files changed, 1174 insertions(+), 742 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 546870f..4001a5c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-yaml - id: check-toml @@ -8,13 +8,13 @@ repos: - id: trailing-whitespace - id: mixed-line-ending - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.9 + rev: v0.7.4 hooks: - id: ruff-format - id: ruff args: [ --fix ] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.10.0 + rev: v1.13.0 hooks: # note: mypy runs in an isolated environment and so has no access to third party packages - id: mypy @@ -26,6 +26,6 @@ repos: hooks: - id: codespell - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.41.0 + rev: v0.42.0 hooks: - id: markdownlint-fix diff --git a/src/maturin_import_hook/__main__.py b/src/maturin_import_hook/__main__.py index 6f9559d..999718f 100644 --- a/src/maturin_import_hook/__main__.py +++ b/src/maturin_import_hook/__main__.py @@ -191,10 +191,12 @@ def _main() -> None: install.add_argument( "--user", action="store_true", - help="whether to install into usercustomize.py instead of sitecustomize.py. " - "Note that usercustomize.py is shared between virtualenvs of the same interpreter version and is not loaded " - "unless the virtualenv is created with the `--system-site-packages` argument. Use `site info` to check " - "whether usercustomize.py is loaded the current interpreter.", + help=( + "whether to install into usercustomize.py instead of sitecustomize.py. " + "Note that usercustomize.py is shared between virtualenvs of the same interpreter version and is " + "not loaded unless the virtualenv is created with the `--system-site-packages` argument. " + "Use `site info` to check whether usercustomize.py is loaded the current interpreter." + ), ) uninstall = site_sub_actions.add_parser( diff --git a/src/maturin_import_hook/_building.py b/src/maturin_import_hook/_building.py index 14f360a..cd03508 100644 --- a/src/maturin_import_hook/_building.py +++ b/src/maturin_import_hook/_building.py @@ -208,7 +208,7 @@ def get_maturin_version(maturin_path: Path) -> tuple[int, int, int]: if not success: msg = f'running "{maturin_path} --version" failed' raise MaturinError(msg) - match = re.fullmatch(r"maturin ([0-9]+)\.([0-9]+)\.([0-9]+)\n", output) + match = re.fullmatch(r"maturin ([0-9]+)\.([0-9]+)\.([0-9]+)(-.*)?\n", output) if match is None: msg = f'unexpected version string: "{output}"' raise MaturinError(msg) diff --git a/src/maturin_import_hook/_resolve_project.py b/src/maturin_import_hook/_resolve_project.py index c89eb6f..86b7d25 100644 --- a/src/maturin_import_hook/_resolve_project.py +++ b/src/maturin_import_hook/_resolve_project.py @@ -60,7 +60,7 @@ def get_value(self, keys: list[str], required_type: type[_T]) -> Optional[_T]: def find_cargo_manifest(project_dir: Path) -> Optional[Path]: pyproject_path = project_dir / "pyproject.toml" - if pyproject_path.exists(): + if pyproject_path.is_file(): pyproject_data = pyproject_path.read_text() if "manifest-path" in pyproject_data: pyproject = _TomlFile.from_string(pyproject_path, pyproject_data) @@ -69,17 +69,17 @@ def find_cargo_manifest(project_dir: Path) -> Optional[Path]: return project_dir / relative_manifest_path manifest_path = project_dir / "Cargo.toml" - if manifest_path.exists(): + if manifest_path.is_file(): return manifest_path manifest_path = project_dir / "rust/Cargo.toml" - if manifest_path.exists(): + if manifest_path.is_file(): return manifest_path return None -def is_maybe_maturin_project(project_dir: Path) -> bool: +def is_maybe_maturin_project(directory: Path) -> bool: """note: this function does not check if this really is a maturin project for simplicity.""" - return (project_dir / "pyproject.toml").exists() and find_cargo_manifest(project_dir) is not None + return (directory / "pyproject.toml").is_file() and find_cargo_manifest(directory) is not None class ProjectResolver: @@ -142,7 +142,7 @@ def all_path_dependencies(self) -> list[Path]: def _find_all_path_dependencies(immediate_path_dependencies: list[Path]) -> list[Path]: if not immediate_path_dependencies: return [] - all_path_dependencies = set() + all_path_dependencies: set[Path] = set() to_search = immediate_path_dependencies.copy() while to_search: dependency_project_dir = to_search.pop() @@ -170,6 +170,9 @@ def _resolve_project(project_dir: Path) -> MaturinProject: msg = "no pyproject.toml found" raise _ProjectResolveError(msg) pyproject = _TomlFile.load(pyproject_path) + if not _is_valid_pyproject(pyproject): + msg = "pyproject.toml is invalid (does not have required fields)" + raise _ProjectResolveError(msg) manifest_path = find_cargo_manifest(project_dir) if manifest_path is None: @@ -203,6 +206,13 @@ def _resolve_project(project_dir: Path) -> MaturinProject: ) +def _is_valid_pyproject(pyproject: _TomlFile) -> bool: + """in maturin serde is used to load into a `PyProjectToml` struct. + This function should match whether the toml would parse correctly""" + # it should be sufficient to check the required fields rather than match the serde parsing logic exactly + return pyproject.get_value(["build-system", "requires"], list) is not None + + def _resolve_rust_module(python_dir: Path, module_name: str) -> tuple[Path, Path, str]: """This follows the same logic as project_layout.rs (ProjectLayout::determine). @@ -244,11 +254,11 @@ def _resolve_module_name(pyproject: _TomlFile, cargo: _TomlFile) -> Optional[str def _get_immediate_path_dependencies(manifest_dir_path: Path, cargo: _TomlFile) -> list[Path]: - path_dependencies = [] + path_dependencies: list[Path] = [] for dependency in cargo.get_value_or_default(["dependencies"], dict, {}).values(): if isinstance(dependency, dict): - relative_path = dependency.get("path", None) - if relative_path is not None: + relative_path: Any = dependency.get("path", None) + if relative_path is not None and isinstance(relative_path, str): path_dependencies.append((manifest_dir_path / relative_path).resolve()) return path_dependencies diff --git a/src/maturin_import_hook/project_importer.py b/src/maturin_import_hook/project_importer.py index 33c6ba8..a133123 100644 --- a/src/maturin_import_hook/project_importer.py +++ b/src/maturin_import_hook/project_importer.py @@ -104,7 +104,7 @@ def find_maturin(self) -> Path: return self._maturin_path def invalidate_caches(self) -> None: - """called by importlib.invalidate_caches()""" + """called by `importlib.invalidate_caches()`""" logger.info("clearing cache") self._resolver.clear_cache() _find_maturin_project_above.cache_clear() @@ -172,6 +172,8 @@ def find_spec( logger.info('rebuilt and loaded package "%s" in %.3fs', package_name, duration) else: logger.debug('loaded package "%s" in %.3fs', package_name, duration) + elif logger.isEnabledFor(logging.DEBUG): + logger.debug('%s did not find "%s"', type(self).__name__, package_name) return spec def _handle_reload(self, package_name: str, spec: ModuleSpec) -> ModuleSpec: diff --git a/src/maturin_import_hook/rust_file_importer.py b/src/maturin_import_hook/rust_file_importer.py index c50d0fd..fc45019 100644 --- a/src/maturin_import_hook/rust_file_importer.py +++ b/src/maturin_import_hook/rust_file_importer.py @@ -144,6 +144,8 @@ def find_spec( logger.info('rebuilt and loaded module "%s" in %.3fs', fullname, duration) else: logger.debug('loaded module "%s" in %.3fs', fullname, duration) + elif logger.isEnabledFor(logging.DEBUG): + logger.debug('%s did not find "%s"', type(self).__name__, fullname) return spec diff --git a/src/maturin_import_hook/settings.py b/src/maturin_import_hook/settings.py index ed0c3d2..7a55407 100644 --- a/src/maturin_import_hook/settings.py +++ b/src/maturin_import_hook/settings.py @@ -99,7 +99,7 @@ def to_args(self) -> list[str]: class MaturinBuildSettings(MaturinSettings): """settings for `maturin build`.""" - skip_auditwheel: bool = False + auditwheel: Optional[str] = None zig: bool = False @staticmethod @@ -108,8 +108,9 @@ def supported_commands() -> set[str]: def to_args(self) -> list[str]: args = [] - if self.skip_auditwheel: - args.append("--skip-auditwheel") + if self.auditwheel is not None: + args.append("--auditwheel") + args.append(self.auditwheel) if self.zig: args.append("--zig") args.extend(super().to_args()) diff --git a/tests/README.md b/tests/README.md index 50ff759..7fcdfe5 100644 --- a/tests/README.md +++ b/tests/README.md @@ -33,12 +33,27 @@ To update maturin: - update the submodule to the maturin commit you want to update to - re-run the `package_resolver` to update `resolved.json` (see `package_resolver/README.md` for instructions) -- update `requirements.txt` to match the packages and versions used by the maturin ci (`.github/workflows.test.yml`) +- update `requirements.txt` to match the packages and versions installed by the maturin ci + (see `pip` and `uv` commands in `maturin/.github/workflows/test.yml`) - check the `uniffi` package version listed in the `Cargo.toml` of any of the `uniffi-*` test crates and update `uniffi-bindgen` in `requirements.txt` to match. - check that no crates have been added to `test-crates` that should be excluded from the import hook tests. If so, add them to `IGNORED_TEST_CRATES` in `common.py` +- upgrade the test packages in `test_import_hook/*_helpers` + - check what version of `pyo3` is used by the command: `maturin new --bindings pyo3` - update the version check in the import hook to ensure it allows using the new version +- run the tests to ensure everything still works + +Released versions of the import hook should use a tagged version of maturin, but during development, in order +to use a specific maturin commit: + +- use `maturin @ git+https://github.com/PyO3/maturin@xxxxxxx` in `requirements.txt` + - where `xxxxxxx` is a git commit hash +- `export MATURIN_SETUP_ARGS="--features=scaffolding"` before running `runner.py` + - the `setup.py` of `maturin` uses this environment variable when building from source. the `scaffolding` feature + is required for `maturin new`. + - Make sure a cached built version of this commit is not available because `uv` doesn't know about the + environment variable. run `uv cache clean maturin` to remove any cached versions. ## Notes diff --git a/tests/maturin b/tests/maturin index 894231c..e403fdf 160000 --- a/tests/maturin +++ b/tests/maturin @@ -1 +1 @@ -Subproject commit 894231c644c2d7a9a31349c86b3f3c431b74d615 +Subproject commit e403fdf811d0ccae12001586adc160e977d47c16 diff --git a/tests/package_resolver/Cargo.lock b/tests/package_resolver/Cargo.lock index c2dfb31..569a237 100644 --- a/tests/package_resolver/Cargo.lock +++ b/tests/package_resolver/Cargo.lock @@ -3,16 +3,16 @@ version = 3 [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "once_cell", @@ -22,84 +22,88 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] -name = "autocfg" -version = "1.1.0" +name = "arbitrary" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +dependencies = [ + "derive_arbitrary", +] [[package]] -name = "base64" -version = "0.13.1" +name = "autocfg" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "base64" @@ -108,16 +112,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "bitflags" -version = "1.3.2" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -130,14 +134,20 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" +checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" dependencies = [ "memchr", "serde", ] +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + [[package]] name = "byteorder" version = "1.5.0" @@ -146,9 +156,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "bytesize" @@ -179,9 +189,9 @@ dependencies = [ [[package]] name = "cab" -version = "0.4.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6b4de23c7d39c0631fd3cc952d87951c86c75a13812d7247cb7a896e7b3551" +checksum = "171228650e6721d5acc0868a462cd864f49ac5f64e4a42cde270406e64e404d2" dependencies = [ "byteorder", "flate2", @@ -191,18 +201,18 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.6" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] [[package]] name = "cargo-config2" -version = "0.1.26" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83ce0be8bd1479e5de6202def660e6c7e27e4e0599bffa4fed05bd380ec2ede" +checksum = "1124054becb9262cc15c5e96e82f0d782f2aed3a3034d1f71a6385a6fa9e9595" dependencies = [ "home", "serde", @@ -222,25 +232,25 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" dependencies = [ "serde", ] [[package]] name = "cargo-xwin" -version = "0.16.4" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6c3dd7f20fdd197397532ac882e918cfe1d56f262a97ded7460a50e031e06b" +checksum = "9cfe03fae5d4f7192f1a573f84d12b11f20877d43941ea3730289cc7af050531" dependencies = [ "anyhow", "cargo-config2", "cargo-options", "clap", "dirs", - "fs-err", + "fs-err 3.0.0", "indicatif", "paste", "path-slash", @@ -248,75 +258,81 @@ dependencies = [ "rustls-pemfile", "tracing-subscriber", "ureq", - "which 5.0.0", + "which", "xwin", ] [[package]] name = "cargo-zigbuild" -version = "0.18.4" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65004153e67ac23be88a8e244304a872d727b2aa08654dcabfbecd1fdea4a488" +checksum = "5eb13fbc2ba490ac9eb0b359cf46ba265255424c04a172f1c1772a8b9532283d" dependencies = [ "anyhow", + "cargo-config2", "cargo-options", "cargo_metadata", "clap", + "crc", "dirs", - "fs-err", + "fs-err 3.0.0", "path-slash", "rustc_version", + "rustflags", "semver", "serde", "serde_json", "shlex", "target-lexicon", - "which 6.0.0", + "which", ] [[package]] name = "cargo_metadata" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +checksum = "afc309ed89476c8957c50fb818f56fe894db857866c3e163335faa91dc34eb85" dependencies = [ "camino", "cargo-platform", "semver", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "cbindgen" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da6bc11b07529f16944307272d5bd9b22530bc7d05751717c9d416586cedab49" +checksum = "3fce8dd7fcfcbf3a0a87d8f515194b49d6135acab73e18bd380d1d93bb1a15eb" dependencies = [ - "heck", - "indexmap 1.9.3", + "heck 0.4.1", + "indexmap", "log", "proc-macro2", "quote", "serde", "serde_json", - "syn 1.0.109", + "syn 2.0.90", "tempfile", - "toml 0.5.11", + "toml", ] [[package]] name = "cc" -version = "1.0.90" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" +dependencies = [ + "shlex", +] [[package]] name = "cfb" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b390793e912300f1aa713429f7fd0c391024e6c18b988962558bc4f96a349b1f" +checksum = "d8a4f8e55be323b378facfcf1f06aa97f6ec17cf4ac84fb17325093aaf62da41" dependencies = [ "byteorder", "fnv", @@ -331,11 +347,11 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "charset" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e9079d1a12a2cc2bffb5db039c43661836ead4082120d5844f02555aca2d46" +checksum = "f1f927b07c74ba84c7e5fe4db2baeb3e996ab2688992e39ac68ce3220a677c7e" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", "encoding_rs", ] @@ -345,15 +361,15 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eebd66744a15ded14960ab4ccdbfb51ad3b81f51f3f04a80adac98c985396c9" dependencies = [ - "hashbrown 0.14.3", + "hashbrown 0.14.5", "stacker", ] [[package]] name = "clap" -version = "4.4.18" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" dependencies = [ "clap_builder", "clap_derive", @@ -361,9 +377,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" dependencies = [ "anstream", "anstyle", @@ -374,18 +390,18 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.4.9" +version = "4.5.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df631ae429f6613fcd3a7c1adbdb65f637271e561b03680adaa6573015dfb106" +checksum = "d9647a559c112175f17cf724dc72d3645680a883c58481332779192b0d8e7a01" dependencies = [ "clap", ] [[package]] name = "clap_complete_command" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "183495371ea78d4c9ff638bfc6497d46fed2396e4f9c50aebc1278a4a9919a3d" +checksum = "da8e198c052315686d36371e8a3c5778b7852fc75cc313e4e11eeb7a644a1b62" dependencies = [ "clap", "clap_complete", @@ -394,9 +410,9 @@ dependencies = [ [[package]] name = "clap_complete_nushell" -version = "0.1.11" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d02bc8b1a18ee47c4d2eec3fb5ac034dc68ebea6125b1509e9ccdffcddce66e" +checksum = "315902e790cc6e5ddd20cbd313c1d0d49db77f191e149f96397230fb82a17677" dependencies = [ "clap", "clap_complete", @@ -404,43 +420,43 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.90", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "cli-table" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adfbb116d9e2c4be7011360d0c0bee565712c11e969c9609b25b619366dc379d" +checksum = "b53f9241f288a7b12c56565f04aaeaeeab6b8923d42d99255d4ca428b4d97f89" dependencies = [ "termcolor", - "unicode-width", + "unicode-width 0.1.14", ] [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "configparser" -version = "3.0.4" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec6d3da8e550377a85339063af6e3735f4b1d9392108da4e083a1b3b9820288" +checksum = "e57e3272f0190c3f1584272d613719ba5fc7df7f4942fe542e63d949cf3a649b" [[package]] name = "console" @@ -451,33 +467,48 @@ dependencies = [ "encode_unicode", "lazy_static", "libc", - "unicode-width", + "unicode-width 0.1.14", "windows-sys 0.52.0", ] [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.11" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -503,9 +534,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crypto-common" @@ -519,9 +550,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "deranged" @@ -543,6 +574,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "dialoguer" version = "0.11.0" @@ -551,7 +593,7 @@ checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" dependencies = [ "console", "shell-words", - "thiserror", + "thiserror 1.0.69", "zeroize", ] @@ -586,17 +628,28 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -606,9 +659,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -621,46 +674,46 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "fastrand" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "fat-macho" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4c93f393add03d72bc10dd3dea43a1610ecb29e0c0a6459c70b53b82931adf" +checksum = "4c9c45caa6c6edfaee4cb3bd84ea9686e115df7f0efb530e15fb466eccb0b345" dependencies = [ "goblin", ] [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -690,6 +743,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "fs-err" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb60e7409f34ef959985bc9d9c5ee8f5db24ee46ed9775850548021710f807f" +dependencies = [ + "autocfg", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -702,9 +764,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -719,22 +781,22 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.4", - "regex-syntax 0.8.2", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] name = "goblin" -version = "0.8.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb07a4ffed2093b118a525b1d8f5204ae274faed5604537caf7135d0f18d9887" +checksum = "53ab3f32d1d77146981dea5d6b1e8fe31eedcb7013e5e00d6ccd1259a4b4d923" dependencies = [ "log", "plain", @@ -743,26 +805,32 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + [[package]] name = "heck" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "home" version = "0.5.9" @@ -772,27 +840,156 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", "log", "memchr", - "regex-automata 0.4.4", + "regex-automata 0.4.9", "same-file", "walkdir", "winapi-util", @@ -800,142 +997,161 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.2.6" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.15.2", "serde", ] [[package]] name = "indicatif" -version = "0.17.7" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" +checksum = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281" dependencies = [ "console", - "instant", "number_prefix", "portable-atomic", - "unicode-width", + "unicode-width 0.2.0", + "web-time", ] [[package]] -name = "instant" -version = "0.1.12" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] [[package]] name = "itertools" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "js-sys" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" +dependencies = [ + "once_cell", + "wasm-bindgen", +] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lddtree" -version = "0.3.4" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88a93876d2485ede9c97d698c164cf5c024491908483964a998faae9705dea6" +checksum = "e0779ac94bd7b6ab781fa12388dbf79ac45ec1fa433e7d25521753be8227b08e" dependencies = [ - "fs-err", + "fs-err 3.0.0", "glob", "goblin", ] [[package]] name = "libc" -version = "0.2.152" +version = "0.2.167" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" + +[[package]] +name = "libmimalloc-sys" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44" +dependencies = [ + "cc", + "libc", +] [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.2", + "bitflags", "libc", "redox_syscall", ] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "litemap" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", ] +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lzxd" -version = "0.1.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784462f20dddd9dfdb45de963fa4ad4a288cb10a7889ac5d2c34fb6481c6b213" +checksum = "5de7336a183103429ad66d11d56d8bdc9c4a2916f6b85a8f11e5b127bde12001" [[package]] name = "mailparse" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d096594926cab442e054e047eb8c1402f7d5b2272573b97ba68aa40629f9757" +checksum = "3da03d5980411a724e8aaf7b61a7b5e386ec55a7fb49ee3d0ff79efc7e5e7c7e" dependencies = [ "charset", "data-encoding", - "quoted_printable 0.5.0", + "quoted_printable", ] [[package]] @@ -949,7 +1165,7 @@ dependencies = [ [[package]] name = "maturin" -version = "1.6.0" +version = "1.7.8" dependencies = [ "anyhow", "base64 0.21.7", @@ -970,11 +1186,11 @@ dependencies = [ "dunce", "fat-macho", "flate2", - "fs-err", + "fs-err 3.0.0", "glob", "goblin", "ignore", - "indexmap 2.2.6", + "indexmap", "itertools 0.12.1", "lddtree", "minijinja", @@ -991,6 +1207,7 @@ dependencies = [ "rustc_version", "rustls", "rustls-pemfile", + "same-file", "semver", "serde", "serde_json", @@ -999,9 +1216,9 @@ dependencies = [ "target-lexicon", "tempfile", "textwrap", - "thiserror", + "thiserror 2.0.3", "time", - "toml 0.8.12", + "toml", "toml_edit", "tracing", "tracing-subscriber", @@ -1014,9 +1231,18 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "mimalloc" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "68914350ae34959d83f732418d51e2427a794055d0b9529f48259ac07af65633" +dependencies = [ + "libmimalloc-sys", +] [[package]] name = "mime" @@ -1026,9 +1252,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -1036,9 +1262,9 @@ dependencies = [ [[package]] name = "minijinja" -version = "1.0.12" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe0ff215195a22884d867b547c70a0c4815cbbcc70991f281dca604b20d10ce" +checksum = "2c37e1b517d1dcd0e51dc36c4567b9d5a29262b3ec8da6cb5d35e27a8fb529b5" dependencies = [ "serde", ] @@ -1051,18 +1277,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "msi" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b2404f03d2cf47375b9715c8adfae4e388bb2377cff908e8a40f31e421514" +checksum = "4a2332f87a064dea9cce571408c879e0da8dc193b3af06a2b3b2604ee4182a32" dependencies = [ "byteorder", "cfb", @@ -1095,11 +1321,11 @@ dependencies = [ [[package]] name = "normpath" -version = "1.1.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec60c60a693226186f5d6edf073232bfb6464ed97eb22cf3b01c1e8198fd97f5" +checksum = "c8911957c4b1549ac0dc74e30db9c8b0e66ddcd6d7acc33098f4c63a64a6d7ed" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -1112,6 +1338,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "number_prefix" version = "0.4.0" @@ -1120,9 +1352,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "option-ext" @@ -1148,9 +1380,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1158,22 +1390,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "path-slash" @@ -1183,31 +1415,31 @@ checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" [[package]] name = "pep440_rs" -version = "0.5.0" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15efd4d885c29126cc93e12af3087896e2518bd5ca0fb328c19c4ef9cecfa8be" +checksum = "466eada3179c2e069ca897b99006cbb33f816290eaeec62464eea907e22ae385" dependencies = [ "once_cell", "serde", "tracing", - "unicode-width", + "unicode-width 0.1.14", "unscanny", ] [[package]] name = "pep508_rs" -version = "0.4.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1455babf8edd3eedcdfcb39700e455a4bb189e71b4f1fa0eacc9b244cc5a55e6" +checksum = "3f8877489a99ccc80012333123e434f84e645fe1ede3b30e9d3b815887a12979" dependencies = [ "derivative", "once_cell", "pep440_rs", "regex", "serde", - "thiserror", + "thiserror 1.0.69", "tracing", - "unicode-width", + "unicode-width 0.1.14", "url", "urlencoding", ] @@ -1220,15 +1452,15 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pkg-config" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plain" @@ -1238,9 +1470,9 @@ checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" [[package]] name = "platform-info" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6259c4860e53bf665016f1b2f46a8859cadfa717581dc9d597ae4069de6300f" +checksum = "91077ffd05d058d70d79eefcd7d7f6aac34980860a7519960f7913b6563a8c3a" dependencies = [ "libc", "winapi", @@ -1248,9 +1480,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" [[package]] name = "powerfmt" @@ -1260,76 +1492,73 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] [[package]] name = "psm" -version = "0.1.21" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810" dependencies = [ "cc", ] [[package]] name = "pyproject-toml" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b80f889b6d413c3f8963a2c7db03f95dd6e1d85e1074137cb2013ea2faa8898" +checksum = "ef7061023bcb58a0fc4a4bbe9819c13b0dca7c2abc14da14f5ecc1532ab3a36a" dependencies = [ - "indexmap 2.2.6", + "indexmap", "pep440_rs", "pep508_rs", "serde", - "toml 0.8.12", + "toml", ] [[package]] name = "python-pkginfo" -version = "0.6.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037469c164f08c891bf6d69ca02f1d56210011451e229618669777df82124cfa" +checksum = "f7e893e9f18afff273e1ae794b58e9e45edefcc672e087f2abcf09ab88ade846" dependencies = [ "flate2", - "fs-err", + "fs-err 2.11.0", "mailparse", "rfc2047-decoder", "tar", - "thiserror", + "thiserror 2.0.3", "zip", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] [[package]] name = "quoted_printable" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" - -[[package]] -name = "quoted_printable" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79ec282e887b434b68c18fe5c121d38e72a5cf35119b59e54ec5b992ea9c8eb0" +checksum = "640c9bd8497b02465aeef5375144c26062e0dcd5939dfcbb0f5db76cb8c17c73" [[package]] name = "rand" @@ -1363,9 +1592,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -1383,34 +1612,34 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "regex" -version = "1.10.3" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.4", - "regex-syntax 0.8.2", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -1424,13 +1653,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.4" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.5", ] [[package]] @@ -1441,54 +1670,61 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rfc2047-decoder" -version = "0.2.2" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61fc4b4e52897c3e30b12b7e9b04461215b647fbe66f6def60dd8edbce14ec2e" +checksum = "bc36545d1021456a751b573517cb52e8c339b2f662e6b2778ef629282678de29" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "charset", "chumsky", "memchr", - "quoted_printable 0.4.8", - "thiserror", + "quoted_printable", + "thiserror 2.0.3", ] [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin", "untrusted", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] +[[package]] +name = "rustflags" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7fc92159fb50a431c5da366f7627751fe7263cf867f8a30f27fa6063ba02ac0" + [[package]] name = "rustix" -version = "0.38.30" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ - "bitflags 2.4.2", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -1497,11 +1733,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ "log", + "once_cell", "ring", "rustls-pki-types", "rustls-webpki", @@ -1511,25 +1748,24 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f48172685e6ff52a556baa527774f61fcaa884f59daf3375c62a3f1cd2549dab" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.21.7", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.4.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "868e20fada228fefaf6b652e00cc73623d54f8171e7352c18bb281571f2d92da" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" -version = "0.102.2" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -1538,9 +1774,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -1574,54 +1810,55 @@ checksum = "7f81c2fde025af7e69b1d1420531c8a8811ca898919db177141a85313b1cb932" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.90", ] [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.197" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.90", ] [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -1658,11 +1895,17 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smawk" @@ -1687,17 +1930,23 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "stacker" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" dependencies = [ "cc", "cfg-if", "libc", "psm", - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -1708,15 +1957,15 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -1731,20 +1980,31 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "tar" -version = "0.4.40" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" dependencies = [ "filetime", "libc", @@ -1753,21 +2013,21 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.14" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.9.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1781,12 +2041,12 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +checksum = "5352447f921fda68cf61b4101566c0bdb5104eff6804d0678e5227580ab6a4e9" dependencies = [ "rustix", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -1797,34 +2057,54 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" dependencies = [ "smawk", "unicode-linebreak", - "unicode-width", + "unicode-width 0.1.14", ] [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl 2.0.3", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn 2.0.90", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.90", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -1832,11 +2112,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.31" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", + "num-conv", "powerfmt", "serde", "time-core", @@ -1849,34 +2130,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "toml" -version = "0.5.11" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "serde", + "displaydoc", + "zerovec", ] [[package]] name = "toml" -version = "0.8.12" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -1886,20 +2153,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.9" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.2.6", + "indexmap", "serde", "serde_spanned", "toml_datetime", @@ -1908,9 +2175,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -1919,20 +2186,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.90", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -1951,9 +2218,9 @@ dependencies = [ [[package]] name = "tracing-serde" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" dependencies = [ "serde", "tracing-core", @@ -1961,9 +2228,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -1999,24 +2266,15 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-linebreak" @@ -2025,25 +2283,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] -name = "unicode-normalization" -version = "0.1.22" +name = "unicode-width" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unscanny" @@ -2059,29 +2314,31 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.9.6" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11f214ce18d8b2cbe84ed3aa6486ed3f5b285cf8d8fbdbce9f3f767a724adc35" +checksum = "b30e6f97efe1fa43535ee241ee76967d3ff6ff3953ebb430d8d55c5393029e7b" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "flate2", + "litemap", "log", "once_cell", "rustls", "rustls-pki-types", - "rustls-webpki", "serde", "serde_json", "socks", "url", "webpki-roots", + "yoke", + "zerofrom", ] [[package]] name = "url" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -2095,17 +2352,29 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.7.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" [[package]] name = "valuable" @@ -2115,25 +2384,25 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "versions" -version = "5.0.1" +version = "6.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73a36bc44e3039f51fbee93e39f41225f6b17b380eb70cc2aab942df06b34dd" +checksum = "f25d498b63d1fdb376b4250f39ab3a5ee8d103957346abacd911e2d8b612c139" dependencies = [ - "itertools 0.11.0", + "itertools 0.13.0", "nom", ] [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -2146,45 +2415,96 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "webpki-roots" -version = "0.26.1" +name = "wasm-bindgen" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" dependencies = [ - "rustls-pki-types", + "cfg-if", + "once_cell", + "wasm-bindgen-macro", ] [[package]] -name = "which" -version = "5.0.0" +name = "wasm-bindgen-backend" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bf3ea8596f3a0dd5980b46430f2058dfe2c36a27ccfbb1845d6fbfcd9ba6e14" +checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" dependencies = [ - "either", - "home", + "bumpalo", + "log", "once_cell", - "rustix", - "windows-sys 0.48.0", + "proc-macro2", + "quote", + "syn 2.0.90", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.26.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +dependencies = [ + "rustls-pki-types", ] [[package]] name = "which" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fa5e0c10bf77f44aac573e498d1a82d5fbd5e91f6fc0a99e7be4b38e85e101c" +checksum = "c9cad3279ade7346b96e38731a641d7343dd6a53d55083dd54eadfa5a1b38c6b" dependencies = [ "either", "home", - "once_cell", "rustix", - "windows-sys 0.52.0", + "winsafe", ] [[package]] name = "wild" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d01931a94d5a115a53f95292f51d316856b68a035618eb831bbba593a30b67" +checksum = "a3131afc8c575281e1e80f36ed6a092aa502c08b18ed7524e86fbbb12bb410e1" dependencies = [ "glob", ] @@ -2207,11 +2527,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -2235,7 +2555,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -2255,17 +2584,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -2276,9 +2606,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -2288,9 +2618,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -2300,9 +2630,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -2312,9 +2648,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -2324,9 +2660,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -2336,9 +2672,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -2348,19 +2684,37 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.5" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] +[[package]] +name = "winsafe" +version = "0.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "xattr" version = "1.3.1" @@ -2374,9 +2728,9 @@ dependencies = [ [[package]] name = "xwin" -version = "0.5.0" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43e0202f5457b48558096cb7b36d0e473f267551a89c82ed72d73b01dfd4007" +checksum = "ca7e4546db1514c186778f0a257d89732ed9ed75587d0953ac25be7519d9f0d1" dependencies = [ "anyhow", "bytes", @@ -2385,9 +2739,9 @@ dependencies = [ "clap", "cli-table", "crossbeam-channel", - "flate2", "indicatif", "memchr", + "mimalloc", "msi", "parking_lot", "rayon", @@ -2396,7 +2750,7 @@ dependencies = [ "serde_json", "sha2", "tempfile", - "toml 0.8.12", + "toml", "tracing", "tracing-subscriber", "twox-hash", @@ -2406,42 +2760,129 @@ dependencies = [ "zip", ] +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", + "synstructure", +] + [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.90", + "synstructure", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] [[package]] name = "zip" -version = "0.6.6" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +checksum = "99d52293fc86ea7cf13971b3bb81eb21683636e7ae24c729cdaf1b7c4157a352" dependencies = [ - "byteorder", + "arbitrary", "bzip2", "crc32fast", "crossbeam-utils", + "displaydoc", "flate2", + "indexmap", + "memchr", + "thiserror 2.0.3", "time", + "zopfli", +] + +[[package]] +name = "zopfli" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +dependencies = [ + "bumpalo", + "crc32fast", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", ] diff --git a/tests/package_resolver/Cargo.toml b/tests/package_resolver/Cargo.toml index 7b61825..f4b23a0 100644 --- a/tests/package_resolver/Cargo.toml +++ b/tests/package_resolver/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" publish = false [dependencies] -anyhow = "1.0.79" +anyhow = "1.0.93" maturin = { path = "../maturin" } serde = { version = "1.0.195", features = ["derive"] } -serde_json = "1.0.111" +serde_json = "1.0.133" diff --git a/tests/package_resolver/src/main.rs b/tests/package_resolver/src/main.rs index 492df23..5b95910 100644 --- a/tests/package_resolver/src/main.rs +++ b/tests/package_resolver/src/main.rs @@ -32,7 +32,7 @@ fn resolve_package(project_root: &Path) -> Result { let _cwd = TemporaryChdir::chdir(&project_root)?; let build_options: BuildOptions = Default::default(); - let build_context = build_options.into_build_context(false, false, false)?; + let build_context = build_options.into_build_context().build()?; let extension_module_dir = if build_context.project_layout.python_module.is_some() { Some(relative_path( &build_context.project_layout.rust_module, @@ -74,7 +74,16 @@ fn resolve_all_packages(test_crates_dir: &Path) -> Result { for path in entries { if path.join("pyproject.toml").exists() { let project_name = path.file_name().unwrap().to_str().unwrap().to_owned(); - resolved_packages.insert(project_name, resolve_package(&path).unwrap_or(Value::Null)); + println!("resolve '{}'", project_name); + match resolve_package(&path) { + Ok(value) => { + resolved_packages.insert(project_name, value); + } + Err(err) => { + println!("resolve failed with: {:?}", err); + resolved_packages.insert(project_name, Value::Null); + } + } } } Ok(Value::Object(resolved_packages)) diff --git a/tests/requirements.txt b/tests/requirements.txt index 3345486..b2eb4b2 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,9 +1,9 @@ -e .. uv -maturin==1.6.0 +maturin==1.7.8 pytest junit2html -uniffi-bindgen==0.27.0 +uniffi-bindgen==0.28.0 cffi # required for pyo3-mixed diff --git a/tests/resolved.json b/tests/resolved.json index c490138..f581170 100644 --- a/tests/resolved.json +++ b/tests/resolved.json @@ -1,5 +1,5 @@ { - "commit": "894231c644c2d7a9a31349c86b3f3c431b74d615", + "commit": "e403fdf811d0ccae12001586adc160e977d47c16", "crates": { "cffi-mixed": { "cargo_manifest_path": "Cargo.toml", @@ -155,6 +155,7 @@ "python_dir": ".", "python_module": null }, + "workspace-inverted-order": null, "wrong-python-source": { "cargo_manifest_path": "Cargo.toml", "extension_module_dir": null, diff --git a/tests/runner.py b/tests/runner.py index 1050b9a..747cbe9 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -8,6 +8,7 @@ import subprocess import sys from dataclasses import dataclass +from enum import Enum from pathlib import Path # ruff: noqa: INP001 @@ -19,14 +20,24 @@ logging.basicConfig(format="[%(name)s] [%(levelname)s] %(message)s", level=logging.DEBUG) +class PackageInstaller(Enum): + PIP = "pip" + UV = "uv" + + def __str__(self) -> str: + return self.value + + @dataclass class TestOptions: test_specification: str test_suite_name: str timeout: int max_failures: int | None + package_installer: PackageInstaller use_lld: bool profile: Path | None + maturin_debug: bool html_report: bool notify: bool @@ -49,7 +60,7 @@ def _run_tests_serial( report_path = workspace / "report.html" report_path.unlink(missing_ok=True) - venv = _create_test_venv(python, workspace / "venv") + venv = _create_test_venv(python, workspace / "venv", options.package_installer) try: _run_test_in_environment(venv, workspace / "cache", reports_dir / "results.xml", options) finally: @@ -78,6 +89,11 @@ def _run_test_in_environment( env["MATURIN_BUILD_DIR"] = str(cache_dir / "maturin_build_cache") env["CARGO_TARGET_DIR"] = str(cache_dir / "target") + env["MATURIN_IMPORT_HOOK_TEST_PACKAGE_INSTALLER"] = options.package_installer.value + + if options.maturin_debug: + env["RUST_LOG"] = "maturin=debug" + if options.use_lld: log.info("using lld") # https://stackoverflow.com/a/57817848 @@ -100,8 +116,8 @@ def _run_test_in_environment( sys.exit(proc.returncode) -def _pip_install_command(interpreter_path: Path) -> list[str]: - if shutil.which("uv") is not None: +def _package_install_command(interpreter_path: Path, package_installer: PackageInstaller) -> list[str]: + if package_installer == PackageInstaller.UV: log.info("using uv to install packages") return [ "uv", @@ -110,7 +126,7 @@ def _pip_install_command(interpreter_path: Path) -> list[str]: "--python", str(interpreter_path), ] - else: + elif package_installer == PackageInstaller.PIP: log.info("using pip to install packages") return [ str(interpreter_path), @@ -119,14 +135,16 @@ def _pip_install_command(interpreter_path: Path) -> list[str]: "install", "--disable-pip-version-check", ] + else: + raise ValueError(package_installer) -def _create_test_venv(python: Path, venv_dir: Path) -> VirtualEnv: - venv = VirtualEnv.create(venv_dir, python) +def _create_test_venv(python: Path, venv_dir: Path, package_installer: PackageInstaller) -> VirtualEnv: + venv = VirtualEnv.create(venv_dir, python, package_installer) log.info("installing test requirements into virtualenv") proc = subprocess.run( [ - *_pip_install_command(venv.interpreter_path), + *_package_install_command(venv.interpreter_path, package_installer), "-r", "requirements.txt", ], @@ -144,8 +162,10 @@ def _create_test_venv(python: Path, venv_dir: Path) -> VirtualEnv: return venv -def _create_virtual_env_command(interpreter_path: Path, venv_path: Path) -> list[str]: - if shutil.which("uv") is not None: +def _create_virtual_env_command( + interpreter_path: Path, venv_path: Path, package_installer: PackageInstaller +) -> list[str]: + if package_installer == PackageInstaller.UV: log.info("using uv to create virtual environments") return ["uv", "venv", "--seed", "--python", str(interpreter_path), str(venv_path)] elif shutil.which("virtualenv") is not None: @@ -156,8 +176,10 @@ def _create_virtual_env_command(interpreter_path: Path, venv_path: Path) -> list return [str(interpreter_path), "-m", "venv", str(venv_path)] -def _install_into_virtual_env_command(interpreter_path: Path, package_path: Path) -> list[str]: - if shutil.which("uv") is not None: +def _install_into_virtual_env_command( + interpreter_path: Path, package_path: Path, package_installer: PackageInstaller +) -> list[str]: + if package_installer == PackageInstaller.UV: log.info("using uv to install package as editable") return ["uv", "pip", "install", "--python", str(interpreter_path), "--editable", str(package_path)] else: @@ -166,23 +188,24 @@ def _install_into_virtual_env_command(interpreter_path: Path, package_path: Path class VirtualEnv: - def __init__(self, root: Path) -> None: + def __init__(self, root: Path, package_installer: PackageInstaller) -> None: self._root = root.resolve() self._is_windows = platform.system() == "Windows" + self._package_installer = package_installer @staticmethod - def create(root: Path, interpreter_path: Path) -> VirtualEnv: + def create(root: Path, interpreter_path: Path, package_installer: PackageInstaller) -> VirtualEnv: if root.exists(): log.info("removing virtualenv at %s", root) shutil.rmtree(root) if not interpreter_path.exists(): raise FileNotFoundError(interpreter_path) log.info("creating test virtualenv at '%s' from '%s'", root, interpreter_path) - cmd = _create_virtual_env_command(interpreter_path, root) + cmd = _create_virtual_env_command(interpreter_path, root, package_installer) proc = subprocess.run(cmd, capture_output=True, check=True) log.debug("%s", proc.stdout.decode()) assert root.is_dir() - return VirtualEnv(root) + return VirtualEnv(root, package_installer) @property def root_dir(self) -> Path: @@ -204,7 +227,7 @@ def interpreter_path(self) -> Path: return interpreter def install_editable_package(self, package_path: Path) -> None: - cmd = _install_into_virtual_env_command(self.interpreter_path, package_path) + cmd = _install_into_virtual_env_command(self.interpreter_path, package_path, self._package_installer) proc = subprocess.run(cmd, capture_output=True, check=True) log.debug("%s", proc.stdout.decode()) @@ -296,11 +319,23 @@ def main() -> None: default=True, help="send a notification when finished", ) + parser.add_argument( + "--installer", + choices=list(PackageInstaller), + type=PackageInstaller, + default=PackageInstaller.UV, + help="the package installer to use in the tests", + ) parser.add_argument( "--lld", action="store_true", help="use lld for linking (generally faster than the default).", ) + parser.add_argument( + "--maturin_debug", + action="store_true", + help="have maturin produce verbose logs", + ) parser.add_argument( "--profile", type=Path, @@ -321,8 +356,10 @@ def main() -> None: test_suite_name=args.name, timeout=args.timeout, max_failures=args.max_failures, + package_installer=args.installer, use_lld=args.lld, profile=args.profile, + maturin_debug=args.maturin_debug, html_report=args.html_report, notify=args.notify, ) diff --git a/tests/test_import_hook/common.py b/tests/test_import_hook/common.py index ac4f492..fda11b3 100644 --- a/tests/test_import_hook/common.py +++ b/tests/test_import_hook/common.py @@ -31,6 +31,7 @@ "hello-world", # not imported as a python module (subprocess only) "license-test", # not imported as a python module (subprocess only) "pyo3-bin", # not imported as a python module (subprocess only) + "workspace-inverted-order", # this directory is not a maturin package, only the subdirectory } @@ -87,9 +88,9 @@ def resolved_packages() -> dict[str, Optional[ResolvedPackage]]: assert git_path is not None cmd = [git_path, "rev-parse", "HEAD"] current_commit_hash = subprocess.check_output(cmd, cwd=MATURIN_DIR).decode().strip() - assert ( - current_commit_hash == commit_hash - ), "the maturin submodule is not in sync with resolved.json. See package_resolver/README.md for details" + assert current_commit_hash == commit_hash, ( + "the maturin submodule is not in sync with resolved.json. See package_resolver/README.md for details" + ) _RESOLVED_PACKAGES = { crate_name: None if crate_data is None else ResolvedPackage.from_dict(crate_data) diff --git a/tests/test_import_hook/conftest.py b/tests/test_import_hook/conftest.py index 8747c0e..254b434 100644 --- a/tests/test_import_hook/conftest.py +++ b/tests/test_import_hook/conftest.py @@ -5,6 +5,7 @@ from pathlib import Path import pytest + from maturin_import_hook import reset_logger from maturin_import_hook._building import get_default_build_dir @@ -19,7 +20,7 @@ log.info("running tests with %s", sys.executable) -@pytest.fixture() +@pytest.fixture def workspace(tmp_path: Path) -> Iterator[Path]: try: yield tmp_path diff --git a/tests/test_import_hook/file_importer_helpers/my_script_1.rs b/tests/test_import_hook/file_importer_helpers/my_script_1.rs index a802118..c426d7c 100644 --- a/tests/test_import_hook/file_importer_helpers/my_script_1.rs +++ b/tests/test_import_hook/file_importer_helpers/my_script_1.rs @@ -5,6 +5,6 @@ fn get_num() -> usize { 10 } #[pymodule] fn my_script(m: &Bound<'_, PyModule>) -> PyResult<()> { - m.add_wrapped(wrap_pyfunction!(get_num))?; + m.add_function(wrap_pyfunction!(get_num, m)?)?; Ok(()) } diff --git a/tests/test_import_hook/file_importer_helpers/my_script_2.rs b/tests/test_import_hook/file_importer_helpers/my_script_2.rs index 9ce2b30..f87e88d 100644 --- a/tests/test_import_hook/file_importer_helpers/my_script_2.rs +++ b/tests/test_import_hook/file_importer_helpers/my_script_2.rs @@ -8,7 +8,7 @@ fn get_other_num() -> usize { 100 } #[pymodule] fn my_script(m: &Bound<'_, PyModule>) -> PyResult<()> { - m.add_wrapped(wrap_pyfunction!(get_num))?; - m.add_wrapped(wrap_pyfunction!(get_other_num))?; + m.add_function(wrap_pyfunction!(get_num, m)?)?; + m.add_function(wrap_pyfunction!(get_other_num, m)?)?; Ok(()) } diff --git a/tests/test_import_hook/file_importer_helpers/my_script_3.rs b/tests/test_import_hook/file_importer_helpers/my_script_3.rs index 58decfb..b58dd62 100644 --- a/tests/test_import_hook/file_importer_helpers/my_script_3.rs +++ b/tests/test_import_hook/file_importer_helpers/my_script_3.rs @@ -11,6 +11,6 @@ fn get_num() -> usize { #[pymodule] fn my_script(m: &Bound<'_, PyModule>) -> PyResult<()> { - m.add_wrapped(wrap_pyfunction!(get_num))?; + m.add_function(wrap_pyfunction!(get_num, m)?)?; Ok(()) } diff --git a/tests/test_import_hook/file_importer_helpers/packages/my_rust_module.rs b/tests/test_import_hook/file_importer_helpers/packages/my_rust_module.rs index 712990d..89e799b 100644 --- a/tests/test_import_hook/file_importer_helpers/packages/my_rust_module.rs +++ b/tests/test_import_hook/file_importer_helpers/packages/my_rust_module.rs @@ -6,7 +6,7 @@ pub fn do_something(a: usize, b: usize) -> PyResult { } #[pymodule] -pub fn my_rust_module(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> { - m.add_wrapped(wrap_pyfunction!(do_something))?; +pub fn my_rust_module(m: &Bound<'_, PyModule>) -> PyResult<()> { + m.add_function(wrap_pyfunction!(do_something, m)?)?; Ok(()) } diff --git a/tests/test_import_hook/file_importer_helpers/packages/subpackage/my_rust_module.rs b/tests/test_import_hook/file_importer_helpers/packages/subpackage/my_rust_module.rs index f610cc6..67203a5 100644 --- a/tests/test_import_hook/file_importer_helpers/packages/subpackage/my_rust_module.rs +++ b/tests/test_import_hook/file_importer_helpers/packages/subpackage/my_rust_module.rs @@ -1,5 +1,4 @@ use pyo3::prelude::*; -use pyo3::wrap_pyfunction; #[pyfunction] pub fn get_num() -> PyResult { @@ -7,7 +6,7 @@ pub fn get_num() -> PyResult { } #[pymodule] -pub fn my_rust_module(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_wrapped(wrap_pyfunction!(get_num))?; +pub fn my_rust_module(m: &Bound<'_, PyModule>) -> PyResult<()> { + m.add_function(wrap_pyfunction!(get_num, m)?)?; Ok(()) } diff --git a/tests/test_import_hook/file_importer_helpers/reload_template.rs b/tests/test_import_hook/file_importer_helpers/reload_template.rs index 8b119b9..35a7fad 100644 --- a/tests/test_import_hook/file_importer_helpers/reload_template.rs +++ b/tests/test_import_hook/file_importer_helpers/reload_template.rs @@ -40,7 +40,7 @@ impl Integer { } fn __richcmp__(&self, other: &Self, op: CompareOp, py: Python<'_>) -> PyResult { - let logging = PyModule::import_bound(py, "logging")?; + let logging = PyModule::import(py, "logging")?; let message = format!( "comparing Integer instances {} and {}", self.name, other.name @@ -66,7 +66,7 @@ impl PicklableInteger { } fn __richcmp__(&self, other: &Self, op: CompareOp, py: Python<'_>) -> PyResult { - let logging = PyModule::import_bound(py, "logging")?; + let logging = PyModule::import(py, "logging")?; let message = format!( "comparing PicklableInteger instances {} and {}", self.name, other.name @@ -89,35 +89,35 @@ fn get_str() -> String { } fn register_child_module(py: Python<'_>, parent_module: &Bound<'_, PyModule>) -> PyResult<()> { - let child_module = PyModule::new_bound(py, "child")?; - child_module.add_wrapped(wrap_pyfunction!(get_str))?; + let child_module = PyModule::new(py, "child")?; + child_module.add_function(wrap_pyfunction!(get_str, &child_module)?)?; parent_module.add_submodule(&child_module)?; Ok(()) } #[pymodule] fn my_module(py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> { - m.add_wrapped(wrap_pyfunction!(get_num))?; - m.add_wrapped(wrap_pyfunction!(get_global_num))?; - m.add_wrapped(wrap_pyfunction!(set_global_num))?; + m.add_function(wrap_pyfunction!(get_num, m)?)?; + m.add_function(wrap_pyfunction!(get_global_num, m)?)?; + m.add_function(wrap_pyfunction!(set_global_num, m)?)?; m.add_class::()?; m.add_class::()?; register_child_module(py, m)?; - let data = PyDict::new_bound(py); + let data = PyDict::new(py); data.set_item("foo", 123)?; m.add("data", data)?; if !m.hasattr("data_init_once")? { - let data = PyDict::new_bound(py); + let data = PyDict::new(py); data.set_item("foo", 123)?; m.add("data_init_once", data)?; } m.add("data_str", "foo")?; - let logging = PyModule::import_bound(py, "logging")?; + let logging = PyModule::import(py, "logging")?; logging .getattr("info")? .call1(("my_module extension module initialised",))?; diff --git a/tests/test_import_hook/project_importer_helpers/blank-project/Cargo.lock b/tests/test_import_hook/project_importer_helpers/blank-project/Cargo.lock index 21e8eaa..925777c 100644 --- a/tests/test_import_hook/project_importer_helpers/blank-project/Cargo.lock +++ b/tests/test_import_hook/project_importer_helpers/blank-project/Cargo.lock @@ -8,12 +8,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "blank-project" version = "0.1.0" @@ -29,9 +23,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "indoc" @@ -45,16 +39,6 @@ version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" -[[package]] -name = "lock_api" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "memoffset" version = "0.9.0" @@ -70,29 +54,6 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - [[package]] name = "portable-atomic" version = "1.6.0" @@ -101,24 +62,24 @@ checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] [[package]] name = "pyo3" -version = "0.21.2" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8" +checksum = "f54b3d09cbdd1f8c20650b28e7b09e338881482f4aa908a5f61a00c98fba2690" dependencies = [ "cfg-if", "indoc", "libc", "memoffset", - "parking_lot", + "once_cell", "portable-atomic", "pyo3-build-config", "pyo3-ffi", @@ -128,9 +89,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.21.2" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50" +checksum = "3015cf985888fe66cfb63ce0e321c603706cd541b7aec7ddd35c281390af45d8" dependencies = [ "once_cell", "target-lexicon", @@ -138,9 +99,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.21.2" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403" +checksum = "6fca7cd8fd809b5ac4eefb89c1f98f7a7651d3739dfb341ca6980090f554c270" dependencies = [ "libc", "pyo3-build-config", @@ -148,9 +109,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.21.2" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c" +checksum = "34e657fa5379a79151b6ff5328d9216a84f55dc93b17b08e7c3609a969b73aa0" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -160,9 +121,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.21.2" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c" +checksum = "295548d5ffd95fd1981d2d3cf4458831b21d60af046b729b6fd143b0ba7aee2f" dependencies = [ "heck", "proc-macro2", @@ -173,39 +134,18 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "smallvec" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" - [[package]] name = "syn" -version = "2.0.32" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -214,9 +154,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.11" +version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "unicode-ident" @@ -229,60 +169,3 @@ name = "unindent" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" diff --git a/tests/test_import_hook/project_importer_helpers/blank-project/Cargo.toml b/tests/test_import_hook/project_importer_helpers/blank-project/Cargo.toml index 97a17cc..72bb266 100644 --- a/tests/test_import_hook/project_importer_helpers/blank-project/Cargo.toml +++ b/tests/test_import_hook/project_importer_helpers/blank-project/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" description = "" [dependencies] -pyo3 = { version = "0.21.2", features = ["extension-module"] } +pyo3 = { version = "0.23.2", features = ["extension-module"] } [lib] crate-type = ["cdylib"] diff --git a/tests/test_import_hook/project_importer_helpers/logging_reload_helper.py b/tests/test_import_hook/project_importer_helpers/logging_reload_helper.py index 052a6cf..3534df8 100644 --- a/tests/test_import_hook/project_importer_helpers/logging_reload_helper.py +++ b/tests/test_import_hook/project_importer_helpers/logging_reload_helper.py @@ -1,8 +1,9 @@ import importlib -import maturin_import_hook import test_project # type: ignore[missing-import] +import maturin_import_hook + maturin_import_hook.install() # install after importing so that the first reload triggers a build print("reload start", flush=True) diff --git a/tests/test_import_hook/project_importer_helpers/reload_template.rs b/tests/test_import_hook/project_importer_helpers/reload_template.rs index 23e3961..03cb9af 100644 --- a/tests/test_import_hook/project_importer_helpers/reload_template.rs +++ b/tests/test_import_hook/project_importer_helpers/reload_template.rs @@ -40,7 +40,7 @@ impl Integer { } fn __richcmp__(&self, other: &Self, op: CompareOp, py: Python<'_>) -> PyResult { - let logging = PyModule::import_bound(py, "logging")?; + let logging = PyModule::import(py, "logging")?; let message = format!( "comparing Integer instances {} and {}", self.name, other.name @@ -66,7 +66,7 @@ impl PicklableInteger { } fn __richcmp__(&self, other: &Self, op: CompareOp, py: Python<'_>) -> PyResult { - let logging = PyModule::import_bound(py, "logging")?; + let logging = PyModule::import(py, "logging")?; let message = format!( "comparing PicklableInteger instances {} and {}", self.name, other.name @@ -89,7 +89,7 @@ fn get_str() -> String { } fn register_child_module(py: Python<'_>, parent_module: &Bound<'_, PyModule>) -> PyResult<()> { - let child_module = PyModule::new_bound(py, "child")?; + let child_module = PyModule::new(py, "child")?; child_module.add_wrapped(wrap_pyfunction!(get_str))?; parent_module.add_submodule(&child_module)?; Ok(()) @@ -105,19 +105,19 @@ fn my_project(py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> { register_child_module(py, m)?; - let data = PyDict::new_bound(py); + let data = PyDict::new(py); data.set_item("foo", 123)?; m.add("data", data)?; if !m.hasattr("data_init_once")? { - let data = PyDict::new_bound(py); + let data = PyDict::new(py); data.set_item("foo", 123)?; m.add("data_init_once", data)?; } m.add("data_str", "foo")?; - let logging = PyModule::import_bound(py, "logging")?; + let logging = PyModule::import(py, "logging")?; logging .getattr("info")? .call1(("my_project extension module initialised",))?; diff --git a/tests/test_import_hook/test_project_importer.py b/tests/test_import_hook/test_project_importer.py index 9e4dd64..e91c094 100644 --- a/tests/test_import_hook/test_project_importer.py +++ b/tests/test_import_hook/test_project_importer.py @@ -8,11 +8,13 @@ import subprocess import sys from collections.abc import Iterator +from enum import Enum from pathlib import Path from textwrap import dedent -from typing import Optional +from typing import Any import pytest + from maturin_import_hook.project_importer import DefaultProjectFileSearcher, _load_dist_info from .common import ( @@ -357,7 +359,7 @@ def test_concurrent_import(workspace: Path, initially_mixed: bool, mixed: bool) shutil.rmtree(project_dir) _get_project_copy(TEST_CRATES_DIR / project_name, project_dir) - args = {"python_script": check_installed_with_hook, "quiet": True} + args: dict[str, Any] = {"python_script": check_installed_with_hook, "quiet": True} if platform.system() == "Windows" and platform.python_implementation() == "PyPy": # workaround for https://github.com/pypy/pypy/issues/4917 @@ -462,14 +464,14 @@ def test_rebuild_on_change_to_path_dependency(workspace: Path) -> None: """), ) - output1, duration1 = run_python_code(check_installed) + output1, _duration1 = run_python_code(check_installed) assert "21 is half 42: True" in output1 assert "21 is half 63: False" in output1 transitive_dep_lib = transitive_dep_dir / "src/lib.rs" transitive_dep_lib.write_text(transitive_dep_lib.read_text().replace("x + y == sum", "x + x + y == sum")) - output2, duration2 = run_python_code(check_installed) + output2, _duration2 = run_python_code(check_installed) assert "21 is half 42: False" in output2 assert "21 is half 63: True" in output2 @@ -1079,12 +1081,7 @@ def test_default_rebuild(self, workspace: Path, is_mixed: bool) -> None: self._create_clean_project(workspace, is_mixed) output, _ = run_python_code(self._logging_helper()) - pattern = ( - 'building "test_project"\n' - 'rebuilt and loaded package "test_project" in [0-9.]+s\n' - "value 10\n" - "SUCCESS\n" - ) + pattern = 'building "test_project"\nrebuilt and loaded package "test_project" in [0-9.]+s\nvalue 10\nSUCCESS\n' check_match(output, pattern, flags=re.MULTILINE) @pytest.mark.parametrize("is_mixed", [False, True]) @@ -1343,22 +1340,29 @@ def _rebuilt_message(project_name: str) -> str: return f'rebuilt and loaded package "{with_underscores(project_name)}"' -_UV_AVAILABLE: Optional[bool] = None +class PackageInstaller(Enum): + PIP = "pip" + UV = "uv" + + def __str__(self) -> str: + return self.value -def uv_available() -> bool: - """whether the `uv` command is installed""" - global _UV_AVAILABLE - if _UV_AVAILABLE is None: - _UV_AVAILABLE = shutil.which("uv") is not None - return _UV_AVAILABLE +def get_package_installer() -> PackageInstaller: + # set by `runner.py` + key = "MATURIN_IMPORT_HOOK_TEST_PACKAGE_INSTALLER" + if key not in os.environ: + msg = f"environment variable {key} not set" + raise RuntimeError(msg) + return PackageInstaller(os.environ[key]) def _uninstall(*project_names: str) -> None: log.info("uninstalling %s", sorted(project_names)) - if uv_available(): + installer = get_package_installer() + if installer == PackageInstaller.UV: cmd = ["uv", "pip", "uninstall", "--python", str(sys.executable), *project_names] - else: + elif installer == PackageInstaller.PIP: cmd = [ sys.executable, "-m", @@ -1368,13 +1372,16 @@ def _uninstall(*project_names: str) -> None: "-y", *project_names, ] + else: + raise ValueError(installer) subprocess.check_call(cmd) def _get_installed_package_names() -> set[str]: - if uv_available(): + installer = get_package_installer() + if installer == PackageInstaller.UV: cmd = ["uv", "pip", "list", "--python", sys.executable, "--format", "json"] - else: + elif installer == PackageInstaller.PIP: cmd = [ sys.executable, "-m", @@ -1383,6 +1390,8 @@ def _get_installed_package_names() -> set[str]: "list", "--format=json", ] + else: + raise ValueError(installer) packages = json.loads(subprocess.check_output(cmd).decode()) return {package["name"] for package in packages} @@ -1395,15 +1404,21 @@ def _install_editable(project_dir: Path) -> None: assert maturin_path is not None env = os.environ.copy() env["VIRTUAL_ENV"] = sys.exec_prefix - subprocess.check_call([maturin_path, "develop", "--uv"], cwd=project_dir, env=env) + args = [maturin_path, "develop"] + if get_package_installer() == PackageInstaller.UV: + args.append("--uv") + subprocess.check_call(args, cwd=project_dir, env=env) def _install_non_editable(project_dir: Path) -> None: log.info("installing %s in non-editable mode", project_dir.name) - if uv_available(): + installer = get_package_installer() + if installer == PackageInstaller.UV: cmd = ["uv", "pip", "install", "--python", sys.executable, str(project_dir)] - else: + elif installer == PackageInstaller.PIP: cmd = [sys.executable, "-m", "pip", "install", "--disable-pip-version-check", str(project_dir)] + else: + raise ValueError(installer) subprocess.check_call(cmd) @@ -1437,11 +1452,14 @@ def _is_editable_installed_correctly(project_name: str, project_dir: Path, is_mi installed_editable_with_direct_url, ) - if uv_available(): + installer = get_package_installer() + if installer == PackageInstaller.UV: # TODO(matt): use uv once the --files option is supported https://github.com/astral-sh/uv/issues/2526 cmd = [sys.executable, "-m", "pip", "show", "--disable-pip-version-check", "-f", project_name] - else: + elif installer == PackageInstaller.PIP: cmd = [sys.executable, "-m", "pip", "show", "--disable-pip-version-check", "-f", project_name] + else: + raise ValueError(installer) proc = subprocess.run( cmd, @@ -1454,14 +1472,21 @@ def _is_editable_installed_correctly(project_name: str, project_dir: Path, is_mi return installed_editable_with_direct_url and (installed_as_pth == is_mixed) -def _get_project_copy(project_dir: Path, output_path: Path) -> Path: - for relative_path in _get_relative_files_tracked_by_git(project_dir): +def _get_project_copy(project_dir: Path, output_path: Path, *, use_git: bool = True) -> Path: + paths = _get_relative_files_tracked_by_git(project_dir) if use_git else _get_relative_files(project_dir) + for relative_path in paths: output_file_path = output_path / relative_path output_file_path.parent.mkdir(parents=True, exist_ok=True) shutil.copy(project_dir / relative_path, output_file_path) return output_path +def _get_relative_files(root: Path) -> Iterator[Path]: + for p in root.rglob("*"): + if p.is_file(): + yield p.relative_to(root) + + def _get_relative_files_tracked_by_git(root: Path) -> Iterator[Path]: """This is used to ignore built artifacts to create a clean copy.""" output = subprocess.check_output(["git", "ls-tree", "--name-only", "-z", "-r", "HEAD"], cwd=root) diff --git a/tests/test_import_hook/test_rust_file_importer.py b/tests/test_import_hook/test_rust_file_importer.py index b734ee5..3852278 100644 --- a/tests/test_import_hook/test_rust_file_importer.py +++ b/tests/test_import_hook/test_rust_file_importer.py @@ -614,7 +614,7 @@ def _create_clean_package(self, package_path: Path, *, reload_helper: bool = Fal return rs_path, py_path def test_maturin_detection(self, workspace: Path) -> None: - rs_path, py_path = self._create_clean_package(workspace / "package") + _rs_path, py_path = self._create_clean_package(workspace / "package") env = os.environ.copy() env["PATH"] = remove_executable_from_path(env["PATH"], "maturin") @@ -639,7 +639,7 @@ def test_default_rebuild(self, workspace: Path) -> None: """By default, when a module is out of date the import hook logs messages before and after rebuilding but hides the underlying details. """ - rs_path, py_path = self._create_clean_package(workspace / "package") + _rs_path, py_path = self._create_clean_package(workspace / "package") output, _ = run_python([str(py_path)], workspace) pattern = 'building "my_script"\nrebuilt and loaded module "my_script" in [0-9.]+s\nget_num 10\nSUCCESS\n' @@ -647,7 +647,7 @@ def test_default_rebuild(self, workspace: Path) -> None: def test_default_up_to_date(self, workspace: Path) -> None: """By default, when the module is up-to-date nothing is printed.""" - rs_path, py_path = self._create_clean_package(workspace / "package") + _rs_path, py_path = self._create_clean_package(workspace / "package") run_python([str(py_path)], workspace) # run once to rebuild @@ -709,7 +709,7 @@ def test_default_compile_warning(self, workspace: Path) -> None: @pytest.mark.skipif(not RELOAD_SUPPORTED, reason="reload not supported") def test_reload(self, workspace: Path) -> None: - rs_path, py_path = self._create_clean_package(workspace / "package", reload_helper=True) + _rs_path, py_path = self._create_clean_package(workspace / "package", reload_helper=True) output1, _ = run_python([str(py_path)], workspace) output1 = remove_ansii_escape_characters(output1) @@ -733,7 +733,7 @@ def test_reset_logger_without_configuring(self, workspace: Path) -> None: """If reset_logger is called then by default logging level INFO is not printed (because the messages are handled by the root logger). """ - rs_path, py_path = self._create_clean_package(workspace / "package") + _rs_path, py_path = self._create_clean_package(workspace / "package") output, _ = run_python([str(py_path), "RESET_LOGGER"], workspace) assert output == "get_num 10\nSUCCESS\n" diff --git a/tests/test_import_hook/test_site.py b/tests/test_import_hook/test_site.py index bc8a915..7e29a12 100644 --- a/tests/test_import_hook/test_site.py +++ b/tests/test_import_hook/test_site.py @@ -2,6 +2,7 @@ from textwrap import dedent import pytest + from maturin_import_hook._site import ( has_automatic_installation, insert_automatic_installation, diff --git a/tests/test_import_hook/test_utilities.py b/tests/test_import_hook/test_utilities.py index 0bf9347..ec14088 100644 --- a/tests/test_import_hook/test_utilities.py +++ b/tests/test_import_hook/test_utilities.py @@ -9,6 +9,7 @@ from typing import cast import pytest + from maturin_import_hook._building import BuildCache, BuildStatus, Freshness, get_installation_freshness from maturin_import_hook._resolve_project import _ProjectResolveError, _resolve_project, _TomlFile from maturin_import_hook.error import ImportHookError @@ -34,7 +35,7 @@ def test_maturin_unchanged() -> None: env = {"PATH": os.environ["PATH"], "COLUMNS": "120"} build_help = subprocess.check_output("stty rows 50 cols 120; maturin build --help", shell=True, env=env) # noqa: S602 - assert hashlib.sha1(build_help).hexdigest() == "99f80713607f23c53a0a936c36789c7c4186d5a9" + assert hashlib.sha1(build_help).hexdigest() == "ea47a884c90c9376047687aed98ab1dca29b433a" develop_help = subprocess.check_output("stty rows 50 cols 120; maturin develop --help", shell=True, env=env) # noqa: S602 assert hashlib.sha1(develop_help).hexdigest() == "ad7036a829c6801224933d589b1f9848678c9458" @@ -94,9 +95,10 @@ def test_settings() -> None: ] # fmt: on - build_settings = MaturinBuildSettings(skip_auditwheel=True, zig=True, color=False, rustc_flags=["flag1", "flag2"]) + build_settings = MaturinBuildSettings(auditwheel="skip", zig=True, color=False, rustc_flags=["flag1", "flag2"]) assert build_settings.to_args() == [ - "--skip-auditwheel", + "--auditwheel", + "skip", "--zig", "--color", "never", @@ -221,8 +223,7 @@ def test_read_error(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> No assert freshness == Freshness(False, "failed to read installed files", None, None) expected_error = re.escape( - "error reading source file mtimes: " - f"PermissionError(13, 'Permission denied') ({unreadable_dir / 'source'})" + f"error reading source file mtimes: PermissionError(13, 'Permission denied') ({unreadable_dir / 'source'})" ) with pytest.raises(ImportHookError, match=expected_error): get_installation_freshness([unreadable_dir / "source"], [readable_dir / "install"], readable_status)