repo stringclasses 37
values | instance_id stringlengths 17 34 | base_commit stringlengths 40 40 | patch stringlengths 291 1.62M | test_patch stringlengths 307 76.5k | problem_statement stringlengths 40 59.9k | hints_text stringlengths 0 149k | created_at stringdate 2018-06-13 17:01:37 2024-12-20 00:40:00 | merged_at stringdate 2018-09-24 06:57:54 2024-12-20 20:16:12 | PASS_TO_PASS stringlengths 2 601k | PASS_TO_FAIL stringclasses 11
values | FAIL_TO_PASS stringlengths 18 605k | FAIL_TO_FAIL stringclasses 60
values | install stringlengths 217 12.7k | test_framework stringclasses 10
values | test_commands stringclasses 10
values | version null | environment_setup_commit null | docker_image_root stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mitmproxy/mitmproxy | mitmproxy__mitmproxy-7031 | 317f5b9dced719ceaef9d65ff427e64a98dfeffc | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a4de351b34..9545e997a2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -33,6 +33,8 @@
([#7021](https://github.com/mitmproxy/mitmproxy/pull/7021), @petsneakers)
* Support all query types in DNS mode
([#6975](https://github.com/mitmproxy/mitmproxy/pull/6975), @errorxy... | diff --git a/test/conftest.py b/test/conftest.py
index 0d8fb23dfa..c830a5f7c5 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -35,7 +35,7 @@ def new_event_loop(self):
return loop
-@pytest.fixture()
+@pytest.fixture(scope="session")
def event_loop_policy(request):
return EagerTaskCreationEvent... | AssertionError in _http1 after multiple calls
#### Problem Description
I used mitmproxy to create an automatic upstream proxy switcher that based on the whether a certain host is available will use a specific upstream proxy, and otherwise it will route the traffic through a second instance of mitmproxy that functions ... | Thank you for the detailed report! A regression from 10.1.6 to 10.2.0 is a bit surprising because there have been no HTTP-related changes in there beyond ignore_domains, which is not used here. I'm unfortunately unable to reproduce your original issue on Linux.
Can you reproduce with `--set proxy_debug -vvv` and (if... | 2024-07-21T17:46:43Z | 2024-07-23T09:12:09Z | [] | [] | ["test/mitmproxy/proxy/test_server.py::test_open_connection[success]", "test/mitmproxy/proxy/test_server.py::test_open_connection[killed]", "test/mitmproxy/proxy/test_server.py::test_open_connection[failed]", "test/mitmproxy/proxy/test_server.py::test_no_reentrancy"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-7021 | 9c99bf4485d5f926522b51f9cfcee163f03f2f20 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 895e0bf40f..6de242ee6b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,8 +25,8 @@
([#6999](https://github.com/mitmproxy/mitmproxy/pull/6999), @lups2000)
* Allow `typing.Sequence[str]` to be an editable option
([#7001](https://github.com/mitmproxy/mitmproxy/pull/... | diff --git a/test/mitmproxy/addons/test_clientplayback.py b/test/mitmproxy/addons/test_clientplayback.py
index f9fc32ae9f..b2f210606f 100644
--- a/test/mitmproxy/addons/test_clientplayback.py
+++ b/test/mitmproxy/addons/test_clientplayback.py
@@ -126,7 +126,7 @@ async def handler(reader: asyncio.StreamReader, writer: a... | CONNECT request does not include Host header
#### Problem Description
When proxying https in upstream mode, the CONNECT request initiated by mitmproxy does not include the Host header. This is in violation of [RFC2616 14.23](https://datatracker.ietf.org/doc/html/rfc2616#section-14.23), which states
```
A client MU... | IIRC sending a host header also breaks some proxies. We probably need a setting for that.
In a perfect world it would be on those proxies to get into compliance . . . not sure where mitmproxy lands in terms of accommodating nonstandard proxies/clients, but I hear ya ;-)
The correct place to fix this is here: https://gi... | 2024-07-12T23:14:56Z | 2024-07-16T13:43:11Z | ["test/mitmproxy/proxy/layers/http/test_http.py::test_request_smuggling_whitespace", "test/mitmproxy/proxy/layers/http/test_http.py::test_connect_unauthorized", "test/mitmproxy/proxy/layers/http/test_http.py::test_request_streaming[early close-identity-addon]", "test/mitmproxy/addons/test_clientplayback.py::test_playba... | [] | ["test/mitmproxy/proxy/layers/http/test_http.py::test_upstream_proxy[https-xn--eckwd4c7c.xn--zckzah-change-destination]", "test/mitmproxy/proxy/layers/http/test_http.py::test_redirect[lazy-False-False]", "test/mitmproxy/addons/test_clientplayback.py::test_playback_https_upstream", "test/mitmproxy/proxy/layers/http/test... | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-7002 | 7fdf111febd6bfb25e94a825c732d40fa2e3cf99 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2bd1ede6a7..97770144a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,8 @@
([#6935](https://github.com/mitmproxy/mitmproxy/pull/6935), @errorxyz)
* Fix non-linear growth in processing time for large HTTP bodies.
([#6952](https://github.com/mitmproxy/mitmp... | diff --git a/test/helper_tools/loggrep.py b/test/helper_tools/loggrep.py
index c9528f4913..965f70fb6a 100755
--- a/test/helper_tools/loggrep.py
+++ b/test/helper_tools/loggrep.py
@@ -11,7 +11,7 @@
port = sys.argv[1]
matches = False
for line in fileinput.input(sys.argv[2:]):
- if re.match(r"^\[|(\d... | Allow Server SNI Interrogation in Transparent Mode
#### Problem Description
The sever SNI is not added to the array of hostnames checked against `ignored-hosts` and `allowed-hosts` in `next_layer.py` so some requests get past the respective filters.
#### Proposal
Here is a patch I currently use myself that I'd... | Thanks for sharing your patches! 😃
Could you share how your setup looks like? We do peek at the incoming bytes and extract the SNI right after your additions:
https://github.com/mitmproxy/mitmproxy/blob/1abb8f69217910c8623bd1339da2502aed98ff0d/mitmproxy/addons/next_layer.py#L75-L85
If that for some reason doesn'... | 2024-07-05T22:13:45Z | 2024-07-05T22:19:55Z | ["test/mitmproxy/addons/test_next_layer.py::TestNextLayer::test_ignore_connection[allow: sni]", "test/mitmproxy/addons/test_next_layer.py::test_next_layer[reverse proxy: udp -> dtls]", "test/mitmproxy/addons/test_next_layer.py::TestNextLayer::test_ignore_connection[incomplete client hello]", "test/mitmproxy/addons/test... | [] | ["test/mitmproxy/addons/test_next_layer.py::TestNextLayer::test_ignore_connection[allow: sni from parent layer]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6954 | 252a07e24a0386cf6ea371ff4b8d893bafaa8d16 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e6c8299943..2bd1ede6a7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,8 @@
([#6921](https://github.com/mitmproxy/mitmproxy/pull/6921), @zendai)
* Add `HttpConnectedHook` and `HttpConnectErrorHook`.
([#6930](https://github.com/mitmproxy/mitmproxy/pull/6930... | diff --git a/test/mitmproxy/net/dns/test_domain_names.py b/test/mitmproxy/net/dns/test_domain_names.py
index 431b1a63ab..a6d749f96c 100644
--- a/test/mitmproxy/net/dns/test_domain_names.py
+++ b/test/mitmproxy/net/dns/test_domain_names.py
@@ -4,6 +4,7 @@
import pytest
from mitmproxy.net.dns import domain_names
+fro... | DNS message parsing issue
#### Problem Description
In the current DNS implementation, we only decompress compression pointers from known formats in a DNS message such as domain names([example](https://github.com/mitmproxy/mitmproxy/blob/95bf441bc3a1dfcac2cb313cac8e72d3716a4bed/mitmproxy/net/dns/domain_names.py#L36)) d... | 2024-06-24T18:03:23Z | 2024-07-05T01:19:19Z | ["test/mitmproxy/test_dns.py::TestMessage::test_json", "test/mitmproxy/test_dns.py::TestResourceRecord::test_str", "test/mitmproxy/test_dns.py::TestMessage::test_responses", "test/mitmproxy/net/dns/test_domain_names.py::test_unpack", "test/mitmproxy/test_dns.py::TestMessage::test_copy", "test/mitmproxy/test_dns.py::Tes... | [] | ["test/mitmproxy/test_dns.py::TestMessage::test_packing", "test/mitmproxy/net/dns/test_domain_names.py::test_decompress_from_record_data", "test/mitmproxy/net/dns/test_domain_names.py::test_record_data_can_have_compression", "test/mitmproxy/test_dns.py::TestDNSFlow::test_repr"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval | |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6963 | e047e76b226b335698ac1f56527558e5c9841114 | diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml
index 725848ef8d..369986db64 100644
--- a/.github/workflows/autofix.yml
+++ b/.github/workflows/autofix.yml
@@ -35,4 +35,4 @@ jobs:
- uses: mhils/add-pr-ref-in-changelog@main
- - uses: autofix-ci/action@d3e591514b99d0fca6779455ff... | diff --git a/test/mitmproxy/addons/test_next_layer.py b/test/mitmproxy/addons/test_next_layer.py
index d88f81f84b..b4df96ea2b 100644
--- a/test/mitmproxy/addons/test_next_layer.py
+++ b/test/mitmproxy/addons/test_next_layer.py
@@ -674,19 +674,27 @@ class TConf:
udp := TConf(
before=[modes.Transpar... | Show More Not working
I'm trying to look at this WebSocket data in mitmweb, after I click Show More 2 times and the button no longer works. How do I fix this?
Export tab that works for Safari
#### Description
For safari users export error fixed.
| 2024-06-26T15:18:50Z | 2024-06-26T15:27:47Z | [] | [] | ["test/mitmproxy/addons/test_next_layer.py::TestNextLayer::test_ignore_connection[incomplete client hello] PASSED", "test/mitmproxy/addons/test_next_layer.py::test_next_layer[reverse proxy: http3] PASSED", "test/mitmproxy/proxy/test_mode_servers.py::test_last_exception_and_running PASSED", "test/mitmproxy/proxy/layers/... | [] | {"install": ["uv pip install -e ."], "python": "3.12", "pip_packages": ["aioquic==1.0.0", "altgraph==0.17.4", "asgiref==3.8.1", "attrs==23.2.0", "blinker==1.8.2", "brotli==1.1.0", "build==1.2.1", "cachetools==5.3.3", "certifi==2024.6.2", "cffi==1.16.0", "chardet==5.2.0", "charset-normalizer==3.3.2", "click==8.1.7", "co... | tox -e py -- | null | null | null | swa-bench:sw.eval | |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6819 | b2298d7e99ca7b7269b2163868699d2a5af9917d | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0592cefe92..253169312b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@
* Release tags are now prefixed with `v` again to follow SemVer convention.
([#6810](https://github.com/mitmproxy/mitmproxy/pull/6810), @mhils)
+* Fix a bug where mitmproxy would not ... | diff --git a/test/mitmproxy/addons/test_readfile.py b/test/mitmproxy/addons/test_readfile.py
index 78513d586c..bc1dd383a9 100644
--- a/test/mitmproxy/addons/test_readfile.py
+++ b/test/mitmproxy/addons/test_readfile.py
@@ -54,13 +54,21 @@ async def test_read(self, tmpdir, data, corrupt_data, caplog_async):
... | Mitmdump does not exit
#### Problem Description
Mitmdump does not exit automatically when executing:
`mitmdump -nr infile -w outfile
`
Until version 10.0.0 it was working properly and when running mitmdump with "-n" the process finished automatically once the outfile was written.
#### Steps to reproduce the ... | Thanks for the report. Bisected to 6e38a56f4c399551c3fe3d399bddfa8083ccd0f1. | 2024-04-24T11:11:58Z | 2024-04-24T12:14:54Z | ["test/mitmproxy/addons/test_readfile.py::TestReadFileStdin::test_stdin", "test/mitmproxy/addons/test_readfile.py::TestReadFile::test_corrupt", "test/mitmproxy/addons/test_readfile.py::TestReadFile::test_configure", "test/mitmproxy/addons/test_readfile.py::TestReadFile::test_nonexistent_file"] | [] | ["test/mitmproxy/addons/test_readfile.py::TestReadFile::test_read"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6796 | 61b094ac36ecde0bfef825b1763a1deec15621ad | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a0a31038c6..1df19bb268 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,6 +35,8 @@
([#6767](https://github.com/mitmproxy/mitmproxy/pull/6767), @txrp0x9)
* Fix compatibility with older cryptography versions and silence a DeprecationWarning on Python <3.11.
([#6790... | diff --git a/test/mitmproxy/addons/test_tlsconfig.py b/test/mitmproxy/addons/test_tlsconfig.py
index d209fd91eb..f4a7bf9ea9 100644
--- a/test/mitmproxy/addons/test_tlsconfig.py
+++ b/test/mitmproxy/addons/test_tlsconfig.py
@@ -138,12 +138,12 @@ def test_get_cert(self, tdata):
)
# And now we ... | Failed to proxy HTTPS request to unicode domains
#### Problem Description
Just like issue https://github.com/mitmproxy/mitmproxy/issues/6381.
#### Steps to reproduce the behavior:
1. start mitmproxy: `mitmproxy -p 8080`
2. browse url with proxy setup, for example: `https://tt.广西阀门.net`
and then mitmproxy throw... | 2024-04-12T14:35:03Z | 2024-04-12T15:22:19Z | ["test/mitmproxy/addons/test_tlsconfig.py::TestTlsConfig::test_tls_start_server_verify_ok[example.mitmproxy.org]", "test/mitmproxy/addons/test_tlsconfig.py::TestTlsConfig::test_tls_clienthello", "test/mitmproxy/addons/test_tlsconfig.py::TestTlsConfig::test_tls_start_server_cannot_verify", "test/mitmproxy/addons/test_tl... | [] | ["test/mitmproxy/addons/test_tlsconfig.py::TestTlsConfig::test_get_cert", "test/mitmproxy/addons/test_tlsconfig.py::TestTlsConfig::test_ca_expired"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval | |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6719 | 9acf06427a5c6b790cfba54528adb239c3653d37 | diff --git a/.gitignore b/.gitignore
index 2a6f5eb373..a5dfafcc27 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
MANIFEST
**/tmp
/venv*
+/.venv*
*.py[cdo]
*.swp
*.swo
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5a9cf993b8..6634b3d7ef 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,8 @@
## ... | diff --git a/test/mitmproxy/addons/test_errorcheck.py b/test/mitmproxy/addons/test_errorcheck.py
index a9ab75ad56..bc71f6aaf1 100644
--- a/test/mitmproxy/addons/test_errorcheck.py
+++ b/test/mitmproxy/addons/test_errorcheck.py
@@ -6,10 +6,11 @@
from mitmproxy.tools import main
-def test_errorcheck(tdata, capsys):
... | The mitmproxy program failed to start because the default port 8080 was occupied.
#### Problem Description
Because the default port 8080 is occupied, the mitmproxy program fails to start, and there is no output reason for the failure.
#### Steps to reproduce the behavior:
1. Listen on port 8080 using the nc comman... | That's bad, thanks. Possibly refs https://github.com/mitmproxy/mitmproxy/issues/6707
bisected to 6e38a56f4c399551c3fe3d399bddfa8083ccd0f1 | 2024-03-07T17:40:33Z | 2024-03-07T20:41:26Z | ["test/mitmproxy/addons/test_errorcheck.py::test_errorcheck[mitmdump]", "test/mitmproxy/addons/test_errorcheck.py::test_no_error", "test/mitmproxy/addons/test_errorcheck.py::test_error_message"] | [] | ["test/mitmproxy/addons/test_errorcheck.py::test_repeat_error_on_stderr", "test/mitmproxy/addons/test_errorcheck.py::test_errorcheck[mitmproxy]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6695 | 92c556afbe631f1ff065d8ffc612f8e04ce9f9d8 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f5a8f3ca83..5d140fe624 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,8 @@
([#6666](https://github.com/mitmproxy/mitmproxy/pull/6666), @manselmi)
* Add `content_view_lines_cutoff` option to mitmdump
([#6692](https://github.com/mitmproxy/mitmproxy/pull/669... | diff --git a/test/mitmproxy/addons/test_serverplayback.py b/test/mitmproxy/addons/test_serverplayback.py
index aa3a2178de..7ae12c2eed 100644
--- a/test/mitmproxy/addons/test_serverplayback.py
+++ b/test/mitmproxy/addons/test_serverplayback.py
@@ -325,6 +325,24 @@ def multipart_setter(r, **kwargs):
thash(r, r2, mul... | Unable to set `server_replay_ignore_params` in the UI
#### Value of server_replay_ignore_params is ignored when set in the UI or through command line
#### Steps to reproduce the behavior:
1. Prepare a mock endpoint that works with 5 s delay. In this example I will use a configured mock https://hello.free.beeceptor.... | Thanks! The problem here ist that we compute a hash for each flow when server replay is started, which we then later use to serve that flow:
https://github.com/mitmproxy/mitmproxy/blob/0650f132e9526a6ac881c2fb0cb3f53fba19ed1e/mitmproxy/addons/serverplayback.py#L114-L161
We need to rerun that function and recomput... | 2024-02-28T16:29:20Z | 2024-02-28T18:57:06Z | ["test/mitmproxy/addons/test_serverplayback.py::test_load", "test/mitmproxy/addons/test_serverplayback.py::test_ignore_content", "test/mitmproxy/addons/test_serverplayback.py::test_server_playback_404[400-400]", "test/mitmproxy/addons/test_serverplayback.py::test_load_with_server_replay_reuse", "test/mitmproxy/addons/t... | [] | ["test/mitmproxy/addons/test_serverplayback.py::test_runtime_modify_params", "test/mitmproxy/addons/test_serverplayback.py::test_server_playback_response_deleted"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6692 | 240a286b2a3cedd0193b660e5217adfa46bb82b3 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 051202a58b..f5a8f3ca83 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,8 @@
([#6659](https://github.com/mitmproxy/mitmproxy/pull/6659), @basedBaba)
* Fix a regression when leaf cert creation would fail with intermediate CAs in `ca_file`.
([#6666](https://g... | diff --git a/test/mitmproxy/addons/test_dumper.py b/test/mitmproxy/addons/test_dumper.py
index c7f2e85d4e..e9b6a92bc2 100644
--- a/test/mitmproxy/addons/test_dumper.py
+++ b/test/mitmproxy/addons/test_dumper.py
@@ -97,7 +97,7 @@ def test_simple():
def test_echo_body():
f = tflow.tflow(resp=True)
f.response.h... | Dumper Addon: make the number of printed lines configurable when using `flow_detail = 3`
I try to dump full traffic on stdout using mitmdump, but when response body has more than about 80 or 90 lines on stdout appear (cut off) and all other lines are lost,
I use this command:
*mitmdump --set flow_detail=3 --set co... | I'm not sure why it's that way, but it happens here
https://github.com/mitmproxy/mitmproxy/blob/8178f6c77b715cd342f8be161d5ca5da8938645c/mitmproxy/addons/dumper.py#L110-L113
but all calls to `_echo_message` are already guarded with `if ctx.options.flow_detail >= 3:` so the `else` will _never_ be reached. Edit: ok... | 2024-02-27T09:39:34Z | 2024-02-27T11:50:26Z | ["test/mitmproxy/addons/test_dumper.py::test_contentview", "test/mitmproxy/addons/test_dumper.py::test_configure", "test/mitmproxy/addons/test_dumper.py::test_echo_trailer", "test/mitmproxy/addons/test_dumper.py::test_echo_body", "test/mitmproxy/addons/test_dumper.py::test_quic", "test/mitmproxy/addons/test_dumper.py::... | [] | ["test/mitmproxy/addons/test_dumper.py::test_echo_body_custom_cutoff", "test/mitmproxy/addons/test_dumper.py::test_styling"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6648 | 1a02ebb89f6765d827f2fe0086dfe5960eb6e093 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 44b4369036..8e613d5da0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,8 @@
([#6599](https://github.com/mitmproxy/mitmproxy/pull/6599), @basedBaba)
* Add an arm64 variant for the precompiled macOS app.
([#6633](https://github.com/mitmproxy/mitmproxy/pull/6... | diff --git a/test/mitmproxy/addons/test_dns_resolver.py b/test/mitmproxy/addons/test_dns_resolver.py
index a72d5ed257..a998ef264e 100644
--- a/test/mitmproxy/addons/test_dns_resolver.py
+++ b/test/mitmproxy/addons/test_dns_resolver.py
@@ -41,18 +41,18 @@ async def getnameinfo(self, socketaddr: Address, flags: int = 0):... | Duplicate answers in DNS queries
#### Problem Description
Two duplicate records are returned for each unique A/AAAA record in a DNS query when using DNS mode.
#### Steps to reproduce the behavior:
##### Without mitmproxy
1. Run `dig +short google.com`
2. Correct output: `142.250.193.206`
##### With mitm... | Yes, please send a PR! We eventually should really support DNS-over-TCP, but this is a good mitigation for now. | 2024-02-06T15:39:48Z | 2024-02-13T09:58:35Z | ["test/mitmproxy/addons/test_proxyserver.py::test_reverse_http3_and_quic_stream[quic]", "test/mitmproxy/addons/test_proxyserver.py::test_self_connect", "test/mitmproxy/addons/test_proxyserver.py::test_reverse_quic_datagram", "test/mitmproxy/addons/test_proxyserver.py::test_inject", "test/mitmproxy/addons/test_proxyserv... | [] | ["test/mitmproxy/addons/test_proxyserver.py::test_dns", "test/mitmproxy/addons/test_dns_resolver.py::test_resolve"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6619 | 6c7089f7a3bdc2f13017599fc9edfe247af65b67 | diff --git a/mitmproxy/contentviews/graphql.py b/mitmproxy/contentviews/graphql.py
index 5263b75f5f..b76b7bf054 100644
--- a/mitmproxy/contentviews/graphql.py
+++ b/mitmproxy/contentviews/graphql.py
@@ -30,7 +30,12 @@ def is_graphql_query(data):
def is_graphql_batch_query(data):
- return isinstance(data, list) ... | diff --git a/test/mitmproxy/contentviews/test_graphql.py b/test/mitmproxy/contentviews/test_graphql.py
index 89beda814c..f10af244ff 100644
--- a/test/mitmproxy/contentviews/test_graphql.py
+++ b/test/mitmproxy/contentviews/test_graphql.py
@@ -19,6 +19,7 @@ def test_render_priority():
assert 0 == v.render_priority(... | `Couldn't parse: falling back to Raw` for empty JSON array
#### Problem Description
The following response packet:
```
HTTP/2.0 200
date: Sun, 14 Jan 2024 23:30:12 GMT
content-type: application/json; charset=utf-8
content-length: 2
server: nginx/1.18.0 (Ubuntu)
cache-control: no-store
x-amzn-trace-id: [REDA... | Thanks! Looks like an edge case for the empty array, the following all work: `[1]`, `"foo"` and `null`
@Prinzhorn I would like to fix this. Could you show me the part(s) of the codebase where this is handled?
@haanhvu sure, it's probably somewhere in https://github.com/mitmproxy/mitmproxy/blob/main/mitmproxy/contentvie... | 2024-01-27T14:15:07Z | 2024-02-05T10:11:03Z | ["test/mitmproxy/contentviews/test_graphql.py::test_view_graphql_doesnt_crash", "test/mitmproxy/contentviews/test_graphql.py::test_format_query_list", "test/mitmproxy/contentviews/test_json.py::test_format_json", "test/mitmproxy/contentviews/test_json.py::test_view_json", "test/mitmproxy/contentviews/test_graphql.py::t... | [] | ["test/mitmproxy/contentviews/test_graphql.py::test_render_priority", "test/mitmproxy/contentviews/test_json.py::test_render_priority"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6594 | 4101e8aeef770df29a7f8cf8d74c88c2ac6c04ba | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2cf2563774..367748ed0d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@
* Fix bug where insecure HTTP requests are saved incorrectly when exporting to HAR files.
([#6578](https://github.com/mitmproxy/mitmproxy/pull/6578), @DaniElectra)
+* `allow_hosts`/`i... | diff --git a/test/mitmproxy/addons/test_next_layer.py b/test/mitmproxy/addons/test_next_layer.py
index bd67a83e6e..480ab3d399 100644
--- a/test/mitmproxy/addons/test_next_layer.py
+++ b/test/mitmproxy/addons/test_next_layer.py
@@ -117,7 +117,25 @@ def test_configure(self):
["example.com"], [], "tcp", "... | `ignore_hosts` and `allow_hosts` are not matched against `host:port` format
#### Problem Description
Documentation [Ignoring Domains](https://docs.mitmproxy.org/stable/howto-ignoredomains/) says that `ignore_hosts` is matched against `host:port` string.
> The `ignore_hosts` option allows you to specify a regex whic... | 2024-01-09T09:24:14Z | 2024-01-21T17:07:14Z | ["test/mitmproxy/addons/test_next_layer.py::test_next_layer[reverse proxy: udp -> dtls]", "test/mitmproxy/addons/test_next_layer.py::TestNextLayer::test_ignore_connection[incomplete client hello]", "test/mitmproxy/addons/test_next_layer.py::test_next_layer[transparent proxy: ignore_hosts]", "test/mitmproxy/addons/test_... | [] | ["test/mitmproxy/addons/test_next_layer.py::TestNextLayer::test_ignore_connection[port matches]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval | |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6537 | 558b0b664277769310ce99c7d8136eca1ba74658 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 14f237559f..b79820f4f5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,9 @@
([#4860](https://github.com/mitmproxy/mitmproxy/pull/4860), @Speedlulu)
* Enhance documentation and add alert log messages when stream_large_bodies and modify_body are set
([#6514]... | diff --git a/test/mitmproxy/addons/test_tlsconfig.py b/test/mitmproxy/addons/test_tlsconfig.py
index 64144e12e5..d209fd91eb 100644
--- a/test/mitmproxy/addons/test_tlsconfig.py
+++ b/test/mitmproxy/addons/test_tlsconfig.py
@@ -1,3 +1,4 @@
+import ipaddress
import ssl
import time
from pathlib import Path
@@ -128,20 +... | Malformed SANs, or SANs of type other than DNS or IP Address, may raise "UnicodeError: label too long in IDNA decode" in certs.dummy_cert()
#6382 changed `certs.dummy_cert()`'s logic when generating a cert for a given list of string-type `sans`
Old behaviour:
1. Try to `ipaddress.ip_address()` the `san`
2. If th... | 2023-12-07T06:15:18Z | 2023-12-14T09:26:23Z | ["test/mitmproxy/addons/test_tlsconfig.py::test_alpn_select_callback", "test/mitmproxy/test_certs.py::TestCertStore::test_create_dhparams", "test/mitmproxy/addons/test_tlsconfig.py::TestTlsConfig::test_configure", "test/mitmproxy/addons/test_tlsconfig.py::TestTlsConfig::test_quic_start_server_verify_ok[192.0.2.42]", "t... | [] | ["test/mitmproxy/test_certs.py::TestCertStore::test_asterisk_forms[input2-output2]", "test/mitmproxy/addons/test_tlsconfig.py::TestTlsConfig::test_get_cert", "test/mitmproxy/test_certs.py::TestCertStore::test_asterisk_forms[input1-output1]", "test/mitmproxy/test_certs.py::TestCertStore::test_sans_change", "test/mitmpro... | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval | |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6493 | 9787871e6cadf397f94447c32dd4d397d937a954 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index bdac343e75..a80ac80cac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,8 @@
([#6543](https://github.com/mitmproxy/mitmproxy/pull/6543), @mhils)
* DNS resolution is now exempted from `--ignore-hosts` in WireGuard Mode.
([#6513](https://github.com/mitmproxy/... | diff --git a/test/mitmproxy/addons/test_blocklist.py b/test/mitmproxy/addons/test_blocklist.py
index 9187443b28..b7c7e536d3 100644
--- a/test/mitmproxy/addons/test_blocklist.py
+++ b/test/mitmproxy/addons/test_blocklist.py
@@ -22,20 +22,21 @@ def test_parse_spec_err(filter, err):
class TestBlockList:
@pytest.ma... | uppercase breaks block_list
#### Problem Description
using these values for `block_list`
~~~
/~u AccountsSignInUi/444
/~u accountssigninui/444
~~~
neither one is blocking the expected URL:
~~~
https://accounts.google.com/v3/signin/_/AccountsSignInUi/data/batchexecute
~~~
this works:
~~~
/~u .cco... | I didn't verify this, but peeking at the code the issue should be here (I literally just ctrl+f for `lower`):
https://github.com/mitmproxy/mitmproxy/blob/7aa41a8467f73d86ad6ce5b95439c147a26896f9/mitmproxy/addons/blocklist.py#L27
If you are interested you can create a PR and add a case sensitive test here https://... | 2023-11-19T18:35:59Z | 2023-12-12T18:33:19Z | ["test/mitmproxy/addons/test_blocklist.py::TestBlockList::test_block[:~u example.org:404-https://example.org/images/test.jpg-404]", "test/mitmproxy/addons/test_blocklist.py::test_parse_spec_err[:~d ~d ~d:200-Invalid filter]", "test/mitmproxy/addons/test_blocklist.py::test_parse_spec_err[/~u index.html/abc-Invalid HTTP ... | [] | ["test/mitmproxy/addons/test_blocklist.py::TestBlockList::test_block[:~u test:404-https://example.org/images/TEST.jpg-404]", "test/mitmproxy/addons/test_blocklist.py::TestBlockList::test_configure_err"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6432 | 640bb5377e24886342bacfc0c73e09ea71dc6956 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7ab6ebd486..93e3feaf55 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,8 @@
([#6411](https://github.com/mitmproxy/mitmproxy/pull/6411), @davet2001)
* Add an optional parameter(ldap search filter key) to ProxyAuth-LDAP.
([#6428](https://github.com/mitmproxy... | diff --git a/test/mitmproxy/proxy/layers/http/test_http.py b/test/mitmproxy/proxy/layers/http/test_http.py
index f579a065f8..273179bdf3 100644
--- a/test/mitmproxy/proxy/layers/http/test_http.py
+++ b/test/mitmproxy/proxy/layers/http/test_http.py
@@ -678,6 +678,7 @@ def test_server_unreachable(tctx, connect):
... | Proxyauth doesn't work on HTTPS on IOS
#### Problem Description
I'm trying to make my proxy have basic authentication. I'm running the proxy with the command `mitmdump --proxyauth ac:dc`, It starts on port `8080`. This all works well for cURL `curl -x ac:dc@127.0.0.1:8080 https://httpbin.org`, but when I go on IOS
... | Can you run `mitmdump -v --proxyauth ac:dc` please? That should display the headers that are being sent with the CONNECT requests.
> Can you run `mitmdump -v --proxyauth ac:dc` please? That should display the headers that are being sent with the CONNECT requests.
HTTPS:
```
[07:00:09.099][192.168.1.28:57310] clien... | 2023-10-31T13:10:23Z | 2023-10-31T13:17:28Z | ["test/mitmproxy/proxy/layers/http/test_http.py::test_redirect[lazy-True-False]", "test/mitmproxy/proxy/layers/http/test_http.py::test_request_streaming[early kill-chunked-body_size=0]", "test/mitmproxy/proxy/layers/http/test_http.py::test_kill_flow[requestheaders]", "test/mitmproxy/proxy/layers/http/test_http.py::test... | [] | ["test/mitmproxy/proxy/layers/http/test_http.py::test_connect_unauthorized", "test/mitmproxy/proxy/layers/http/test_http.py::test_drop_stream_with_paused_events"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6428 | 98d84f77cead76384b7e341ac3510d68422b2b1e | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 27cec191ba..7ab6ebd486 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@
([#6412](https://github.com/mitmproxy/mitmproxy/pull/6412), @tddschn)
* Fix root-relative URLs so that mitmweb can run in subdirectories.
([#6411](https://github.com/mitmproxy/mitm... | diff --git a/test/mitmproxy/addons/test_proxyauth.py b/test/mitmproxy/addons/test_proxyauth.py
index 9bdb5b7ce3..743bc635bf 100644
--- a/test/mitmproxy/addons/test_proxyauth.py
+++ b/test/mitmproxy/addons/test_proxyauth.py
@@ -165,11 +165,25 @@ def test_configure(self, monkeypatch, tdata):
)
a... | Insufficient flexibility of LDAP Proxy Auth
Insufficient flexibility of LDAP Proxy Auth
I noticed that in the Ldap Validator object, the username passed in during authentication queries will be set to cn. However, in our AD, CN is highly likely to be a Chinese name. Is there a solution to pass in other keys, such as... | Not our focus right now, but happy to look at a PR for this. :) | 2023-10-30T13:39:57Z | 2023-10-31T12:52:21Z | ["test/mitmproxy/addons/test_proxyauth.py::test_parse_http_basic_auth_error[]", "test/mitmproxy/addons/test_proxyauth.py::TestProxyAuth::test_socks5", "test/mitmproxy/utils/test_arg_check.py::test_check_args[arg3---palette is deprecated.\\nPlease use `--set console_palette=value` instead.\\nTo show all options and thei... | [] | ["test/mitmproxy/addons/test_proxyauth.py::TestProxyAuth::test_configure", "test/mitmproxy/utils/test_arg_check.py::test_check_args[arg6---nonanonymous is deprecated.\\nPlease use `--proxyauth SPEC` instead.\\nSPEC Format: \"username:pass\", \"any\" to accept any user/pass combination,\\n\"@path\" to use an Apache htpa... | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6382 | 95fe3f99298ce44a66828f939dddce54068f5d65 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18b65ab3fd..865390d8ef 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
## Unreleased: mitmproxy next
+* Fix certificate generation for punycode domains.
+ ([#6382](https://github.com/mitmproxy/mitmproxy/pull/6382), @mhils)
## 24 September 2023: mitm... | diff --git a/test/mitmproxy/test_certs.py b/test/mitmproxy/test_certs.py
index 815a84c613..e46245f1b5 100644
--- a/test/mitmproxy/test_certs.py
+++ b/test/mitmproxy/test_certs.py
@@ -141,11 +141,17 @@ def test_with_ca(self, tstore):
tstore.default_privatekey,
tstore.default_ca._cert,
... | An error occurred when trying to open a punycode domain
#### Problem Description
When trying to open a punycode domain, for example https://xn--80afnfom.xn--80ahmohdapg.xn--80asehdb/login, an error occurs in mitmproxy
mitmproxy log
```
[13:35:19.966][192.168.20.31:53287] client connect
[13:35:20.032][192.168... | 2023-09-24T17:48:11Z | 2023-09-24T17:55:21Z | ["test/mitmproxy/test_certs.py::TestCert::test_keyinfo[ec_cert.pem-EC (secp256r1)-256]", "test/mitmproxy/test_certs.py::TestCert::test_keyinfo[text_cert-RSA-1024]", "test/mitmproxy/test_certs.py::TestCertStore::test_create_no_common_name", "test/mitmproxy/test_certs.py::TestCertStore::test_create_dhparams", "test/mitmp... | [] | ["test/mitmproxy/test_certs.py::TestCert::test_multi_valued_rdns", "test/mitmproxy/test_certs.py::TestDummyCert::test_with_ca"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval | |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6221 | fd01a0aa95b575ce9bf696fd9530f911bfd07fc5 | diff --git a/mitmproxy/proxy/mode_servers.py b/mitmproxy/proxy/mode_servers.py
index 4b06ee5b26..d991dee5a3 100644
--- a/mitmproxy/proxy/mode_servers.py
+++ b/mitmproxy/proxy/mode_servers.py
@@ -279,7 +279,7 @@ async def _start(self) -> None:
assert (
self.mode.custom_listen_host i... | diff --git a/test/mitmproxy/tools/web/test_master.py b/test/mitmproxy/tools/web/test_master.py
index 14b1046949..ee0225754a 100644
--- a/test/mitmproxy/tools/web/test_master.py
+++ b/test/mitmproxy/tools/web/test_master.py
@@ -15,6 +15,6 @@ async def test_reuse():
master = WebMaster(Options(), with_termlog=False)
... | Misleading/incorrect message when port 8080 is taken (mitmweb)
#### Problem Description
- When port 8080 is already taken, `mitmweb` recommends you switch to port 8081.
- However, the web UI is already running on port 8081. The two collide, but no error message is printed.
- If you try to proxy your connections to 8... | This seems like an already fixed issue (I'm using Mitmproxy: 10.0.0.dev), I tried this:
```bash
mitmweb --listen-port 8081 # another service is blocking port 8080
```
and an error is raised:
```python
...
File "/path/to/mitmproxy/mitmproxy/tools/web/master.py", line 107, in running
raise OSError(e.... | 2023-07-02T11:24:41Z | 2023-07-02T12:59:56Z | [] | [] | ["test/mitmproxy/tools/web/test_master.py::test_reuse"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6148 | ab9429e3f6f831290f2a104a25b084f3f25b6452 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5c8f838e61..20f6a3ae94 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,6 +34,8 @@
([#6087](https://github.com/mitmproxy/mitmproxy/pull/6087), @sujaldev)
* focus-follow shortcut will now work in flow view context too.
([#6088](https://github.com/mitmproxy/mitmpro... | diff --git a/test/mitmproxy/proxy/layers/http/test_http.py b/test/mitmproxy/proxy/layers/http/test_http.py
index 0d8e638df5..f579a065f8 100644
--- a/test/mitmproxy/proxy/layers/http/test_http.py
+++ b/test/mitmproxy/proxy/layers/http/test_http.py
@@ -1432,6 +1432,29 @@ def test_transparent_sni(tctx):
assert server... | Wrong SNI hostname used for reverse HTTPS proxy
#### Problem Description
When using mitmproxy in reverse proxy mode, it attempts to use the mitmproxy's domain for SNI in the outer TLS connection, fails to validate that connection and returns "502 Bad Gateway" -- "Certificate verify failed: Hostname mismatch"
#### S... | Can you reproduce this on the main branch?
Yes I can reproduce it on the main branch.
I forgot an important fact : problem happens only one out of two times. Page loads correctly in the browser, but when I reload it fails. Or I click on a link, it fails but when I reload it loads correctly.
Thank you.
Thanks, that wa... | 2023-05-28T16:28:44Z | 2023-05-28T16:35:34Z | ["test/mitmproxy/proxy/layers/http/test_http.py::test_redirect[lazy-True-False]", "test/mitmproxy/proxy/layers/http/test_http.py::test_request_streaming[early kill-chunked-body_size=0]", "test/mitmproxy/proxy/layers/http/test_http.py::test_kill_flow[requestheaders]", "test/mitmproxy/proxy/layers/http/test_http.py::test... | [] | ["test/mitmproxy/proxy/layers/http/test_http.py::test_reverse_sni", "test/mitmproxy/proxy/layers/http/test_http.py::test_drop_stream_with_paused_events"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-6020 | 84b03c06e3d857c70daa2eb0d0c83a0c1af556ba | diff --git a/mitmproxy/addons/errorcheck.py b/mitmproxy/addons/errorcheck.py
index b634623cff..4dccffac53 100644
--- a/mitmproxy/addons/errorcheck.py
+++ b/mitmproxy/addons/errorcheck.py
@@ -8,8 +8,14 @@
class ErrorCheck:
"""Monitor startup for error log entries, and terminate immediately if there are some."""
... | diff --git a/test/mitmproxy/addons/test_errorcheck.py b/test/mitmproxy/addons/test_errorcheck.py
index 16de948007..b96a6dbadc 100644
--- a/test/mitmproxy/addons/test_errorcheck.py
+++ b/test/mitmproxy/addons/test_errorcheck.py
@@ -1,3 +1,5 @@
+import logging
+
import pytest
from mitmproxy.addons.errorcheck import E... | Logging verbosity impacts logs from a script
#### Problem Description
When I set the log verbosity in the config file to `warn`, i.e.
```
console_eventlog_verbosity: warn
termlog_verbosity: warn
```
logs that I'm writing in a script at that log level or higher are not outputted to stdout, whereas they are if ... | I can't reproduce this with what you provided. The following works as expected for me:
```python
import logging
from mitmproxy import http
class Handler:
def __init__(self):
logging.basicConfig(level=logging.WARNING,
format='%(asctime)s %(levelname)s %(name)s %(message)s',
... | 2023-03-26T18:06:12Z | 2023-03-26T18:14:57Z | [] | [] | ["test/mitmproxy/addons/test_errorcheck.py::test_errorcheck", "test/mitmproxy/addons/test_errorcheck.py::test_error_message", "test/mitmproxy/addons/test_errorcheck.py::test_no_error"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[project]\nname = \"mitmproxy\"\ndescription = \"An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets.\"\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\nlicense = {file=\"LICENSE\"}\nauthor... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-5917 | 430833e3d9651bb5fe2a32c882643e61c815a66c | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3f18e7743b..6670055d33 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,8 @@
* Updating `Request.port` now also updates the Host header if present.
This aligns with `Request.host`, which already does this.
([#5908](https://github.com/mitmproxy/mitmproxy/pul... | diff --git a/test/mitmproxy/net/http/test_multipart.py b/test/mitmproxy/net/http/test_multipart.py
index 1045d70c60..b1d83b654e 100644
--- a/test/mitmproxy/net/http/test_multipart.py
+++ b/test/mitmproxy/net/http/test_multipart.py
@@ -1,6 +1,5 @@
import pytest
-from mitmproxy.http import Headers
from mitmproxy.net.... | Crash when editing multipart/formdata
#### Problem Description
I received the following message when editng a field of a `multipart/form-data` request body, which is for for file uploads.
```
Traceback (most recent call last):
File "mitmproxy/master.py", line 54, in run_loop
File "urwid/main_loop.py", line... | I can confirm that this is still an issue on v8.0.0. | 2023-02-07T09:59:08Z | 2023-02-07T10:29:08Z | ["test/mitmproxy/test_http.py::TestRequest::test_constrain_encoding", "test/mitmproxy/test_http.py::TestRequestCore::test_first_line_format", "test/mitmproxy/test_http.py::TestResponseUtils::test_get_cookies_simple", "test/mitmproxy/test_http.py::TestHTTPFlow::test_copy", "test/mitmproxy/test_http.py::TestRequestUtils:... | [] | ["test/mitmproxy/net/http/test_multipart.py::test_encode", "test/mitmproxy/net/http/test_multipart.py::test_decode", "test/mitmproxy/test_http.py::TestRequestUtils::test_get_multipart_form", "test/mitmproxy/test_http.py::TestMessageText::test_get_json"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py, flake8, mypy\nskipsdist = True\ntoxworkdir={env:TOX_WORK_DIR:.tox}\n\n[testenv]\ndeps =\n -e .[dev]\nsetenv = HOME = {envtmpdir}\ncommands =\n mitmdump --version\n pytest --color=no -rA --tb=no -p no:cacheprovide... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-5908 | a7e50c793e9c6840d9f0fc162893e293477a358e | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3c0175badf..42e2ae9d79 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,9 @@
([#5851](https://github.com/mitmproxy/mitmproxy/pull/5851), @italankin)
* Removed string escaping in raw view.
([#5470](https://github.com/mitmproxy/mitmproxy/issues/5470), @stephe... | diff --git a/test/mitmproxy/addons/test_mapremote.py b/test/mitmproxy/addons/test_mapremote.py
index 2aff3468d9..f20ca20efd 100644
--- a/test/mitmproxy/addons/test_mapremote.py
+++ b/test/mitmproxy/addons/test_mapremote.py
@@ -27,6 +27,16 @@ def test_simple(self):
mr.request(f)
assert f.reques... | Map remote should include port in Host header (mitmweb)
#### Problem Description
When using `--map-remote` in `mitmweb`, the request URL gets replaced, and the `Host` gets updated. However, the port is not added to the Host header, leading to problems when using non-standard ports.
#### Steps to reproduce the beh... | The map remote addon just sets a new URL [here](https://github.com/mitmproxy/mitmproxy/blob/dfeddcf4add66a6ebab1d508c47256185ef6ddb7/mitmproxy/addons/mapremote.py#L68), which seems like the right thing to do. Seems like the bug is in [`mitmproxy.http.Request.host` and `mitmproxy.http.Request.port`](https://github.com/m... | 2023-02-04T10:56:06Z | 2023-02-06T16:35:17Z | ["test/mitmproxy/test_http.py::TestRequest::test_constrain_encoding", "test/mitmproxy/test_http.py::TestRequestCore::test_first_line_format", "test/mitmproxy/test_http.py::TestResponseUtils::test_get_cookies_simple", "test/mitmproxy/test_http.py::TestHTTPFlow::test_copy", "test/mitmproxy/test_http.py::TestRequestUtils:... | [] | ["test/mitmproxy/test_http.py::TestRequestCore::test_host_update_also_updates_header", "test/mitmproxy/addons/test_mapremote.py::TestMapRemote::test_host_header", "test/mitmproxy/test_http.py::TestMessageText::test_get_json", "test/mitmproxy/test_http.py::TestRequestCore::test_port"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py, flake8, mypy\nskipsdist = True\ntoxworkdir={env:TOX_WORK_DIR:.tox}\n\n[testenv]\ndeps =\n -e .[dev]\nsetenv = HOME = {envtmpdir}\ncommands =\n mitmdump --version\n pytest --color=no -rA --tb=no -p no:cacheprovide... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-5894 | 0c4549f4cce06c217f62ee79a3d32fa8b5bbaaed | diff --git a/CHANGELOG.md b/CHANGELOG.md
index fc72f5d1ba..3c0175badf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@
([#5725](https://github.com/mitmproxy/mitmproxy/pull/5725), @mhils)
* Add `replay.server.add` command for adding flows to server replay buffer
([#5851](https://github.com/mitmproxy/m... | diff --git a/test/mitmproxy/contentviews/test_raw.py b/test/mitmproxy/contentviews/test_raw.py
index 0cffcf869f..f5020c2793 100644
--- a/test/mitmproxy/contentviews/test_raw.py
+++ b/test/mitmproxy/contentviews/test_raw.py
@@ -5,6 +5,16 @@
def test_view_raw():
v = full_eval(raw.ViewRaw())
assert v(b"foo")
+ ... | "raw" view is not raw, adds extra backslash
#### Problem Description
I just noticed during https://github.com/mitmproxy/mitmproxy/issues/5469#issuecomment-1191343747
#### Steps to reproduce the behavior:
http.txt
```
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 1
\
```
1. `ncat -l 1337... | Raw mode currently escapes unprintable characters as well as backslashes so that the representation is unambiguous. I do agree though that the example you are showing is all but optimal, maybe we should just switch to rendering unprintable characters as �.
> maybe we should just switch to rendering unprintable characte... | 2023-01-28T15:10:36Z | 2023-01-29T10:56:39Z | [] | [] | ["test/mitmproxy/contentviews/test_raw.py::test_view_raw", "test/mitmproxy/contentviews/test_raw.py::test_render_priority"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py, flake8, mypy\nskipsdist = True\ntoxworkdir={env:TOX_WORK_DIR:.tox}\n\n[testenv]\ndeps =\n -e .[dev]\nsetenv = HOME = {envtmpdir}\ncommands =\n mitmdump --version\n pytest --color=no -rA --tb=no -p no:cacheprovide... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-5695 | 0f53caee7d886b76279cbdb57cc3e1a325e38792 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9c2cf20f1e..64d70370f0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
## Unreleased: mitmproxy next
+* Hard exit when mitmproxy cannot write logs, fixes endless loop when parent process exits
+ ([#4669](https://github.com/mitmproxy/mitmproxy/issues/4669... | diff --git a/test/mitmproxy/addons/test_termlog.py b/test/mitmproxy/addons/test_termlog.py
index 209f8eb89c..62573e218c 100644
--- a/test/mitmproxy/addons/test_termlog.py
+++ b/test/mitmproxy/addons/test_termlog.py
@@ -1,4 +1,5 @@
import asyncio
+import builtins
import io
import logging
@@ -55,3 +56,20 @@ async de... | mitmdump jumps to 100% CPU when parent process exits
#### Problem Description
It took me two days to make this reproduce in isolation. I hope someone with Python skills can figure out what is happening here. Depending on what the root cause is this might not even be related to my funny architecture.
I'm spawning ... | Current working theory: the addon `print` raises a broken pipe and the mitmdump error handling wants to log that broken pipe error to stderr, causing another broken pipe. And this somehow causes an infinite recursion of trying to write to stderr? Maybe this is just a matter of `if e.errno != errno.EPIPE:` in the right ... | 2022-10-30T17:56:58Z | 2022-10-30T18:23:44Z | ["test/mitmproxy/addons/test_termlog.py::test_styling", "test/mitmproxy/addons/test_termlog.py::test_output", "test/mitmproxy/addons/test_termlog.py::test_delayed_teardown"] | [] | ["test/mitmproxy/addons/test_termlog.py::test_cannot_print"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py, flake8, mypy\nskipsdist = True\ntoxworkdir={env:TOX_WORK_DIR:.tox}\n\n[testenv]\ndeps =\n -e .[dev]\nsetenv = HOME = {envtmpdir}\ncommands =\n mitmdump --version\n pytest --color=no -rA --tb=no -p no:cacheprovide... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-5652 | ca74a2a9cb168260e5f6b0a84de3ab76b9d160c8 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 91a6343970..bcfb189f55 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -46,6 +46,8 @@
([#5562](https://github.com/mitmproxy/mitmproxy/pull/5562), @decathorpe, @mhils)
* Fix mitmweb not properly opening a browser and being stuck on some Linux.
([#5522](https://github... | diff --git a/test/mitmproxy/tools/console/test_quickhelp.py b/test/mitmproxy/tools/console/test_quickhelp.py
new file mode 100644
index 0000000000..958bf6ae40
--- /dev/null
+++ b/test/mitmproxy/tools/console/test_quickhelp.py
@@ -0,0 +1,65 @@
+import pytest
+
+from mitmproxy.test.tflow import tflow
+from mitmproxy.tool... | Add quick help bar
#### Description
Issue #4515
This PR adds a Nano-looking quick help bar.
* Key display shows a small number of basic key bindings that are helpful (like exit or help).
* The set of keys displayed change depending on the context so bindings for flowlist only show when you're focused on the flo... | Fantastic, this looks great from the screenshots! 😃
I likely won't find time to review this properly before Wednesday, but I'm very happy to see this being tackled and will try to shorten turnaround times then. :) | 2022-10-17T15:34:36Z | 2022-10-20T14:29:59Z | [] | [] | ["test/mitmproxy/tools/console/test_quickhelp.py::test_quickhelp[HelpView-None-False]", "test/mitmproxy/tools/console/test_quickhelp.py::test_make_rows", "test/mitmproxy/tools/console/test_quickhelp.py::test_quickhelp[PathEditor-None-False]", "test/mitmproxy/tools/console/test_quickhelp.py::test_quickhelp[KeyBindings-N... | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py, flake8, mypy\nskipsdist = True\ntoxworkdir={env:TOX_WORK_DIR:.tox}\n\n[testenv]\ndeps =\n -e .[dev]\nsetenv = HOME = {envtmpdir}\ncommands =\n mitmdump --version\n pytest --color=no -rA --tb=no -p no:cacheprovide... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-5648 | 42df073f7ec57360dff6f1a974c4d42464e43a81 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 01c5608467..e1181b8c60 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -45,6 +45,8 @@
([#5562](https://github.com/mitmproxy/mitmproxy/pull/5562), @decathorpe, @mhils)
* Fix mitmweb not properly opening a browser and being stuck on some Linux.
([#5522](https://github... | diff --git a/test/mitmproxy/contentviews/test_json.py b/test/mitmproxy/contentviews/test_json.py
index 43565b2302..5b3883060f 100644
--- a/test/mitmproxy/contentviews/test_json.py
+++ b/test/mitmproxy/contentviews/test_json.py
@@ -17,6 +17,32 @@ def test_parse_json():
def test_format_json():
assert list(json.fo... | mitmweb: Add support for syntax highlighting / coloring
#### Problem Description
When selecting "View: msgpack" on a msgpack request or response, the resultant JSON is displayed using single-quotes (`'`), which is not valid. It should use double-quotes (`"`) instead.
#### Steps to reproduce the behavior:
1. Have a... | I don't know if this is _supposed_ to be valid JSON. First and foremost this is a human readable version of msgpack that happens to look somewhat like JSON.
The code is here
https://github.com/mitmproxy/mitmproxy/blob/a1631154d722ea4c82dcb72e0c84ad38c6991de5/mitmproxy/contentviews/msgpack.py#L18-L30
I don't kn... | 2022-10-14T23:23:15Z | 2022-10-19T21:51:03Z | ["test/mitmproxy/contentviews/test_msgpack.py::test_parse_msgpack", "test/mitmproxy/contentviews/test_json.py::test_view_json", "test/mitmproxy/contentviews/test_msgpack.py::test_view_msgpack_doesnt_crash", "test/mitmproxy/contentviews/test_msgpack.py::test_view_msgpack", "test/mitmproxy/contentviews/test_json.py::test... | [] | ["test/mitmproxy/contentviews/test_msgpack.py::test_render_priority", "test/mitmproxy/contentviews/test_json.py::test_format_json", "test/mitmproxy/contentviews/test_msgpack.py::test_format_msgpack"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py, flake8, mypy\nskipsdist = True\ntoxworkdir={env:TOX_WORK_DIR:.tox}\n\n[testenv]\ndeps =\n -e .[dev]\nsetenv = HOME = {envtmpdir}\ncommands =\n mitmdump --version\n pytest --color=no -rA --tb=no -p no:cacheprovide... | tox -e py -- | null | null | null | swa-bench:sw.eval |
mitmproxy/mitmproxy | mitmproxy__mitmproxy-5589 | d3fb9f43494359cc6dddccb56e63f02b8eb44fd2 | diff --git a/mitmproxy/net/udp.py b/mitmproxy/net/udp.py
index 328fcba751..3590d42843 100644
--- a/mitmproxy/net/udp.py
+++ b/mitmproxy/net/udp.py
@@ -175,8 +175,12 @@ def __init__(
"""
self._transport = transport
self._remote_addr = remote_addr
- self._reader = reader
- self._c... | diff --git a/test/mitmproxy/net/test_udp.py b/test/mitmproxy/net/test_udp.py
index 6e5a9f6237..f90538f559 100644
--- a/test/mitmproxy/net/test_udp.py
+++ b/test/mitmproxy/net/test_udp.py
@@ -45,11 +45,16 @@ def handle_datagram(
server.resume_writing()
await server.drain()
+ assert not client_writer.is_cl... | 'socket.send() raised exception.' on stderr
#### Problem Description
In a long-running session of mitmdump that captures traffic of all surfing on an iPad, standard error logs a bunch of
```
socket.send() raised exception.
```
Nothing else is logged. Subjectively every now and then this is logged a browser tab sta... | I did some googling and issues like this show up in the bug tracker of various projects. I found this fix for the issue in one project:
https://github.com/ska-sa/aiokatcp/commit/200189687148ab63b79081d8cfd6c2c92277895c
I did a small modification to `mitmproxy/proxy/server.py` to see if this approach would be viable:
... | 2022-09-15T12:43:55Z | 2022-09-22T14:47:26Z | [] | [] | ["test/mitmproxy/net/test_udp.py::test_reader", "test/mitmproxy/net/test_udp.py::test_client_server"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py, flake8, mypy\nskipsdist = True\ntoxworkdir={env:TOX_WORK_DIR:.tox}\n\n[testenv]\ndeps =\n -e .[dev]\nsetenv = HOME = {envtmpdir}\ncommands =\n mitmdump --version\n pytest --color=no -rA --tb=no -p no:cacheprovide... | tox -e py -- | null | null | null | swa-bench:sw.eval |
dbcli/pgcli | dbcli__pgcli-1452 | 96eb37fd1989ec8fd86150f20053abd03f50e7a4 | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 68a69acd..d9698ef4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -67,10 +67,6 @@ jobs:
psql -h localhost -U postgres -p 6432 pgbouncer -c 'show help'
- - name: Install beta version of pendulum
- ... | diff --git a/tests/test_main.py b/tests/test_main.py
index cbf20a6a..0aeba80e 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -11,6 +11,7 @@
from pgcli.main import (
obfuscate_process_password,
+ duration_in_words,
format_output,
PGCli,
OutputSettings,
@@ -488,3 +489,28 @@ def test... | pendulum dependency cannot be installed on 32-bit arches
## Description
The current version of `pendulum` is broken on 32-bit architectures, and prevents `pgcli` from being installed, e.g. on x86:
```
$ pip install pgcli
[…]
Building wheels for collected packages: pendulum
Building wheel for pendulum (pyproje... | I wasn't even sure what it was used for and how it looked like. Here is an example:
```
> select pg_sleep(2)
+----------+
| pg_sleep |
|----------|
| |
+----------+
SELECT 1
Time: 2.013s (2 seconds), executed in: 2.003s (2 seconds)
> select pg_sleep(62)
+----------+
| pg_sleep |
|----------|
... | 2024-02-19T08:52:19Z | 2024-02-20T11:51:33Z | [] | [] | ["tests/test_main.py::test_duration_in_words[60-1 minute]", "tests/test_main.py::test_duration_in_words[0.0005-0.001 second]", "tests/test_main.py::test_pset_pager_always[Output longer than terminal width]", "tests/test_main.py::test_duration_in_words[86401-24 hours 1 second]", "tests/test_main.py::test_pset_pager_off[... | [] | {"install": ["uv pip install -e '.[sshtunnel]'"], "pre_install": ["tee tests/pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no -rA --tb=no -p no:cacheprovider --capture=sys --showlocals\n\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py38, py39, py310, py311, py312\n[testenv]\ndeps = pyt... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
cookiecutter/cookiecutter | cookiecutter__cookiecutter-2029 | 9f94bceed2301659fbc64b20deb7f96a81ac42f8 | diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py
index 14a96e6ce..48aacb6d6 100644
--- a/cookiecutter/generate.py
+++ b/cookiecutter/generate.py
@@ -15,6 +15,7 @@
from binaryornot.check import is_binary
from jinja2 import Environment, FileSystemLoader
from jinja2.exceptions import TemplateSyntaxError... | diff --git a/tests/test_generate_context.py b/tests/test_generate_context.py
index 6cc5c133a..fe2935302 100644
--- a/tests/test_generate_context.py
+++ b/tests/test_generate_context.py
@@ -8,6 +8,7 @@
from cookiecutter import generate
from cookiecutter.exceptions import ContextDecodingException
+from cookiecutter.p... | Cannot properly override boolean variable from command line
* Cookiecutter version: 2.4.0
* Template project url: N/A
* Python version: 3.10
* Operating System: Linux
### Description:
I tried to use the boolean variable. It works great when generating from interactive prompt. But when I try to use --no-input w... | 2024-03-06T06:42:32Z | 2024-03-25T14:51:19Z | ["tests/test_generate_context.py::test_apply_overwrites_does_not_modify_choices_for_invalid_overwrite", "tests/test_generate_context.py::test_generate_context[input_params2-expected_context2]", "tests/test_generate_context.py::test_apply_overwrites_in_dictionaries", "tests/test_generate_context.py::test_generate_contex... | [] | ["tests/test_generate_context.py::test_apply_overwrites_overwrite_value_as_boolean_string[on-expected5]", "tests/test_generate_context.py::test_apply_overwrites_overwrite_value_as_boolean_string[t-expected2]", "tests/test_generate_context.py::test_apply_overwrites_overwrite_value_as_boolean_string[no-expected9]", "test... | [] | {"install": [], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n # lint\n py{312, 311, 310, 39, 38, 37}\n safety\n # docs\n\nskip_missing_interpreters = True\nisolated_build = True\n\n\n[testenv:lint]\ndescription = Run pre-commit hooks\ndeps = pre-commit\ncommands = pre-commit run --all --... | tox -- | null | null | null | swa-bench:sw.eval | |
cookiecutter/cookiecutter | cookiecutter__cookiecutter-2010 | 04b42e1cb32526b8f0fd34f46529344d424fac7a | diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py
index d505825ac..a148b384f 100644
--- a/cookiecutter/generate.py
+++ b/cookiecutter/generate.py
@@ -55,8 +55,11 @@ def apply_overwrites_to_context(
"""Modify the given context in place based on the overwrite_context."""
for variable, overwrite i... | diff --git a/tests/test-generate-context/nested_dict_additional.json b/tests/test-generate-context/nested_dict_additional.json
new file mode 100644
index 000000000..115da3236
--- /dev/null
+++ b/tests/test-generate-context/nested_dict_additional.json
@@ -0,0 +1,9 @@
+{
+ "mainkey1": "mainvalue1",
+ "mainkey2": {
+ ... | Adding value to nested dicts broken after 2.2.0
Tested with cookiecutter version: 2.5.0 and main
Prior to Version 2.2.0 one could have a `cookiecutter.json` with a dict as value like so:
```json
{
"mainkey": {
"subkey1": "value1"
"subkey2": "value2"
}
}
```
and then define an YAML to pass in wi... | 2024-02-02T16:11:15Z | 2024-02-21T16:33:17Z | ["tests/test_generate_context.py::test_apply_overwrites_does_not_modify_choices_for_invalid_overwrite", "tests/test_generate_context.py::test_generate_context[input_params2-expected_context2]", "tests/test_generate_context.py::test_apply_overwrites_in_dictionaries", "tests/test_generate_context.py::test_generate_contex... | [] | ["tests/test_generate_context.py::test_apply_overwrites_in_nested_dict", "tests/test_generate_context.py::test_apply_overwrite_context_as_in_nested_dict_with_additional_values", "tests/test_generate_context.py::test_apply_overwrites_in_nested_dict_additional_values"] | [] | {"install": [], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n # lint\n py{312, 311, 310, 39, 38, 37}\n safety\n # docs\n\nskip_missing_interpreters = True\nisolated_build = True\n\n\n[testenv:lint]\ndescription = Run pre-commit hooks\ndeps = pre-commit\ncommands = pre-commit run --all --... | tox -- | null | null | null | swa-bench:sw.eval | |
cookiecutter/cookiecutter | cookiecutter__cookiecutter-1981 | 11c2c30c2aae795db2f8542985cba26f8bb54b0e | diff --git a/cookiecutter/main.py b/cookiecutter/main.py
index f8b660844..65871ab16 100644
--- a/cookiecutter/main.py
+++ b/cookiecutter/main.py
@@ -6,7 +6,6 @@
"""
import logging
import os
-import re
import sys
from copy import copy
from pathlib import Path
@@ -15,6 +14,7 @@
from cookiecutter.exceptions import ... | diff --git a/tests/fake-nested-templates-old-style/cookiecutter.json b/tests/fake-nested-templates-old-style/cookiecutter.json
new file mode 100644
index 000000000..2cdf1d272
--- /dev/null
+++ b/tests/fake-nested-templates-old-style/cookiecutter.json
@@ -0,0 +1,11 @@
+{
+ "template": [
+ "fake-package (./fake-packa... | Nested Config Files: New format for "template" key
* Cookiecutter version: 2.4.0
* Template project URL: https://github.com/plone/cookiecutter-plone/blob/main/cookiecutter.json
* Python version: 3.11
* Operating System: macOs
### Description:
The format for the `template` key requires some additional parsing:
... | 2023-11-17T23:54:33Z | 2023-11-20T21:26:53Z | ["tests/test_prompt.py::TestRenderVariable::test_convert_to_str_complex_variables[raw_var1-rendered_var1]", "tests/test_prompt.py::TestPromptChoiceForConfig::test_should_read_user_choice", "tests/test_prompt.py::TestPrompt::test_dont_prompt_for_private_context_var", "tests/test_prompt.py::TestPrompt::test_prompt_for_co... | [] | ["tests/test_prompt.py::test_cookiecutter_nested_templates[fake-nested-templates-old-style-fake-package]", "tests/test_cookiecutter_nested_templates.py::test_cookiecutter_nested_templates[fake-nested-templates-fake-project]", "tests/test_prompt.py::test_cookiecutter_nested_templates_invalid_paths[/tmp]", "tests/test_pr... | ["[ 33%]", "[ 31%]", "tests/test_prompt.py::TestPrompt::test_prompt_for_config_with_human_choices[context1] - AttributeError: module 'click' has no attribute 'testing'", "tests/test_prompt.py::TestPrompt::test_prompt_for_config_with_human_choices[context0] - AttributeError: module 'click' has no attribute 'testing'", "... | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n # lint\n py{312, 311, 310, 39, 38, 37}\n safety\n # docs\n\nskip_missing_interpreters = True\nisolated_build = True\n\n\n[testenv:lint]\ndescription = Run pre-commit hooks\ndeps = pre-commit\ncommands = pr... | tox -- | null | null | null | swa-bench:sw.eval | |
cookiecutter/cookiecutter | cookiecutter__cookiecutter-1950 | 539f341d514e237149e7e6b4248c5b765c70922e | diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py
index ae6062b55..233141209 100644
--- a/cookiecutter/generate.py
+++ b/cookiecutter/generate.py
@@ -14,13 +14,12 @@
from cookiecutter.environment import StrictEnvironment
from cookiecutter.exceptions import (
ContextDecodingException,
- FailedHo... | diff --git a/tests/test-pyhooks/cookiecutter.json b/tests/test-pyhooks/cookiecutter.json
new file mode 100644
index 000000000..224d5c1fa
--- /dev/null
+++ b/tests/test-pyhooks/cookiecutter.json
@@ -0,0 +1,4 @@
+{
+ "pyhooks": "fake-project",
+ "project_title": "Project Title"
+}
diff --git a/tests/test-pyhooks/hooks/... | Implement a pre_prompt hook that will run before prompts
* Cookiecutter version: 2.3.1
### Description:
Create a new hook, `pre_prompt`, that will be called before `cookiecutter` asks the user any question. This hook can be used to:
- Pre-process the context
- Run sanity checks
| 2023-09-28T16:49:45Z | 2023-09-29T11:43:32Z | ["tests/test_prompt.py::TestPrompt::test_prompt_for_config_with_human_choices[context0]", "tests/test_generate_hooks.py::test_run_python_hooks", "tests/test_default_extensions.py::test_jinja2_slugify_extension", "tests/test_prompt.py::TestReadUserChoice::test_should_invoke_read_user_choice", "tests/test_generate_hooks.... | [] | ["tests/test_pre_prompt_hooks.py::test_run_pre_prompt_shell_hook", "tests/test_utils.py::test_create_tmp_repo_dir", "tests/test_cli.py::test_cli_with_pre_prompt_hook_fail", "tests/test_pre_prompt_hooks.py::test_run_pre_prompt_python_hook_fail", "tests/test_generate_hooks.py::test_deprecate_run_hook_from_repo_dir", "tes... | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n # lint\n py{312, 311, 310, 39, 38, 37}\n safety\n # docs\n\nskip_missing_interpreters = True\nisolated_build = True\n\n\n[testenv:lint]\ndescription = Run pre-commit hooks\ndeps = pre-commit\ncommands = pr... | null | ["tox"] | null | null | swa-bench:sw.eval | |
cookiecutter/cookiecutter | cookiecutter__cookiecutter-1626 | 558f4404852e22965a21cad964271ea74f73e6f8 | diff --git a/cookiecutter/prompt.py b/cookiecutter/prompt.py
index a067d0932..003ace67d 100644
--- a/cookiecutter/prompt.py
+++ b/cookiecutter/prompt.py
@@ -143,8 +143,8 @@ def render_variable(env, raw, cookiecutter_dict):
being populated with variables.
:return: The rendered value for the default variabl... | diff --git a/tests/test_prompt.py b/tests/test_prompt.py
index 037591dd4..9e85bcd9e 100644
--- a/tests/test_prompt.py
+++ b/tests/test_prompt.py
@@ -21,7 +21,7 @@ class TestRenderVariable:
'raw_var, rendered_var',
[
(1, '1'),
- (True, 'True'),
+ (True, True),
... | Boolean parameters parsed as String
* Cookiecutter version: 2.0
* Template project url: https://github.com/cookiecutter/cookiecutter-django
* Python version: 3.8
* Operating System: Linux
### Description:
We want to be able to ask the user for true/false questions.
The example template shows the current usage... | 2021-12-19T22:48:20Z | 2022-06-06T10:41:39Z | ["tests/test_prompt.py::TestPromptChoiceForConfig::test_should_read_user_choice", "tests/test_prompt.py::TestPrompt::test_dont_prompt_for_private_context_var", "tests/test_prompt.py::TestPrompt::test_prompt_for_config_dict", "tests/test_prompt.py::TestReadUserChoice::test_should_invoke_read_user_choice", "tests/test_pr... | [] | ["tests/test_prompt.py::TestRenderVariable::test_convert_to_str[True-True]", "tests/test_prompt.py::TestReadUserYesNo::test_should_invoke_read_user_yes_no[False]", "tests/test_prompt.py::TestReadUserYesNo::test_boolean_parameter_no_input", "tests/test_prompt.py::TestRenderVariable::test_convert_to_str_complex_variables... | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n # lint\n py{312, 311, 310, 39, 38, 37}\n safety\n # docs\n\nskip_missing_interpreters = True\nisolated_build = True\n\n\n[testenv:lint]\ndescription = Run pre-commit hooks\ndeps = pre-commit\ncommands = pr... | tox -- | null | null | null | swa-bench:sw.eval | |
cookiecutter/cookiecutter | cookiecutter__cookiecutter-1669 | fdffddb31fd2b46344dfa317531ff155e7999f77 | diff --git a/cookiecutter/cli.py b/cookiecutter/cli.py
index a792fa5f5..208901a92 100644
--- a/cookiecutter/cli.py
+++ b/cookiecutter/cli.py
@@ -144,6 +144,11 @@ def list_installed_templates(default_config, passed_config_file):
@click.option(
'-l', '--list-installed', is_flag=True, help='List currently installed ... | diff --git a/tests/test_cli.py b/tests/test_cli.py
index ad6abd1e0..1bc2fdd55 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -109,6 +109,7 @@ def test_cli_replay(mocker, cli_runner):
password=None,
directory=None,
accept_hooks=True,
+ keep_project_on_failure=False,
)
... | add CLI option not to delete files on failure
If there's a bug in my hooks, it can be tough to debug it. I'd like to be able to inspect the generated files.
Currently, I modify the hook to exit with code 0 just before the failing line, but it'd be nice if that wasn't necessary.
| 2022-05-06T23:02:26Z | 2022-06-06T01:57:40Z | ["tests/test_generate_files.py::test_generate_files_with_trailing_newline_forced_to_linux_by_context", "tests/test_generate_files.py::test_generate_files_with_jinja2_environment", "tests/test_generate_files.py::test_ensure_dir_is_templated_raises[bar}}]", "tests/test_generate_files.py::test_raise_undefined_variable_fil... | [] | ["tests/test_specify_output_dir.py::test_default_output_dir", "tests/test_cli.py::test_cli_accept_hooks[--output-dir---accept-hooks=ask-yes-True]", "tests/test_cli.py::test_run_cookiecutter_on_overwrite_if_exists_and_replay[--overwrite-if-exists]", "tests/test_cli.py::test_run_cookiecutter_on_overwrite_if_exists_and_re... | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n # lint\n py{312, 311, 310, 39, 38, 37}\n safety\n # docs\n\nskip_missing_interpreters = True\nisolated_build = True\n\n\n[testenv:lint]\ndescription = Run pre-commit hooks\ndeps = pre-commit\ncommands = pr... | tox -- | null | null | null | swa-bench:sw.eval | |
cookiecutter/cookiecutter | cookiecutter__cookiecutter-1168 | 5c282f020a8db7e5e7c4e7b51b010556ca31fb7f | diff --git a/AUTHORS.rst b/AUTHORS.rst
index 8b39d812d..a1afb70df 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -127,6 +127,7 @@ Contributors
* Jonathan Sick (`@jonathansick`_)
* Hugo (`@hugovk`_)
* Min ho Kim (`@minho42`_)
+* Ryan Ly (`@rly`_)
.. _`@cedk`: https://github.com/cedk
.. _`@johtso`: https://github.c... | diff --git a/tests/test_read_user_choice.py b/tests/test_read_user_choice.py
index 0f9e003a1..0e81c2d75 100644
--- a/tests/test_read_user_choice.py
+++ b/tests/test_read_user_choice.py
@@ -29,7 +29,8 @@ def test_click_invocation(mocker, user_choice, expected_value):
prompt.assert_called_once_with(
EXPECTE... | Choice options are redundant using cookiecutter with latest click package
* Cookiecutter version: 1.6.0 -- installed via `pip install`
* Template project url: n/a
* Python version: 3.7
* Operating System: Windows 10
### Description:
If cookiecutter.json has the following:
```json
{
"my_choice": ["a","b"]
... | 2019-05-03T22:42:29Z | 2019-08-10T17:06:47Z | [] | [] | ["tests/test_read_user_choice.py::test_raise_if_options_is_not_a_non_empty_list", "tests/test_read_user_choice.py::test_click_invocation[4-bar]", "tests/test_read_user_choice.py::test_click_invocation[1-hello]", "tests/test_read_user_choice.py::test_click_invocation[3-foo]", "tests/test_read_user_choice.py::test_click_... | [] | {"install": [], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n # lint\n py27\n py35\n py36\n py37\n py38\n pypy\n pypy3\nminversion = 3.14.2\nrequires =\n # https://github.com/tox-dev/tox/issues/765\n virtualenv >= 16.7.9\n pip >= 19.3.1\n\n[testenv]\npassenv =\n L... | tox -e py37 -- | null | null | null | swa-bench:sw.eval | |
nvbn/thefuck | nvbn__thefuck-1316 | f1b7d879bdfc712c14de1e40f00c52ed4a0437dd | diff --git a/thefuck/rules/brew_install.py b/thefuck/rules/brew_install.py
index 5848764cc..d285a2d46 100644
--- a/thefuck/rules/brew_install.py
+++ b/thefuck/rules/brew_install.py
@@ -1,42 +1,24 @@
-import os
import re
-from thefuck.utils import get_closest, replace_argument
-from thefuck.specific.brew import get_bre... | diff --git a/tests/rules/test_brew_install.py b/tests/rules/test_brew_install.py
index cd6e028b6..e56cf7647 100644
--- a/tests/rules/test_brew_install.py
+++ b/tests/rules/test_brew_install.py
@@ -1,17 +1,26 @@
import pytest
-from thefuck.rules.brew_install import match, get_new_command
-from thefuck.rules.brew_instal... | IndexError when using thefuck with brew install command
<!-- If you have any issue with The Fuck, sorry about that, but we will do what we
can to fix that. Actually, maybe we already have, so first thing to do is to
update The Fuck and see if the bug is still there. -->
<!-- If it is (sorry again), check if the pr... | Seems to occur because the `is_proper_commnd` check on line 27 is much looser than the findall check on the following line:
https://github.com/nvbn/thefuck/blob/d8ddf5a2be9d52ec4bc8c11e79fcc7b3c390b669/thefuck/rules/brew_install.py#L31
Then the findall assumes it will find something and without checking, indexes ... | 2022-06-29T12:18:56Z | 2022-07-02T13:06:00Z | [] | [] | ["tests/rules/test_brew_install.py::test_suggestions", "tests/rules/test_brew_install.py::test_get_new_command", "tests/rules/test_brew_install.py::test_match"] | [] | {"install": ["python setup.py develop"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py27,py35,py36,py37,py38\n\n[testenv]\ndeps = -rrequirements.txt\ncommands = pytest --color=no -rA --tb=no -p no:cacheprovider -v --capture=sys\n\n[flake8]\nignore = E501,W503,W504\nexclude = venv,build,.tox,setup.p... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
nvbn/thefuck | nvbn__thefuck-1314 | 5198b34f24ca4bc414a5bf1b0288ee86ea2529a8 | diff --git a/thefuck/rules/brew_update_formula.py b/thefuck/rules/brew_update_formula.py
index 172df6a7d..4f2264aa7 100644
--- a/thefuck/rules/brew_update_formula.py
+++ b/thefuck/rules/brew_update_formula.py
@@ -5,7 +5,7 @@
def match(command):
return ('update' in command.script
and "Error: This comm... | diff --git a/tests/rules/test_brew_update_formula.py b/tests/rules/test_brew_update_formula.py
index 5cec48bdb..a35e1d9a5 100644
--- a/tests/rules/test_brew_update_formula.py
+++ b/tests/rules/test_brew_update_formula.py
@@ -4,7 +4,7 @@
output = ("Error: This command updates brew itself, and does not take formula"... | support brew update <package name>
This is more of a feature request -- it'd be nice to support fixing `brew update $package_name` to `brew upgrade $package_name`, e.g.:
```
❯ brew update 1password
Error: This command updates brew itself, and does not take formula names.
Use `brew upgrade 1password` instead.
... | I ran into the same problem and in my research I found that the output at brew has been changed and that's why the rule doesn't recognize it correctly anymore.
I will try a PR in a moment. | 2022-06-23T15:14:02Z | 2022-06-28T16:28:38Z | ["tests/rules/test_brew_update_formula.py::test_get_new_command[brew update bar zap-bar zap]", "tests/rules/test_brew_update_formula.py::test_not_match[brew upgrade foo]", "tests/rules/test_brew_update_formula.py::test_get_new_command[brew update foo-foo]", "tests/rules/test_brew_update_formula.py::test_not_match[brew ... | [] | ["tests/rules/test_brew_update_formula.py::test_match"] | [] | {"install": ["python setup.py develop"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py27,py35,py36,py37,py38\n\n[testenv]\ndeps = -rrequirements.txt\ncommands = pytest --color=no -rA --tb=no -p no:cacheprovider -v --capture=sys\n\n[flake8]\nignore = E501,W503,W504\nexclude = venv,build,.tox,setup.p... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
nvbn/thefuck | nvbn__thefuck-1241 | c719712b6256f4add4e65e8d4369b36d73342b48 | diff --git a/thefuck/entrypoints/fix_command.py b/thefuck/entrypoints/fix_command.py
index 6946653e1..018ba580f 100644
--- a/thefuck/entrypoints/fix_command.py
+++ b/thefuck/entrypoints/fix_command.py
@@ -12,7 +12,7 @@
def _get_raw_command(known_args):
if known_args.force_command:
- return known_args.for... | diff --git a/tests/entrypoints/test_fix_command.py b/tests/entrypoints/test_fix_command.py
index 18431c465..3012bb4f8 100644
--- a/tests/entrypoints/test_fix_command.py
+++ b/tests/entrypoints/test_fix_command.py
@@ -5,8 +5,8 @@
class TestGetRawCommand(object):
def test_from_force_command_argument(self):
- ... | Repeat does not end
This bug occurs when user tries to correct command that has to be corrected twice.
For example `cs foo`, when directory foo does not exist.
### The output of thefuck --version
```
The Fuck 3.31 using Python 3.9.7 and Bash 5.1.8(1)-release
```
### System
```
Arch Linux
```
### Example... | I was able to reproduce this bug on Mac OS and I have found a fix for it. I will create a PR in the next couple of days. | 2021-10-21T22:21:46Z | 2021-12-19T23:05:48Z | ["tests/entrypoints/test_fix_command.py::TestGetRawCommand::test_from_history[git br-git br]", "tests/entrypoints/test_fix_command.py::TestGetRawCommand::test_from_history[git br\\nfcuk\\nls-ls]", "tests/entrypoints/test_fix_command.py::TestGetRawCommand::test_from_command_argument", "tests/entrypoints/test_fix_command... | [] | ["tests/entrypoints/test_fix_command.py::TestGetRawCommand::test_from_force_command_argument"] | [] | {"install": ["python setup.py develop"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py27,py35,py36,py37,py38\n\n[testenv]\ndeps = -rrequirements.txt\ncommands = pytest --color=no -rA --tb=no -p no:cacheprovider -v --capture=sys\n\n[flake8]\nignore = E501,W503,W504\nexclude = venv,build,.tox,setup.p... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
nvbn/thefuck | nvbn__thefuck-1228 | 2a166a7dec3c872ef6be3870b50889500ca6a212 | diff --git a/thefuck/specific/git.py b/thefuck/specific/git.py
index c8f11bd64..979314651 100644
--- a/thefuck/specific/git.py
+++ b/thefuck/specific/git.py
@@ -14,7 +14,7 @@ def git_support(fn, command):
return False
# perform git aliases expansion
- if 'trace: alias expansion:' in command.output:
+... | diff --git a/tests/specific/test_git.py b/tests/specific/test_git.py
index a17121082..10acb6cde 100644
--- a/tests/specific/test_git.py
+++ b/tests/specific/test_git.py
@@ -27,9 +27,10 @@ def fn(command):
('ls', False),
('cat git', False),
('cat hub', False)])
-def test_git_support_match(command, is_git)... | Python exception when executing rule git_hook_bypass: NoneType is not iterable
<!-- If you have any issue with The Fuck, sorry about that, but we will do what we
can to fix that. Actually, maybe we already have, so first thing to do is to
update The Fuck and see if the bug is still there. -->
<!-- If it is (sorry ... | Hey! 👋 Thanks a lot for reporting.
So, what happens is that for some reason [the execution times out and therefore no output gets collected](https://github.com/nvbn/thefuck/blob/master/thefuck/output_readers/rerun.py#L67-L68). As the `git_hook_bypass` rule [does not require output](https://github.com/nvbn/thefuck/b... | 2021-08-16T22:35:57Z | 2021-08-17T13:41:54Z | ["tests/specific/test_git.py::test_git_support[git br -d some_branch-git branch -d some_branch-19:22:36.299340 git.c:282 trace: alias expansion: br => 'branch']", "tests/specific/test_git.py::test_git_support_match[-git pull-True]", "tests/specific/test_git.py::test_git_support_match[-cat git-False]", "tests/specific... | [] | ["tests/specific/test_git.py::test_git_support_match[None-git push --set-upstream origin foo-True]", "tests/specific/test_git.py::test_git_support_match[None-hub pull-True]", "tests/specific/test_git.py::test_git_support_match[None-git pull-True]", "tests/specific/test_git.py::test_git_support_match[None-hub push --set... | [] | {"install": ["python setup.py develop"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py27,py35,py36,py37,py38\n\n[testenv]\ndeps = -rrequirements.txt\ncommands = pytest --color=no -rA --tb=no -p no:cacheprovider -v --capture=sys\n\n[flake8]\nignore = E501,W503,W504\nexclude = venv,build,.tox,setup.p... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
nvbn/thefuck | nvbn__thefuck-1220 | c2df71caed917ea659a72a393b105881ec0709df | diff --git a/thefuck/utils.py b/thefuck/utils.py
index 42f326312..466e4ba51 100644
--- a/thefuck/utils.py
+++ b/thefuck/utils.py
@@ -344,4 +344,4 @@ def format_raw_script(raw_script):
else:
script = ' '.join(raw_script)
- return script.strip()
+ return script.lstrip()
| diff --git a/tests/test_types.py b/tests/test_types.py
index 3a43cded4..a322d21e8 100644
--- a/tests/test_types.py
+++ b/tests/test_types.py
@@ -143,7 +143,9 @@ def test_from_script_calls(self, Popen, settings, os_environ):
([''], None),
(['', ''], None),
(['ls', '-la'], 'ls -la'),
- (... | ValueError after single backslash
<!-- If you have any issue with The Fuck, sorry about that, but we will do what we
can to fix that. Actually, maybe we already have, so first thing to do is to
update The Fuck and see if the bug is still there. -->
<!-- If it is (sorry again), check if the problem has not already ... | Yep, can confirm this issue also exists on windows/powershell
FWIW I do not get this error on mac(big sur 11.3) | 2021-07-23T18:09:12Z | 2021-07-29T20:04:47Z | ["tests/test_types.py::TestCorrectedCommand::test_run[git branch-git branch-override_settings0]", "tests/test_types.py::TestRule::test_from_path_excluded_rule", "tests/test_types.py::TestRule::test_isnt_match_when_rule_failed", "tests/test_types.py::TestRule::test_is_enabled[rules1-rule1-False]", "tests/test_types.py::... | [] | ["tests/test_types.py::TestCommand::test_from_script[script4-ls]", "tests/test_types.py::TestCommand::test_from_script[script6-echo \\\\\\n]", "tests/test_types.py::TestCommand::test_from_script[script5-echo \\\\ ]"] | [] | {"install": ["python setup.py develop"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py27,py35,py36,py37,py38\n\n[testenv]\ndeps = -rrequirements.txt\ncommands = pytest --color=no -rA --tb=no -p no:cacheprovider -v --capture=sys\n\n[flake8]\nignore = E501,W503,W504\nexclude = venv,build,.tox,setup.p... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
nvbn/thefuck | nvbn__thefuck-1214 | 58ddd4338adf12a3abc2ffed0e27794a398fa8d2 | diff --git a/thefuck/output_readers/rerun.py b/thefuck/output_readers/rerun.py
index af4f331a2..b50c0d3c5 100644
--- a/thefuck/output_readers/rerun.py
+++ b/thefuck/output_readers/rerun.py
@@ -60,7 +60,7 @@ def get_output(script, expanded):
result = Popen(expanded, shell=True, stdin=PIPE,
... | diff --git a/tests/output_readers/test_rerun.py b/tests/output_readers/test_rerun.py
index 02dbd40cd..632606c6f 100644
--- a/tests/output_readers/test_rerun.py
+++ b/tests/output_readers/test_rerun.py
@@ -22,6 +22,14 @@ def test_get_output(self, popen_mock, wait_output_mock):
assert rerun.get_output('', '') is... | UnicodeDecodeError when using thefuck
I followed the alias guide, but I got an error when running thefuck in PowerShell:
```
Traceback (most recent call last):
File "d:\python36\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\python36\lib\runpy.py", line 85, in _run_code
... | @nvbn would this be easier if we decode the `output = result.stdout.read().decode('utf-8')` using **utf-32** instead of utf-8 ?
Hey, can I look into this issue?
@Surya97, you are more than welcome! The Fuck really needs Windows users as contributors!
Maybe we can using `chardet` to make it?
I'm not sure to open a ne... | 2021-07-14T11:17:50Z | 2021-07-29T19:37:19Z | ["tests/output_readers/test_rerun.py::TestRerun::test_wait_output_is_slow", "tests/output_readers/test_rerun.py::TestRerun::test_get_output", "tests/output_readers/test_rerun.py::TestRerun::test_wait_output_timeout", "tests/output_readers/test_rerun.py::TestRerun::test_wait_output_timeout_children", "tests/output_reade... | [] | ["tests/output_readers/test_rerun.py::TestRerun::test_get_output_invalid_continuation_byte", "tests/output_readers/test_rerun.py::TestRerun::test_kill_process_access_denied"] | [] | {"install": ["python setup.py develop"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py27,py35,py36,py37,py38\n\n[testenv]\ndeps = -rrequirements.txt\ncommands = pytest --color=no -rA --tb=no -p no:cacheprovider -v --capture=sys\n\n[flake8]\nignore = E501,W503,W504\nexclude = venv,build,.tox,setup.p... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
nvbn/thefuck | nvbn__thefuck-1216 | 11b70526f72339bcce0beefa1665c74bb06e18b3 | diff --git a/thefuck/shells/fish.py b/thefuck/shells/fish.py
index 51478192e..eb7e9153c 100644
--- a/thefuck/shells/fish.py
+++ b/thefuck/shells/fish.py
@@ -52,7 +52,7 @@ def app_alias(self, alias_name):
if settings.alter_history:
alter_history = (' builtin history delete --exact'
... | diff --git a/tests/shells/test_fish.py b/tests/shells/test_fish.py
index ff627a4ea..2384dad8b 100644
--- a/tests/shells/test_fish.py
+++ b/tests/shells/test_fish.py
@@ -87,8 +87,11 @@ def test_app_alias(self, shell):
def test_app_alias_alter_history(self, settings, shell):
settings.alter_history = True
... | #994: Replace decoding errors with the replacement marker
Fix #994
Reference: https://docs.python.org/3/library/codecs.html#error-handlers
| 2021-07-17T12:21:27Z | 2021-07-18T13:10:48Z | ["tests/shells/test_fish.py::TestFish::test_get_aliases", "tests/shells/test_fish.py::TestFish::test_how_to_configure", "tests/shells/test_fish.py::TestFish::test_from_shell[pwd-pwd]", "tests/shells/test_fish.py::TestFish::test_from_shell[ll-fish -ic \"ll\"]", "tests/shells/test_fish.py::TestFish::test_to_shell", "test... | [] | ["tests/shells/test_fish.py::TestFish::test_app_alias_alter_history", "tests/shells/test_fish.py::TestFish::test_get_version_error[side_effect1-OSError]"] | [] | {"install": ["python setup.py develop"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py27,py35,py36,py37,py38\n\n[testenv]\ndeps = -rrequirements.txt\ncommands = pytest --color=no -rA --tb=no -p no:cacheprovider -v --capture=sys\n\n[flake8]\nignore = E501,W503,W504\nexclude = venv,build,.tox,setup.p... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
nvbn/thefuck | nvbn__thefuck-1135 | c196e2901c449d96bf5116e6988610c38ca8b725 | diff --git a/thefuck/rules/composer_not_command.py b/thefuck/rules/composer_not_command.py
index bfe4c5a49..b67880094 100644
--- a/thefuck/rules/composer_not_command.py
+++ b/thefuck/rules/composer_not_command.py
@@ -5,12 +5,18 @@
@for_app('composer')
def match(command):
return (('did you mean this?' in command.... | diff --git a/tests/rules/test_composer_not_command.py b/tests/rules/test_composer_not_command.py
index 33823cfcd..2bae920c2 100644
--- a/tests/rules/test_composer_not_command.py
+++ b/tests/rules/test_composer_not_command.py
@@ -39,18 +39,28 @@ def composer_not_command_one_of_this():
)
-def test_match(composer... | No suggestions for incorrectly using composer install instead of composer require
<!-- If you have any issue with The Fuck, sorry about that, but we will do what we
can to fix that. Actually, maybe we already have, so first thing to do is to
update The Fuck and see if the bug is still there. -->
<!-- If it is (sor... | Seems like the `composer_not_command` rule needs to be updated to cover that version of `compose`.
@scorphus I'm on it! | 2020-10-01T04:39:46Z | 2021-06-30T21:10:06Z | [] | [] | ["tests/rules/test_composer_not_command.py::test_match", "tests/rules/test_composer_not_command.py::test_get_new_command"] | [] | {"install": ["python setup.py develop"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py27,py35,py36,py37,py38\n\n[testenv]\ndeps = -rrequirements.txt\ncommands = pytest --color=no -rA --tb=no -p no:cacheprovider -v --capture=sys\n\n[flake8]\nignore = E501,W503,W504\nexclude = venv,build,.tox,setup.p... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
nvbn/thefuck | nvbn__thefuck-1151 | 40dd65963d7819a3c566416827dd1c8dae5baf0e | diff --git a/README.md b/README.md
index 5ac8b83ef..8aa2294d9 100644
--- a/README.md
+++ b/README.md
@@ -281,6 +281,7 @@ following rules are enabled by default:
* `pyenv_no_such_command` – fixes wrong pyenv commands like `pyenv isntall` or `pyenv list`;
* `python_command` – prepends `python` when you try ... | diff --git a/tests/rules/test_python_module_error.py b/tests/rules/test_python_module_error.py
new file mode 100644
index 000000000..838f9561a
--- /dev/null
+++ b/tests/rules/test_python_module_error.py
@@ -0,0 +1,63 @@
+import pytest
+
+from thefuck.rules.python_module_error import get_new_command, match
+from thefuck... | Give a fuck about ModuleNotFoundError
Those who have ever tried to run moderately complicated python scripts are familiar with this kind of errors:
ModuleNotFoundError: No module named 'more_itertools'
It would be nice if `fuck` was able to fix this with `pip install`.
| Seems to be a nice idea, maybe I'll try to make a PR on this!
Thank you for the Issue 👍🏻
However, there are some python modules which have a different package name on PyPI and expose different module name for import.
Any ideas on how to handle that?
Hmm, quick googling showed there is indeed no simple way to fi... | 2020-12-27T22:30:20Z | 2021-01-19T21:37:05Z | [] | [] | ["tests/rules/test_python_module_error.py::test_not_match[test0]", "tests/rules/test_python_module_error.py::test_not_match[test1]", "tests/rules/test_python_module_error.py::test_match[./some_other_script.py-some_other_script.py-a_module-pip install a_module && ./some_other_script.py]", "tests/rules/test_python_module... | [] | {"install": ["python setup.py develop"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py27,py35,py36,py37,py38\n\n[testenv]\ndeps = -rrequirements.txt\ncommands = pytest --color=no -rA --tb=no -p no:cacheprovider -v --capture=sys\n\n[flake8]\nignore = E501,W503,W504\nexclude = venv,build,.tox,setup.p... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
nvbn/thefuck | nvbn__thefuck-1091 | 6975d30818792f1b37de702fc93c66023c4c50d5 | diff --git a/thefuck/types.py b/thefuck/types.py
index 8c5770f4f..eb4b1de19 100644
--- a/thefuck/types.py
+++ b/thefuck/types.py
@@ -255,4 +255,4 @@ def run(self, old_cmd):
logs.debug(u'PYTHONIOENCODING: {}'.format(
os.environ.get('PYTHONIOENCODING', '!!not-set!!')))
- print(self._get_scr... | diff --git a/tests/test_types.py b/tests/test_types.py
index f946a8b82..4d0f0f70d 100644
--- a/tests/test_types.py
+++ b/tests/test_types.py
@@ -41,7 +41,7 @@ def test_run(self, capsys, settings, script, printed, override_settings):
settings.update(override_settings)
CorrectedCommand(script, None, 100... | Always corrects to empty git subcommands
`thefuck` shows the right correction but always executes a empty git subcommand.
Actual output:
``` sh
λ Imagine ~ → git commot
git: 'commot' is not a git command. See 'git --help'.
Did you mean this?
commit
λ Imagine ~ → fuck
git commit [enter/↑/↓/ctrl+c]
' is not a ... | I was able to reproduce and find out the bug.
**Buggy Configuration:**
OS: Windows
Terminal: Any *nix shell
Python: Any (Installed on Windows)
When on above configuration, the python uses CRLF for newline, but the shell does not understand CR character. This gives errors while setting the alias and running cor... | 2020-05-11T21:14:24Z | 2020-07-16T21:56:59Z | ["tests/test_types.py::TestRule::test_is_enabled[rules1-exclude_rules1-rule1-False]", "tests/test_types.py::TestRule::test_is_enabled[rules8-exclude_rules8-rule8-False]", "tests/test_types.py::TestRule::test_isnt_match_when_rule_failed", "tests/test_types.py::TestRule::test_is_enabled[rules9-exclude_rules9-rule9-False]... | [] | ["tests/test_types.py::TestCorrectedCommand::test_run[git branch-git branch-override_settings0]", "tests/test_types.py::TestCorrectedCommand::test_run[git brunch-git brunch || fuck --repeat --force-command 'git brunch'-override_settings1]", "tests/test_types.py::TestCorrectedCommand::test_run[git brunch-git brunch || f... | [] | {"install": ["python setup.py develop"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py27,py35,py36,py37,py38\n\n[testenv]\ndeps = -rrequirements.txt\ncommands = pytest --color=no -rA --tb=no -p no:cacheprovider -v --capture=sys\n\n[flake8]\nignore = E501,W503,W504\nexclude = venv,build,.tox,setup.p... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
nvbn/thefuck | nvbn__thefuck-1059 | 2ced7a7f33ae0bec3ffc7a43ce95330bdf6cfcb9 | diff --git a/thefuck/rules/pip_unknown_command.py b/thefuck/rules/pip_unknown_command.py
index 75fcc7caa..2720cda5e 100644
--- a/thefuck/rules/pip_unknown_command.py
+++ b/thefuck/rules/pip_unknown_command.py
@@ -12,8 +12,8 @@ def match(command):
def get_new_command(command):
- broken_cmd = re.findall(r'ERROR: ... | diff --git a/tests/rules/test_pip_unknown_command.py b/tests/rules/test_pip_unknown_command.py
index 22abef269..36d23dafb 100644
--- a/tests/rules/test_pip_unknown_command.py
+++ b/tests/rules/test_pip_unknown_command.py
@@ -4,13 +4,23 @@
@pytest.fixture
-def pip_unknown_cmd():
- return '''ERROR: unknown comman... | Crash when trying to correct `pip un+install thefuck`
The output of `thefuck --version` (something like `The Fuck 3.1 using Python
3.5.0 and Bash 4.4.12(1)-release`):
The Fuck 3.15 using Python 3.7.6
Your system (Debian 7, ArchLinux, Windows, etc.):
Fedora 31
How to reproduce the bug:
1. `pi... | 2020-03-01T01:34:48Z | 2020-03-01T16:40:50Z | ["tests/rules/test_pip_unknown_command.py::test_match", "tests/rules/test_pip_unknown_command.py::test_get_new_command[pip instatl-instatl-install-pip install]"] | [] | ["tests/rules/test_pip_unknown_command.py::test_get_new_command[pip un+install thefuck-un+install-uninstall-pip uninstall thefuck]"] | [] | {"install": ["python setup.py develop"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py27,py35,py36,py37,py38\n\n[testenv]\ndeps = -rrequirements.txt\ncommands = pytest --color=no -rA --tb=no -p no:cacheprovider -v --capture=sys\n\n[flake8]\nignore = E501,W503,W504\nexclude = venv,build,.tox,setup.p... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
spack/spack | spack__spack-42780 | 2d8e0825feb05f082f5dc4b4c3832fc323f7cf07 | diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py
index d2f56dd4a7688..645d989313763 100644
--- a/lib/spack/spack/util/environment.py
+++ b/lib/spack/spack/util/environment.py
@@ -11,6 +11,7 @@
import os.path
import pickle
import re
+import shlex
import sys
from functools impor... | diff --git a/lib/spack/spack/test/util/environment.py b/lib/spack/spack/test/util/environment.py
index ef7c151fee1a0..adf82aa83f4e5 100644
--- a/lib/spack/spack/test/util/environment.py
+++ b/lib/spack/spack/test/util/environment.py
@@ -160,22 +160,13 @@ def test_reverse_environment_modifications(working_env):
ass... | spack build-env doesn't escape backticks in existing env variable values
### Steps to reproduce
```console
$ export SOME_VARIABLE="\`the_answer_to_life_the_universe_and_everything\`"
$ spack build-env --dump myenv.sh zlib
$ source myenv.sh
```
**Background for your entertainment:**
This showed up due to a n... | 2024-02-21T11:52:00Z | 2024-08-16T15:32:48Z | ["lib/spack/spack/test/util/environment.py::test_is_system_path", "lib/spack/spack/test/util/environment.py::test_dump_environment[bash]", "lib/spack/spack/test/util/environment.py::test_prune_duplicate_paths", "lib/spack/spack/test/util/environment.py::test_path_set", "lib/spack/spack/test/util/environment.py::test_fi... | [] | ["lib/spack/spack/test/util/environment.py::test_shell_modifications_are_properly_escaped", "lib/spack/spack/test/util/environment.py::test_reverse_environment_modifications"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval | |
spack/spack | spack__spack-45631 | 327c75386a08e64a94a1ebcfc3583baeca2d6e2a | diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py
index e0542640a2dec..9819d6f4d3039 100644
--- a/lib/spack/docs/conf.py
+++ b/lib/spack/docs/conf.py
@@ -206,6 +206,7 @@ def setup(sphinx):
("py:class", "six.moves.urllib.parse.ParseResult"),
("py:class", "TextIO"),
("py:class", "hashlib._Hash")... | diff --git a/lib/spack/spack/test/cmd/buildcache.py b/lib/spack/spack/test/cmd/buildcache.py
index b634e371165dc..eee8c160f1fb2 100644
--- a/lib/spack/spack/test/cmd/buildcache.py
+++ b/lib/spack/spack/test/cmd/buildcache.py
@@ -12,7 +12,9 @@
import spack.binary_distribution
import spack.cmd.buildcache
+import spac... | Doing "buildcache push" should work on partial environments
### Steps to reproduce
Build a spack environment where one or more specs fail to install (e.g. the "bart" package is currently failing in the develop branch), then try to do a "buildcache push" command to save progress on all the packages that did build succe... | 2024-08-08T13:02:41Z | 2024-08-13T06:12:49Z | [] | [] | ["lib/spack/spack/test/cmd/buildcache.py::test_correct_specs_are_pushed[package-expected2]", "lib/spack/spack/test/cmd/buildcache.py::test_correct_specs_are_pushed[dependencies-expected1]", "lib/spack/spack/test/cmd/buildcache.py::test_buildcache_list_allarch", "lib/spack/spack/test/cmd/buildcache.py::test_buildcache_c... | ["lib/spack/spack/test/oci/integration_test.py::test_buildcache_push_with_base_image_command", "lib/spack/spack/test/cmd/buildcache.py::test_update_key_index[mock_archive0]", "lib/spack/spack/test/oci/integration_test.py::test_best_effort_upload", "lib/spack/spack/test/cmd/buildcache.py::test_push_and_install_with_mirr... | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval | |
spack/spack | spack__spack-45326 | 530639e15fb792911f7900127989b0f294928fb3 | diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index c4251bc22018a0..53d5aa8cfb6f9e 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -1438,16 +1438,14 @@ def condition(
# caller, we won't emit partial facts.
condition_id = next(sel... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index e1076abd103abc..f18e1f6854ee27 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -2609,6 +2609,55 @@ def test_cannot_reuse_host_incompatible_libc(self):
assert len(result.specs) ... | Cannot concretize if an external entry is corrupted
### Steps to reproduce
Add this entry to `packages.yaml`:
```yaml
packages:
gcc:
externals:
- spec: gcc@9.4.0 languages='c,c++,fortran,z'
prefix: /usr
extra_attributes:
compilers:
c: /usr/bin/gcc
cxx: /usr/b... | 2024-07-19T14:51:34Z | 2024-08-05T16:24:57Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_concretize[mpileaks ^mpi@:1]", "lib/spack/spack/test/concretize.py::TestConcretizeEdges::test_virtuals_provided_together_but_only_one_required_in_dag", "lib/spack/spack/test/concretize.py::TestConcretize::test_custom_compiler_version", "lib/spack/spack/test/con... | [] | ["lib/spack/spack/test/concretize.py::TestConcretize::test_corrupted_external_does_not_halt_concretization[mvdefaults@1.0 foo=a,d]", "lib/spack/spack/test/concretize.py::TestConcretize::test_correct_external_is_selected_from_packages_yaml", "lib/spack/spack/test/concretize.py::TestConcretize::test_corrupted_external_do... | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval | |
spack/spack | spack__spack-45268 | 89c0b4accf0655d280f6c84a332cc95a03e90aef | diff --git a/lib/spack/spack/store.py b/lib/spack/spack/store.py
index dc2d5de54b437..8509d728aa596 100644
--- a/lib/spack/spack/store.py
+++ b/lib/spack/spack/store.py
@@ -371,7 +371,6 @@ def use_store(
data.update(extra_data)
# Swap the store with the one just constructed and return it
- ensure_sin... | diff --git a/lib/spack/spack/test/bootstrap.py b/lib/spack/spack/test/bootstrap.py
index 5f11e2d381e63..f0d11d41247e4 100644
--- a/lib/spack/spack/test/bootstrap.py
+++ b/lib/spack/spack/test/bootstrap.py
@@ -228,3 +228,25 @@ def test_source_is_disabled(mutable_config):
spack.config.add("bootstrap:trusted:{0}:{1}"... | Bootstrap always tries to write to the default install tree root path in activated Spack environment
### Steps to reproduce
If we activate a Spack environment with an existing `spack.yaml` that has both a defined `config` `install_tree` `root` in a personal location writable to the user and an `upstream` section:
... | OK, an update.
I decided to try this again with a local clone of Spack from GitHub to a location that is r/w for me. When I activate the Spack env from the same YAML, then run `spack spec` without a config scope, it works, and I noticed it creates the following directory inside the cloned version of Spack:
```
o... | 2024-07-17T09:53:59Z | 2024-07-18T05:18:15Z | ["lib/spack/spack/test/bootstrap.py::test_nested_use_of_context_manager", "lib/spack/spack/test/bootstrap.py::test_raising_exception_executables_in_path", "lib/spack/spack/test/bootstrap.py::test_store_is_restored_correctly_after_bootstrap", "lib/spack/spack/test/bootstrap.py::test_store_path_customization[/opt/spack/b... | [] | ["lib/spack/spack/test/bootstrap.py::test_use_store_does_not_try_writing_outside_root", "lib/spack/spack/test/bootstrap.py::test_source_is_disabled"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-45263 | 89c0b4accf0655d280f6c84a332cc95a03e90aef | diff --git a/lib/spack/spack/environment/environment.py b/lib/spack/spack/environment/environment.py
index e0002fd0ee39b..65a08ff7fa456 100644
--- a/lib/spack/spack/environment/environment.py
+++ b/lib/spack/spack/environment/environment.py
@@ -5,6 +5,7 @@
import collections
import collections.abc
import contextlib
... | diff --git a/lib/spack/spack/test/env.py b/lib/spack/spack/test/env.py
index c09393376a175..46be9ca66c864 100644
--- a/lib/spack/spack/test/env.py
+++ b/lib/spack/spack/test/env.py
@@ -841,3 +841,28 @@ def test_root_version_weights_for_old_versions(mutable_mock_env_path, mock_packa
assert bowtie.satisfies("@=1.3... | Symlinking environment view to /usr/local seems broken
### Steps to reproduce
Build this Dockerfile:
```Dockerfile
FROM ubuntu:latest AS dev
USER root
ENV DEBIAN_FRONTEND=noninteractive \
LANGUAGE=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8
WORKDIR /root
# Install Spack dependencie... | This issue appears when (because) /usr/local already exists, is a directory, and isn't empty. In that case, spack won't remove it. Exception [IsADirectoryError](https://docs.python.org/3.10/library/exceptions.html#IsADirectoryError) is raised in https://github.com/spack/spack/blob/7c1a3094536730be698809daf2c3df267dd8a9... | 2024-07-17T00:04:34Z | 2024-07-17T21:17:30Z | ["lib/spack/spack/test/env.py::test_environment_concretizer_scheme_used[False-True]", "lib/spack/spack/test/env.py::test_update_default_complex_view[\\nspack:\\n specs:\\n - mpileaks\\n view:\\n default:\\n root: ./view-gcc\\n select: ['%gcc']\\n link_type: symlink\\n-True-expected_view1]", "lib/sp... | [] | ["lib/spack/spack/test/env.py::test_env_view_on_non_empty_dir_errors", "lib/spack/spack/test/env.py::test_env_view_on_empty_dir_is_fine", "lib/spack/spack/test/env.py::test_root_version_weights_for_old_versions"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-44834 | 4bbf4a5e79483f9b2cd7e4f3b778b33da1f6f76a | diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index df1c7337290016..021e5872b2d335 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -3234,6 +3234,39 @@ def requires(self, impose: str, *, when: str):
self.runtime_conditions.add((imposed_spec, when_sp... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index 547e3209eb1bbb..0c3f80d9c1d489 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -1767,21 +1767,21 @@ def test_reuse_with_unknown_package_dont_raise(self, tmpdir, temporary_store, mo
... | Concretizer does not constrain child nodes to use a runtime version lower or equal to parent
Hi,
the new feature for tracking the compiler runtime #43190 looks very promising for solving some strange problems and ensuring consistency.
Currently (develop from 2024-05-29, 70412612c79af495fb2b2223edac4bd5a70a813a) s... | Minimal example:
```shell
> spack env create --without-view test_gcc9
==> Created environment test_gcc9 in: /home/zoel_ml/spack_tmp/var/spack/environments/test_gcc9
==> Activate with: spack env activate test_gcc9
> spack -e test_gcc9 add boost%gcc@9.4.0
==> Adding boost%gcc@9.4.0 to environment test_gcc9
> spack... | 2024-06-24T08:07:16Z | 2024-06-27T12:58:42Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_concretize[mpileaks ^mpi@:1]", "lib/spack/spack/test/concretize.py::TestConcretizeEdges::test_virtuals_provided_together_but_only_one_required_in_dag", "lib/spack/spack/test/concretize.py::TestConcretize::test_custom_compiler_version", "lib/spack/spack/test/con... | [] | ["lib/spack/spack/test/concretize_compiler_runtimes.py::test_reusing_specs_with_gcc_runtime[a%gcc@10.2.1-b%gcc@9.4.0 target=x86_64-expected3-2]", "lib/spack/spack/test/concretize_compiler_runtimes.py::test_reusing_specs_with_gcc_runtime[a%gcc@9.4.0-b%gcc@10.2.1-expected1-1]", "lib/spack/spack/test/concretize_compiler_r... | ["var/spack/repos/compiler_runtime.test/packages/gcc/package.py::test_part"] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-44374 | 24e1b56268898383f534906ebc2567c94c6fa280 | diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py
index 755fab7fa67ac..69de44df57c3c 100644
--- a/lib/spack/spack/cmd/install.py
+++ b/lib/spack/spack/cmd/install.py
@@ -61,7 +61,6 @@ def install_kwargs_from_args(args):
"dependencies_use_cache": cache_opt(args.use_cache, dep_use_bc),... | diff --git a/lib/spack/spack/test/buildtask.py b/lib/spack/spack/test/buildtask.py
index a571e1dccd1c6..569bfc56d888d 100644
--- a/lib/spack/spack/test/buildtask.py
+++ b/lib/spack/spack/test/buildtask.py
@@ -12,21 +12,21 @@
def test_build_task_errors(install_mockery):
with pytest.raises(ValueError, match="must... | Spack does not generate modules for already installed, implicit packages
### Steps to reproduce
This originated from https://spackpm.slack.com/archives/C5W7NKZJT/p1710254261915679.
Assuming I have, exclude_implicits:true and two product A and B, with A that depends on B. I could use tcl or lmod (it does not matter)... | 2024-05-24T14:08:32Z | 2024-05-29T06:25:34Z | ["lib/spack/spack/test/installer.py::test_dump_packages_deps_errs", "lib/spack/spack/test/installer.py::test_package_id_err", "lib/spack/spack/test/installer.py::test_try_install_from_binary_cache", "lib/spack/spack/test/installer.py::test_combine_phase_logs", "lib/spack/spack/test/installer.py::test_print_install_test... | [] | ["lib/spack/spack/test/installer.py::test_setup_install_dir_grp", "lib/spack/spack/test/installer.py::test_install_fail_on_interrupt", "lib/spack/spack/test/installer.py::test_ensure_locked_err", "lib/spack/spack/test/installer.py::test_update_failed_no_dependent_task", "lib/spack/spack/test/installer.py::test_install_... | ["lib/spack/spack/test/installer.py::test_clear_failures_errs - Assertio..."] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval | |
spack/spack | spack__spack-44316 | 7503a417731910d918a7863d1862f62c9b76429d | diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index 0083dbc070b13..094ebaf170e81 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -1939,6 +1939,11 @@ def _spec_clauses(
for virtual in virtuals:
clauses.append(fn.attr("virtual_on... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index 797c865a4f63d..0b4ce5b42a8f0 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -2546,6 +2546,30 @@ def test_include_specs_from_externals_and_libcs(
assert result["deprecated-ve... | Cannot reuse specs with externals on linux
### Steps to reproduce the issue
```console
spack spec -I hdf5@1.14.3 +fortran +mpi %oneapi@2022.2.1 ^intel-oneapi-mpi/zfmfvyc
spack spec fftw@3.3.10 %oneapi@2022.2.1 ^intel-oneapi-mpi@2021.7.1/zfmfvyc
```
### Error message
<details>
<summary>Error message... | Todd and Harmen have been working this issue from an alternative angle, just openmpi instead of intel compiler + intel mpi:
```console
$ spack spec openmpi@4.1.6~atomics~cuda~cxx~cxx_exceptions~gpfs~internal-hwloc~internal-libevent~internal-pmix~java~legacylaunchers~lustre~memchecker~openshmem~orterunprefix+pmi~romio... | 2024-05-22T14:47:08Z | 2024-05-23T12:37:48Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_concretize[mpileaks ^mpi@:1]", "lib/spack/spack/test/concretize.py::TestConcretizeEdges::test_virtuals_provided_together_but_only_one_required_in_dag", "lib/spack/spack/test/concretize.py::TestConcretize::test_custom_compiler_version", "lib/spack/spack/test/con... | [] | ["lib/spack/spack/test/concretize.py::TestConcretize::test_can_reuse_concrete_externals_for_dependents"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-44272 | 21139945dfca0650229038d2310c10ef6982255f | diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp
index 60165338c66280..4d8a202ce331bb 100644
--- a/lib/spack/spack/solver/concretize.lp
+++ b/lib/spack/spack/solver/concretize.lp
@@ -1432,11 +1432,11 @@ opt_criterion(73, "deprecated versions used").
% 1. Version weight
% 2. Num... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index bfa774e3f40fc9..797c865a4f63dd 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -1914,11 +1914,11 @@ def test_version_weight_and_provenance(self):
libc_offset = 1 if spack.s... | v0.22 concretizer yields suboptimal fresh concrete specs
### Steps to reproduce
When the `spack.yaml` file defining the environment `test` is as follows:
```yaml
spack:
specs:
- lcov@1
- vtk@9.1
```
then the v0.22 concretizer selects the version 1.15 of `lcov` even if a version 1.16 is available.
```cons... | Bisected to 89fc9a9d47108c5d34f3f5180eb10d5253689c29, which just adds new versions and deps, not immediately useful.
edit: just removing version 2.0 from lcov is sufficient to have it pick up 1.16 on `@1`.
I can reproduce too. The optimization weights when `@1.16` is forced say:
```
==> Best of 7 considered soluti... | 2024-05-20T14:14:02Z | 2024-05-21T06:41:10Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_concretize[mpileaks ^mpi@:1]", "lib/spack/spack/test/concretize.py::TestConcretizeEdges::test_virtuals_provided_together_but_only_one_required_in_dag", "lib/spack/spack/test/concretize.py::TestConcretize::test_custom_compiler_version", "lib/spack/spack/test/con... | [] | ["lib/spack/spack/test/concretize.py::TestConcretize::test_version_weight_and_provenance", "lib/spack/spack/test/env.py::test_root_version_weights_for_old_versions"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-44093 | 762833a663ba67868ff2e715ec1ccd3c7538b3d9 | diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index 0d84c539705c3..46e892a835cc9 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -1649,11 +1649,15 @@ def external_packages(self):
if isinstance(reuse_yaml, typing.Mapping):
default_inclu... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index f0b92c98f58a2..bfa774e3f40fc 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -2464,6 +2464,7 @@ def test_spec_with_build_dep_from_json(self, tmp_path):
assert s["dttop"].dag_ha... | Cannot filter external specs using `reuse:from`
### Steps to reproduce
Originally reported by @pranav-sivaraman on Slack.
The following environment fails to concretize:
```yaml
spack:
specs:
- flap
view: true
concretizer:
unify: true
reuse:
from:
- type: external
inclu... | This diff fixes the issue, and makes the external selected by default even if deprecated:
```diff
diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index 0d84c53970..3c8f385a29 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -1649,11 +1649,13 @@ def exter... | 2024-05-09T08:17:58Z | 2024-05-09T16:50:15Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_concretize[mpileaks ^mpi@:1]", "lib/spack/spack/test/concretize.py::TestConcretizeEdges::test_virtuals_provided_together_but_only_one_required_in_dag", "lib/spack/spack/test/concretize.py::TestConcretize::test_custom_compiler_version", "lib/spack/spack/test/con... | [] | ["lib/spack/spack/test/concretize.py::TestConcretize::test_include_specs_from_externals_and_libcs[included_externals1]", "lib/spack/spack/test/concretize.py::TestConcretize::test_include_specs_from_externals_and_libcs[included_externals0]"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-44042 | fd3cd3a1c6a7147c1a84d6a8415800c8f079c5c6 | diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index e3dd3ca6df9e2..6b2205a6bba97 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -944,14 +944,26 @@ class ConcreteSpecsByHash(collections.abc.Mapping):
def __init__(self) -> None:
self.data: Di... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index 009d9b6a3676f..f0b92c98f58a2 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -2463,6 +2463,46 @@ def test_spec_with_build_dep_from_json(self, tmp_path):
s = Spec(f"dtuse ^{str(... | Exclude/include rules are not always applied when filtering reused specs
### Steps to reproduce
When concretizing the following environment
```yaml
spack:
specs:
- libvterm
view: true
concretizer:
unify: true
reuse:
from:
- type: buildcache
exclude:
- libtool
... | 2024-05-06T21:32:30Z | 2024-05-07T07:06:51Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_concretize[mpileaks ^mpi@:1]", "lib/spack/spack/test/concretize.py::TestConcretizeEdges::test_virtuals_provided_together_but_only_one_required_in_dag", "lib/spack/spack/test/concretize.py::TestConcretize::test_custom_compiler_version", "lib/spack/spack/test/con... | [] | ["lib/spack/spack/test/concretize.py::TestConcretize::test_exclude_specs_from_reuse"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval | |
spack/spack | spack__spack-40773 | c1cea9d304206cedaafedd512642e3287a2e2858 | diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst
index f26c6e56839af..e49ca3073ef97 100644
--- a/lib/spack/docs/basic_usage.rst
+++ b/lib/spack/docs/basic_usage.rst
@@ -865,7 +865,7 @@ There are several different ways to use Spack packages once you have
installed them. As you've seen, spack... | diff --git a/lib/spack/spack/test/cmd/extensions.py b/lib/spack/spack/test/cmd/extensions.py
index 1f6ed95b56446..5869e466422a0 100644
--- a/lib/spack/spack/test/cmd/extensions.py
+++ b/lib/spack/spack/test/cmd/extensions.py
@@ -33,21 +33,23 @@ def check_output(ni):
packages = extensions("-s", "packages", ... | `pkg.windows_establish_runtime_linkage()` runs in the wrong place
Missed in review of https://github.com/spack/spack/pull/31930
The following
https://github.com/spack/spack/blob/9c4e44a0ad2a65f12a8cc4ee88729208ab78844b/lib/spack/spack/installer.py#L1694-L1697
is executed after post install hooks are run, but m... |
I have another issue to track down, i.e. a system `python2` that:
```console
Python 2.7.18 (default, Mar 8 2021, 13:02:45)
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from sysconfig import get_paths
>>> get_paths()
{'platinclude': '/usr/local/include/python... | 2023-10-30T11:42:26Z | 2024-05-06T14:17:36Z | [] | [] | ["lib/spack/spack/test/cmd/extensions.py::test_extensions_raises_if_multiple_specs", "lib/spack/spack/test/cmd/extensions.py::test_extensions_raises_if_not_extendable", "lib/spack/spack/test/cmd/extensions.py::test_extensions_no_arguments", "lib/spack/spack/test/cmd/extensions.py::test_extensions"] | ["var/spack/repos/duplicates.test/packages/python-venv/package.py::test_part"] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-42782 | 7f2cedd31fa83e404c9701d93c9496d6d1824e4e | diff --git a/lib/spack/docs/build_settings.rst b/lib/spack/docs/build_settings.rst
index f58c9f4c9772e7..d545c70d18dcb3 100644
--- a/lib/spack/docs/build_settings.rst
+++ b/lib/spack/docs/build_settings.rst
@@ -21,23 +21,86 @@ is the following:
Reuse already installed packages
--------------------------------
-The ... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index f69ab54a586a0f..cf20934a00e84f 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -2823,3 +2823,78 @@ def test_concretization_version_order():
Version("develop"), # likely develo... | Fine-Grained Control over the reuse-process
### Summary
So, as I mentioned on the Slack, I would like to have all specs with a specific `target=<desc>` at the root be concretized with that target enforced for all dependencies. So I want to disable reusing non-target dependencies I'd argue.
Where should I start? Wou... | > So, as I mentioned on the Slack, I would like to have all specs with a specific target=<desc> at the root be concretized with that target enforced for all dependencies
Can you be more specific by, e.g. providing one or more concrete use cases? Asking because, depending on the complexity of what you need, this migh... | 2024-02-21T13:01:12Z | 2024-05-02T03:05:26Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_concretize[mpileaks ^mpi@:1]", "lib/spack/spack/test/concretize.py::TestConcretizeEdges::test_virtuals_provided_together_but_only_one_required_in_dag", "lib/spack/spack/test/concretize.py::TestConcretize::test_custom_compiler_version", "lib/spack/spack/test/con... | [] | ["lib/spack/spack/test/concretize.py::test_selecting_reused_sources[reuse_yaml1-0]", "lib/spack/spack/test/concretize.py::test_spec_filters[specs1-include1-exclude1-expected1]", "lib/spack/spack/test/concretize.py::test_filtering_reused_specs[roots0-reuse_yaml0-expected0-not_expected0-2]", "lib/spack/spack/test/concret... | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-43758 | 98c08d277d0a2176aaa8acb3d2b6314ef680b2be | diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index 9e1e86bfe4987..22d6994e4c071 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -1610,6 +1610,7 @@ def external_imposition(input_spec, requirements):
self.gen.newline()
self.tr... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index f897230088a96..db675231505c6 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -2398,6 +2398,19 @@ def test_reuse_specs_from_non_available_compilers(self, mutable_config, mutable_
... | Cannot concretize when specifying `platform=` in externals
### Steps to reproduce
This environment fails to concretize:
```yaml
spack:
specs:
- hwloc
view: false
concretizer:
unify: true
packages:
hwloc:
externals:
- spec: hwloc@2.2.0 platform=linux
prefix: /usr
... | @becker33 @alalazo could it be this commit here?
https://github.com/spack/spack/commit/9963e2a20ca1b381ff5e6a3d316c200e01dd0766
@becker33 @scheibelp @alalazo
I believe that this is the same bug that I am hitting.
The issue is specific to `platform=` specification. Minimal reproducer is:
```yaml
spack:
specs:
... | 2024-04-20T08:49:42Z | 2024-04-22T07:15:22Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_concretize[mpileaks ^mpi@:1]", "lib/spack/spack/test/concretize.py::TestConcretizeEdges::test_virtuals_provided_together_but_only_one_required_in_dag", "lib/spack/spack/test/concretize.py::TestConcretize::test_custom_compiler_version", "lib/spack/spack/test/con... | [] | ["lib/spack/spack/test/concretize.py::TestConcretize::test_externals_with_platform_explicitly_set"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-43593 | 07fb83b493d522ef5369e4db565841674b4512c1 | diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 6c4db38ba1170e..52fc8f524d1c4e 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -47,7 +47,8 @@ SPACK_F77_RPATH_ARG
SPACK_FC_RPATH_ARG
SPACK_LINKER_ARG
SPACK_SHORT_SPEC
-SPACK_SYSTEM_DIRS"
+SPACK_SYSTEM_DIRS
+SPACK_MANAGED_DIRS"
# Optional parameters th... | diff --git a/lib/spack/spack/test/build_environment.py b/lib/spack/spack/test/build_environment.py
index 1f2d9e904fd890..cb47ee5977ca1e 100644
--- a/lib/spack/spack/test/build_environment.py
+++ b/lib/spack/spack/test/build_environment.py
@@ -63,7 +63,8 @@ def build_environment(working_env):
os.environ["SPACK_LINK... | Installation issue: gperftools
### Steps to reproduce the issue
```console
spack install gperftools
```
### Information on your system
* **Spack:** 0.16.2-3914-fbed679dd0
* **Python:** 3.9.6
* **Platform:** linux-ubuntu20.04-skylake
* **Concretizer:** original
### Additional information
Basically, this hits... | I can try to have a go at this. It looks like CMake support was added in 2.8.1 though, and I don't know if it's possible to support autotools for the older versions while using CMake for the newer versions? I'd be ok with dropping the older versions but I don't know if someone else needs them to stay around? I take it ... | 2024-04-11T09:02:40Z | 2024-04-20T17:23:37Z | [] | [] | ["lib/spack/spack/test/build_environment.py::test_compiler_config_modifications[initial2-modifications2-expected2]", "lib/spack/spack/test/build_environment.py::test_compiler_config_modifications[initial4-modifications4-expected4]", "lib/spack/spack/test/cc.py::test_system_path_cleanup", "lib/spack/spack/test/build_env... | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-43710 | b362362291816679873d5f2dad37a31748d7e42c | diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp
index 5cabd60be30d7..022c6abe7803f 100644
--- a/lib/spack/spack/solver/concretize.lp
+++ b/lib/spack/spack/solver/concretize.lp
@@ -127,10 +127,12 @@ trigger_node(TriggerID, Node, Node) :-
trigger_condition_holds(TriggerID, Node... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index acc2d0f4e5547..f897230088a96 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -2536,6 +2536,29 @@ def test_no_multiple_solutions_with_different_edges_same_nodes(self):
assert le... | Concretization error related to py-cython
### Steps to reproduce
I encountered this when building a more extensive stack but without any version specifications; this is a simplified reproducer of the same error, which seems to have something to do with py-cython.
```console
git clone https://github.com/spack/spack... | Short version: `apptainer ^py-cython@0.29` picks `^py-cython@3` somewhere down the line.
But how would apptainer possibly depend on py-cython? Was the `^` intentional?
SingularityBase (singularityce/package.py) depends on libseccomp, which has py-cython as a dependency (type=build).
Bisected to cbc39977ca03634f7a6... | 2024-04-17T21:54:26Z | 2024-04-18T15:27:12Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_concretize[mpileaks ^mpi@:1]", "lib/spack/spack/test/concretize.py::TestConcretizeEdges::test_virtuals_provided_together_but_only_one_required_in_dag", "lib/spack/spack/test/concretize.py::TestConcretize::test_custom_compiler_version", "lib/spack/spack/test/con... | [] | ["lib/spack/spack/test/concretize.py::TestConcretizeSeparately::test_specifying_different_versions_build_deps"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-43676 | 9a6c0133658ce0905ff1565160faea3fc69ba9b2 | diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp
index 5f8163c61b2de..5cabd60be30d7 100644
--- a/lib/spack/spack/solver/concretize.lp
+++ b/lib/spack/spack/solver/concretize.lp
@@ -891,12 +891,8 @@ error(100, "{0} variant '{1}' cannot have values '{2}' and '{3}' as they come fr
... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index d7df2d6bc88b2..acc2d0f4e5547 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -1350,6 +1350,22 @@ def test_reuse_installed_packages_when_package_def_changes(
# Structure and pac... | Reuse can prevent specs from concretizing
### Steps to reproduce
Using the following db:
[spack-db.develop.7e14ff806a.2024-04-15-151420.tar.gz](https://github.com/spack/spack/files/14979489/spack-db.develop.7e14ff806a.2024-04-15-151420.tar.gz)
The following fails:
```console
> spack spec gdal+mdb
```
where... | The issue is that `gdal@=3.8.3` is reused by the solver, which lacks `+mdb` because it's a conditional variant `when="@:3.4"`. Will investigate why that happens. | 2024-04-16T10:59:52Z | 2024-04-16T16:09:32Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_concretize[mpileaks ^mpi@:1]", "lib/spack/spack/test/concretize.py::TestConcretizeEdges::test_virtuals_provided_together_but_only_one_required_in_dag", "lib/spack/spack/test/concretize.py::TestConcretize::test_custom_compiler_version", "lib/spack/spack/test/con... | [] | ["lib/spack/spack/test/concretize.py::TestConcretize::test_no_reuse_when_variant_condition_does_not_hold"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-43424 | a05eb11b7bd4e7bc57cfe0d9c2098fdd3debca73 | diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py
index 915327e3b49f7..7cfcd35150b0b 100644
--- a/lib/spack/spack/installer.py
+++ b/lib/spack/spack/installer.py
@@ -2274,11 +2274,15 @@ def __init__(self, pkg: "spack.package_base.PackageBase", install_args: dict):
# whether to install so... | diff --git a/lib/spack/spack/test/cmd/dev_build.py b/lib/spack/spack/test/cmd/dev_build.py
index 3e6631cf51ee0..88b85dc1dd9ab 100644
--- a/lib/spack/spack/test/cmd/dev_build.py
+++ b/lib/spack/spack/test/cmd/dev_build.py
@@ -20,7 +20,10 @@
install = SpackCommand("install")
env = SpackCommand("env")
-pytestmark = py... | spack develop build_stage directory
### Steps to reproduce
The build directory doesn't persist or is deleted randomly for developed specs in an anonymous environment.
Here is a minimal reproducer:
```
wget https://prdownloads.sourceforge.net/lzmautils/files/xz-5.4.6.tar.bz2
tar xf xz-5.4.6.tar.bz2
spack env c... | 2024-03-28T19:00:48Z | 2024-03-29T16:36:31Z | ["lib/spack/spack/test/cmd/env.py::test_bad_env_yaml_create_fails[ConfigFormatError-'specks' was unexpected-spack:\\n specks:\\n - libdwarf\\n]", "lib/spack/spack/test/cmd/env.py::test_view_link_roots[mock_archive0]", "lib/spack/spack/test/cmd/env.py::test_env_include_packages_url", "lib/spack/spack/test/cmd/env.py... | [] | ["lib/spack/spack/test/stage.py::TestDevelopStage::test_develop_stage", "lib/spack/spack/test/cmd/env.py::test_install_develop_keep_stage[mock_archive0]"] | ["lib/spack/spack/test/cmd/env.py::test_view_link_type[mock_archive0-copy]"] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval | |
spack/spack | spack__spack-43143 | 48183b37beadd6bcd57d39d58b3cd8c825dab583 | diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index 0ae359c00699b6..c2524b1223c992 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -823,11 +823,12 @@ def on_model(model):
print("Statistics:")
pprint.pprint(self.control.statistics)
... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index 1c1444423b7f77..b12fbfb9107dbd 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -2114,6 +2114,15 @@ def test_unsolved_specs_raises_error(self, monkeypatch, mock_packages, config):
... | Internal error when requesting a compiler that is not available
### Steps to reproduce
Try to concretize:
```console
$ spack spec zlib-ng %nvhpc
```
with no `nvhpc` compiler available
### Error message
Spack will prompt the following:
```console
$ spack spec zlib-ng %nvhpc
==> Error: Internal Spack error: the... | @scheibelp We likely introduced this in #42655 | 2024-03-12T14:34:58Z | 2024-03-14T20:47:56Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_concretize[mpileaks ^mpi@:1]", "lib/spack/spack/test/concretize.py::TestConcretizeEdges::test_virtuals_provided_together_but_only_one_required_in_dag", "lib/spack/spack/test/concretize.py::TestConcretize::test_custom_compiler_version", "lib/spack/spack/test/con... | [] | ["lib/spack/spack/test/concretize.py::TestConcretize::test_clear_error_when_unknown_compiler_requested"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-43100 | ee1fa3e50c1d9dce481572a69fb255f8ca3cee6b | diff --git a/lib/spack/spack/builder.py b/lib/spack/spack/builder.py
index 4119062ab6bc5..00734d5533796 100644
--- a/lib/spack/spack/builder.py
+++ b/lib/spack/spack/builder.py
@@ -9,6 +9,8 @@
import inspect
from typing import List, Optional, Tuple
+from llnl.util import lang
+
import spack.build_environment
#:... | diff --git a/lib/spack/spack/test/builder.py b/lib/spack/spack/test/builder.py
index 9a99e6ee08cf4..4bd128c3bfb31 100644
--- a/lib/spack/spack/test/builder.py
+++ b/lib/spack/spack/test/builder.py
@@ -164,3 +164,20 @@ def test_install_time_test_callback(tmpdir, config, mock_packages, mock_stage):
with open(s.packa... | Builders fail to account for run_after callbacks, when using mixins
### Steps to reproduce
The following is expected to run `make check`
```console
$ spack install --test=root netcdf-c
```
but it doesn't. Issue reported by @skosukhin in DM.
### Error message
No error message, just some expected function calls ar... | A first diff to solve this issue:
```diff
diff --git a/lib/spack/spack/builder.py b/lib/spack/spack/builder.py
index 4119062ab6..d85d95284d 100644
--- a/lib/spack/spack/builder.py
+++ b/lib/spack/spack/builder.py
@@ -230,11 +230,6 @@ class PhaseCallbacksMeta(type):
def __new__(mcs, name, bases, attr_dict):
... | 2024-03-08T17:25:55Z | 2024-03-11T19:48:21Z | ["lib/spack/spack/test/cmd/list.py::test_list_filter", "lib/spack/spack/test/cmd/list.py::test_list_repos", "lib/spack/spack/test/builder.py::test_callbacks_and_installation_procedure[inheritance@1.0-expected_values2]", "lib/spack/spack/test/builder.py::test_callbacks_and_installation_procedure[callbacks@2.0-expected_v... | [] | ["lib/spack/spack/test/builder.py::test_mixins_with_builders"] | ["var/spack/repos/builder.test/packages/builder-and-mixins/package.py::test_part"] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-42696 | a2ad2d1c9f91812a0f23edade96e010bdcc53383 | diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py
index a854b864da783..c2f0567d22fb0 100644
--- a/lib/spack/spack/database.py
+++ b/lib/spack/spack/database.py
@@ -1687,7 +1687,11 @@ def root(key, record):
with self.read_transaction():
roots = [rec.spec for key, rec in self._d... | diff --git a/lib/spack/spack/test/cmd/gc.py b/lib/spack/spack/test/cmd/gc.py
index b9d39567f4cc3..05f7a111adf0a 100644
--- a/lib/spack/spack/test/cmd/gc.py
+++ b/lib/spack/spack/test/cmd/gc.py
@@ -6,9 +6,11 @@
import pytest
+import spack.deptypes as dt
import spack.environment as ev
import spack.main
import spa... | `spack gc` does nothing for several minutes, then exits
### Steps to reproduce
```console
$ spack gc
-- darwin-sonoma-m1 / apple-clang@15.0.0 ------------------------
zwr44p6 autoconf@2.69 yg5a2oh gmake@4.4.1 kyfcphh py-flit-core@3.9.0
7rgw5gc autoconf-archive@2023.02.20... | Thanks for the report! Do you have any reproducer? Can you provide a stacktrace using `spack -d gc` ?
Stuck on getting a write lock for the DB? Then you should see timeouts with the `-d` flag.
Here is the output with `-d`:
```console
$ spack -d gc
==> [2024-01-29-11:04:48.843439] Reading config from file /Users/ben... | 2024-02-15T12:22:41Z | 2024-02-22T04:21:39Z | ["lib/spack/spack/test/cmd/gc.py::test_gc_except_any_environments", "lib/spack/spack/test/cmd/gc.py::test_gc_except_specific_environments", "lib/spack/spack/test/cmd/gc.py::test_gc_with_environment", "lib/spack/spack/test/cmd/gc.py::test_gc_without_build_dependency", "lib/spack/spack/test/cmd/gc.py::test_gc_except_none... | [] | ["lib/spack/spack/test/cmd/gc.py::test_gc_with_build_dependency", "lib/spack/spack/test/cmd/gc.py::test_gc_with_build_dependency_in_environment", "lib/spack/spack/test/cmd/gc.py::test_gc_except_specific_dir_env"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-42281 | 2721b4c10d27afde281ea0cdb0480a7343ce0863 | diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 767a69ee6751ea..13048bd094264a 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -1636,23 +1636,23 @@ def _add_dependency(self, spec: "Spec", *, depflag: dt.DepFlag, virtuals: Tuple[
self.add_dependency_edge(spec, depf... | diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py
index c421494ce81720..49f6de3b65ee58 100644
--- a/lib/spack/spack/test/spec_syntax.py
+++ b/lib/spack/spack/test/spec_syntax.py
@@ -523,6 +523,23 @@ def _specfile_for(spec_str, filename):
],
"^[virtuals=mpi]... | quantum-espresso concretizes other providers than intel-oneapi-mkl for scalapack unless +cluster spec is used
### Steps to reproduce
I am building quantum espresso from the recipe in the following environment
```
spack:
specs:
- gcc
- openmpi
- intel-oneapi-mkl
- quantum-espresso+mpi+openmp+... | > Are scalapack not available from the intel-oneapi-mkl package without +cluster spec?
That is true:
https://github.com/spack/spack/blob/66813460c0777a4a2bbeb071db3cd7318f382811/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py#L133
but maybe @rscohn2 can comment more on why.
The scalapack library is ... | 2024-01-25T10:28:29Z | 2024-01-26T08:48:54Z | ["lib/spack/spack/test/spec_syntax.py::test_platform_is_none_if_not_present[os=redhat6]", "lib/spack/spack/test/spec_syntax.py::test_error_conditions[x target=fe target=be-DuplicateArchitectureError]", "lib/spack/spack/test/spec_syntax.py::test_parse_single_spec[cflags==\"-O3 -g\"-tokens63-cflags=='-O3 -g']", "lib/spac... | [] | ["lib/spack/spack/test/spec_syntax.py::test_parse_single_spec[^[virtuals=mpi] openmpi+foo ^[virtuals=lapack] openmpi+bar-tokens71-^[virtuals=lapack,mpi] openmpi+bar+foo]"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-42253 | 61421b3a67941f5c91239360b4d7d3ee5c3428df | diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index 0f38331412cd0..bed0c86e80480 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -1863,15 +1863,12 @@ def external_packages(self):
for local_idx, spec in enumerate(external_specs):
... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index b6ddf6c4dd68a..2372609b0e62c 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -1522,6 +1522,30 @@ def test_sticky_variant_in_package(self):
s = Spec("sticky-variant %clang").con... | Sticky variants seem to not be working with externals
### Steps to reproduce
Create environment file with an external cuda and clang that are unsupported together (clang@16.0.6 and cuda@12.2.2).
Partial `spack.yaml`:
```
'compilers:':
- compiler:
environment: {}
extra_rpaths: []
flags:
... | I was able to narrow this down to being specific to externals. `spack spec cuda+allow-unsupported-compilers` works.
Exact same issue was reported by @finkandreas. Users expect the `buildable: false` + `spec: x +sticky_variant` to be enough.
I have a candidate patch for this that I've given to @white238 to ensure it wo... | 2024-01-23T21:57:47Z | 2024-01-25T16:22:23Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_no_compilers_for_arch", "lib/spack/spack/test/concretize.py::TestConcretize::test_external_package_versions[external-buildable-with-variant@0.9 +baz-True-@0.9]", "lib/spack/spack/test/concretize.py::TestConcretize::test_newer_dependency_adds_a_transitive_virtua... | [] | ["lib/spack/spack/test/concretize.py::test_reusable_externals_different_spec", "lib/spack/spack/test/concretize.py::TestConcretize::test_sticky_variant_in_external[sticky-variant@1.0+allow-gcc-True]"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-42088 | d95bcd8d85a37ee8c09e85a051564d571c68a4c7 | diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index 0f38331412cd0..6881b51f2778b 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -1740,9 +1740,10 @@ def provider_requirements(self):
rules = self._rules_from_requirements(
virtua... | diff --git a/lib/spack/spack/test/concretize_requirements.py b/lib/spack/spack/test/concretize_requirements.py
index 7b8f825eaed26..3a6b2b75c40a0 100644
--- a/lib/spack/spack/test/concretize_requirements.py
+++ b/lib/spack/spack/test/concretize_requirements.py
@@ -1012,3 +1012,26 @@ def test_default_requirements_semant... | Requirements ignored for a package providing multiple virtuals
### Steps to reproduce
Create an environment for `dla-future+scalapack` and require that all BLAS, LAPACK and SCALAPACK providers are provided by `intel-oneapi-mkl`.
```console
spack env create -d .
spack -e . add dla-future+scalapack
spack -e . co... | Confirmed. Thanks for the reproducer.
The current facts that are emitted for the solver are:

These are probably too coarse when the node is also used as a provider of something else, since ther... | 2024-01-15T15:54:57Z | 2024-01-16T10:50:34Z | ["lib/spack/spack/test/concretize_requirements.py::test_requirements_and_deprecated_versions[True-expected0-not_expected0]", "lib/spack/spack/test/concretize_requirements.py::test_default_requirements_semantic[\\n packages:\\n all:\\n require:\\n - one_of: [\"+shared\"]\\n ]", "... | [] | ["lib/spack/spack/test/concretize_requirements.py::test_requiring_package_on_multiple_virtuals"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-41957 | 6753cc0b814d80ab240d6aebf6d756497dd046d3 | diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py
index 92c456f7fe252a..a2176565fe1701 100644
--- a/lib/spack/spack/package_base.py
+++ b/lib/spack/spack/package_base.py
@@ -24,6 +24,7 @@
import textwrap
import time
import traceback
+import typing
import warnings
from typing import Any... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index b6ddf6c4dd68ae..70743d8704407d 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -2207,6 +2207,33 @@ def test_reuse_python_from_cli_and_extension_from_db(self, mutable_database):
... | Namespace is ignored depending on the repo order in repos.yaml
### Steps to reproduce
We want to have the same package (e.g. `zlib` here) in two repos, where the `builtin` repository is the default one and `myrepo` to have less priority.
I start from scratch:
```console
$ cd $SCRATCH
$ git clone -c feature.many... | I think originally namespaces were meant to act as overlays, even though I am not sure if that is written anywhere. We should probably define the semantic more rigorously, document it and enforce its behavior with tests. @tgamblin @haampie fyi
I'll start adding references, as this seems similar to our problem: https://... | 2024-01-04T18:45:36Z | 2024-01-16T10:47:33Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_no_compilers_for_arch", "lib/spack/spack/test/concretize.py::TestConcretize::test_external_package_versions[external-buildable-with-variant@0.9 +baz-True-@0.9]", "lib/spack/spack/test/concretize.py::TestConcretize::test_newer_dependency_adds_a_transitive_virtua... | [] | ["lib/spack/spack/test/concretize.py::test_reusable_externals_different_spec", "lib/spack/spack/test/concretize.py::TestConcretize::test_select_lower_priority_package_from_repository_stack[hdf5 ^builtin.mock.gmake-expected_namespaces1]", "lib/spack/spack/test/concretize.py::TestConcretize::test_select_lower_priority_pa... | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-41994 | 0e9c88385b25362dae556cf9913e1ab407ca3253 | diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index dd4ed9e0c2338..f545db58ae981 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -2927,6 +2927,7 @@ def depends_on(self, dependency_str: str, *, when: str, type: str, description:
body_clauses = self.... | diff --git a/lib/spack/spack/test/concretize_compiler_runtimes.py b/lib/spack/spack/test/concretize_compiler_runtimes.py
index 18eff16fe90d0..f331e9a7f8f35 100644
--- a/lib/spack/spack/test/concretize_compiler_runtimes.py
+++ b/lib/spack/spack/test/concretize_compiler_runtimes.py
@@ -13,7 +13,10 @@
import spack.spec
... | Environment: external and %gcc fails view update
### Steps to reproduce
Create an env like:
```
spack:
# add package specs to the `specs` list
specs:
- zlib
packages:
zlib-api:
buildable: false
zlib:
externals:
- spec: zlib@1.2.11
prefix: /usr/
view: true
c... | > I assume the core issue is that gcc-runtime should actually be getting installed.
the issue is that externals depend on `gcc-runtime` too (and the installer probably assumes externals have no installable deps)
@alalazo is that a bug or intentional?
```
==> Concretized zlib
[e] atsd7wc zlib@1.2.11%gcc@13.... | 2024-01-08T19:17:50Z | 2024-01-08T21:09:54Z | [] | [] | ["lib/spack/spack/test/concretize_compiler_runtimes.py::test_external_nodes_do_not_have_runtimes", "lib/spack/spack/test/concretize_compiler_runtimes.py::test_correct_gcc_runtime_is_injected_as_dependency"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-41934 | 375bc6fc9443082fd28e4bbcad44d1f627a452eb | diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index f37d993993c12b..9140a3532ae962 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -213,6 +213,19 @@ def __call__(self, match):
return clr.colorize(re.sub(_SEPARATORS, insert_color(), str(spec)) + "@.")
+OLD_STYLE_FMT_RE = r... | diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py
index 7964ed318487a5..d159bf744ae95e 100644
--- a/lib/spack/spack/test/spec_semantics.py
+++ b/lib/spack/spack/test/spec_semantics.py
@@ -1528,3 +1528,9 @@ def test_edge_equality_does_not_depend_on_virtual_order():
assert ... | Installation issue: dollar signs `$` in paths for several packages, e.g. gmake@=4.4.1%gcc@=12.2.0
### Steps to reproduce the issue
```console
$ spack install --overwrite gmake@=4.4.1%gcc@=12.2.0
```
### Error message
See the last two lines. Second-last line has the path with dollar signs `$`, last line with the ... | Ping.
Any workaround? Would be very helpful to get this fixed. Thanks!
Possibly due to the outdated Python 3.6.8 on the server. Simply writing `prefix.bin.gmake` above this line
https://github.com/spack/spack/blob/45838cee0b8b01ad999b459ed6d19e37686859c0/var/spack/repos/builtin/packages/gmake/package.py#L79
rem... | 2024-01-03T14:23:17Z | 2024-01-03T16:45:00Z | ["lib/spack/spack/test/spec_semantics.py::TestSpecSemantics::test_spec_flags_maintain_order", "lib/spack/spack/test/spec_semantics.py::TestSpecSemantics::test_abstract_specs_can_constrain_each_other[libelf foo=bar,baz-libelf foo=*-libelf foo=bar,baz]", "lib/spack/spack/test/spec_semantics.py::test_intersects_and_satisf... | [] | ["lib/spack/spack/test/spec_semantics.py::test_edge_equality_does_not_depend_on_virtual_order"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-41731 | 60d0cd1f210fdd4475a03760e8516accb1d2b07d | diff --git a/lib/spack/spack/cmd/common/confirmation.py b/lib/spack/spack/cmd/common/confirmation.py
index 8a5cd2592b44e..0bdc9a2202a34 100644
--- a/lib/spack/spack/cmd/common/confirmation.py
+++ b/lib/spack/spack/cmd/common/confirmation.py
@@ -21,10 +21,11 @@ def confirm_action(specs: List[spack.spec.Spec], participle... | diff --git a/lib/spack/spack/test/cmd/gc.py b/lib/spack/spack/test/cmd/gc.py
index d692628e106fe..9defb9d99c68a 100644
--- a/lib/spack/spack/test/cmd/gc.py
+++ b/lib/spack/spack/test/cmd/gc.py
@@ -11,37 +11,140 @@
import spack.spec
gc = spack.main.SpackCommand("gc")
+add = spack.main.SpackCommand("add")
+install = ... | spack gc: remove packages not used by an environment
I would like `spack gc` to have the additional functionality that would allow it to uninstall all packages that are not currently activated by some environment.
### Rationale
I use Spack as a replacement for Homebrew. I would like functionality similar to `brew... | Yes please!
Worth noting: the above script will delete build-only dependencies when run on the current spack develop (i.e. autotools will go away unless your environment requires it).
Here's a tweak to the above script that makes its operation a little clearer by "inlining" and simplifying the `dependent_environment... | 2023-12-17T09:16:06Z | 2023-12-26T22:52:10Z | ["lib/spack/spack/test/database.py::test_017_write_and_read_without_uuid", "lib/spack/spack/test/database.py::test_query_spec_with_non_conditional_virtual_dependency", "lib/spack/spack/test/database.py::test_110_no_write_with_exception_on_install", "lib/spack/spack/test/database.py::test_115_reindex_with_packages_not_i... | [] | ["lib/spack/spack/test/database.py::test_query_unused_specs", "lib/spack/spack/test/database.py::test_db_all_hashes", "lib/spack/spack/test/cmd/gc.py::test_gc_without_build_dependency", "lib/spack/spack/test/database.py::test_database_construction_doesnt_use_globals[None]", "lib/spack/spack/test/cmd/gc.py::test_gc_exce... | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-41707 | 3053e701c02fd57b0a3aa169abd57b144edf827b | diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index 13fe2ef156885b..b00982b4fbc9d7 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -3134,14 +3134,38 @@ def _develop_specs_from_env(spec, env):
spec.constrain(dev_info["spec"])
-def _is_reusable_exter... | diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py
index 2eb75edb6c607e..fd5bd7d9c59684 100644
--- a/lib/spack/spack/test/concretize.py
+++ b/lib/spack/spack/test/concretize.py
@@ -1817,12 +1817,14 @@ def test_git_ref_version_succeeds_with_unknown_version(self, git_ref):
@pytest... | External packages modules are cached in opt/spack/.spack-db without being updated on configuration changes
### Steps to reproduce
Let's say you have an external package provided via modules like this
```yaml
packages:
cray-mpich:
externals:
- spec: cray-mpich@8.1.21
modules:
- cray/22.11... | Thanks to @haampie for the support in debugging this problem.
Probably worth pointing out that https://github.com/spack/spack/pull/35975 might be useful for trying solving this.
The idea of #35975 is to only reuse those externals that match config:
```python
reusables = [s for s in specs if not s.external or an... | 2023-12-14T23:40:30Z | 2023-12-20T19:21:15Z | ["lib/spack/spack/test/concretize.py::TestConcretize::test_no_compilers_for_arch", "lib/spack/spack/test/concretize.py::TestConcretize::test_external_package_versions[external-buildable-with-variant@0.9 +baz-True-@0.9]", "lib/spack/spack/test/concretize.py::TestConcretize::test_newer_dependency_adds_a_transitive_virtua... | [] | ["lib/spack/spack/test/concretize.py::test_reusable_externals_different_spec", "lib/spack/spack/test/concretize.py::test_reusable_externals_match_virtual", "lib/spack/spack/test/concretize.py::test_reusable_externals_different_prefix", "lib/spack/spack/test/concretize.py::test_reusable_externals_different_modules[modul... | ["lib/spack/spack/test/cray_manifest.py::test_reusable_externals_cray_manifest", "lib/spack/spack/test/cray_manifest.py::test_find_external_nonempty_default_manifest_dir"] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-41723 | b7edcbecd7adc4f7db670392499295bfcf6bdab1 | diff --git a/lib/spack/docs/packages_yaml.rst b/lib/spack/docs/packages_yaml.rst
index af0acf0f9a4e6..0567421054175 100644
--- a/lib/spack/docs/packages_yaml.rst
+++ b/lib/spack/docs/packages_yaml.rst
@@ -97,6 +97,35 @@ Each package version and compiler listed in an external should
have entries in Spack's packages and... | diff --git a/lib/spack/spack/test/build_environment.py b/lib/spack/spack/test/build_environment.py
index cbccbc429eac6..8e13a5f13a436 100644
--- a/lib/spack/spack/test/build_environment.py
+++ b/lib/spack/spack/test/build_environment.py
@@ -285,6 +285,24 @@ def platform_pathsep(pathlist):
assert name not in os... | Allow for environment modifications by the external packages
It would be nice to have an option to apply additional modifications to the environment when an external package is in use. We already have it for compilers, so the required logic is already more or less implemented.
### Rationale
This would help to cus... | There is probably one more thing to consider. Imagine that `mpi` is not an external package. Say we build `openmpi`. We still have to set additional environment variables to make `srun` work. Therefore, it would be nice to have an additional `environment` section for the whole package, not only for externals:
```yam... | 2023-12-15T19:54:08Z | 2023-12-19T04:24:15Z | ["lib/spack/spack/test/build_environment.py::test_compiler_config_modifications[initial2-modifications2-expected2]", "lib/spack/spack/test/build_environment.py::test_compiler_config_modifications[initial4-modifications4-expected4]", "lib/spack/spack/test/build_environment.py::test_compiler_config_modifications[initial1... | [] | ["lib/spack/spack/test/build_environment.py::test_clear_compiler_related_runtime_variables_of_build_deps", "lib/spack/spack/test/build_environment.py::test_external_config_env"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-41529 | f01774f1d41781bc4b9e5abb5469e234168da663 | diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py
index c26ab181c1023..cb4083ed8f2c5 100644
--- a/lib/spack/spack/cmd/__init__.py
+++ b/lib/spack/spack/cmd/__init__.py
@@ -6,10 +6,8 @@
import argparse
import os
import re
-import shlex
import sys
-from textwrap import dedent
-from typing... | diff --git a/lib/spack/spack/test/cmd/common/arguments.py b/lib/spack/spack/test/cmd/common/arguments.py
index e889fe55d89e2..dcfe86aa5153a 100644
--- a/lib/spack/spack/test/cmd/common/arguments.py
+++ b/lib/spack/spack/test/cmd/common/arguments.py
@@ -50,8 +50,8 @@ def test_negative_integers_not_allowed_for_parallel_j... | Spack spec fails with "complex" flags string even if quoted
### Steps to reproduce
```console
spack/bin/spack spec umpire%clang@9.0.0 cxxflags="-stdlib=libc++ -DGTEST_HAS_CXXABI_H_=0"
```
@cosmicexplorer @trws
I seem to have an issue with this
### Error message
```console
➜ uberenv_libs git:(bernede1/ci/spa... | If the whole spec is quoted, it seems to parse, e.g.:
```
./bin/spack spec 'umpire%clang@9.0.0 cxxflags="-stdlib=libc++ -DGTEST_HAS_CXXABI_H_=0"'
```
That seems like a regression, the way @davidbeckingsale posted it is what that patch was meant to fix, but it should have kept working with the individual components q... | 2023-12-10T07:41:12Z | 2023-12-14T00:36:22Z | ["lib/spack/spack/test/spec_syntax.py::test_platform_is_none_if_not_present[os=redhat6]", "lib/spack/spack/test/spec_syntax.py::test_error_conditions[x target=fe target=be-DuplicateArchitectureError]", "lib/spack/spack/test/spec_syntax.py::test_error_conditions[x os=fe os=fe-DuplicateArchitectureError]", "lib/spack/spa... | [] | ["lib/spack/spack/test/spec_syntax.py::test_parse_single_spec[cflags=a=b=c-tokens59-cflags='a=b=c']", "lib/spack/spack/test/spec_syntax.py::test_cli_spec_roundtrip[args4-zlib cflags='-O3 -g +bar baz']", "lib/spack/spack/test/spec_syntax.py::test_cli_spec_roundtrip[args15-SpecTokenizationError]", "lib/spack/spack/test/s... | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-41294 | 0e65e84768949b6e989036bbc17a2db5b4b62a4c | diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index d33b47eeb2459..8ad8d5c5c013d 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -2699,15 +2699,13 @@ def literal_specs(self, specs):
self.gen.fact(fn.pkg_fact(spec.name, fn.condition_trigger(cond... | diff --git a/lib/spack/spack/test/env.py b/lib/spack/spack/test/env.py
index 7490a6e0b2620..6ab05a603f970 100644
--- a/lib/spack/spack/test/env.py
+++ b/lib/spack/spack/test/env.py
@@ -778,3 +778,32 @@ def test_env_with_include_def_missing(mutable_mock_env_path, mock_packages):
with e:
with pytest.raises(... | Environment errors when reconcretizing
### Steps to reproduce
Activate the following environment:
```yaml
spack:
specs:
- zlib-ng
- hdf5@1.14.2 ~mpi
- zlib-ng generator=make
view: false
concretizer:
unify: true
```
and concretize it:
```console
$ spack concretize
[ ... ]
```
Then deco... | Looking at the code, the assertion seems unnecessary[^1] and a fix might just be:
```diff
diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index b41bcba228..4661d82e96 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -2709,10 +2709,6 @@ def literal_specs(... | 2023-11-28T13:42:34Z | 2023-11-29T08:09:16Z | ["lib/spack/spack/test/env.py::test_environment_concretizer_scheme_used[False-True]", "lib/spack/spack/test/env.py::test_update_default_complex_view[\\nspack:\\n specs:\\n - mpileaks\\n view:\\n default:\\n root: ./view-gcc\\n select: ['%gcc']\\n link_type: symlink\\n-True-expected_view1]", "lib/sp... | [] | ["lib/spack/spack/test/env.py::test_deconcretize_then_concretize_does_not_error", "lib/spack/spack/test/env.py::test_env_with_include_def_missing"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
spack/spack | spack__spack-41138 | 5154d696297a6b00a148f09967688dd27113275d | diff --git a/lib/spack/spack/audit.py b/lib/spack/spack/audit.py
index d0a68cf2121316..970e4a3b367ff9 100644
--- a/lib/spack/spack/audit.py
+++ b/lib/spack/spack/audit.py
@@ -286,6 +286,54 @@ def make_error(attribute_name, config_data, summary):
return errors
+@config_packages
+def _avoid_mismatched_variants(e... | diff --git a/lib/spack/spack/test/concretize_preferences.py b/lib/spack/spack/test/concretize_preferences.py
index d061f9a8f555c5..929ae0a9ec27a5 100644
--- a/lib/spack/spack/test/concretize_preferences.py
+++ b/lib/spack/spack/test/concretize_preferences.py
@@ -504,3 +504,13 @@ def test_sticky_variant_accounts_for_pac... | Concretization errors if a preference doesn't match the type of the variant for a package
### Steps to reproduce
Create an environment like:
```yaml
spack:
specs:
- llvm
- openmpi
view: true
concretizer:
unify: true
packages:
all:
variants: [+openmp]
```
and try to concretize it:... | 2023-11-17T14:42:10Z | 2023-11-23T10:30:40Z | ["lib/spack/spack/test/concretize_preferences.py::TestConcretizePreferences::test_preferred_compilers[gcc@=4.5.0-openmpi]", "lib/spack/spack/test/concretize_preferences.py::TestConcretizePreferences::test_buildable_false_all", "lib/spack/spack/test/concretize_preferences.py::TestConcretizePreferences::test_preferred_va... | [] | ["lib/spack/spack/test/concretize_preferences.py::TestConcretizePreferences::test_sticky_variant_accounts_for_packages_yaml", "lib/spack/spack/test/concretize_preferences.py::TestConcretizePreferences::test_default_preference_variant_different_type_does_not_error"] | [] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval | |
spack/spack | spack__spack-31261 | a2f00886e911a8219bfac27752e5c7fd83c65280 | diff --git a/lib/spack/docs/build_settings.rst b/lib/spack/docs/build_settings.rst
index 402b33f6a2585..38fe2fb2c06d7 100644
--- a/lib/spack/docs/build_settings.rst
+++ b/lib/spack/docs/build_settings.rst
@@ -526,56 +526,52 @@ Package Preferences
In some cases package requirements can be too strong, and package
prefe... | diff --git a/lib/spack/spack/test/cmd/config.py b/lib/spack/spack/test/cmd/config.py
index 4f3d5afe770e0..7247ce97531dc 100644
--- a/lib/spack/spack/test/cmd/config.py
+++ b/lib/spack/spack/test/cmd/config.py
@@ -215,10 +215,10 @@ def test_config_add_override_leaf(mutable_empty_config):
def test_config_add_update_... | Unclear which provider will be used, when preferences are set in `packages.yaml` at the package level
### Steps to reproduce
I have found an issue with the concretizer not picking up the correct providers when described in `packages.yaml`. If providers are aded to the command line, e.g. `^intel-mpi ^intel-mkl`, all wo... | Is this syntax supposed to work?
```yaml
packages:
gromacs:
providers:
mpi: [...]
```
It looks like an ill-defined minimization problem :thinking: if there are two packages depending on mpi, with different preferences, what determines optimality?
> Is this syntax supposed to work?
Yes: for no... | 2022-06-23T08:44:25Z | 2023-11-07T06:46:07Z | ["lib/spack/spack/test/cmd/env.py::test_bad_env_yaml_create_fails[ConfigFormatError-'specks' was unexpected-spack:\\n specks:\\n - libdwarf\\n]", "lib/spack/spack/test/cmd/env.py::test_env_include_packages_url", "lib/spack/spack/test/config.py::test_config_collect_urls[https://gitlab.fake.io/user/repo/-/blob/config... | [] | ["lib/spack/spack/test/cmd/config.py::test_config_prefer_upstream[mock_archive0]"] | ["lib/spack/spack/test/config.py::test_config_file_read_perms_failure - ...", "lib/spack/spack/test/cmd/env.py::test_view_link_type[mock_archive0-copy]"] | {"install": ["uv pip install -e .", "spack -d bootstrap now --dev"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no --tb=no -p no:cacheprovider --durations=30 -rA --strict-markers\ntestpaths = lib/spack/spack/test\npython_files = *.py\nfilterwarnings = \n\tignore::UserWarning\nmarkers ... | spack unit-test --verbose | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-10446 | b69b368ffe7a2931766418b1a71e6f2598e59143 | diff --git a/dvc/dependency/repo.py b/dvc/dependency/repo.py
index eaf776a2e0..c5a1e55c66 100644
--- a/dvc/dependency/repo.py
+++ b/dvc/dependency/repo.py
@@ -35,7 +35,7 @@ def __init__(self, def_repo: dict[str, Any], stage: "Stage", *args, **kwargs):
super().__init__(stage, *args, **kwargs)
self.fs... | diff --git a/tests/func/test_import.py b/tests/func/test_import.py
index 873ad8dd75..125337811e 100644
--- a/tests/func/test_import.py
+++ b/tests/func/test_import.py
@@ -305,11 +305,12 @@ def test_cache_type_is_properly_overridden(tmp_dir, scm, dvc, erepo_dir):
assert scm.is_ignored("foo_imported")
-def test_... | pull: breaks if imported dir ends with "/"
# Bug Report
## Description
When a directory is imported with `dvc import` and the directory ends with `/` dvc pull is unable to get the imported files in a clean clone of the repository.
### Reproduce
Run this bash-script to reproduce the bug.
```bash
rm -rf ... | The difference is that the dependency path is saved as `tutorials/nlp/` instead of `tutorials/nlp`. We should either be stripping the final `/` there or treating these as equivalent in the dvc-data index and everywhere else.
| 2024-05-31T00:14:54Z | 2024-06-03T10:58:43Z | ["tests/func/test_import.py::test_granular_import_from_subrepos", "tests/func/test_import.py::test_import_to_dir[dir]", "tests/func/test_import.py::test_import_complete_repo", "tests/func/test_import.py::test_import_configs[options4-def_repo4]", "tests/func/test_import.py::test_import_git_dir[False]", "tests/func/test_... | [] | ["tests/func/test_import.py::test_pull_imported_directory_stage[dir/]"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.12", "pip_packages": ["adlfs==2024.4.1", "aiobotocore==2.13.0", "aiohttp==3.9.5", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.10", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.15.1", "aliyun-python-sdk-kms==2.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-10441 | 83ec952da139853cdc8532ce6b7758d6e990e531 | diff --git a/dvc/repo/fetch.py b/dvc/repo/fetch.py
index 05f92921d0..047a45f9c9 100644
--- a/dvc/repo/fetch.py
+++ b/dvc/repo/fetch.py
@@ -2,6 +2,7 @@
from dvc.exceptions import DownloadError
from dvc.log import logger
+from dvc.stage.cache import RunCacheNotSupported
from dvc.ui import ui
from dvc_data.index imp... | diff --git a/tests/func/test_run_cache.py b/tests/func/test_run_cache.py
index a8669e88bd..495e64c838 100644
--- a/tests/func/test_run_cache.py
+++ b/tests/func/test_run_cache.py
@@ -1,3 +1,4 @@
+import logging
import os
import pytest
@@ -231,13 +232,15 @@ def test_restore_pull(tmp_dir, dvc, run_copy, mocker, local... | Latest release of DVC breaks object versioned configs
# Bug Report
<!--
## Issue name
Issue names must follow the pattern `command: description` where the command is the dvc command that you are trying to run. The description should describe the consequence of the bug.
Example: `repro: doesn't detect input ch... | Seems DVC builds are also broken here https://github.com/iterative/dvc-s3-repo | 2024-05-26T20:10:13Z | 2024-05-27T08:52:44Z | ["tests/func/test_run_cache.py::test_outs_no_cache_deactivate_run_cache[metrics_no_cache-True]", "tests/func/test_run_cache.py::test_newest_entry_is_loaded_for_non_deterministic_stage", "tests/func/test_run_cache.py::test_memory_for_multiple_runs_of_same_stage", "tests/func/test_run_cache.py::test_outs_no_cache_deactiv... | [] | ["tests/func/test_run_cache.py::test_push_pull_unsupported", "tests/func/test_run_cache.py::test_restore_pull"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.12", "pip_packages": ["adlfs==2024.4.1", "aiobotocore==2.13.0", "aiohttp==3.9.5", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.10", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.15.1", "aliyun-python-sdk-kms==2.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-10435 | 2e0b024efe6d7564df3d4ec2f3f9e715be0c0bab | diff --git a/dvc/commands/repro.py b/dvc/commands/repro.py
index fb085a1fe3..bbcb132e90 100644
--- a/dvc/commands/repro.py
+++ b/dvc/commands/repro.py
@@ -117,10 +117,7 @@ def add_arguments(repro_parser):
"--pull",
action="store_true",
default=False,
- help=(
- "Try automati... | diff --git a/tests/func/repro/test_repro_allow_missing.py b/tests/func/repro/test_repro_allow_missing.py
index e69b3764e4..bcbcd30774 100644
--- a/tests/func/repro/test_repro_allow_missing.py
+++ b/tests/func/repro/test_repro_allow_missing.py
@@ -55,3 +55,16 @@ def test_repro_allow_missing_upstream_stage_modified(
... | `dvc repro --pull`: invalidates cache
# Bug Report
## `repro`: `dvc repro --pull` invalidates cache. doing `dvc pull` and then `dvc repro` works.
<!--
## Issue name
Issue names must follow the pattern `command: description` where the command is the dvc command that you are trying to run. The description should ... | Are you able to provide a reproducible example? I'm not able to reproduce with https://github.com/iterative/example-get-started:
```bash
$ dvc repro --pull
WARNING: Failed to pull run cache: run-cache is not supported for http filesystem: https://remote.dvc.org/get-started
Importing 'get-started/data.xml (https:/... | 2024-05-21T13:09:48Z | 2024-05-23T18:26:43Z | ["tests/func/repro/test_repro_pull.py::test_repro_pulls_missing_data_source", "tests/func/repro/test_repro_pull.py::test_repro_skip_pull_if_single_item_is_passed", "tests/func/repro/test_repro_pull.py::test_repro_pulls_continue_without_run_cache", "tests/func/repro/test_repro_allow_missing.py::test_repro_allow_missing"... | [] | ["tests/func/repro/test_repro_allow_missing.py::test_repro_allow_missing_cached", "tests/func/repro/test_repro_pull.py::test_repro_pulls_allow_missing[False]", "tests/func/repro/test_repro_pull.py::test_repro_pull_fails", "tests/func/repro/test_repro_pull.py::test_repro_pulls_persisted_output", "tests/func/repro/test_r... | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.12", "pip_packages": ["adlfs==2024.4.1", "aiobotocore==2.13.0", "aiohttp==3.9.5", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.10", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.15.1", "aliyun-python-sdk-kms==2.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-10386 | ec92cc14d13d273634cc6a5af9ac392be5e0f115 | diff --git a/dvc/api/artifacts.py b/dvc/api/artifacts.py
index 687fc86a83..7ac85bf649 100644
--- a/dvc/api/artifacts.py
+++ b/dvc/api/artifacts.py
@@ -1,3 +1,4 @@
+import os
from typing import Any, Optional
from dvc.repo import Repo
@@ -36,12 +37,22 @@ def artifacts_show(
if version and stage:
raise V... | diff --git a/tests/func/api/test_artifacts.py b/tests/func/api/test_artifacts.py
new file mode 100644
index 0000000000..4907e9046c
--- /dev/null
+++ b/tests/func/api/test_artifacts.py
@@ -0,0 +1,74 @@
+from os.path import join, normpath
+
+import pytest
+
+from dvc.api import artifacts_show
+from dvc.testing.tmp_dir im... | artifacts: doesn't work with monorepos
# Bug Report
## Description
See https://iterativeai.slack.com/archives/C05L7S1TWAW/p1712247647559389. `dvc.api.artifacts_show()` can't find artifacts in subrepos.
### Reproduce
```python
import os
import dvc.api
URL = 'https://github.com/mnrozhkov/monorepo-multi... | I have changed the issue from a https://github.com/iterative/dvc/labels/bug to a https://github.com/iterative/dvc/labels/feature%20request. | 2024-04-11T12:21:26Z | 2024-04-16T15:28:03Z | ["tests/func/artifacts/test_artifacts.py::test_get_path", "tests/func/artifacts/test_artifacts.py::test_broken_dvcyaml_extra_field[bad_dvcyaml0]", "tests/func/artifacts/test_artifacts.py::test_name_is_compatible_fails[model-]", "tests/func/artifacts/test_artifacts.py::test_name_is_compatible_fails[-model]", "tests/func... | [] | ["tests/func/artifacts/test_artifacts.py::test_artifacts_download_subrepo[]", "tests/func/artifacts/test_artifacts.py::test_get_path_subrepo", "tests/func/artifacts/test_artifacts.py::test_artifacts_download[sub]", "tests/func/artifacts/test_artifacts.py::test_artifacts_download[]", "tests/func/artifacts/test_artifacts... | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.12", "pip_packages": ["adlfs==2024.4.1", "aiobotocore==2.12.3", "aiohttp==3.9.5", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.10", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.15.1", "aliyun-python-sdk-kms==2.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-10365 | 6f6038888feaf7ad26c8eb6d114659287ea198ff | diff --git a/dvc/repo/fetch.py b/dvc/repo/fetch.py
index 7f1a0ce13f..1bf95a074b 100644
--- a/dvc/repo/fetch.py
+++ b/dvc/repo/fetch.py
@@ -22,7 +22,7 @@ def _onerror(entry, exc):
return _onerror
-def _collect_indexes( # noqa: PLR0913
+def _collect_indexes( # noqa: PLR0913, C901
repo,
targets=None,
... | diff --git a/tests/func/test_data_cloud.py b/tests/func/test_data_cloud.py
index 74011a4568..a506a205ce 100644
--- a/tests/func/test_data_cloud.py
+++ b/tests/func/test_data_cloud.py
@@ -582,6 +582,58 @@ def test_target_remote(tmp_dir, dvc, make_remote):
}
+def test_output_target_remote(tmp_dir, dvc, make_remo... | pull: how to only download data from a specified remote?
# Bug Report
## Description
We have a dvc projects with two remotes (`remote_a` and `remote_b`).
Most of our stages are parametrized and some outputs contain a `remote` attribute.
For example:
```yaml
stages:
my_stage:
foreach: ['remote_a', '... | mea culpa, the doc explains how the remote flag works and it seems consistent with the behaviour I experienced:
> The [dvc remote](https://dvc.org/doc/command-reference/remote) used is determined in order, based on
> - the remote fields in the [dvc.yaml](https://dvc.org/doc/user-guide/project-structure/dvcyaml-file... | 2024-03-22T13:11:42Z | 2024-03-25T19:12:34Z | ["tests/func/test_data_cloud.py::test_push_stats[fs0-2 files pushed]", "tests/func/test_data_cloud.py::test_output_remote", "tests/func/test_data_cloud.py::test_pull_partial_import", "tests/func/test_data_cloud.py::test_pull_partial_import_modified", "tests/func/test_data_cloud.py::test_push_stats[fs1-1 file pushed]", ... | [] | ["tests/func/test_data_cloud.py::test_output_target_remote"] | ["tests/func/test_data_cloud.py::TestRemote::test_pull_no_00_prefix", "tests/func/test_data_cloud.py::TestRemote::test_stage_cache_push_pull", "tests/func/test_data_cloud.py::TestRemote::test_pull_00_prefix"] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.12", "pip_packages": ["adlfs==2024.2.0", "aiobotocore==2.12.1", "aiohttp==3.9.3", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.10", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.15.0", "aliyun-python-sdk-kms==2.... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-10359 | 8d8939fb67783e66c7dce66d194c72728a3c854b | diff --git a/dvc/dvcfile.py b/dvc/dvcfile.py
index dde1aac8a5..1a150e8c9d 100644
--- a/dvc/dvcfile.py
+++ b/dvc/dvcfile.py
@@ -242,16 +242,22 @@ def dump(self, stage, update_pipeline=True, update_lock=True, **kwargs):
def dump_dataset(self, dataset):
with modify_yaml(self.path, fs=self.repo.fs) as data:... | diff --git a/tests/func/artifacts/test_artifacts.py b/tests/func/artifacts/test_artifacts.py
index ea2553c36b..fcad4d3071 100644
--- a/tests/func/artifacts/test_artifacts.py
+++ b/tests/func/artifacts/test_artifacts.py
@@ -196,3 +196,13 @@ def test_get_path(tmp_dir, dvc):
assert dvc.artifacts.get_path("subdir/dvc.... | top-level params/metrics/plots/artifacts: support templating and foreach
Templating and foreach are only supported in `stages` in `dvc.yaml`. It would be nice to have support in top-level `params`, `metrics`, `plots`, and `artifacts`.
| @skshetry pointed out that these should probably be separate issues since templating should be straightforward (syntax doesn't change, reuse existing top-level `vars`), whereas foreach will require new syntax (for one thing, `stages` are dicts whereas other top-level fields are lists). When we get to these, we can spli... | 2024-03-18T12:11:20Z | 2024-03-22T12:22:16Z | ["tests/func/artifacts/test_artifacts.py::test_get_path", "tests/func/plots/test_show.py::test_top_level_plots[plot_config2-expected_datafiles2]", "tests/func/metrics/test_show.py::test_show", "tests/func/metrics/test_show.py::test_metrics_show_no_target", "tests/func/metrics/test_show.py::test_show_branch", "tests/fun... | [] | ["tests/func/plots/test_show.py::test_top_level_parametrized[plot_config1-expanded_config1-expected_datafiles1]", "tests/func/parsing/test_top_level.py::test_artifacts", "tests/func/parsing/test_top_level.py::test_plots", "tests/func/plots/test_show.py::test_top_level_parametrized[plot_config0-expanded_config0-expected... | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.12", "pip_packages": ["adlfs==2024.2.0", "aiobotocore==2.12.1", "aiohttp==3.9.3", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.9", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.15.0", "aliyun-python-sdk-kms==2.1... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-10345 | 603da1ca1ed1b71aae85e6bf4247e39e2788a538 | diff --git a/dvc/repo/experiments/executor/base.py b/dvc/repo/experiments/executor/base.py
index 933353b57d..64b670c800 100644
--- a/dvc/repo/experiments/executor/base.py
+++ b/dvc/repo/experiments/executor/base.py
@@ -25,6 +25,7 @@
from dvc.utils.fs import remove
from dvc.utils.studio import (
env_to_config,
+ ... | diff --git a/tests/integration/test_studio_live_experiments.py b/tests/integration/test_studio_live_experiments.py
index da1136f08a..e5851aac7b 100644
--- a/tests/integration/test_studio_live_experiments.py
+++ b/tests/integration/test_studio_live_experiments.py
@@ -3,6 +3,7 @@
from funcy import first
from dvc.env ... | `dvc studio login`: setup auto pushing experiments
See ~#5029~ (edit: https://github.com/iterative/dvc.org/issues/5029) and the related issues linked there for background.
Rather than document the environment variables to auto push experiments, we could make this part of the studio login workflow since auto-pushing ... | Since this is a `studio login`, I'd rather not have any prompts and enable everything by default. But we should notify users that they are enabled and provide hints to disable (and support arg to disable this behaviour).
cc @iterative/vs-code since this should also impact the vs code flow
@skshetry Do you mean to enabl... | 2024-03-07T18:37:45Z | 2024-03-11T14:47:01Z | [] | [] | ["tests/unit/utils/test_studio.py::test_notify_refs[500-ValueError]", "tests/integration/test_studio_live_experiments.py::test_post_to_studio[None-False-False]", "tests/integration/test_studio_live_experiments.py::test_post_to_studio[DVC_EXP_GIT_REMOTE-False-True]", "tests/unit/utils/test_studio.py::test_env_to_config"... | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.12", "pip_packages": ["adlfs==2024.2.0", "aiobotocore==2.12.1", "aiohttp==3.9.3", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.9", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.15.0", "aliyun-python-sdk-kms==2.1... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-10277 | 84b2e685e25c31fc1296d2902c728d84785a656d | diff --git a/dvc/commands/data_sync.py b/dvc/commands/data_sync.py
index fa05cf7aa6..a8cae64bf8 100644
--- a/dvc/commands/data_sync.py
+++ b/dvc/commands/data_sync.py
@@ -429,5 +429,11 @@ def add_parser(subparsers, _parent_parser):
default=False,
help="Show status in JSON format.",
)
+ status_... | diff --git a/tests/func/test_status.py b/tests/func/test_status.py
index e624a9924c..84964d6bf7 100644
--- a/tests/func/test_status.py
+++ b/tests/func/test_status.py
@@ -1,5 +1,7 @@
import os
+import pytest
+
from dvc.cli import main
from dvc.fs import localfs
@@ -30,19 +32,25 @@ def test_implied_cloud(dvc, moc... | dvc status: reports change for frozen import
## Description
According to https://dvc.org/doc/command-reference/freeze , when a stage is "frozen" `dvc status` should not consider it as changed. But it does when the stage is obtained by `dvc import`
### Reproduce
Here's a trivial example that imports from the sam... | TBH I don't know if it's "expected" to show as a clean status or not, but if non-import frozen stages behave differently, then it looks like a bug to me. How do you use it? Can you use `dvc data status` instead?
@dberenbaum Doc of `dvc freeze` says:
> [dvc freeze](https://dvc.org/doc/command-reference/freeze) causes... | 2024-02-01T19:04:52Z | 2024-02-01T19:49:51Z | ["tests/unit/command/test_status.py::test_status_up_to_date[cloud_opts0-Cache and remote 'default' are in sync]", "tests/func/test_status.py::test_status_before_and_after_dvc_init", "tests/unit/command/test_status.py::test_status_quiet[status1-1]", "tests/func/test_status.py::test_params_without_targets", "tests/unit/c... | [] | ["tests/unit/command/test_status.py::test_cloud_status", "tests/unit/command/test_status.py::test_status_check_updates", "tests/func/test_status.py::test_status_non_dvc_repo_import[False]", "tests/func/test_status.py::test_status_non_dvc_repo_import[True]"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.12", "pip_packages": ["adlfs==2024.1.0", "aiobotocore==2.11.1", "aiohttp==3.9.1", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.8", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.14.0", "aliyun-python-sdk-kms==2.1... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-10221 | bf5fe95c30c98bd3026bc7e20ee99beca3b8b054 | diff --git a/dvc/repo/index.py b/dvc/repo/index.py
index ee1d6a798a..35eea98f2c 100644
--- a/dvc/repo/index.py
+++ b/dvc/repo/index.py
@@ -255,6 +255,33 @@ def _load_storage_from_out(storage_map, key, out):
_load_storage_from_import(storage_map, key, out)
+def _build_tree_from_outs(outs):
+ from dvc_dat... | diff --git a/dvc/testing/workspace_tests.py b/dvc/testing/workspace_tests.py
index c9846873c0..13bdaf7d3c 100644
--- a/dvc/testing/workspace_tests.py
+++ b/dvc/testing/workspace_tests.py
@@ -149,14 +149,33 @@ def test_import_dir(self, tmp_dir, dvc, remote_version_aware):
assert (tmp_dir / "data_dir" / "subdir"... | S3 version tracking is working, but version switch is not working
# Bug Report
<!--
## Issue name
Issue names must follow the pattern `command: description` where the command is the dvc command that you are trying to run. The description should describe the consequence of the bug.
Example: `repro: doesn't det... | @justHungryMan Could you give an upstream dvc a try, please? https://dvc.org/doc/install/pre-release
@efiop Is it fixed? I already have a same problem.
Data is not changed
```
V1: a.text, b.text
V2: a.text, b.text, c.text
```
If I pull from V2, and `git checkout + dvc checkout to V1`, but c.text is yet aliv... | 2024-01-04T15:49:42Z | 2024-01-04T16:17:46Z | ["dvc/testing/workspace_tests.py::TestLsUrl::test_nonexistent", "dvc/testing/workspace_tests.py::TestGetUrl::test_get_url_nonexistent", "tests/func/test_data_cloud.py::test_push_stats[fs0-2 files pushed]", "tests/func/test_data_cloud.py::test_output_remote", "dvc/testing/workspace_tests.py::TestToRemote::test_add_to_re... | [] | ["tests/func/test_data_cloud.py::test_pull_partial_import"] | ["dvc/testing/workspace_tests.py::TestImportURLVersionAware::test_import_no_download", "dvc/testing/workspace_tests.py::TestImportURLVersionAware::test_import_dir", "dvc/testing/workspace_tests.py::TestImportURLVersionAware::test_import_file", "tests/func/test_data_cloud.py::TestRemote::test_pull_00_prefix ", "tests/fu... | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.12", "pip_packages": ["adlfs==2023.12.0", "agate==1.7.0", "aiobotocore==2.9.0", "aiohttp==3.9.1", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.8", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.14.0", "aliyun-pyt... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-10218 | fe008d974848b2241195d9e37afd1a6f2e323c59 | diff --git a/dvc/repo/imp_url.py b/dvc/repo/imp_url.py
index b243fa8118..1916b437f2 100644
--- a/dvc/repo/imp_url.py
+++ b/dvc/repo/imp_url.py
@@ -77,6 +77,7 @@ def imp_url( # noqa: PLR0913
elif to_remote:
remote_odb = self.cloud.get_remote_odb(remote, "import-url")
stage.outs[0].transfer(url, o... | diff --git a/tests/func/test_import_url.py b/tests/func/test_import_url.py
index e8ae45d721..851296f00d 100644
--- a/tests/func/test_import_url.py
+++ b/tests/func/test_import_url.py
@@ -10,6 +10,7 @@
from dvc.exceptions import InvalidArgumentError
from dvc.stage import Stage
from dvc.testing.workspace_tests import ... | dvc import-url --to-remote: no entry added to .gitignore
# Bug Report
## Description
When I run `dvc import-url` with the `--to-remote` option, a .dvc file is create and the data is written to remote storage, as expected, but no entry is created in .gitignore. When I then run `dvc pull`, a local copy of the data ... | 2024-01-03T12:32:20Z | 2024-01-03T14:12:46Z | ["tests/func/test_import_url.py::test_default_output", "tests/func/test_import_url.py::test_import_stage_accompanies_target", "tests/func/test_import_url.py::test_cmd_import", "tests/func/test_import_url.py::test_import_url_to_dir[dir]", "tests/func/test_import_url.py::TestImport::test_import_empty_dir", "tests/func/te... | [] | ["tests/func/test_import_url.py::test_import_url_fs_config", "tests/func/test_import_url.py::test_import_url_to_remote_absolute"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.12", "pip_packages": ["adlfs==2023.12.0", "agate==1.7.0", "aiobotocore==2.9.0", "aiohttp==3.9.1", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.8", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.14.0", "aliyun-pyt... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval | |
iterative/dvc | iterative__dvc-10213 | 987b1c421346a9e1faf518a9cf64f0d16c86ac53 | diff --git a/dvc/repo/index.py b/dvc/repo/index.py
index 67692d320b..40218c1375 100644
--- a/dvc/repo/index.py
+++ b/dvc/repo/index.py
@@ -174,6 +174,30 @@ def _load_data_from_outs(index, prefix, outs):
)
+def _load_storage_from_import(storage_map, key, out):
+ from fsspec.utils import tokenize
+
+ f... | diff --git a/tests/func/test_repo_index.py b/tests/func/test_repo_index.py
index 42a5123a27..22d977d973 100644
--- a/tests/func/test_repo_index.py
+++ b/tests/func/test_repo_index.py
@@ -360,26 +360,47 @@ def test_data_index(tmp_dir, dvc, local_cloud, erepo_dir):
dvc.imp(os.fspath(erepo_dir), "efoo")
dvc.imp(... | pull: "No file hash info found" and checkout fails when pulling frozen imported url that is a directory that has subsequently changed
# Bug Report
## Description
I have used `dvc import-url` to track a GCS directory that is updated daily with incremental new data. [The documentation](https://dvc.org/doc/user-gui... | Thanks for the report @ahasha. I can confirm at least the part about push not doing anything, and I can reproduce even on a local remote with this script:
```sh
set -eux
IMPORT=$(mktemp -d)
REPO=$(mktemp -d)
REMOTE=$(mktemp -d)
echo foo > $IMPORT/foo
tree $IMPORT
cd $REPO
git init -q
dvc init -q
dvc remote... | 2024-01-02T07:46:15Z | 2024-01-02T11:38:40Z | ["tests/func/test_repo_index.py::test_view_granular_dir", "tests/func/test_repo_index.py::test_view_stage_filter", "tests/func/test_repo_index.py::test_skip_graph_checks", "tests/func/test_repo_index.py::test_repr", "tests/func/test_repo_index.py::test_view_outs_filter", "tests/func/test_repo_index.py::test_ignored_dir... | [] | ["tests/func/test_repo_index.py::test_data_index", "tests/func/test_repo_index.py::test_param_keys_top_level_params"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.12", "pip_packages": ["adlfs==2023.12.0", "agate==1.7.0", "aiobotocore==2.9.0", "aiohttp==3.9.1", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.8", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.14.0", "aliyun-pyt... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-10208 | 73820cc5963e969ca9f3a838b26ef00a93a0e7b4 | diff --git a/dvc/repo/index.py b/dvc/repo/index.py
index b3dfb47ee5..bac2bfa36b 100644
--- a/dvc/repo/index.py
+++ b/dvc/repo/index.py
@@ -221,7 +221,7 @@ def _load_storage_from_out(storage_map, key, out):
),
)
)
- storage_map.add_remote(FileStorage(key, dep.fs,... | diff --git a/tests/func/test_repo_index.py b/tests/func/test_repo_index.py
index 9a0b06ea4a..42a5123a27 100644
--- a/tests/func/test_repo_index.py
+++ b/tests/func/test_repo_index.py
@@ -1,3 +1,4 @@
+import os
from itertools import chain
import pytest
@@ -338,3 +339,53 @@ def test_param_keys_top_level_params(tmp_di... | dvc push: Unexpected error when pushing to Google Cloud storage or S3
# Bug Report
dvc push: "Unexpected error" when pushing to Google Cloud storage or S3
### Reproduce
```
dvc init
dvc remote add -d s3 s3://bucket # or gcs gs://bucket
dvc import-url https://data.dvc.org/get-started/data.xml
dvc push -v
``... | Looks like we are accidentally trying to push to that import-url's fs. Taking a look...
Ok, with index migration we need `storage.read_only` that we can use during index building to say that this remote is read-only. This is similar to odb-only `read_only` that we used to have in the past. Already preparing a fix.
Is i... | 2023-12-28T04:57:12Z | 2023-12-28T06:08:45Z | ["tests/func/test_repo_index.py::test_view_granular_dir", "tests/func/test_repo_index.py::test_view_stage_filter", "tests/func/test_repo_index.py::test_skip_graph_checks", "tests/func/test_repo_index.py::test_repr", "tests/func/test_repo_index.py::test_view_outs_filter", "tests/func/test_repo_index.py::test_ignored_dir... | [] | ["tests/func/test_repo_index.py::test_data_index", "tests/func/test_repo_index.py::test_param_keys_top_level_params"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.12", "pip_packages": ["adlfs==2023.12.0", "agate==1.7.0", "aiobotocore==2.9.0", "aiohttp==3.9.1", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.8", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.14.0", "aliyun-pyt... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-10205 | 27a8222e2a05e70deb78e641c4f4824dcdcc10c6 | diff --git a/pyproject.toml b/pyproject.toml
index 7ced3b9271..54c1b4614e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -35,7 +35,7 @@ dependencies = [
"configobj>=5.0.6",
"distro>=1.3",
"dpath<3,>=2.1.0",
- "dvc-data>=3.3,<3.4",
+ "dvc-data>=3.4,<3.5",
"dvc-http>=2.29.0",
"dvc-rend... | diff --git a/tests/func/test_data_cloud.py b/tests/func/test_data_cloud.py
index 89fdb9e5c7..17f15f70af 100644
--- a/tests/func/test_data_cloud.py
+++ b/tests/func/test_data_cloud.py
@@ -481,12 +481,13 @@ def test_push_pull_fetch_pipeline_stages(tmp_dir, dvc, run_copy, local_remote):
def test_pull_partial(tmp_dir,... | partial fetch is broken
Partial fetch is broken in dvc.
## Steps to Reproduce
```bash
#! /bin/bash
set -ex
gen() {
mkdir -p "$1"
for i in {00..99}; do echo "$1/$i" > "$1/${i}.txt"; done
}
setup() {
pip install -q -e "."
pushd "$1"
dvc init -q --no-scm
gen data/dir01
gen... | Also see https://discuss.dvc.org/t/why-dvc-pulls-full-dataset-instead-of-a-single-file/1897.
This is very interesting. If I do `len(idx)`, it tells me the correct number of files and only downloads a subset. If I don't do anything, it downloads everything.
| 2023-12-27T10:55:54Z | 2023-12-27T13:20:33Z | ["tests/func/test_data_cloud.py::test_push_stats[fs0-2 files pushed]", "tests/func/test_data_cloud.py::test_output_remote", "tests/func/test_data_cloud.py::test_pull_partial_import", "tests/func/test_data_cloud.py::test_push_stats[fs1-1 file pushed]", "tests/func/test_virtual_directory.py::test_virtual_update_dir", "te... | [] | ["tests/func/test_virtual_directory.py::test_partial_checkout_and_update", "tests/func/test_data_cloud.py::test_pull_partial"] | ["tests/func/test_data_cloud.py::TestRemote::test_stage_cache_push_pull ", "tests/func/test_data_cloud.py::TestRemote::test_pull_no_00_prefix ", "tests/func/test_data_cloud.py::TestRemote::test_pull_00_prefix "] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.12", "pip_packages": ["adlfs==2023.12.0", "agate==1.7.0", "aiobotocore==2.9.0", "aiohttp==3.9.1", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.8", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.14.0", "aliyun-pyt... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-9952 | 9f4b67cec4d3a075c8fa94e507ccad6d80366667 | diff --git a/dvc/commands/gc.py b/dvc/commands/gc.py
index 46250c2e2e..1350b9362c 100644
--- a/dvc/commands/gc.py
+++ b/dvc/commands/gc.py
@@ -81,6 +81,7 @@ def run(self): # noqa: C901, PLR0912
rev=self.args.rev,
num=self.args.num,
not_in_remote=self.args.not_in_remote,
+ ... | diff --git a/tests/func/test_gc.py b/tests/func/test_gc.py
index a7e96b91d9..f1e28465ac 100644
--- a/tests/func/test_gc.py
+++ b/tests/func/test_gc.py
@@ -36,14 +36,14 @@ def test_gc_api(dvc, good_and_bad_cache):
dvc.gc(workspace=True)
odb = dvc.cache.local
good_cache, bad_cache = good_and_bad_cache
- ... | Dry run option for dvc gc
Can we have a dry run option for `dvc gc` so we can see what files and directories the command would delete without actually deleting it?
| @fedorn Sure. Contributions are welcome.
Happy to work on this one!
Related: https://discord.com/channels/485586884165107732/563406153334128681/1139483806957576212 | 2023-09-15T14:59:38Z | 2023-09-30T02:33:45Z | ["tests/func/test_gc.py::test_gc_without_workspace[c]", "tests/func/test_gc.py::test_gc_no_dir_cache", "tests/func/test_gc.py::test_gc_not_in_remote_remote_arg", "tests/func/test_gc.py::test_gc_with_possible_args_positive", "tests/func/test_gc.py::test_gc_all_experiments", "tests/func/test_gc.py::test_gc_cloud_positive... | [] | ["tests/func/test_gc.py::test_gc_cloud_remote_field", "tests/func/test_gc.py::test_gc_logging", "tests/func/test_gc.py::test_gc_dry"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.11", "pip_packages": ["adlfs==2023.8.0", "aiobotocore==2.5.4", "aiohttp==3.8.5", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.7", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.14.0", "aliyun-python-sdk-kms==2.16... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-9980 | f98150086254ae271145b1d3307b75d32ae3cb20 | diff --git a/dvc/repo/diff.py b/dvc/repo/diff.py
index d49b7e3ac9..9a98d11211 100644
--- a/dvc/repo/diff.py
+++ b/dvc/repo/diff.py
@@ -22,7 +22,7 @@ def _hash(entry):
return None
-def _diff(old, new, with_missing=False):
+def _diff(old, new, data_keys, with_missing=False):
from dvc_data.index.diff import ... | diff --git a/tests/func/test_diff.py b/tests/func/test_diff.py
index b1b09d9936..2c818c8dfd 100644
--- a/tests/func/test_diff.py
+++ b/tests/func/test_diff.py
@@ -668,3 +668,59 @@ def test_rename_multiple_files_same_hashes(tmp_dir, scm, dvc):
},
],
}
+
+
+def test_diff_granular(tmp_dir, dvc, ... | diff: output after partial pull wrongfully includes top dir
# Bug Report
## Description
After pulling a subset of a dvc tracked dataset, the results of `dvc diff <subpath in dataset>` show wrong (or confusing) results.
Specifically, if only a subdir of a dataset is pulled and modified, the top level item appears... | Additional info, `dvc data status --granular` output attached
[data_status_gran.txt](https://github.com/iterative/dvc/files/11559435/data_status_gran.txt)
> it shows a the top level dir as "Deleted", and also the containing dir as added
This may have actually got worse since 3.0. Even without adding a new file, I... | 2023-09-26T22:29:40Z | 2023-09-28T18:54:07Z | ["tests/func/test_diff.py::test_same_rev", "tests/func/test_diff.py::test_directories", "tests/func/test_diff.py::test_diff_rename_file[False]", "tests/func/test_diff.py::test_targets_single_file", "tests/func/test_diff.py::test_no_cache_entry", "tests/func/test_diff.py::test_targets_two_files_in_dir", "tests/func/test... | [] | ["tests/func/test_diff.py::test_diff_granular", "tests/func/test_diff.py::test_rename_multiple_files_same_hashes"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.11", "pip_packages": ["adlfs==2023.8.0", "aiobotocore==2.5.4", "aiohttp==3.8.5", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.7", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.14.0", "aliyun-python-sdk-kms==2.16... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-9929 | 7e52c233ae6797cf7029871afcd95645e8a435c5 | diff --git a/dvc/commands/experiments/run.py b/dvc/commands/experiments/run.py
index dd8c90cd3e..090cae3134 100644
--- a/dvc/commands/experiments/run.py
+++ b/dvc/commands/experiments/run.py
@@ -26,7 +26,7 @@ def run(self):
def add_parser(experiments_subparsers, parent_parser):
- EXPERIMENTS_RUN_HELP = "Run or ... | diff --git a/tests/func/experiments/test_experiments.py b/tests/func/experiments/test_experiments.py
index 1c487306c9..29259ac3e2 100644
--- a/tests/func/experiments/test_experiments.py
+++ b/tests/func/experiments/test_experiments.py
@@ -676,10 +676,12 @@ def test_experiment_unchanged(tmp_dir, scm, dvc, exp_stage):
... | `dvc exp run --dry --allow-missing` modifies dvc files
Reproduction steps:
```bash
cd "$(mktemp -d)"
git init && dvc init
echo -e "outs:\n- path: data" > data.dvc
dvc stage add -n test -d data ls
cat data.dvc
echo "data" >> .gitignore
git add .
git commit -m "init"
dvc exp run --dry --allow-missing -vv
cat... | @skshetry could you clarify why this is p1 /which scenarios are impacted?
It looks like this is coming from the internal `commit` operation done as part of `dvc exp run`:
```
cd "$(mktemp -d)"
git init && dvc init
echo -e "outs:\n- path: data" > data.dvc
dvc stage add -n test -d data ls
cat data.dvc
ec... | 2023-09-08T19:32:01Z | 2023-09-13T06:06:47Z | ["tests/func/experiments/test_experiments.py::test_untracked_top_level_files_are_included_in_exp[False]", "tests/func/experiments/test_experiments.py::test_failed_exp_workspace", "tests/func/experiments/test_experiments.py::test_new_simple[False-None]", "tests/func/experiments/test_experiments.py::test_modified_data_de... | [] | ["tests/func/experiments/test_experiments.py::test_experiment_run_dry"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.11", "pip_packages": ["adlfs==2023.8.0", "aiobotocore==2.5.4", "aiohttp==3.8.5", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.7", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.13.36", "aliyun-python-sdk-kms==2.1... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-9888 | 7a9da0f4a1d2790f2dcfd2774854b6ab2a10cd97 | diff --git a/dvc/commands/get_url.py b/dvc/commands/get_url.py
index e96deb50e1..9270f57a37 100644
--- a/dvc/commands/get_url.py
+++ b/dvc/commands/get_url.py
@@ -3,7 +3,7 @@
from dvc.cli import completion
from dvc.cli.command import CmdBaseNoRepo
-from dvc.cli.utils import append_doc_link
+from dvc.cli.utils impor... | diff --git a/dvc/testing/workspace_tests.py b/dvc/testing/workspace_tests.py
index 216c83ff12..e998601147 100644
--- a/dvc/testing/workspace_tests.py
+++ b/dvc/testing/workspace_tests.py
@@ -173,7 +173,7 @@ class TestLsUrl:
def test_file(self, cloud, fname):
cloud.gen({fname: "foo contents"})
fs,... | import-url/get-url: support smth like --config
To be able to pass remote config options on the fly. Similar to `--remote-config` in `import`.
Need to take care figuring out a proper name for this, because we already have `--config` and `--remote-config` elsewhere. So maybe `--url-config`?
| I have the need for this use case! | 2023-08-30T00:39:48Z | 2023-08-31T23:17:17Z | ["tests/func/test_import_url.py::test_cmd_import", "tests/func/test_import_url.py::test_import_url_to_dir[dir]", "tests/unit/command/test_imp_url.py::test_import_url_to_remote_invalid_combination[--version-aware]", "tests/func/test_import_url.py::test_import_url_to_remote_status", "tests/func/test_import_url.py::test_i... | [] | ["dvc/testing/workspace_tests.py::TestLsUrl::test_recursive", "tests/unit/command/test_imp_url.py::test_import_url_to_remote", "tests/unit/command/test_imp_url.py::test_import_url_no_exec_download_flags[--no-exec-expected0]", "dvc/testing/workspace_tests.py::TestLsUrl::test_file[foo]", "dvc/testing/workspace_tests.py::... | ["dvc/testing/workspace_tests.py::TestImportURLVersionAware::test_import_no_download", "dvc/testing/workspace_tests.py::TestImportURLVersionAware::test_import_dir", "dvc/testing/workspace_tests.py::TestImportURLVersionAware::test_import_file"] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.11", "pip_packages": ["adlfs==2023.8.0", "aiobotocore==2.5.4", "aiohttp==3.8.5", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiooss2==0.2.7", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.13.36", "aliyun-python-sdk-kms==2.1... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-9838 | a051b8b60f5ca7268ff1b1f7e8454f703a5539c6 | diff --git a/dvc/output.py b/dvc/output.py
index 43387e7840..fa73c4ba09 100644
--- a/dvc/output.py
+++ b/dvc/output.py
@@ -1090,7 +1090,7 @@ def get_files_number(self, filter_info=None):
return len(obj) if obj else 0
def unprotect(self):
- if self.exists:
+ if self.exists and self.use_cach... | diff --git a/tests/func/repro/test_repro.py b/tests/func/repro/test_repro.py
index 551e70527c..5f68c1e60f 100644
--- a/tests/func/repro/test_repro.py
+++ b/tests/func/repro/test_repro.py
@@ -1366,3 +1366,27 @@ def test_repro_ignore_errors(mocker, tmp_dir, dvc, copy_script):
[bar_call, stage1_call, foo_call, st... | repro: External outputs with persist: true and cache: false raise AssertionError
# Bug Report
<!--
## Issue name
Issue names must follow the pattern `command: description` where the command is the dvc command that you are trying to run. The description should describe the consequence of the bug.
Example: `rep... | cc'ing @efiop, do we expect this to work?
Cached external outputs are not supported since 3.0, we should give a better error here.
@efiop, it is in the case of `cache: false` here though.
Ah, right. Then probably missing `out.use_cache` check somewhere up the stack. | 2023-08-11T13:38:25Z | 2023-08-11T15:12:26Z | ["tests/func/repro/test_repro.py::test_freeze_non_existing[stage.dvc:name]", "tests/func/repro/test_repro.py::test_repro_when_new_out_overlaps_others_stage_outs", "tests/func/repro/test_repro.py::test_repro_shell", "tests/func/repro/test_repro.py::test_repro_dep_dir_with_outputs_under_it", "tests/func/repro/test_repro.... | [] | ["tests/func/repro/test_repro.py::test_repro_external_outputs[True]"] | ["tests/func/repro/test_repro.py::test_repro_ignore_errors - AssertionEr...", "tests/func/repro/test_repro.py::test_repro_external_outputs[False]", "tests/func/repro/test_repro.py::test_repro_keep_going - AssertionError..."] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.11", "pip_packages": ["adlfs==2023.8.0", "aiobotocore==2.5.4", "aiohttp==3.8.5", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.11.5", "aliyun-python-sdk-core-v3==2.11.5", "aliyun-p... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
iterative/dvc | iterative__dvc-9825 | c71b07b99622ab37138d6d63f611a532c1dda142 | diff --git a/dvc/config.py b/dvc/config.py
index 77f086c147..cee34420e0 100644
--- a/dvc/config.py
+++ b/dvc/config.py
@@ -250,21 +250,30 @@ def load_one(self, level):
return conf
@staticmethod
- def _load_paths(conf, filename):
- abs_conf_dir = os.path.abspath(os.path.dirname(filename))
+ ... | diff --git a/tests/func/test_config.py b/tests/func/test_config.py
index 9829b3ad1e..ac812836dc 100644
--- a/tests/func/test_config.py
+++ b/tests/func/test_config.py
@@ -265,14 +265,16 @@ def test_load_relative_paths(dvc, field, remote_url):
# check if written paths are correct
dvc_dir = dvc.config.dvc_dir... | Path with `~` in config breaks repo parsing
An entry like this:
```ini
[cache]
dir = ~/Projects
```
Breaks DVC into a weird error (and breaks at the moment Studio parsing, which is a separate issue a bit - we need to make resilient to this, but changes here would help us):
<details>
</summary>DVC verb... | @shcheklein Thanks for the report. You are spot on, we are using `isabs` there, but we really just need to do an expanduser somewhere there.
Will take a look. | 2023-08-09T21:17:26Z | 2023-08-10T00:28:33Z | ["tests/func/test_config.py::test_config_get_in_non_dvc_repo[args1-251]", "tests/func/test_config.py::test_config_get[args1-0-myremote]", "tests/func/test_config.py::test_config_get[args2-0-iterative]", "tests/func/test_config.py::test_config_get_in_non_dvc_repo[args0-251]", "tests/func/test_config.py::test_config_get[... | [] | ["tests/func/test_config.py::test_load_relative_paths[gdrive_service_account_json_file_path-gdrive://root/test]", "tests/func/test_config.py::test_load_relative_paths[cert_path-webdavs://example.com/files/USERNAME/]", "tests/func/test_config.py::test_load_relative_paths[key_path-webdavs://example.com/files/USERNAME/]",... | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": [], "python": "3.11", "pip_packages": ["adlfs==2023.8.0", "aiobotocore==2.5.4", "aiohttp==3.8.5", "aiohttp-retry==2.8.3", "aioitertools==0.11.0", "aiosignal==1.3.1", "aliyun-python-sdk-core==2.11.5", "aliyun-python-sdk-core-v3==2.11.5", "aliyun-p... | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.