Commit 826964fb by Randy Döring Committed by GitHub

Remove some workarounds not required anymore with poetry-core 1.1.0a7 (#5308)

parent 4da3bcb3
...@@ -189,11 +189,6 @@ class Provider: ...@@ -189,11 +189,6 @@ class Provider:
dependency._source_reference = package.source_reference dependency._source_reference = package.source_reference
dependency._source_resolved_reference = package.source_resolved_reference dependency._source_resolved_reference = package.source_resolved_reference
if hasattr(package, "source_subdirectory") and hasattr(
dependency, "_source_subdirectory"
):
# this is supported only for poetry-core >= 1.1.0a7
dependency._source_subdirectory = package.source_subdirectory dependency._source_subdirectory = package.source_subdirectory
self._deferred_cache[dependency] = package self._deferred_cache[dependency] = package
...@@ -671,10 +666,6 @@ class Provider: ...@@ -671,10 +666,6 @@ class Provider:
dep_other.set_constraint( dep_other.set_constraint(
dep_other.constraint.intersect(dep_any.constraint) dep_other.constraint.intersect(dep_any.constraint)
) )
# TODO: Setting _pretty_constraint can be removed once the
# following issue has been fixed:
# https://github.com/python-poetry/poetry/issues/4589
dep_other._pretty_constraint = str(dep_other.constraint)
overrides = [] overrides = []
for _dep in _deps: for _dep in _deps:
......
...@@ -1036,26 +1036,15 @@ def test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_ ...@@ -1036,26 +1036,15 @@ def test_exporter_can_export_requirements_txt_with_nested_packages_and_multiple_
with (Path(tmp_dir) / "requirements.txt").open(encoding="utf-8") as f: with (Path(tmp_dir) / "requirements.txt").open(encoding="utf-8") as f:
content = f.read() content = f.read()
expected = ( expected = textwrap.dedent(
# expectation for poetry-core <= 1.1.0a6
textwrap.dedent(
"""\
bar==7.8.9 ; platform_system != "Windows" or platform_system == "Windows"
baz==10.11.13 ; platform_system == "Windows"
foo==1.2.3
"""
),
# expectation for poetry-core > 1.1.0a6
textwrap.dedent(
"""\ """\
bar==7.8.9 bar==7.8.9
baz==10.11.13 ; platform_system == "Windows" baz==10.11.13 ; platform_system == "Windows"
foo==1.2.3 foo==1.2.3
""" """
),
) )
assert content in expected assert content == expected
def test_exporter_can_export_requirements_txt_with_git_packages_and_markers( def test_exporter_can_export_requirements_txt_with_git_packages_and_markers(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment