Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ keywords = ["pip", "requirements", "packaging"]
dependencies = [
# direct dependencies
"build >= 1.0.0",
"click >= 8, < 8.2",
"click >= 8",
"pip >= 22.2",
"pyproject_hooks",
"tomli; python_version < '3.11'",
Expand Down
6 changes: 5 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from contextlib import contextmanager
from dataclasses import dataclass, field
from functools import partial
from importlib.metadata import version as version_of
from pathlib import Path
from textwrap import dedent
from typing import Any, cast
Expand Down Expand Up @@ -227,7 +228,10 @@ def from_editable():

@pytest.fixture
def runner():
cli_runner = CliRunner(mix_stderr=False)
if Version(version_of("click")) < Version("8.2"):
cli_runner = CliRunner(mix_stderr=False)
else:
cli_runner = CliRunner()
with cli_runner.isolated_filesystem():
yield cli_runner

Expand Down
4 changes: 3 additions & 1 deletion tests/test_cli_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,9 @@ def test_trusted_host_envvar(monkeypatch, pip_conf, runner):
def test_all_no_emit_options(runner, options):
with open("requirements.in", "w"):
pass
out = runner.invoke(cli, ["--output-file", "-", "--no-header", *options])
out = runner.invoke(
cli, ["--output-file", "-", "--no-header", "--strip-extras", *options]
)
assert out.stdout.strip().splitlines() == []


Expand Down
Empty file.
27 changes: 27 additions & 0 deletions tests/test_data/packages/fake_with_deps/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "fake_with_deps"
description = "Fake package with dependencies"
authors = [{name = "jazzband"}]
# license = "0BSD"
# Deprecated license table for Python 3.8's latest setuptools compatibility:
license = {text = "0BSD"}
version = "0.1"
dependencies = [
"python-dateutil>=2.4.2,<2.5",
"colorama<0.4.0,>=0.3.7",
"cornice<1.1,>=1.0.0",
"enum34<1.1.7,>=1.0.4",
"six>1.5,<=1.8",
"ipaddress<1.1,>=1.0.16",
"jsonschema<3.0,>=2.4.0",
"pyramid<1.6,>=1.5.7",
"pyzmq<26.3.0,>=26.2.0",
"simplejson>=3.5,!=3.8,>3.9",
"SQLAlchemy!=0.9.5,<2.0.0,>=0.7.8,>=1.0.0",
"python-memcached>=1.57,<2.0",
"xmltodict<=0.11,>=0.4.6"
]
23 changes: 0 additions & 23 deletions tests/test_data/packages/fake_with_deps/setup.py

This file was deleted.

3 changes: 2 additions & 1 deletion tests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ def test_indentation(runner):
"""
log = LogContext(indent_width=2)

with runner.isolation() as (_, stderr):
with runner.isolation() as streams:
stderr = streams[1]
log.log("Test message 1")
with log.indentation():
log.log("Test message 2")
Expand Down
Loading