Commit 816ee19
committed
Update to support click >= 8.3
The latest `click` release makes two changes which are visible in
`pip-tools`, one of which is only seen in the testsuite.
1. The default for `Parameter.default` is now an internal `UNSET`
sentinel.
Because `UNSET` isn't in the public API, checking `Option.default`
is not the right way to check if an option has no explicit default
value. We could use `Option.to_info_dict()`, but we're *also*
checking for a falsy value right now -- the simple fix is to check
for a parsed value of `None`.
2. Changes to EOF handling in `CliRunner.isolation()` result in the
stream being closed on exit.
Between pallets/click#2934 and pallets/click#2940, we now get the
intended behavior for `CliRunner.isolation()`, in that it outputs an
EOF when the context manager exits. To solve, update a test to read
stderr before exiting the context manager.1 parent b97a0d4 commit 816ee19
3 files changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
| 402 | + | |
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
0 commit comments