Commit a770b3ac by David Hotham Committed by GitHub

package category is not useful (#7637)

package.category doesn't make a lot of sense in the richer world of dependency groups.

The only use that is made of the category in poetry and poetry-core is that it is written to and read back from the lockfile. But no use is made of that information.
parent ec35b837
......@@ -126,7 +126,6 @@ class Locker:
source_subdirectory=source.get("subdirectory"),
)
package.description = info.get("description", "")
package.category = info.get("category", "main")
package.optional = info["optional"]
metadata = cast("dict[str, Any]", lock_data["metadata"])
......@@ -425,7 +424,6 @@ class Locker:
"name": package.pretty_name,
"version": package.pretty_version,
"description": package.description or "",
"category": package.category,
"optional": package.optional,
"python-versions": package.python_versions,
"files": sorted(
......
......@@ -9,8 +9,6 @@ from typing import FrozenSet
from typing import Tuple
from typing import TypeVar
from poetry.core.packages.dependency_group import MAIN_GROUP
from poetry.mixology import resolve_version
from poetry.mixology.failure import SolveFailure
from poetry.puzzle.exceptions import OverrideNeeded
......@@ -273,11 +271,9 @@ class PackageNode(DFSNode):
self.depth = -1
if not previous:
self.category = "dev"
self.groups: frozenset[str] = frozenset()
self.optional = True
elif dep:
self.category = "main" if MAIN_GROUP in dep.groups else "dev"
self.groups = dep.groups
self.optional = dep.is_optional()
else:
......@@ -327,14 +323,11 @@ def aggregate_package_nodes(nodes: list[PackageNode]) -> tuple[Package, int]:
for node in nodes:
groups.extend(node.groups)
category = "main" if any(MAIN_GROUP in node.groups for node in nodes) else "dev"
optional = all(node.optional for node in nodes)
for node in nodes:
node.depth = depth
node.category = category
node.optional = optional
package.category = category
package.optional = optional
return package, depth
......@@ -45,7 +45,6 @@ def install_plugin(installed: Repository) -> None:
{
"name": "poetry-plugin",
"version": "1.2.3",
"category": "main",
"optional": False,
"platform": "*",
"python-versions": "*",
......
......@@ -4,7 +4,6 @@
name = "missing"
version = "1.2.3"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -4,7 +4,6 @@
name = "missing"
version = "1.2.3"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -4,7 +4,6 @@
name = "missing"
version = "1.2.3"
description = ""
category = "dev"
optional = false
python-versions = "*"
files = []
......
......@@ -4,7 +4,6 @@
name = "missing"
version = "1.2.3"
description = ""
category = "dev"
optional = false
python-versions = "*"
files = []
......
[[package]]
category = "main"
description = "A sample Python project"
name = "sampleproject"
optional = false
......
......@@ -4,7 +4,6 @@
name = "quix"
version = "1.2.3"
description = "Some description."
category = "main"
optional = false
python-versions = "~2.7 || ^3.4"
files = []
......
......@@ -2,7 +2,6 @@
name = "certifi"
version = "2020.6.20"
description = "Python package for providing Mozilla's CA Bundle."
category = "main"
optional = false
python-versions = "*"
......@@ -18,7 +17,6 @@ hash = "sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3"
name = "chardet"
version = "3.0.4"
description = "Universal encoding detector for Python 2 and 3"
category = "main"
optional = false
python-versions = "*"
......@@ -34,7 +32,6 @@ hash = "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
name = "docker"
version = "4.3.0"
description = "A Python library for the Docker Engine API."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
......@@ -60,7 +57,6 @@ tls = ["pyOpenSSL (>=17.5.0)", "cryptography (>=1.3.4)", "idna (>=2.0.0)"]
name = "idna"
version = "2.10"
description = "Internationalized Domain Names in Applications (IDNA)"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
......@@ -76,7 +72,6 @@ hash = "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"
name = "pywin32"
version = "227"
description = "Python for Window Extensions"
category = "main"
optional = false
python-versions = "*"
......@@ -132,7 +127,6 @@ hash = "sha256:f27cec5e7f588c3d1051651830ecc00294f90728d19c3bf6916e6dba93ea357c"
name = "requests"
version = "2.24.0"
description = "Python HTTP for Humans."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
......@@ -158,7 +152,6 @@ socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"]
name = "six"
version = "1.15.0"
description = "Python 2 and 3 compatibility utilities"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
......@@ -174,7 +167,6 @@ hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"
name = "urllib3"
version = "1.25.10"
description = "HTTP library with thread-safe connection pooling, file post, and more."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4"
......@@ -195,7 +187,6 @@ socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"]
name = "websocket-client"
version = "0.57.0"
description = "WebSocket client for Python. hybi13 is supported."
category = "main"
optional = false
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
......
......@@ -2,7 +2,6 @@
name = "certifi"
version = "2020.12.5"
description = "Python package for providing Mozilla's CA Bundle."
category = "main"
optional = false
python-versions = "*"
......@@ -18,7 +17,6 @@ hash = "sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c"
name = "chardet"
version = "4.0.0"
description = "Universal encoding detector for Python 2 and 3"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
......@@ -34,7 +32,6 @@ hash = "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa"
name = "docker"
version = "4.3.1"
description = "A Python library for the Docker Engine API."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
......@@ -60,7 +57,6 @@ tls = ["pyOpenSSL (>=17.5.0)", "cryptography (>=1.3.4)", "idna (>=2.0.0)"]
name = "idna"
version = "2.10"
description = "Internationalized Domain Names in Applications (IDNA)"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
......@@ -76,7 +72,6 @@ hash = "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"
name = "pywin32"
version = "227"
description = "Python for Window Extensions"
category = "main"
optional = false
python-versions = "*"
......@@ -132,7 +127,6 @@ hash = "sha256:f27cec5e7f588c3d1051651830ecc00294f90728d19c3bf6916e6dba93ea357c"
name = "requests"
version = "2.25.1"
description = "Python HTTP for Humans."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
......@@ -158,7 +152,6 @@ socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"]
name = "six"
version = "1.15.0"
description = "Python 2 and 3 compatibility utilities"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
......@@ -174,7 +167,6 @@ hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"
name = "urllib3"
version = "1.26.3"
description = "HTTP library with thread-safe connection pooling, file post, and more."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4"
......@@ -195,7 +187,6 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
name = "websocket-client"
version = "0.58.0"
description = "WebSocket client for Python with low level API options"
category = "main"
optional = false
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -11,7 +10,6 @@ files = []
name = "B"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -20,7 +18,6 @@ files = []
name = "C"
version = "1.0"
description = ""
category = "main"
optional = true
python-versions = "*"
files = []
......@@ -32,7 +29,6 @@ D = "^1.0"
name = "D"
version = "1.1"
description = ""
category = "main"
optional = true
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -11,7 +10,6 @@ files = []
name = "B"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -20,7 +18,6 @@ files = []
name = "C"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -29,7 +26,6 @@ files = []
name = "D"
version = "1.1"
description = ""
category = "main"
optional = true
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -11,7 +10,6 @@ files = []
name = "B"
version = "1.1"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -20,7 +18,6 @@ files = []
name = "C"
version = "1.2"
description = ""
category = "dev"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "attrs"
version = "17.4.0"
description = "Classes Without Boilerplate"
category = "dev"
optional = false
python-versions = "*"
......@@ -15,7 +14,6 @@ tests = ["coverage", "hypothesis", "pympler", "pytest", "six", "zope.interface"]
name = "colorama"
version = "0.3.9"
description = "Cross-platform colored terminal text."
category = "dev"
marker = "sys_platform == \"win32\""
optional = false
python-versions = "*"
......@@ -24,7 +22,6 @@ python-versions = "*"
name = "funcsigs"
version = "1.0.2"
description = "Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+"
category = "dev"
marker = "python_version < \"3.0\""
optional = false
python-versions = "*"
......@@ -33,7 +30,6 @@ python-versions = "*"
name = "more-itertools"
version = "4.1.0"
description = "More routines for operating on iterables, beyond itertools"
category = "dev"
optional = false
python-versions = "*"
......@@ -44,7 +40,6 @@ six = ">=1.0.0,<2.0.0"
name = "pluggy"
version = "0.6.0"
description = "plugin and hook calling mechanisms for python"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
......@@ -52,7 +47,6 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
name = "py"
version = "1.5.3"
description = "library with cross-python path, ini-parsing, io, code, log facilities"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
......@@ -60,7 +54,6 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
name = "pytest"
version = "3.5.0"
description = "pytest: simple powerful testing with Python"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
......@@ -77,7 +70,6 @@ colorama = "*"
name = "six"
version = "1.11.0"
description = "Python 2 and 3 compatibility utilities"
category = "dev"
optional = false
python-versions = "*"
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.1"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -18,7 +17,6 @@ foo = ["B"]
name = "B"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -27,7 +25,6 @@ files = []
name = "C"
version = "1.1"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -36,7 +33,6 @@ files = []
name = "D"
version = "1.1"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
[[package]]
name = "A"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
[[package]]
name = "B"
version = "1.1"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
[package.dependencies]
A = "^1.0"
[metadata]
python-versions = "*"
lock-version = "2.0"
content-hash = "123456789"
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0.0"
description = ""
category = "main"
optional = false
python-versions = ">=3.5"
files = []
......@@ -14,7 +13,6 @@ python = ">=3.5,<4.0"
name = "A"
version = "1.0.1"
description = ""
category = "main"
optional = false
python-versions = ">=3.6"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -11,7 +10,6 @@ files = []
name = "B"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -26,7 +24,6 @@ foo = ["C (>=1.0,<2.0)"]
name = "C"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -17,7 +16,6 @@ b = ["B[c] (>=1.0,<2.0)"]
name = "B"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -32,7 +30,6 @@ c = ["C (>=1.0,<2.0)"]
name = "C"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -11,7 +10,6 @@ files = []
name = "B"
version = "1.1"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
[[package]]
category = "main"
description = ""
name = "demo"
optional = false
......@@ -22,7 +21,6 @@ type = "file"
url = "../distributions/demo-0.1.0-py2.py3-none-any.whl"
[[package]]
category = "main"
description = "This is a description"
develop = false
name = "inner-directory-project"
......@@ -36,7 +34,6 @@ type = "directory"
url = "project_with_transitive_file_dependencies/inner-directory-project"
[[package]]
category = "main"
description = ""
name = "pendulum"
optional = false
......@@ -45,7 +42,6 @@ files = []
version = "1.4.4"
[[package]]
category = "main"
description = "This is a description"
develop = false
name = "project-with-extras"
......@@ -63,7 +59,6 @@ type = "directory"
url = "../project_with_extras"
[[package]]
category = "main"
description = "This is a description"
develop = false
name = "project-with-transitive-directory-dependencies"
......@@ -81,7 +76,6 @@ type = "directory"
url = "project_with_transitive_directory_dependencies"
[[package]]
category = "main"
description = "This is a description"
develop = false
name = "project-with-transitive-file-dependencies"
......
[[package]]
description = ""
category = "main"
name = "pendulum"
optional = false
python-versions = "*"
......@@ -8,7 +7,6 @@ files = []
version = "1.4.4"
[[package]]
category = "main"
description = "This is a description"
develop = false
name = "project-with-extras"
......
......@@ -2,7 +2,6 @@
name = "cachy"
version = "0.2.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -11,7 +10,6 @@ files = []
name = "pendulum"
version = "1.4.4"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -21,7 +19,6 @@ name = "project-with-setup"
version = "0.1.2"
develop = false
description = "Demo project."
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.1"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -14,7 +13,6 @@ B = "^2.0"
name = "B"
version = "2.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -26,7 +24,6 @@ C = "1.5"
name = "C"
version = "1.5"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -17,7 +16,6 @@ B = [
name = "B"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -29,7 +27,6 @@ C = "1.2"
name = "B"
version = "2.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -41,7 +38,6 @@ C = "1.5"
name = "C"
version = "1.2"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -50,7 +46,6 @@ files = []
name = "C"
version = "1.5"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
[[package]]
category = "main"
description = ""
name = "demo"
optional = false
......@@ -22,7 +21,6 @@ type = "file"
url = "../distributions/demo-0.1.0-py2.py3-none-any.whl"
[[package]]
category = "main"
description = "This is a description"
develop = false
name = "inner-directory-project"
......@@ -36,7 +34,6 @@ type = "directory"
url = "project_with_transitive_file_dependencies/inner-directory-project"
[[package]]
category = "main"
description = ""
name = "pendulum"
optional = false
......@@ -45,7 +42,6 @@ files = []
version = "1.4.4"
[[package]]
category = "main"
description = "This is a description"
develop = false
name = "project-with-transitive-file-dependencies"
......
......@@ -2,7 +2,6 @@
name = "demo"
version = "0.1.0"
description = ""
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
......@@ -25,7 +24,6 @@ foo = ["cleo"]
name = "pendulum"
version = "1.4.4"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.1"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -18,7 +17,6 @@ C = [
name = "B"
version = "1.1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -27,7 +25,6 @@ files = []
name = "C"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -36,7 +33,6 @@ files = []
name = "C"
version = "2.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0"
description = ""
category = "main"
optional = true
python-versions = "*"
files = []
......@@ -11,7 +10,6 @@ files = []
name = "C"
version = "1.3"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -23,7 +21,6 @@ D = "^1.2"
name = "D"
version = "1.4"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0"
description = ""
category = "main"
optional = true
python-versions = "*"
files = []
......@@ -11,7 +10,6 @@ files = []
name = "B"
version = "1.1"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -20,7 +18,6 @@ files = []
name = "C"
version = "1.3"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -32,7 +29,6 @@ D = "^1.2"
name = "D"
version = "1.4"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0a2"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -11,7 +10,6 @@ files = []
name = "B"
version = "1.1"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -4,7 +4,6 @@
name = "attrs"
version = "17.4.0"
description = "Classes Without Boilerplate"
category = "dev"
optional = false
python-versions = "*"
files = [
......@@ -21,7 +20,6 @@ tests = ["coverage", "hypothesis", "pympler", "pytest", "six", "zope.interface"]
name = "colorama"
version = "0.3.9"
description = "Cross-platform colored terminal text."
category = "dev"
optional = false
python-versions = "*"
files = [
......@@ -33,7 +31,6 @@ files = [
name = "more-itertools"
version = "4.1.0"
description = "More routines for operating on iterables, beyond itertools"
category = "dev"
optional = false
python-versions = "*"
files = [
......@@ -49,7 +46,6 @@ six = ">=1.0.0,<2.0.0"
name = "pluggy"
version = "0.6.0"
description = "plugin and hook calling mechanisms for python"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
files = [
......@@ -60,7 +56,6 @@ files = [
name = "py"
version = "1.5.3"
description = "library with cross-python path, ini-parsing, io, code, log facilities"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
files = [
......@@ -72,7 +67,6 @@ files = [
name = "pytest"
version = "3.5.0"
description = "pytest: simple powerful testing with Python"
category = "dev"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
files = [
......@@ -93,7 +87,6 @@ six = ">=1.10.0"
name = "setuptools"
version = "67.6.1"
description = "Easily download, build, install, upgrade, and uninstall Python packages"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
......@@ -110,7 +103,6 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (
name = "six"
version = "1.11.0"
description = "Python 2 and 3 compatibility utilities"
category = "dev"
optional = false
python-versions = "*"
files = [
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -11,7 +10,6 @@ files = []
name = "B"
version = "1.1"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -20,7 +18,6 @@ files = []
name = "C"
version = "1.2"
description = ""
category = "main"
optional = false
python-versions = "~2.7 || ^3.3"
files = []
......
......@@ -2,7 +2,6 @@
name = "demo"
version = "0.1.0"
description = ""
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
files = [
......@@ -24,7 +23,6 @@ foo = ["cleo"]
name = "demo"
version = "0.1.0"
description = ""
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
files = [
......@@ -45,7 +43,6 @@ foo = ["cleo"]
name = "pendulum"
version = "1.4.4"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "A"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -14,7 +13,6 @@ D = "^1.0"
name = "B"
version = "1.1"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -26,7 +24,6 @@ C = "~1.2"
name = "C"
version = "1.2"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -35,7 +32,6 @@ files = []
name = "D"
version = "1.3"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "demo"
version = "0.1.0"
description = ""
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
files = [
......@@ -24,7 +23,6 @@ foo = ["cleo"]
name = "pendulum"
version = "1.4.4"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "demo"
version = "0.1.2"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -25,7 +24,6 @@ resolved_reference = "123456"
name = "pendulum"
version = "1.4.4"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -34,7 +32,6 @@ files = []
name = "cleo"
version = "1.0.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "demo"
version = "0.1.2"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -21,7 +20,6 @@ resolved_reference = "123456"
name = "pendulum"
version = "1.4.4"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -2,7 +2,6 @@
name = "demo"
version = "0.1.0"
description = ""
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
......
......@@ -101,7 +101,6 @@ def test_lock_file_data_is_ordered(locker: Locker, root: ProjectPackage) -> None
name = "A"
version = "1.0.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = [
......@@ -116,7 +115,6 @@ B = "^1.0"
name = "A"
version = "2.0.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = [
......@@ -127,7 +125,6 @@ files = [
name = "B"
version = "1.2"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -136,7 +133,6 @@ files = []
name = "git-package"
version = "1.2.3"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -152,7 +148,6 @@ resolved_reference = "123456"
name = "git-package-subdir"
version = "1.2.3"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -169,7 +164,6 @@ subdirectory = "subdir"
name = "url-package"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -182,7 +176,6 @@ url = "https://example.org/url-package-1.0-cp39-manylinux_2_17_x86_64.whl"
name = "url-package"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -208,7 +201,6 @@ def test_locker_properly_loads_extras(locker: Locker) -> None:
name = "cachecontrol"
version = "0.12.5"
description = "httplib2 caching for requests"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
files = []
......@@ -254,7 +246,6 @@ def test_locker_properly_loads_nested_extras(locker: Locker) -> None:
name = "a"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -269,7 +260,6 @@ b = ["b[c] (>=1.0,<2.0)"]
name = "b"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -284,7 +274,6 @@ c = ["c (>=1.0,<2.0)"]
name = "c"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -335,7 +324,6 @@ def test_locker_properly_loads_extras_legacy(locker: Locker) -> None:
name = "a"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -350,7 +338,6 @@ b = ["b (^1.0)"]
name = "b"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -384,7 +371,6 @@ def test_locker_properly_loads_subdir(locker: Locker) -> None:
name = "git-package-subdir"
version = "1.2.3"
description = ""
category = "main"
optional = false
python-versions = "*"
develop = false
......@@ -427,7 +413,6 @@ def test_locker_properly_assigns_metadata_files(locker: Locker) -> None:
name = "demo"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
develop = false
......@@ -436,7 +421,6 @@ develop = false
name = "demo"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
develop = false
......@@ -451,7 +435,6 @@ resolved_reference = "123456"
name = "demo"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
develop = false
......@@ -464,7 +447,6 @@ url = "./folder"
name = "demo"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
develop = false
......@@ -477,7 +459,6 @@ url = "./demo-1.0-cp39-win_amd64.whl"
name = "demo"
version = "1.0"
description = ""
category = "main"
optional = false
python-versions = "*"
develop = false
......@@ -548,7 +529,6 @@ def test_lock_packages_with_null_description(
name = "A"
version = "1.0.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -582,7 +562,6 @@ def test_lock_file_should_not_have_mixed_types(
name = "A"
version = "1.0.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -618,7 +597,6 @@ def test_reading_lock_file_should_raise_an_error_on_invalid_data(
name = "A"
version = "1.0.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -667,7 +645,6 @@ def test_locking_legacy_repository_package_should_include_source_section(
name = "A"
version = "1.0.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -790,7 +767,6 @@ def test_extras_dependencies_are_ordered(locker: Locker, root: ProjectPackage) -
name = "A"
version = "1.0.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -897,7 +873,6 @@ def test_locker_dumps_dependency_information_correctly(
name = "A"
version = "1.0.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -944,7 +919,6 @@ def test_locker_dumps_subdir(locker: Locker, root: ProjectPackage) -> None:
name = "git-package-subdir"
version = "1.2.3"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -993,7 +967,6 @@ def test_locker_dumps_dependency_extras_in_correct_order(
name = "A"
version = "1.0.0"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......@@ -1021,7 +994,6 @@ def test_locked_repository_uses_root_dir_of_package(
name = "lib-a"
version = "0.1.0"
description = ""
category = "main"
optional = false
python-versions = "^2.7.9"
develop = true
......@@ -1162,7 +1134,6 @@ def test_lock_file_resolves_file_url_symlinks(root: ProjectPackage) -> None:
name = "local-package"
version = "1.2.3"
description = ""
category = "main"
optional = false
python-versions = "*"
files = []
......
......@@ -356,7 +356,7 @@ def test_solver_sets_groups(
transaction = solver.solve()
ops = check_solver_result(
_ = check_solver_result(
transaction,
[
{"job": "install", "package": package_c},
......@@ -365,10 +365,6 @@ def test_solver_sets_groups(
],
)
assert ops[0].package.category == "dev"
assert ops[2].package.category == "dev"
assert ops[1].package.category == "main"
def test_solver_respects_root_package_python_versions(
solver: Solver, repo: Repository, package: ProjectPackage
......@@ -1090,7 +1086,7 @@ def test_solver_with_dependency_in_both_main_and_dev_dependencies(
transaction = solver.solve()
ops = check_solver_result(
_ = check_solver_result(
transaction,
[
{"job": "install", "package": package_d},
......@@ -1100,16 +1096,6 @@ def test_solver_with_dependency_in_both_main_and_dev_dependencies(
],
)
d = ops[0].package
b = ops[1].package
c = ops[2].package
a = ops[3].package
assert d.category == "dev"
assert b.category == "main"
assert c.category == "dev"
assert a.category == "main"
def test_solver_with_dependency_in_both_main_and_dev_dependencies_with_one_more_dependent( # noqa: E501
solver: Solver, repo: Repository, package: ProjectPackage
......@@ -1147,7 +1133,7 @@ def test_solver_with_dependency_in_both_main_and_dev_dependencies_with_one_more_
transaction = solver.solve()
ops = check_solver_result(
_ = check_solver_result(
transaction,
[
{"job": "install", "package": package_b},
......@@ -1158,18 +1144,6 @@ def test_solver_with_dependency_in_both_main_and_dev_dependencies_with_one_more_
],
)
b = ops[0].package
d = ops[1].package
a = ops[2].package
c = ops[3].package
e = ops[4].package
assert b.category == "main"
assert d.category == "dev"
assert a.category == "main"
assert c.category == "dev"
assert e.category == "main"
def test_solver_with_dependency_and_prerelease_sub_dependencies(
solver: Solver, repo: Repository, package: ProjectPackage
......@@ -1218,7 +1192,7 @@ def test_solver_circular_dependency(
transaction = solver.solve()
ops = check_solver_result(
_ = check_solver_result(
transaction,
[
{"job": "install", "package": package_c},
......@@ -1227,8 +1201,6 @@ def test_solver_circular_dependency(
],
)
assert ops[0].package.category == "main"
def test_solver_circular_dependency_chain(
solver: Solver, repo: Repository, package: ProjectPackage
......@@ -1254,7 +1226,7 @@ def test_solver_circular_dependency_chain(
transaction = solver.solve()
ops = check_solver_result(
_ = check_solver_result(
transaction,
[
{"job": "install", "package": package_d},
......@@ -1264,8 +1236,6 @@ def test_solver_circular_dependency_chain(
],
)
assert ops[0].package.category == "main"
def test_solver_dense_dependencies(
solver: Solver, repo: Repository, package: ProjectPackage
......
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