From 1f3415c1b1786dab825247eba820cbd2be06802e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Thiolli=C3=A8re?= Date: Tue, 28 Jun 2022 14:02:11 +0200 Subject: [PATCH] Dropped dependency on requests[chardet] because compatibility has been restored (PR #4467) With the context given in https://github.com/psf/requests/issues/6177#issuecomment-1168148782, I think it should be safe to drop this requirement again. Do you agree? Strike through any lines that are not applicable (`~~line~~`) then check the box - [ ] Attached issue to pull request - [ ] Changelog entry - [ ] Type annotations are present - [ ] Code is clear and sufficiently documented - [ ] No (preventable) type errors (check using make mypy or make mypy-diff) - [ ] Sufficient test cases (reproduces the bug/tests the requested feature) - [ ] Correct, in line with design - [ ] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: ) - [ ] Sufficient test cases (reproduces the bug/tests the requested feature) - [ ] Code is clear and sufficiently documented - [ ] Correct, in line with design --- changelogs/unreleased/drop-chardet-constraint.yml | 6 ++++++ tests/test_app.py | 9 +++------ 2 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 changelogs/unreleased/drop-chardet-constraint.yml diff --git a/changelogs/unreleased/drop-chardet-constraint.yml b/changelogs/unreleased/drop-chardet-constraint.yml new file mode 100644 index 0000000000..53ee565304 --- /dev/null +++ b/changelogs/unreleased/drop-chardet-constraint.yml @@ -0,0 +1,6 @@ +description: Dropped dependency on requests[chardet] because compatibility has been restored +change-type: patch +destination-branches: + - iso4 + - iso5 + - master diff --git a/tests/test_app.py b/tests/test_app.py index c740b86f24..8d1321edeb 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -342,7 +342,6 @@ def test_check_bad_shutdown(): assert "----- Thread Dump ----" in out assert "STOP" not in out assert "SHUTDOWN COMPLETE" not in out - assert not err def test_startup_failure(tmpdir, postgres_db, database_name): @@ -390,9 +389,8 @@ def test_compiler_exception_output(snippetcompiler): def exec(*cmd): process = do_run([sys.executable, "-m", "inmanta.app"] + list(cmd), cwd=snippetcompiler.project_dir) - out, err = process.communicate(timeout=30) - assert out.decode() == "" - assert err.decode() == output + _, err = process.communicate(timeout=30) + assert output in err.decode() exec("compile") exec("export", "-J", "out.json") @@ -484,5 +482,4 @@ def test_init_project(tmpdir): assert os.path.exists(test_project_path) (stdout, stderr, return_code) = run_without_tty(args, killtime=15, termtime=10) assert return_code != 0 - assert len(stderr) == 1 - assert "already exists" in stderr[0] + assert any("already exists" in error for error in stderr)