From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oDmMJgo6+mOVeQAAbAwnHQ (envelope-from ) for ; Sat, 25 Feb 2023 17:40:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0NNxJgo6+mMCOwAAauVa8A (envelope-from ) for ; Sat, 25 Feb 2023 17:40:42 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A93E01A40B for ; Sat, 25 Feb 2023 17:40:41 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677343242; a=rsa-sha256; cv=none; b=oUKkVUSyxVPfcOzAMNEGZvuLfOrabbOuaGnj9c/ByQtuiZDshaW7yuM8PpoqzgxumdtBrt yvd1q35YvqnpnvTWtIugFjo9NUqCG5IP2GlcWSX317JPH8gp6LUn1v46M/YpEaLvl9eAkj JCbgWqHux01GDAFH4e+dHzR2yJBMLjacvqck8MAbaFzlF5eoP5AtkCGdz35K3pwe0AAfZR eR8gWM+3DlyhKMTaoyUR6Cm+AI6XgjaR0ETKCkJm1jSP/WqPeC0cjf6cvWVKMnNpNFX3Ee eGs/7t0mpl2HQxkTBHi9BUs/9hq6TKZmaN895e/qARIJqFnSqpbSgoKLHCWsrw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677343242; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=U10nARnDeFssZeSCosMi5L4Hn+ePXSNr5UAFoMXVLsQ=; b=FND7kT/nHpj2lXmynqyePrUCDNDR8PEhR5X7nUKgr7dL1YSB2UxTYMO5Hx/M1I6DOu6Cd4 abCSlIKNC5RerkfPqnN8eS30GaBEe4RclbHZiLZBcOmQziKsjo3N+pb5REosmH/LwkwWjd 0KX6i41O8yFxvkAK0iRdJ+glQLkg/UZB4bxZqBtWhOn7GGNT2irxLr9IT6rB1WQYt5qxSy zyUQ/h46P9WPXEDJOLQZ+f/ar2XH82OHicTklVyCbpUV2YaOc3EiWswboQsV8uK6AH4EAn yn1ABgMBFbEoVX1epQv/tqDnWzbNOaOk6vNGod+lK3pFg7hKKRK9bfAS6CNCEA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVxap-0003Wb-Ub; Sat, 25 Feb 2023 11:40:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVxag-0003TS-64 for guix-devel@gnu.org; Sat, 25 Feb 2023 11:40:06 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVxad-0002sv-FL for guix-devel@gnu.org; Sat, 25 Feb 2023 11:40:05 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 3C72BF90; Sat, 25 Feb 2023 17:39:58 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5SRfYBx4UZ4o; Sat, 25 Feb 2023 17:39:56 +0100 (CET) Received: from jurong (unknown [IPv6:2001:861:c4:f2f0::c64]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 53C143F0; Sat, 25 Feb 2023 17:39:56 +0100 (CET) Date: Sat, 25 Feb 2023 17:39:55 +0100 From: Andreas Enge To: Lars-Dominik Braun Cc: guix-devel@gnu.org Subject: Re: Python Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Received-SPF: pass client-ip=2a0c:e300::1; envelope-from=andreas@enge.fr; helo=hera.aquilenet.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: A93E01A40B X-Spam-Score: -1.48 X-Migadu-Spam-Score: -1.48 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-TUID: 6wdTBRCI3dH8 Am Sat, Feb 25, 2023 at 04:45:39PM +0100 schrieb Lars-Dominik Braun: > note that importlib-metadata is – again – part of the standard > library, as the table on [1] points out. So if we would ship Python 3.12, > we would not need it. Bumping it to version 5.2 seems like the correct > approach right now, since we’re at 3.10.7 on core-updates (as far as I see). Very interesting! I am just not used to these very dynamically changing languages. After a bit of discussion, we recently decided with my coauthor to assume the C99 standard in our library instead of C89 :) Right now I am left with a number of test failures that look real and cannot easily be solved by an upgrade (either because we are already on the latest version or because the tests still fail): python-sgmllib3k, python-typeguard and python-coveralls. See messages below. Andreas python-coveralls: =================================== FAILURES =================================== ___________________ ReporterTest.test_reporter_with_branches ___________________ self = def test_reporter_with_branches(self): subprocess.call(['coverage', 'run', '--branch', '--omit=**/.tox/*', 'runtests.py'], cwd=EXAMPLE_DIR) results = Coveralls(repo_token='xxx').get_coverage() assert len(results) == 2 # Branches are expressed as four values each in a flat list assert not len(results[0]['branches']) % 4 assert not len(results[1]['branches']) % 4 > assert_coverage(results[0], { 'source': ('def hello():\n' ' print(\'world\')\n\n\n' 'class Foo:\n' ' """ Bar """\n\n\n' 'def baz():\n' ' print(\'this is not tested\')\n\n' 'def branch(cond1, cond2):\n' ' if cond1:\n' ' print(\'condition tested both ways\')\n' ' if cond2:\n' ' print(\'condition not tested both ways\')\n'), 'name': 'project.py', 'branches': [13, 0, 14, 1, 13, 0, 15, 1, 15, 0, 16, 1, 15, 0, 12, 0], 'coverage': [1, 1, None, None, 1, None, None, None, 1, 0, None, 1, 1, 1, 1, 1]}) /tmp/guix-build-python-coveralls-3.2.0.drv-0/source/tests/api/reporter_test.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ actual = {'branches': [5, 0, 6, 1, 5, 0, ...], 'coverage': [1, 1, None, None, 1, None, ...], 'name': 'project.py', 'source': 'd...1:\n print(\'condition tested both ways\')\n if cond2:\n print(\'condition not tested both ways\')\n'} expected = {'branches': [13, 0, 14, 1, 13, 0, ...], 'coverage': [1, 1, None, None, 1, None, ...], 'name': 'project.py', 'source':...1:\n print(\'condition tested both ways\')\n if cond2:\n print(\'condition not tested both ways\')\n'} def assert_coverage(actual, expected): assert actual['source'].strip() == expected['source'].strip() assert actual['name'] == expected['name'] assert actual['coverage'] == expected['coverage'] > assert actual.get('branches') == expected.get('branches') E assert [5, 0, 6, 1, 5, 0, 9, 1, 13, 0, 14, 1, 13, 0, 15, 1, 15, 0, 16, 1, 15, 0, 12, 0] == [13, 0, 14, 1, 13, 0, 15, 1, 15, 0, 16, 1, 15, 0, 12, 0] E At index 0 diff: 5 != 13 E Left contains 8 more items, first extra item: 15 E Full diff: E - [13, 0, 14, 1, 13, 0, 15, 1, 15, 0, 16, 1, 15, 0, 12, 0] E + [5, 0, 6, 1, 5, 0, 9, 1, 13, 0, 14, 1, 13, 0, 15, 1, 15, 0, 16, 1, 15, 0, 12, 0] E ? ++++++++++++++++++++++++ /tmp/guix-build-python-coveralls-3.2.0.drv-0/source/tests/api/reporter_test.py:17: AssertionError ----------------------------- Captured stdout call ----------------------------- world condition not tested both ways condition tested both ways condition not tested both ways =========================== short test summary info ============================ FAILED tests/api/reporter_test.py::ReporterTest::test_reporter_with_branches =================== 1 failed, 51 passed, 1 skipped in 2.51s ==================== error: in phase 'check': uncaught exception: %exception #<&invoke-error program: "pytest" arguments: ("-vv") exit-status: 1 term-signal: #f stop-signal: #f> phase `check' failed after 2.8 seconds command "pytest" "-vv" failed with status 1 builder for `/gnu/store/2f7hab84ljj1k284w61zn14cbapzfdnf-python-coveralls-3.2.0.drv' failed with exit code 1 build of /gnu/store/2f7hab84ljj1k284w61zn14cbapzfdnf-python-coveralls-3.2.0.drv failed View build log at '/var/log/guix/drvs/2f/7hab84ljj1k284w61zn14cbapzfdnf-python-coveralls-3.2.0.drv.gz'. python-sgmllib3k: ====================================================================== FAIL: test_declaration_junk_chars (test_sgmllib.SGMLParserTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/guix-build-python-sgmllib3k-1.0.0-1.7999646.drv-0/source/test_sgmllib.py", line 310, in test_declaration_junk_chars self.check_parse_error("") File "/tmp/guix-build-python-sgmllib3k-1.0.0-1.7999646.drv-0/source/test_sgmllib.py", line 127, in check_parse_error parser.feed(source) File "/tmp/guix-build-python-sgmllib3k-1.0.0-1.7999646.drv-0/source/sgmllib.py", line 98, in feed self.goahead(0) File "/tmp/guix-build-python-sgmllib3k-1.0.0-1.7999646.drv-0/source/sgmllib.py", line 168, in goahead k = self.parse_declaration(i) File "/gnu/store/blals34ar25fiifvm17m2b504waxzys0-python-3.10.7/lib/python3.10/_markupbase.py", line 134, in parse_declaration raise AssertionError("unexpected %r char in declaration" % rawdata[j]) AssertionError: unexpected '$' char in declaration ---------------------------------------------------------------------- Ran 23 tests in 0.008s FAILED (failures=1) Test failed: error: Test failed: error: in phase 'check': uncaught exception: %exception #<&invoke-error program: "python" arguments: ("-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test") exit-status: 1 term-signal: #f stop-signal: #f> phase `check' failed after 0.3 seconds command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1 builder for `/gnu/store/cp8sgcp3c1599dzjwmfms38jz3iddyk1-python-sgmllib3k-1.0.0-1.7999646.drv' failed with exit code 1 build of /gnu/store/cp8sgcp3c1599dzjwmfms38jz3iddyk1-python-sgmllib3k-1.0.0-1.7999646.drv failed View build log at '/var/log/guix/drvs/cp/8sgcp3c1599dzjwmfms38jz3iddyk1-python-sgmllib3k-1.0.0-1.7999646.drv.gz'. python-typeguard: =================================== FAILURES =================================== ___________________ TestTypeChecked.test_typed_dict[correct] ___________________ tests/test_typeguard.py:1343: in test_typed_dict foo(value) /gnu/store/qmli9ql0wplg1hyacy07kvgaqbpfa11z-python-typeguard-2.13.3/lib/python3.10/site-packages/typeguard/__init__.py:1032: in wrapper check_argument_types(memo) /gnu/store/qmli9ql0wplg1hyacy07kvgaqbpfa11z-python-typeguard-2.13.3/lib/python3.10/site-packages/typeguard/__init__.py:875: in check_argument_types raise TypeError(*exc.args) from None E TypeError: TypedDict does not support instance and class checks __________________ TestTypeChecked.test_typed_dict[missing_x] __________________ tests/test_typeguard.py:1341: in test_typed_dict pytest.raises(TypeError, foo, value).match(error_re) E AssertionError: Regex pattern 'required key\\(s\\) \\("x"\\) missing from argument "arg"' does not match 'TypedDict does not support instance and class checks'. ___________________ TestTypeChecked.test_typed_dict[wrong_y] ___________________ tests/test_typeguard.py:1341: in test_typed_dict pytest.raises(TypeError, foo, value).match(error_re) E AssertionError: Regex pattern 'type of dict item "y" for argument "arg" must be str; got int instead' does not match 'TypedDict does not support instance and class checks'. _______________ TestTypeChecked.test_typed_dict[missing_y_error] _______________ tests/test_typeguard.py:1341: in test_typed_dict pytest.raises(TypeError, foo, value).match(error_re) E AssertionError: Regex pattern 'required key\\(s\\) \\("y"\\) missing from argument "arg"' does not match 'TypedDict does not support instance and class checks'. ________________ TestTypeChecked.test_typed_dict[missing_y_ok] _________________ tests/test_typeguard.py:1343: in test_typed_dict foo(value) /gnu/store/qmli9ql0wplg1hyacy07kvgaqbpfa11z-python-typeguard-2.13.3/lib/python3.10/site-packages/typeguard/__init__.py:1032: in wrapper check_argument_types(memo) /gnu/store/qmli9ql0wplg1hyacy07kvgaqbpfa11z-python-typeguard-2.13.3/lib/python3.10/site-packages/typeguard/__init__.py:875: in check_argument_types raise TypeError(*exc.args) from None E TypeError: TypedDict does not support instance and class checks ___________________ TestTypeChecked.test_typed_dict[wrong_x] ___________________ tests/test_typeguard.py:1341: in test_typed_dict pytest.raises(TypeError, foo, value).match(error_re) E AssertionError: Regex pattern 'type of dict item "x" for argument "arg" must be int; got str instead' does not match 'TypedDict does not support instance and class checks'. _________________ TestTypeChecked.test_typed_dict[unknown_key] _________________ tests/test_typeguard.py:1341: in test_typed_dict pytest.raises(TypeError, foo, value).match(error_re) E AssertionError: Regex pattern 'extra key\\(s\\) \\("foo"\\) in argument "arg"' does not match 'TypedDict does not support instance and class checks'. =============================== warnings summary =============================== tests/test_typeguard.py::TestTypeChecker::test_generator tests/test_typeguard.py::TestTypeChecker::test_exception tests/test_typeguard_py36.py::TestTypeChecker::test_async_generator[generator] tests/test_typeguard_py36.py::TestTypeChecker::test_async_generator[iterable] tests/test_typeguard_py36.py::TestTypeChecker::test_async_generator[iterator] /gnu/store/fgbf94ab19n90rsz6h7vrvqyw17w9kqa-python-pytest-7.1.3/lib/python3.10/site-packages/_pytest/python.py:192: PytestRemovedIn8Warning: Passing None has been deprecated. See https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests for alternatives in common use cases. result = testfunction(**testargs) tests/test_typeguard_py36.py::TestTypeChecker::test_callable /gnu/store/qmli9ql0wplg1hyacy07kvgaqbpfa11z-python-typeguard-2.13.3/lib/python3.10/site-packages/typeguard/__init__.py:1027: UserWarning: no code associated -- not typechecking test_typeguard_py36..command object at 0x7ffff5d4a800> warn('no code associated -- not typechecking {}'.format(function_name(func))) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========== 7 failed, 233 passed, 3 deselected, 6 warnings in 2.13s ============ error: in phase 'check': uncaught exception: %exception #<&invoke-error program: "pytest" arguments: ("-vv" "-k" "not usefixtures and not test_cached_module") exit-status: 1 term-signal: #f stop-signal: #f> phase `check' failed after 2.5 seconds command "pytest" "-vv" "-k" "not usefixtures and not test_cached_module" failed with status 1 builder for `/gnu/store/l9gb4nadq9c43zn82wqbxmwgib7bkqqs-python-typeguard-2.13.3.drv' failed with exit code 1 build of /gnu/store/l9gb4nadq9c43zn82wqbxmwgib7bkqqs-python-typeguard-2.13.3.drv failed View build log at '/var/log/guix/drvs/l9/gb4nadq9c43zn82wqbxmwgib7bkqqs-python-typeguard-2.13.3.drv.gz'.