Use flit_editable instead of poetry_editable throughout

This commit is contained in:
Zanie Blue 2025-06-26 12:38:40 -05:00
parent 1ff8fc0947
commit 655848c971
6 changed files with 218 additions and 242 deletions

View file

@ -819,7 +819,7 @@ fn compile_pyproject_toml_poetry() -> Result<()> {
let pyproject_toml = context.temp_dir.child("pyproject.toml"); let pyproject_toml = context.temp_dir.child("pyproject.toml");
pyproject_toml.write_str( pyproject_toml.write_str(
r#"[tool.poetry] r#"[tool.poetry]
name = "poetry-editable" name = "flit-editable"
version = "0.1.0" version = "0.1.0"
description = "" description = ""
authors = ["Astral Software Inc. <hey@astral.sh>"] authors = ["Astral Software Inc. <hey@astral.sh>"]
@ -848,7 +848,7 @@ build-backend = "poetry.core.masonry.api"
# This file was autogenerated by uv via the following command: # This file was autogenerated by uv via the following command:
# uv pip compile --cache-dir [CACHE_DIR] pyproject.toml --extra test # uv pip compile --cache-dir [CACHE_DIR] pyproject.toml --extra test
anyio==3.7.1 anyio==3.7.1
# via poetry-editable (pyproject.toml) # via flit-editable (pyproject.toml)
idna==3.6 idna==3.6
# via anyio # via anyio
iniconfig==2.0.0 iniconfig==2.0.0
@ -858,7 +858,7 @@ build-backend = "poetry.core.masonry.api"
pluggy==1.4.0 pluggy==1.4.0
# via pytest # via pytest
pytest==8.1.1 pytest==8.1.1
# via poetry-editable (pyproject.toml) # via flit-editable (pyproject.toml)
sniffio==1.3.1 sniffio==1.3.1
# via anyio # via anyio
@ -878,13 +878,13 @@ fn compile_pyproject_toml_poetry_empty_dependencies() -> Result<()> {
let pyproject_toml = context.temp_dir.child("pyproject.toml"); let pyproject_toml = context.temp_dir.child("pyproject.toml");
pyproject_toml.write_str( pyproject_toml.write_str(
r#"[project] r#"[project]
name = "poetry-editable" name = "flit-editable"
version = "0.1.0" version = "0.1.0"
description = "" description = ""
authors = ["Astral Software Inc. <hey@astral.sh>"] authors = ["Astral Software Inc. <hey@astral.sh>"]
[tool.poetry] [tool.poetry]
name = "poetry-editable" name = "flit-editable"
version = "0.1.0" version = "0.1.0"
description = "" description = ""
authors = ["Astral Software Inc. <hey@astral.sh>"] authors = ["Astral Software Inc. <hey@astral.sh>"]
@ -907,7 +907,7 @@ build-backend = "poetry.core.masonry.api"
# This file was autogenerated by uv via the following command: # This file was autogenerated by uv via the following command:
# uv pip compile --cache-dir [CACHE_DIR] pyproject.toml # uv pip compile --cache-dir [CACHE_DIR] pyproject.toml
anyio==3.7.1 anyio==3.7.1
# via poetry-editable (pyproject.toml) # via flit-editable (pyproject.toml)
idna==3.6 idna==3.6
# via anyio # via anyio
sniffio==1.3.1 sniffio==1.3.1
@ -929,13 +929,13 @@ fn compile_pyproject_toml_poetry_invalid_dependencies() -> Result<()> {
let pyproject_toml = context.temp_dir.child("pyproject.toml"); let pyproject_toml = context.temp_dir.child("pyproject.toml");
pyproject_toml.write_str( pyproject_toml.write_str(
r#"[project] r#"[project]
name = "poetry-editable" name = "flit-editable"
version = "0.1.0" version = "0.1.0"
description = "" description = ""
authors = ["Astral Software Inc. <hey@astral.sh>"] authors = ["Astral Software Inc. <hey@astral.sh>"]
[tool.poetry] [tool.poetry]
name = "poetry-editable" name = "flit-editable"
version = "0.1.0" version = "0.1.0"
description = "" description = ""
authors = ["Astral Software Inc. <hey@astral.sh>"] authors = ["Astral Software Inc. <hey@astral.sh>"]
@ -4572,6 +4572,7 @@ fn compile_editable() -> Result<()> {
let context = TestContext::new("3.12"); let context = TestContext::new("3.12");
let requirements_in = context.temp_dir.child("requirements.in"); let requirements_in = context.temp_dir.child("requirements.in");
requirements_in.write_str(indoc! {r" requirements_in.write_str(indoc! {r"
-e ../../scripts/packages/flit_editable
-e ../../scripts/packages/poetry_editable -e ../../scripts/packages/poetry_editable
-e file://../../scripts/packages/black_editable[dev] -e file://../../scripts/packages/black_editable[dev]
boltons # normal dependency for comparison boltons # normal dependency for comparison
@ -4580,12 +4581,14 @@ fn compile_editable() -> Result<()> {
uv_snapshot!(context.filters(), context.pip_compile() uv_snapshot!(context.filters(), context.pip_compile()
.arg(requirements_in.path()) .arg(requirements_in.path())
.current_dir(current_dir()?), @r###" .current_dir(current_dir()?), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
# This file was autogenerated by uv via the following command: # This file was autogenerated by uv via the following command:
# uv pip compile --cache-dir [CACHE_DIR] [TEMP_DIR]/requirements.in # uv pip compile --cache-dir [CACHE_DIR] [TEMP_DIR]/requirements.in
-e ../../scripts/packages/flit_editable
# via -r [TEMP_DIR]/requirements.in
-e ../../scripts/packages/poetry_editable -e ../../scripts/packages/poetry_editable
# via -r [TEMP_DIR]/requirements.in # via -r [TEMP_DIR]/requirements.in
-e file://../../scripts/packages/black_editable -e file://../../scripts/packages/black_editable
@ -4620,8 +4623,8 @@ fn compile_editable() -> Result<()> {
# via aiohttp # via aiohttp
----- stderr ----- ----- stderr -----
Resolved 13 packages in [TIME] Resolved 14 packages in [TIME]
"###); ");
Ok(()) Ok(())
} }
@ -5194,7 +5197,7 @@ fn generate_hashes_local_directory() -> Result<()> {
uv_snapshot!(context.filters(), context.pip_compile() uv_snapshot!(context.filters(), context.pip_compile()
.arg(requirements_in.path()) .arg(requirements_in.path())
.arg("--generate-hashes") .arg("--generate-hashes")
.current_dir(current_dir()?), @r###" .current_dir(current_dir()?), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
@ -5217,7 +5220,7 @@ fn generate_hashes_local_directory() -> Result<()> {
----- stderr ----- ----- stderr -----
Resolved 4 packages in [TIME] Resolved 4 packages in [TIME]
"###); ");
Ok(()) Ok(())
} }
@ -5237,7 +5240,7 @@ fn generate_hashes_editable() -> Result<()> {
uv_snapshot!(context.filters(), context.pip_compile() uv_snapshot!(context.filters(), context.pip_compile()
.arg(requirements_in.path()) .arg(requirements_in.path())
.arg("--generate-hashes") .arg("--generate-hashes")
.current_dir(current_dir()?), @r###" .current_dir(current_dir()?), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
@ -5260,7 +5263,7 @@ fn generate_hashes_editable() -> Result<()> {
----- stderr ----- ----- stderr -----
Resolved 4 packages in [TIME] Resolved 4 packages in [TIME]
"###); ");
Ok(()) Ok(())
} }
@ -11536,7 +11539,7 @@ fn unnamed_path_requirement() -> Result<()> {
let context = TestContext::new("3.12"); let context = TestContext::new("3.12");
let requirements_in = context.temp_dir.child("requirements.in"); let requirements_in = context.temp_dir.child("requirements.in");
requirements_in.write_str(indoc! {r" requirements_in.write_str(indoc! {r"
../../scripts/packages/poetry_editable ../../scripts/packages/flit_editable
../../scripts/packages/black_editable ../../scripts/packages/black_editable
../../scripts/packages/setup_py_editable ../../scripts/packages/setup_py_editable
../../scripts/packages/setup_cfg_editable ../../scripts/packages/setup_cfg_editable
@ -11545,16 +11548,14 @@ fn unnamed_path_requirement() -> Result<()> {
uv_snapshot!(context.filters(), context.pip_compile() uv_snapshot!(context.filters(), context.pip_compile()
.arg(requirements_in.path()) .arg(requirements_in.path())
.current_dir(current_dir()?), @r###" .current_dir(current_dir()?), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
# This file was autogenerated by uv via the following command: # This file was autogenerated by uv via the following command:
# uv pip compile --cache-dir [CACHE_DIR] [TEMP_DIR]/requirements.in # uv pip compile --cache-dir [CACHE_DIR] [TEMP_DIR]/requirements.in
anyio==4.3.0 anyio==4.3.0
# via # via httpx
# httpx
# poetry-editable
../../scripts/packages/black_editable ../../scripts/packages/black_editable
# via -r [TEMP_DIR]/requirements.in # via -r [TEMP_DIR]/requirements.in
certifi==2024.2.2 certifi==2024.2.2
@ -11564,6 +11565,8 @@ fn unnamed_path_requirement() -> Result<()> {
# requests # requests
charset-normalizer==3.3.2 charset-normalizer==3.3.2
# via requests # via requests
../../scripts/packages/flit_editable
# via -r [TEMP_DIR]/requirements.in
h11==0.14.0 h11==0.14.0
# via httpcore # via httpcore
httpcore==1.0.4 httpcore==1.0.4
@ -11575,8 +11578,6 @@ fn unnamed_path_requirement() -> Result<()> {
# anyio # anyio
# httpx # httpx
# requests # requests
../../scripts/packages/poetry_editable
# via -r [TEMP_DIR]/requirements.in
requests==2.31.0 requests==2.31.0
# via setup-cfg-editable # via setup-cfg-editable
../../scripts/packages/setup_cfg_editable ../../scripts/packages/setup_cfg_editable
@ -11592,7 +11593,7 @@ fn unnamed_path_requirement() -> Result<()> {
----- stderr ----- ----- stderr -----
Resolved 14 packages in [TIME] Resolved 14 packages in [TIME]
"###); ");
Ok(()) Ok(())
} }
@ -13293,7 +13294,7 @@ fn tool_uv_sources() -> Result<()> {
dependencies = [ dependencies = [
"tqdm>4,<=5", "tqdm>4,<=5",
"packaging @ git+https://github.com/pypa/packaging@32deafe8668a2130a3366b98154914d188f3718e", "packaging @ git+https://github.com/pypa/packaging@32deafe8668a2130a3366b98154914d188f3718e",
"poetry_editable", "flit_editable",
"urllib3 @ https://files.pythonhosted.org/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl", "urllib3 @ https://files.pythonhosted.org/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl",
] ]
@ -13308,52 +13309,46 @@ fn tool_uv_sources() -> Result<()> {
[tool.uv.sources] [tool.uv.sources]
tqdm = { url = "https://files.pythonhosted.org/packages/a5/d6/502a859bac4ad5e274255576cd3e15ca273cdb91731bc39fb840dd422ee9/tqdm-4.66.0-py3-none-any.whl" } tqdm = { url = "https://files.pythonhosted.org/packages/a5/d6/502a859bac4ad5e274255576cd3e15ca273cdb91731bc39fb840dd422ee9/tqdm-4.66.0-py3-none-any.whl" }
boltons = { git = "https://github.com/mahmoud/boltons", rev = "57fbaa9b673ed85b32458b31baeeae230520e4a0" } boltons = { git = "https://github.com/mahmoud/boltons", rev = "57fbaa9b673ed85b32458b31baeeae230520e4a0" }
poetry_editable = { path = "../poetry_editable", editable = true } flit_editable = { path = "../flit_editable", editable = true }
"#})?; "#})?;
let project_root = fs_err::canonicalize(current_dir()?.join("../.."))?; let project_root = fs_err::canonicalize(current_dir()?.join("../.."))?;
fs_err::create_dir_all(context.temp_dir.join("poetry_editable/poetry_editable"))?; fs_err::create_dir_all(context.temp_dir.join("flit_editable/flit_editable"))?;
fs_err::copy( fs_err::copy(
project_root.join("scripts/packages/poetry_editable/pyproject.toml"), project_root.join("scripts/packages/flit_editable/pyproject.toml"),
context.temp_dir.join("poetry_editable/pyproject.toml"), context.temp_dir.join("flit_editable/pyproject.toml"),
)?; )?;
fs_err::copy( fs_err::copy(
project_root.join("scripts/packages/poetry_editable/poetry_editable/__init__.py"), project_root.join("scripts/packages/flit_editable/flit_editable/__init__.py"),
context context
.temp_dir .temp_dir
.join("poetry_editable/poetry_editable/__init__.py"), .join("flit_editable/flit_editable/__init__.py"),
)?; )?;
// Install the editable packages. // Install the editable packages.
uv_snapshot!(context.filters(), context.pip_compile() uv_snapshot!(context.filters(), context.pip_compile()
.arg(require_path) .arg(require_path)
.arg("--extra") .arg("--extra")
.arg("utils"), @r###" .arg("utils"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
# This file was autogenerated by uv via the following command: # This file was autogenerated by uv via the following command:
# uv pip compile --cache-dir [CACHE_DIR] some_dir/pyproject.toml --extra utils # uv pip compile --cache-dir [CACHE_DIR] some_dir/pyproject.toml --extra utils
-e ../poetry_editable -e ../flit_editable
# via project (some_dir/pyproject.toml) # via project (some_dir/pyproject.toml)
anyio==4.3.0
# via poetry-editable
boltons @ git+https://github.com/mahmoud/boltons@57fbaa9b673ed85b32458b31baeeae230520e4a0 boltons @ git+https://github.com/mahmoud/boltons@57fbaa9b673ed85b32458b31baeeae230520e4a0
# via project (some_dir/pyproject.toml) # via project (some_dir/pyproject.toml)
idna==3.6
# via anyio
packaging @ git+https://github.com/pypa/packaging@32deafe8668a2130a3366b98154914d188f3718e packaging @ git+https://github.com/pypa/packaging@32deafe8668a2130a3366b98154914d188f3718e
# via project (some_dir/pyproject.toml) # via project (some_dir/pyproject.toml)
sniffio==1.3.1
# via anyio
tqdm @ https://files.pythonhosted.org/packages/a5/d6/502a859bac4ad5e274255576cd3e15ca273cdb91731bc39fb840dd422ee9/tqdm-4.66.0-py3-none-any.whl tqdm @ https://files.pythonhosted.org/packages/a5/d6/502a859bac4ad5e274255576cd3e15ca273cdb91731bc39fb840dd422ee9/tqdm-4.66.0-py3-none-any.whl
# via project (some_dir/pyproject.toml) # via project (some_dir/pyproject.toml)
urllib3 @ https://files.pythonhosted.org/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl urllib3 @ https://files.pythonhosted.org/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl
# via project (some_dir/pyproject.toml) # via project (some_dir/pyproject.toml)
----- stderr ----- ----- stderr -----
Resolved 8 packages in [TIME] Resolved 5 packages in [TIME]
"### "
); );
Ok(()) Ok(())

View file

@ -131,7 +131,7 @@ fn freeze_with_editable() -> Result<()> {
"anyio\n-e {}", "anyio\n-e {}",
context context
.workspace_root .workspace_root
.join("scripts/packages/poetry_editable") .join("scripts/packages/flit_editable")
.display() .display()
))?; ))?;
@ -149,7 +149,7 @@ fn freeze_with_editable() -> Result<()> {
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
anyio==4.3.0 anyio==4.3.0
-e file://[WORKSPACE]/scripts/packages/poetry_editable -e file://[WORKSPACE]/scripts/packages/flit_editable
----- stderr ----- ----- stderr -----
warning: The package `anyio` requires `idna>=2.8`, but it's not installed warning: The package `anyio` requires `idna>=2.8`, but it's not installed

View file

@ -744,7 +744,7 @@ fn install_pyproject_toml_poetry() -> Result<()> {
let pyproject_toml = context.temp_dir.child("pyproject.toml"); let pyproject_toml = context.temp_dir.child("pyproject.toml");
pyproject_toml.write_str( pyproject_toml.write_str(
r#"[tool.poetry] r#"[tool.poetry]
name = "poetry-editable" name = "poetry-example"
version = "0.1.0" version = "0.1.0"
description = "" description = ""
authors = ["Astral Software Inc. <hey@astral.sh>"] authors = ["Astral Software Inc. <hey@astral.sh>"]
@ -1217,7 +1217,7 @@ fn install_extras() -> Result<()> {
uv_snapshot!(context.filters(), context.pip_install() uv_snapshot!(context.filters(), context.pip_install()
.arg("--all-extras") .arg("--all-extras")
.arg("-e") .arg("-e")
.arg(context.workspace_root.join("scripts/packages/poetry_editable")), @r###" .arg(context.workspace_root.join("scripts/packages/flit_editable")), @r###"
success: false success: false
exit_code: 2 exit_code: 2
----- stdout ----- ----- stdout -----
@ -1230,7 +1230,7 @@ fn install_extras() -> Result<()> {
// Request extras for a source tree // Request extras for a source tree
uv_snapshot!(context.filters(), context.pip_install() uv_snapshot!(context.filters(), context.pip_install()
.arg("--all-extras") .arg("--all-extras")
.arg(context.workspace_root.join("scripts/packages/poetry_editable")), @r###" .arg(context.workspace_root.join("scripts/packages/flit_editable")), @r###"
success: false success: false
exit_code: 2 exit_code: 2
----- stdout ----- ----- stdout -----
@ -1290,6 +1290,68 @@ dependencies = ["anyio==3.7.0"]
fn install_editable() { fn install_editable() {
let context = TestContext::new("3.12"); let context = TestContext::new("3.12");
// Install the editable package.
uv_snapshot!(context.filters(), context.pip_install()
.arg("-e")
.arg(context.workspace_root.join("scripts/packages/flit_editable")), @r"
success: true
exit_code: 0
----- stdout -----
----- stderr -----
Resolved 1 package in [TIME]
Prepared 1 package in [TIME]
Installed 1 package in [TIME]
+ flit-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/flit_editable)
"
);
// Install it again.
uv_snapshot!(context.filters(), context.pip_install()
.arg("-e")
.arg(context.workspace_root.join("scripts/packages/flit_editable")), @r"
success: true
exit_code: 0
----- stdout -----
----- stderr -----
Resolved 1 package in [TIME]
Prepared 1 package in [TIME]
Uninstalled 1 package in [TIME]
Installed 1 package in [TIME]
~ flit-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/flit_editable)
"
);
// Add another, non-editable dependency.
uv_snapshot!(context.filters(), context.pip_install()
.arg("-e")
.arg(context.workspace_root.join("scripts/packages/flit_editable"))
.arg("black"), @r"
success: true
exit_code: 0
----- stdout -----
----- stderr -----
Resolved 7 packages in [TIME]
Prepared 7 packages in [TIME]
Uninstalled 1 package in [TIME]
Installed 7 packages in [TIME]
+ black==24.3.0
+ click==8.1.7
~ flit-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/flit_editable)
+ mypy-extensions==1.0.0
+ packaging==24.0
+ pathspec==0.12.1
+ platformdirs==4.2.0
"
);
}
#[test]
fn install_editable_poetry() {
let context = TestContext::new("3.12");
// Install the editable package. // Install the editable package.
uv_snapshot!(context.filters(), context.pip_install() uv_snapshot!(context.filters(), context.pip_install()
.arg("-e") .arg("-e")
@ -1325,30 +1387,6 @@ fn install_editable() {
~ poetry-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/poetry_editable) ~ poetry-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/poetry_editable)
"### "###
); );
// Add another, non-editable dependency.
uv_snapshot!(context.filters(), context.pip_install()
.arg("-e")
.arg(context.workspace_root.join("scripts/packages/poetry_editable"))
.arg("black"), @r###"
success: true
exit_code: 0
----- stdout -----
----- stderr -----
Resolved 10 packages in [TIME]
Prepared 7 packages in [TIME]
Uninstalled 1 package in [TIME]
Installed 7 packages in [TIME]
+ black==24.3.0
+ click==8.1.7
+ mypy-extensions==1.0.0
+ packaging==24.0
+ pathspec==0.12.1
+ platformdirs==4.2.0
~ poetry-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/poetry_editable)
"###
);
} }
#[test] #[test]
@ -7619,7 +7657,7 @@ fn tool_uv_sources() -> Result<()> {
dependencies = [ dependencies = [
"tqdm>4,<=5", "tqdm>4,<=5",
"packaging @ git+https://github.com/pypa/packaging@32deafe8668a2130a3366b98154914d188f3718e", "packaging @ git+https://github.com/pypa/packaging@32deafe8668a2130a3366b98154914d188f3718e",
"poetry_editable", "flit_editable",
"urllib3 @ https://files.pythonhosted.org/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl", "urllib3 @ https://files.pythonhosted.org/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl",
# Windows consistency # Windows consistency
"colorama>0.4,<5", "colorama>0.4,<5",
@ -7636,20 +7674,20 @@ fn tool_uv_sources() -> Result<()> {
[tool.uv.sources] [tool.uv.sources]
tqdm = { url = "https://files.pythonhosted.org/packages/a5/d6/502a859bac4ad5e274255576cd3e15ca273cdb91731bc39fb840dd422ee9/tqdm-4.66.0-py3-none-any.whl" } tqdm = { url = "https://files.pythonhosted.org/packages/a5/d6/502a859bac4ad5e274255576cd3e15ca273cdb91731bc39fb840dd422ee9/tqdm-4.66.0-py3-none-any.whl" }
charset-normalizer = { git = "https://github.com/jawah/charset_normalizer", rev = "ffdf7f5f08beb0ceb92dc0637e97382ba27cecfa" } charset-normalizer = { git = "https://github.com/jawah/charset_normalizer", rev = "ffdf7f5f08beb0ceb92dc0637e97382ba27cecfa" }
poetry_editable = { path = "../poetry_editable", editable = true } flit_editable = { path = "../flit_editable", editable = true }
"#})?; "#})?;
let project_root = fs_err::canonicalize(std::env::current_dir()?.join("../.."))?; let project_root = fs_err::canonicalize(std::env::current_dir()?.join("../.."))?;
fs_err::create_dir_all(context.temp_dir.join("poetry_editable/poetry_editable"))?; fs_err::create_dir_all(context.temp_dir.join("flit_editable/flit_editable"))?;
fs_err::copy( fs_err::copy(
project_root.join("scripts/packages/poetry_editable/pyproject.toml"), project_root.join("scripts/packages/flit_editable/pyproject.toml"),
context.temp_dir.join("poetry_editable/pyproject.toml"), context.temp_dir.join("flit_editable/pyproject.toml"),
)?; )?;
fs_err::copy( fs_err::copy(
project_root.join("scripts/packages/poetry_editable/poetry_editable/__init__.py"), project_root.join("scripts/packages/flit_editable/flit_editable/__init__.py"),
context context
.temp_dir .temp_dir
.join("poetry_editable/poetry_editable/__init__.py"), .join("flit_editable/flit_editable/__init__.py"),
)?; )?;
// Install the editable packages. // Install the editable packages.
@ -7657,25 +7695,22 @@ fn tool_uv_sources() -> Result<()> {
.arg("-r") .arg("-r")
.arg(require_path) .arg(require_path)
.arg("--extra") .arg("--extra")
.arg("utils"), @r###" .arg("utils"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
----- stderr ----- ----- stderr -----
Resolved 9 packages in [TIME] Resolved 6 packages in [TIME]
Prepared 9 packages in [TIME] Prepared 6 packages in [TIME]
Installed 9 packages in [TIME] Installed 6 packages in [TIME]
+ anyio==4.3.0
+ charset-normalizer==3.4.1 (from git+https://github.com/jawah/charset_normalizer@ffdf7f5f08beb0ceb92dc0637e97382ba27cecfa) + charset-normalizer==3.4.1 (from git+https://github.com/jawah/charset_normalizer@ffdf7f5f08beb0ceb92dc0637e97382ba27cecfa)
+ colorama==0.4.6 + colorama==0.4.6
+ idna==3.6 + flit-editable==0.1.0 (from file://[TEMP_DIR]/flit_editable)
+ packaging==24.1.dev0 (from git+https://github.com/pypa/packaging@32deafe8668a2130a3366b98154914d188f3718e) + packaging==24.1.dev0 (from git+https://github.com/pypa/packaging@32deafe8668a2130a3366b98154914d188f3718e)
+ poetry-editable==0.1.0 (from file://[TEMP_DIR]/poetry_editable)
+ sniffio==1.3.1
+ tqdm==4.66.0 (from https://files.pythonhosted.org/packages/a5/d6/502a859bac4ad5e274255576cd3e15ca273cdb91731bc39fb840dd422ee9/tqdm-4.66.0-py3-none-any.whl) + tqdm==4.66.0 (from https://files.pythonhosted.org/packages/a5/d6/502a859bac4ad5e274255576cd3e15ca273cdb91731bc39fb840dd422ee9/tqdm-4.66.0-py3-none-any.whl)
+ urllib3==2.2.1 (from https://files.pythonhosted.org/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl) + urllib3==2.2.1 (from https://files.pythonhosted.org/packages/a2/73/a68704750a7679d0b6d3ad7aa8d4da8e14e151ae82e6fee774e6e0d05ec8/urllib3-2.2.1-py3-none-any.whl)
"### "
); );
// Re-install the editable packages. // Re-install the editable packages.
@ -7683,15 +7718,15 @@ fn tool_uv_sources() -> Result<()> {
.arg("-r") .arg("-r")
.arg(require_path) .arg(require_path)
.arg("--extra") .arg("--extra")
.arg("utils"), @r###" .arg("utils"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
----- stderr ----- ----- stderr -----
Resolved 9 packages in [TIME] Resolved 6 packages in [TIME]
Audited 9 packages in [TIME] Audited 6 packages in [TIME]
"### "
); );
Ok(()) Ok(())
} }
@ -9863,20 +9898,17 @@ fn other_sources_group() -> Result<()> {
// and install an editable // and install an editable
context = new_context()?; context = new_context()?;
uv_snapshot!(context.filters(), context.pip_install() uv_snapshot!(context.filters(), context.pip_install()
.arg("-e").arg(context.workspace_root.join("scripts/packages/poetry_editable")) .arg("-e").arg(context.workspace_root.join("scripts/packages/flit_editable"))
.arg("--group").arg("foo"), @r" .arg("--group").arg("foo"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
----- stderr ----- ----- stderr -----
Resolved 5 packages in [TIME] Resolved 2 packages in [TIME]
Prepared 5 packages in [TIME] Prepared 2 packages in [TIME]
Installed 5 packages in [TIME] Installed 2 packages in [TIME]
+ anyio==4.3.0 + flit-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/flit_editable)
+ idna==3.6
+ poetry-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/poetry_editable)
+ sniffio==1.3.1
+ sortedcontainers==2.4.0 + sortedcontainers==2.4.0
"); ");

View file

@ -286,20 +286,17 @@ fn list_editable() {
// Install the editable package. // Install the editable package.
uv_snapshot!(context.filters(), context.pip_install() uv_snapshot!(context.filters(), context.pip_install()
.arg("-e") .arg("-e")
.arg(context.workspace_root.join("scripts/packages/poetry_editable")), @r###" .arg(context.workspace_root.join("scripts/packages/flit_editable")), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
----- stderr ----- ----- stderr -----
Resolved 4 packages in [TIME] Resolved 1 package in [TIME]
Prepared 4 packages in [TIME] Prepared 1 package in [TIME]
Installed 4 packages in [TIME] Installed 1 package in [TIME]
+ anyio==4.3.0 + flit-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/flit_editable)
+ idna==3.6 "
+ poetry-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/poetry_editable)
+ sniffio==1.3.1
"###
); );
let filters = context let filters = context
@ -308,19 +305,16 @@ fn list_editable() {
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")]) .chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
.collect::<Vec<_>>(); .collect::<Vec<_>>();
uv_snapshot!(filters, context.pip_list(), @r###" uv_snapshot!(filters, context.pip_list(), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
Package Version Editable project location Package Version Editable project location
[UNDERLINE] [UNDERLINE]
anyio 4.3.0 flit-editable 0.1.0 [WORKSPACE]/scripts/packages/flit_editable
idna 3.6
poetry-editable 0.1.0 [WORKSPACE]/scripts/packages/poetry_editable
sniffio 1.3.1
----- stderr ----- ----- stderr -----
"### "
); );
} }
@ -332,20 +326,17 @@ fn list_editable_only() {
// Install the editable package. // Install the editable package.
uv_snapshot!(context.filters(), context.pip_install() uv_snapshot!(context.filters(), context.pip_install()
.arg("-e") .arg("-e")
.arg(context.workspace_root.join("scripts/packages/poetry_editable")), @r###" .arg(context.workspace_root.join("scripts/packages/flit_editable")), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
----- stderr ----- ----- stderr -----
Resolved 4 packages in [TIME] Resolved 1 package in [TIME]
Prepared 4 packages in [TIME] Prepared 1 package in [TIME]
Installed 4 packages in [TIME] Installed 1 package in [TIME]
+ anyio==4.3.0 + flit-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/flit_editable)
+ idna==3.6 "
+ poetry-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/poetry_editable)
+ sniffio==1.3.1
"###
); );
let filters = context let filters = context
@ -361,25 +352,20 @@ fn list_editable_only() {
----- stdout ----- ----- stdout -----
Package Version Editable project location Package Version Editable project location
[UNDERLINE] [UNDERLINE]
poetry-editable 0.1.0 [WORKSPACE]/scripts/packages/poetry_editable flit-editable 0.1.0 [WORKSPACE]/scripts/packages/flit_editable
----- stderr ----- ----- stderr -----
"### "###
); );
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
.arg("--exclude-editable"), @r###" .arg("--exclude-editable"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
Package Version
[UNDERLINE]
anyio 4.3.0
idna 3.6
sniffio 1.3.1
----- stderr ----- ----- stderr -----
"### "
); );
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
@ -407,20 +393,17 @@ fn list_exclude() {
// Install the editable package. // Install the editable package.
uv_snapshot!(context.filters(), context.pip_install() uv_snapshot!(context.filters(), context.pip_install()
.arg("-e") .arg("-e")
.arg(context.workspace_root.join("scripts/packages/poetry_editable")), @r###" .arg(context.workspace_root.join("scripts/packages/flit_editable")), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
----- stderr ----- ----- stderr -----
Resolved 4 packages in [TIME] Resolved 1 package in [TIME]
Prepared 4 packages in [TIME] Prepared 1 package in [TIME]
Installed 4 packages in [TIME] Installed 1 package in [TIME]
+ anyio==4.3.0 + flit-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/flit_editable)
+ idna==3.6 "
+ poetry-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/poetry_editable)
+ sniffio==1.3.1
"###
); );
let filters = context let filters = context
@ -431,53 +414,40 @@ fn list_exclude() {
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
.arg("--exclude") .arg("--exclude")
.arg("numpy"), @r###" .arg("numpy"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
Package Version Editable project location Package Version Editable project location
[UNDERLINE] [UNDERLINE]
anyio 4.3.0 flit-editable 0.1.0 [WORKSPACE]/scripts/packages/flit_editable
idna 3.6
poetry-editable 0.1.0 [WORKSPACE]/scripts/packages/poetry_editable
sniffio 1.3.1
----- stderr ----- ----- stderr -----
"### "
); );
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
.arg("--exclude") .arg("--exclude")
.arg("poetry-editable"), @r###" .arg("flit-editable"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
Package Version
[UNDERLINE]
anyio 4.3.0
idna 3.6
sniffio 1.3.1
----- stderr ----- ----- stderr -----
"### "
); );
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
.arg("--exclude") .arg("--exclude")
.arg("numpy") .arg("numpy")
.arg("--exclude") .arg("--exclude")
.arg("poetry-editable"), @r###" .arg("flit-editable"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
Package Version
[UNDERLINE]
anyio 4.3.0
idna 3.6
sniffio 1.3.1
----- stderr ----- ----- stderr -----
"### "
); );
} }
@ -490,20 +460,17 @@ fn list_format_json() {
// Install the editable package. // Install the editable package.
uv_snapshot!(context.filters(), context.pip_install() uv_snapshot!(context.filters(), context.pip_install()
.arg("-e") .arg("-e")
.arg(context.workspace_root.join("scripts/packages/poetry_editable")), @r###" .arg(context.workspace_root.join("scripts/packages/flit_editable")), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
----- stderr ----- ----- stderr -----
Resolved 4 packages in [TIME] Resolved 1 package in [TIME]
Prepared 4 packages in [TIME] Prepared 1 package in [TIME]
Installed 4 packages in [TIME] Installed 1 package in [TIME]
+ anyio==4.3.0 + flit-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/flit_editable)
+ idna==3.6 "
+ poetry-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/poetry_editable)
+ sniffio==1.3.1
"###
); );
let filters: Vec<_> = context let filters: Vec<_> = context
@ -513,14 +480,14 @@ fn list_format_json() {
.collect(); .collect();
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
.arg("--format=json"), @r###" .arg("--format=json"), @r#"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
[{"name":"anyio","version":"4.3.0"},{"name":"idna","version":"3.6"},{"name":"poetry-editable","version":"0.1.0","editable_project_location":"[WORKSPACE]/scripts/packages/poetry_editable"},{"name":"sniffio","version":"1.3.1"}] [{"name":"flit-editable","version":"0.1.0","editable_project_location":"[WORKSPACE]/scripts/packages/flit_editable"}]
----- stderr ----- ----- stderr -----
"### "#
); );
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
@ -529,7 +496,7 @@ fn list_format_json() {
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
[{"name":"poetry-editable","version":"0.1.0","editable_project_location":"[WORKSPACE]/scripts/packages/poetry_editable"}] [{"name":"flit-editable","version":"0.1.0","editable_project_location":"[WORKSPACE]/scripts/packages/flit_editable"}]
----- stderr ----- ----- stderr -----
"### "###
@ -537,14 +504,14 @@ fn list_format_json() {
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
.arg("--format=json") .arg("--format=json")
.arg("--exclude-editable"), @r###" .arg("--exclude-editable"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
[{"name":"anyio","version":"4.3.0"},{"name":"idna","version":"3.6"},{"name":"sniffio","version":"1.3.1"}] []
----- stderr ----- ----- stderr -----
"### "
); );
} }
@ -557,20 +524,17 @@ fn list_format_freeze() {
uv_snapshot!(context.filters(), context uv_snapshot!(context.filters(), context
.pip_install() .pip_install()
.arg("-e") .arg("-e")
.arg(context.workspace_root.join("scripts/packages/poetry_editable")), @r###" .arg(context.workspace_root.join("scripts/packages/flit_editable")), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
----- stderr ----- ----- stderr -----
Resolved 4 packages in [TIME] Resolved 1 package in [TIME]
Prepared 4 packages in [TIME] Prepared 1 package in [TIME]
Installed 4 packages in [TIME] Installed 1 package in [TIME]
+ anyio==4.3.0 + flit-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/flit_editable)
+ idna==3.6 "
+ poetry-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/poetry_editable)
+ sniffio==1.3.1
"###
); );
let filters = context let filters = context
@ -580,17 +544,14 @@ fn list_format_freeze() {
.collect::<Vec<_>>(); .collect::<Vec<_>>();
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
.arg("--format=freeze"), @r###" .arg("--format=freeze"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
anyio==4.3.0 flit-editable==0.1.0
idna==3.6
poetry-editable==0.1.0
sniffio==1.3.1
----- stderr ----- ----- stderr -----
"### "
); );
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
@ -599,7 +560,7 @@ fn list_format_freeze() {
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
poetry-editable==0.1.0 flit-editable==0.1.0
----- stderr ----- ----- stderr -----
"### "###
@ -607,16 +568,13 @@ fn list_format_freeze() {
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
.arg("--format=freeze") .arg("--format=freeze")
.arg("--exclude-editable"), @r###" .arg("--exclude-editable"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
anyio==4.3.0
idna==3.6
sniffio==1.3.1
----- stderr ----- ----- stderr -----
"### "
); );
} }
@ -723,20 +681,17 @@ fn list_ignores_quiet_flag_format_freeze() {
uv_snapshot!(context.filters(), context uv_snapshot!(context.filters(), context
.pip_install() .pip_install()
.arg("-e") .arg("-e")
.arg(context.workspace_root.join("scripts/packages/poetry_editable")), @r###" .arg(context.workspace_root.join("scripts/packages/flit_editable")), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
----- stderr ----- ----- stderr -----
Resolved 4 packages in [TIME] Resolved 1 package in [TIME]
Prepared 4 packages in [TIME] Prepared 1 package in [TIME]
Installed 4 packages in [TIME] Installed 1 package in [TIME]
+ anyio==4.3.0 + flit-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/flit_editable)
+ idna==3.6 "
+ poetry-editable==0.1.0 (from file://[WORKSPACE]/scripts/packages/poetry_editable)
+ sniffio==1.3.1
"###
); );
let filters = context let filters = context
@ -747,17 +702,14 @@ fn list_ignores_quiet_flag_format_freeze() {
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
.arg("--format=freeze") .arg("--format=freeze")
.arg("--quiet"), @r###" .arg("--quiet"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
anyio==4.3.0 flit-editable==0.1.0
idna==3.6
poetry-editable==0.1.0
sniffio==1.3.1
----- stderr ----- ----- stderr -----
"### "
); );
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
@ -767,7 +719,7 @@ fn list_ignores_quiet_flag_format_freeze() {
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
poetry-editable==0.1.0 flit-editable==0.1.0
----- stderr ----- ----- stderr -----
"### "###
@ -776,15 +728,12 @@ fn list_ignores_quiet_flag_format_freeze() {
uv_snapshot!(filters, context.pip_list() uv_snapshot!(filters, context.pip_list()
.arg("--format=freeze") .arg("--format=freeze")
.arg("--exclude-editable") .arg("--exclude-editable")
.arg("--quiet"), @r###" .arg("--quiet"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
anyio==4.3.0
idna==3.6
sniffio==1.3.1
----- stderr ----- ----- stderr -----
"### "
); );
} }

View file

@ -384,7 +384,7 @@ fn show_editable() -> Result<()> {
context context
.pip_install() .pip_install()
.arg("-e") .arg("-e")
.arg("../../scripts/packages/poetry_editable") .arg("../../scripts/packages/flit_editable")
.current_dir(current_dir()?) .current_dir(current_dir()?)
.env( .env(
EnvVars::CARGO_TARGET_DIR, EnvVars::CARGO_TARGET_DIR,
@ -394,19 +394,19 @@ fn show_editable() -> Result<()> {
.success(); .success();
uv_snapshot!(context.filters(), context.pip_show() uv_snapshot!(context.filters(), context.pip_show()
.arg("poetry-editable"), @r###" .arg("flit-editable"), @r"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
Name: poetry-editable Name: flit-editable
Version: 0.1.0 Version: 0.1.0
Location: [SITE_PACKAGES]/ Location: [SITE_PACKAGES]/
Editable project location: [WORKSPACE]/scripts/packages/poetry_editable Editable project location: [WORKSPACE]/scripts/packages/flit_editable
Requires: anyio Requires:
Required-by: Required-by:
----- stderr ----- ----- stderr -----
"### "
); );
Ok(()) Ok(())

View file

@ -2244,22 +2244,22 @@ fn refresh_package() -> Result<()> {
#[test] #[test]
fn sync_editable() -> Result<()> { fn sync_editable() -> Result<()> {
let context = TestContext::new("3.12"); let context = TestContext::new("3.12");
let poetry_editable = context.temp_dir.child("poetry_editable"); let flit_editable = context.temp_dir.child("flit_editable");
// Copy into the temporary directory so we can mutate it. // Copy into the temporary directory so we can mutate it.
copy_dir_all( copy_dir_all(
context context
.workspace_root .workspace_root
.join("scripts/packages/poetry_editable"), .join("scripts/packages/flit_editable"),
&poetry_editable, &flit_editable,
)?; )?;
let requirements_txt = context.temp_dir.child("requirements.txt"); let requirements_txt = context.temp_dir.child("requirements.txt");
requirements_txt.write_str(&indoc::formatdoc! {r" requirements_txt.write_str(&indoc::formatdoc! {r"
anyio==3.7.0 anyio==3.7.0
-e file://{poetry_editable} -e file://{flit_editable}
", ",
poetry_editable = poetry_editable.display() flit_editable = flit_editable.display()
})?; })?;
// Install the editable package. // Install the editable package.
@ -2274,7 +2274,7 @@ fn sync_editable() -> Result<()> {
Prepared 2 packages in [TIME] Prepared 2 packages in [TIME]
Installed 2 packages in [TIME] Installed 2 packages in [TIME]
+ anyio==3.7.0 + anyio==3.7.0
+ poetry-editable==0.1.0 (from file://[TEMP_DIR]/poetry_editable) + flit-editable==0.1.0 (from file://[TEMP_DIR]/flit_editable)
"### "###
); );
@ -2295,7 +2295,7 @@ fn sync_editable() -> Result<()> {
uv_snapshot!(context.filters(), context.pip_sync() uv_snapshot!(context.filters(), context.pip_sync()
.arg(requirements_txt.path()) .arg(requirements_txt.path())
.arg("--reinstall-package") .arg("--reinstall-package")
.arg("poetry-editable"), @r###" .arg("flit-editable"), @r###"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----
@ -2305,16 +2305,16 @@ fn sync_editable() -> Result<()> {
Prepared 1 package in [TIME] Prepared 1 package in [TIME]
Uninstalled 1 package in [TIME] Uninstalled 1 package in [TIME]
Installed 1 package in [TIME] Installed 1 package in [TIME]
~ poetry-editable==0.1.0 (from file://[TEMP_DIR]/poetry_editable) ~ flit-editable==0.1.0 (from file://[TEMP_DIR]/flit_editable)
"### "###
); );
let python_source_file = poetry_editable.path().join("poetry_editable/__init__.py"); let python_source_file = flit_editable.path().join("flit_editable/__init__.py");
let check_installed = indoc::indoc! {r#" let check_installed = indoc::indoc! {r"
from poetry_editable import a from flit_editable import main
assert a() == "a", a() assert main() == None
"#}; "};
context.assert_command(check_installed).success(); context.assert_command(check_installed).success();
// Edit the sources and make sure the changes are respected without syncing again. // Edit the sources and make sure the changes are respected without syncing again.
@ -2324,7 +2324,7 @@ fn sync_editable() -> Result<()> {
fs_err::write(&python_source_file, python_version_1)?; fs_err::write(&python_source_file, python_version_1)?;
let check_installed = indoc::indoc! {r" let check_installed = indoc::indoc! {r"
from poetry_editable import version from flit_editable import version
assert version == 1, version assert version == 1, version
"}; "};
@ -2336,7 +2336,7 @@ fn sync_editable() -> Result<()> {
fs_err::write(&python_source_file, python_version_2)?; fs_err::write(&python_source_file, python_version_2)?;
let check_installed = indoc::indoc! {r" let check_installed = indoc::indoc! {r"
from poetry_editable import version from flit_editable import version
assert version == 2, version assert version == 2, version
"}; "};
@ -2357,7 +2357,7 @@ fn sync_editable() -> Result<()> {
); );
// Modify the `pyproject.toml` file. // Modify the `pyproject.toml` file.
let pyproject_toml = poetry_editable.path().join("pyproject.toml"); let pyproject_toml = flit_editable.path().join("pyproject.toml");
let pyproject_toml_contents = fs_err::read_to_string(&pyproject_toml)?; let pyproject_toml_contents = fs_err::read_to_string(&pyproject_toml)?;
fs_err::write( fs_err::write(
&pyproject_toml, &pyproject_toml,
@ -2376,13 +2376,13 @@ fn sync_editable() -> Result<()> {
Prepared 1 package in [TIME] Prepared 1 package in [TIME]
Uninstalled 1 package in [TIME] Uninstalled 1 package in [TIME]
Installed 1 package in [TIME] Installed 1 package in [TIME]
- poetry-editable==0.1.0 (from file://[TEMP_DIR]/poetry_editable) - flit-editable==0.1.0 (from file://[TEMP_DIR]/flit_editable)
+ poetry-editable==0.1.1 (from file://[TEMP_DIR]/poetry_editable) + flit-editable==0.1.1 (from file://[TEMP_DIR]/flit_editable)
"### "###
); );
// Modify the `pyproject.toml` file. // Modify the `pyproject.toml` file.
let pyproject_toml = poetry_editable.path().join("pyproject.toml"); let pyproject_toml = flit_editable.path().join("pyproject.toml");
let pyproject_toml_contents = fs_err::read_to_string(&pyproject_toml)?; let pyproject_toml_contents = fs_err::read_to_string(&pyproject_toml)?;
fs_err::write( fs_err::write(
&pyproject_toml, &pyproject_toml,
@ -2401,7 +2401,7 @@ fn sync_editable() -> Result<()> {
Prepared 1 package in [TIME] Prepared 1 package in [TIME]
Uninstalled 1 package in [TIME] Uninstalled 1 package in [TIME]
Installed 1 package in [TIME] Installed 1 package in [TIME]
~ poetry-editable==0.1.1 (from file://[TEMP_DIR]/poetry_editable) ~ flit-editable==0.1.1 (from file://[TEMP_DIR]/flit_editable)
"### "###
); );