diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b68ad72ee..dbd1c568b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ that were not yet released. _Unreleased_ +- Pin down pip to an older version to avoid issues with an incompatible + `pip-tools` version. This does not yet update pip-tools to 7.0 as there + are significant regressions in 7.x. #374 + - The `version` command can show dynamic versions now. #355 - `rye add` now properly checks some incompatible argument combinations. #347 diff --git a/Cargo.lock b/Cargo.lock index 487f2b64c2..a27f2a9ead 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -34,7 +34,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9e4dfef09bebad6d85efa8b6e1b2f7a809c4419d7135ab573c4fd133c0e8ead" dependencies = [ "age-core", - "base64", + "base64 0.13.1", "bech32", "chacha20poly1305", "cookie-factory", @@ -61,7 +61,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3d2e815ac879dc23c1139e720d21c6cd4d1276345c772587285d965a69b8f32" dependencies = [ - "base64", + "base64 0.13.1", "chacha20poly1305", "cookie-factory", "hkdf", @@ -72,6 +72,17 @@ dependencies = [ "sha2", ] +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.9", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "0.7.20" @@ -138,6 +149,12 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + [[package]] name = "bech32" version = "0.9.1" @@ -246,6 +263,26 @@ dependencies = [ "zeroize", ] +[[package]] +name = "charset" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e9079d1a12a2cc2bffb5db039c43661836ead4082120d5844f02555aca2d46" +dependencies = [ + "base64 0.13.1", + "encoding_rs", +] + +[[package]] +name = "chumsky" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23170228b96236b5a7299057ac284a321457700bc8c41a4476052f0f4ba5349d" +dependencies = [ + "hashbrown", + "stacker", +] + [[package]] name = "cipher" version = "0.4.4" @@ -460,6 +497,12 @@ dependencies = [ "parking_lot_core", ] +[[package]] +name = "data-encoding" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" + [[package]] name = "decompress" version = "0.6.0" @@ -568,6 +611,15 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +[[package]] +name = "encoding_rs" +version = "0.8.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +dependencies = [ + "cfg-if", +] + [[package]] name = "errno" version = "0.3.1" @@ -773,6 +825,9 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] [[package]] name = "heck" @@ -1065,6 +1120,17 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "mailparse" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b56570f5f8c0047260d1c8b5b331f62eb9c660b9dd4071a8c46f8c7d3f280aa" +dependencies = [ + "charset", + "data-encoding", + "quoted_printable", +] + [[package]] name = "memchr" version = "2.5.0" @@ -1373,6 +1439,31 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "psm" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +dependencies = [ + "cc", +] + +[[package]] +name = "python-pkginfo" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e23988cc0f9fbe3c42ae6e399daa7c0273d6013784b744b1742c6e1060611b0e" +dependencies = [ + "flate2", + "fs-err", + "mailparse", + "rfc2047-decoder", + "serde", + "tar", + "thiserror", + "zip", +] + [[package]] name = "quote" version = "1.0.27" @@ -1382,6 +1473,12 @@ 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 = "rand" version = "0.7.3" @@ -1497,6 +1594,20 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "rfc2047-decoder" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61fc4b4e52897c3e30b12b7e9b04461215b647fbe66f6def60dd8edbce14ec2e" +dependencies = [ + "base64 0.21.2", + "charset", + "chumsky", + "memchr", + "quoted_printable", + "thiserror", +] + [[package]] name = "rust-embed" version = "6.6.1" @@ -1586,6 +1697,7 @@ dependencies = [ "pathdiff", "pep440_rs", "pep508_rs", + "python-pkginfo", "regex", "same-file", "self-replace", @@ -1780,6 +1892,19 @@ dependencies = [ "winapi", ] +[[package]] +name = "stacker" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "winapi", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -2381,9 +2506,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e92305c174683d78035cbf1b70e18db6329cc0f1b9cae0a52ca90bf5bfe7125" dependencies = [ "byteorder", + "bzip2", "crc32fast", "crossbeam-utils", "flate2", + "time", ] [[package]] diff --git a/requirements-dev.lock b/requirements-dev.lock index e2a70a380f..6d2381d268 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -7,16 +7,12 @@ # all-features: false -e file:. -blinker==1.6.2 certifi==2023.5.7 charset-normalizer==3.1.0 click==8.1.3 colorama==0.4.6 -flask==2.3.2 ghp-import==2.1.0 idna==3.4 -itsdangerous==2.1.2 -jaraco-classes==3.2.3 jinja2==3.1.2 markdown==3.3.7 markupsafe==2.1.2 @@ -28,7 +24,6 @@ mkdocs-material==9.1.12 mkdocs-material-extensions==1.1.1 mkdocs-simple-hooks==0.1.5 mkdocs-version-annotations==1.0.0 -more-itertools==9.1.0 packaging==23.1 pygments==2.15.1 pymdown-extensions==9.11 @@ -40,4 +35,3 @@ requests==2.30.0 six==1.16.0 urllib3==2.0.2 watchdog==3.0.0 -werkzeug==2.3.6 diff --git a/requirements.lock b/requirements.lock index e2a70a380f..6d2381d268 100644 --- a/requirements.lock +++ b/requirements.lock @@ -7,16 +7,12 @@ # all-features: false -e file:. -blinker==1.6.2 certifi==2023.5.7 charset-normalizer==3.1.0 click==8.1.3 colorama==0.4.6 -flask==2.3.2 ghp-import==2.1.0 idna==3.4 -itsdangerous==2.1.2 -jaraco-classes==3.2.3 jinja2==3.1.2 markdown==3.3.7 markupsafe==2.1.2 @@ -28,7 +24,6 @@ mkdocs-material==9.1.12 mkdocs-material-extensions==1.1.1 mkdocs-simple-hooks==0.1.5 mkdocs-version-annotations==1.0.0 -more-itertools==9.1.0 packaging==23.1 pygments==2.15.1 pymdown-extensions==9.11 @@ -40,4 +35,3 @@ requests==2.30.0 six==1.16.0 urllib3==2.0.2 watchdog==3.0.0 -werkzeug==2.3.6 diff --git a/rye/src/bootstrap.rs b/rye/src/bootstrap.rs index 1055f2447d..e0133c22c1 100644 --- a/rye/src/bootstrap.rs +++ b/rye/src/bootstrap.rs @@ -32,7 +32,7 @@ pub const SELF_PYTHON_TARGET_VERSION: PythonVersionRequest = PythonVersionReques suffix: None, }; -const SELF_VERSION: u64 = 3; +const SELF_VERSION: u64 = 4; const SELF_REQUIREMENTS: &str = r#" build==0.10.0 @@ -143,13 +143,16 @@ fn do_update(output: CommandOutput, venv_dir: &Path, app_dir: &Path) -> Result<( let mut pip_install_cmd = Command::new(venv_bin.join("pip")); pip_install_cmd.arg("install"); pip_install_cmd.arg("--upgrade"); - pip_install_cmd.arg("pip"); + // pin to a specific pip version to work around a bug with pip-tools. Fix this + // once 7.0.0 is stable. https://github.com/mitsuhiko/rye/issues/368 + pip_install_cmd.arg("pip==23.1"); if output == CommandOutput::Verbose { pip_install_cmd.arg("--verbose"); } else { pip_install_cmd.arg("--quiet"); pip_install_cmd.env("PYTHONWARNINGS", "ignore"); } + pip_install_cmd.env("PIP_DISABLE_PIP_VERSION_CHECK", "1"); let status = pip_install_cmd .status() .context("unable to self-upgrade pip")?; @@ -162,7 +165,8 @@ fn do_update(output: CommandOutput, venv_dir: &Path, app_dir: &Path) -> Result<( pip_install_cmd .arg("install") .arg("-r") - .arg(req_file.path()); + .arg(req_file.path()) + .env("PIP_DISABLE_PIP_VERSION_CHECK", "1"); if output != CommandOutput::Quiet { echo!("Installing internal dependencies"); } diff --git a/rye/src/cli/show.rs b/rye/src/cli/show.rs index 0a7f58fe0c..390af9596e 100644 --- a/rye/src/cli/show.rs +++ b/rye/src/cli/show.rs @@ -85,6 +85,7 @@ fn print_installed_deps(project: &PyProject) -> Result<(), Error> { .arg(&python) .arg("freeze") .env("PYTHONWARNINGS", "ignore") + .env("PIP_DISABLE_PIP_VERSION_CHECK", "1") .status()?; if !status.success() { diff --git a/rye/src/installer.rs b/rye/src/installer.rs index b272d8a595..cd836f05a1 100644 --- a/rye/src/installer.rs +++ b/rye/src/installer.rs @@ -103,7 +103,8 @@ pub fn install( cmd.arg("--python") .arg(&py) .arg("install") - .env("PYTHONWARNINGS", "ignore"); + .env("PYTHONWARNINGS", "ignore") + .env("PIP_DISABLE_PIP_VERSION_CHECK", "1"); sources.add_as_pip_args(&mut cmd); if output == CommandOutput::Verbose { diff --git a/rye/src/piptools.rs b/rye/src/piptools.rs index 216d3b686a..51c73bf1b7 100644 --- a/rye/src/piptools.rs +++ b/rye/src/piptools.rs @@ -33,7 +33,8 @@ fn get_pip_tools_bin(py_ver: &PythonVersion, output: CommandOutput) -> Result