Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
826964fb
Unverified
Commit
826964fb
authored
Mar 26, 2022
by
Randy Döring
Committed by
GitHub
Mar 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some workarounds not required anymore with poetry-core 1.1.0a7 (#5308)
parent
4da3bcb3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
28 deletions
+8
-28
src/poetry/puzzle/provider.py
+1
-10
tests/utils/test_exporter.py
+7
-18
No files found.
src/poetry/puzzle/provider.py
View file @
826964fb
...
...
@@ -189,12 +189,7 @@ class Provider:
dependency
.
_source_reference
=
package
.
source_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
...
...
@@ -671,10 +666,6 @@ class Provider:
dep_other
.
set_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
=
[]
for
_dep
in
_deps
:
...
...
tests/utils/test_exporter.py
View file @
826964fb
...
...
@@ -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
:
content
=
f
.
read
()
expected
=
(
# 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
baz==10.11.13 ; platform_system == "Windows"
foo==1.2.3
"""
),
expected
=
textwrap
.
dedent
(
"""
\
bar==7.8.9
baz==10.11.13 ; platform_system == "Windows"
foo==1.2.3
"""
)
assert
content
in
expected
assert
content
==
expected
def
test_exporter_can_export_requirements_txt_with_git_packages_and_markers
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment