diff --git a/3rdparty/python/BUILD b/3rdparty/python/BUILD index 2bfcd6f3b70..4ce75ec2b4d 100644 --- a/3rdparty/python/BUILD +++ b/3rdparty/python/BUILD @@ -8,9 +8,6 @@ python_requirements( "python-gnupg": ["gnupg"], "node-semver": ["nodesemver"], }, - overrides={ - "humbug": {"dependencies": ["#setuptools"]}, - }, ) python_requirements( diff --git a/3rdparty/python/requirements.txt b/3rdparty/python/requirements.txt index ddbc1b0ec05..a19ebacb2a0 100644 --- a/3rdparty/python/requirements.txt +++ b/3rdparty/python/requirements.txt @@ -8,11 +8,6 @@ ansicolors==1.1.8 chevron==0.14.0 fasteners==0.16.3 freezegun==1.2.1 - -# Note: we use humbug to report telemetry. When upgrading, ensure the new version maintains the -# anonymity promise we make here: https://www.pantsbuild.org/docs/anonymous-telemetry -humbug==0.2.7 - importlib_resources==5.0.* ijson==3.1.4 packaging==21.3 diff --git a/3rdparty/python/user_reqs.lock b/3rdparty/python/user_reqs.lock index ffb78904d1e..519af17f326 100644 --- a/3rdparty/python/user_reqs.lock +++ b/3rdparty/python/user_reqs.lock @@ -17,7 +17,6 @@ // "fastapi==0.78.0", // "fasteners==0.16.3", // "freezegun==1.2.1", -// "humbug==0.2.7", // "ijson==3.1.4", // "importlib_resources==5.0.*", // "mypy-typing-asserts==0.1.1", @@ -223,19 +222,19 @@ "artifacts": [ { "algorithm": "sha256", - "hash": "4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18", - "url": "https://files.pythonhosted.org/packages/71/4c/3db2b8021bd6f2f0ceb0e088d6b2d49147671f25832fb17970e9b583d742/certifi-2022.12.7-py3-none-any.whl" + "hash": "c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716", + "url": "https://files.pythonhosted.org/packages/9d/19/59961b522e6757f0c9097e4493fa906031b95b3ebe9360b2c3083561a6b4/certifi-2023.5.7-py3-none-any.whl" }, { "algorithm": "sha256", - "hash": "35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3", - "url": "https://files.pythonhosted.org/packages/37/f7/2b1b0ec44fdc30a3d31dfebe52226be9ddc40cd6c0f34ffc8923ba423b69/certifi-2022.12.7.tar.gz" + "hash": "0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7", + "url": "https://files.pythonhosted.org/packages/93/71/752f7a4dd4c20d6b12341ed1732368546bc0ca9866139fe812f6009d9ac7/certifi-2023.5.7.tar.gz" } ], "project_name": "certifi", "requires_dists": [], "requires_python": ">=3.6", - "version": "2022.12.7" + "version": "2023.5.7" }, { "artifacts": [ @@ -770,36 +769,6 @@ "requires_python": ">=3.5.0", "version": "0.5.0" }, - { - "artifacts": [ - { - "algorithm": "sha256", - "hash": "dec2871ce3ba9c9c176be837ea6c53d6001d1c15c7102620a8f58998fa01519c", - "url": "https://files.pythonhosted.org/packages/91/b9/79394ac8c0289802a767231080fb7d9e4474508ec1572d880be939d54406/humbug-0.2.7-py3-none-any.whl" - }, - { - "algorithm": "sha256", - "hash": "ee85cd404b138dd7fdb30e499bb9f10298c1f28acc76b6386a182a177b8f88a3", - "url": "https://files.pythonhosted.org/packages/b7/42/a0d2c78e8b1d0df37a79964d8f381c8fd5136ef5e16361d0d0986944364e/humbug-0.2.7.tar.gz" - } - ], - "project_name": "humbug", - "requires_dists": [ - "black; extra == \"dev\"", - "dataclasses; python_version == \"3.6\"", - "mypy; extra == \"dev\"", - "requests", - "setuptools; extra == \"distribute\"", - "twine; extra == \"distribute\"", - "types-dataclasses; extra == \"dev\"", - "types-pkg-resources; extra == \"dev\"", - "types-requests; extra == \"dev\"", - "wheel; extra == \"dev\"", - "wheel; extra == \"distribute\"" - ], - "requires_python": null, - "version": "0.2.7" - }, { "artifacts": [ { @@ -1587,13 +1556,13 @@ "artifacts": [ { "algorithm": "sha256", - "hash": "e8f3c9be120d3333921d213eef078af392fba3933ab7ed2d1cba3b56f2568c3b", - "url": "https://files.pythonhosted.org/packages/cf/e1/2aa539876d9ed0ddc95882451deb57cfd7aa8dbf0b8dbce68e045549ba56/requests-2.29.0-py3-none-any.whl" + "hash": "10e94cc4f3121ee6da529d358cdaeaff2f1c409cd377dbc72b825852f2f7e294", + "url": "https://files.pythonhosted.org/packages/96/80/034ffeca15c0f4e01b7b9c6ad0fb704b44e190cde4e757edbd60be404c41/requests-2.30.0-py3-none-any.whl" }, { "algorithm": "sha256", - "hash": "f2e34a75f4749019bb0e3effb66683630e4ffeaf75819fb51bebef1bf5aef059", - "url": "https://files.pythonhosted.org/packages/4c/d2/70fc708727b62d55bc24e43cc85f073039023212d482553d853c44e57bdb/requests-2.29.0.tar.gz" + "hash": "239d7d4458afcb28a692cdd298d87542235f4ca8d36d03a15bfc128a6559a2f4", + "url": "https://files.pythonhosted.org/packages/e0/69/122171604bcef06825fa1c05bd9e9b1d43bc9feb8c6c0717c42c92cc6f3c/requests-2.30.0.tar.gz" } ], "project_name": "requests", @@ -1603,10 +1572,10 @@ "chardet<6,>=3.0.2; extra == \"use_chardet_on_py3\"", "charset-normalizer<4,>=2", "idna<4,>=2.5", - "urllib3<1.27,>=1.21.1" + "urllib3<3,>=1.21.1" ], "requires_python": ">=3.7", - "version": "2.29.0" + "version": "2.30.0" }, { "artifacts": [ @@ -2351,30 +2320,29 @@ "artifacts": [ { "algorithm": "sha256", - "hash": "aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42", - "url": "https://files.pythonhosted.org/packages/7b/f5/890a0baca17a61c1f92f72b81d3c31523c99bec609e60c292ea55b387ae8/urllib3-1.26.15-py2.py3-none-any.whl" + "hash": "d055c2f9d38dc53c808f6fdc8eab7360b6fdbbde02340ed25cfbcd817c62469e", + "url": "https://files.pythonhosted.org/packages/4b/1d/f8383ef593114755429c307449e7717b87044b3bcd5f7860b89b1f759e34/urllib3-2.0.2-py3-none-any.whl" }, { "algorithm": "sha256", - "hash": "8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305", - "url": "https://files.pythonhosted.org/packages/21/79/6372d8c0d0641b4072889f3ff84f279b738cd8595b64c8e0496d4e848122/urllib3-1.26.15.tar.gz" + "hash": "61717a1095d7e155cdb737ac7bb2f4324a858a1e2e6466f6d03ff630ca68d3cc", + "url": "https://files.pythonhosted.org/packages/fb/c0/1abba1a1233b81cf2e36f56e05194f5e8a0cec8c03c244cab56cc9dfb5bd/urllib3-2.0.2.tar.gz" } ], "project_name": "urllib3", "requires_dists": [ - "PySocks!=1.5.7,<2.0,>=1.5.6; extra == \"socks\"", - "brotli>=1.0.9; ((os_name != \"nt\" or python_version >= \"3\") and platform_python_implementation == \"CPython\") and extra == \"brotli\"", - "brotlicffi>=0.8.0; ((os_name != \"nt\" or python_version >= \"3\") and platform_python_implementation != \"CPython\") and extra == \"brotli\"", - "brotlipy>=0.6.0; (os_name == \"nt\" and python_version < \"3\") and extra == \"brotli\"", + "brotli>=1.0.9; platform_python_implementation == \"CPython\" and extra == \"brotli\"", + "brotlicffi>=0.8.0; platform_python_implementation != \"CPython\" and extra == \"brotli\"", "certifi; extra == \"secure\"", - "cryptography>=1.3.4; extra == \"secure\"", + "cryptography>=1.9; extra == \"secure\"", "idna>=2.0.0; extra == \"secure\"", - "ipaddress; python_version == \"2.7\" and extra == \"secure\"", - "pyOpenSSL>=0.14; extra == \"secure\"", - "urllib3-secure-extra; extra == \"secure\"" + "pyopenssl>=17.1.0; extra == \"secure\"", + "pysocks!=1.5.7,<2.0,>=1.5.6; extra == \"socks\"", + "urllib3-secure-extra; extra == \"secure\"", + "zstandard>=0.18.0; extra == \"zstd\"" ], - "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7", - "version": "1.26.15" + "requires_python": ">=3.7", + "version": "2.0.2" }, { "artifacts": [ @@ -2550,204 +2518,204 @@ "artifacts": [ { "algorithm": "sha256", - "hash": "5004c087d17251938a52cce21b3dbdabeecbbe432ce3f5bbbf15d8692c36eac9", - "url": "https://files.pythonhosted.org/packages/ea/8a/32116db59137262378ba72a124e5ee28f78f8a3a621281cfbddb6a634b37/websockets-11.0.2-py3-none-any.whl" + "hash": "6681ba9e7f8f3b19440921e99efbb40fc89f26cd71bf539e45d8c8a25c976dc6", + "url": "https://files.pythonhosted.org/packages/47/96/9d5749106ff57629b54360664ae7eb9afd8302fad1680ead385383e33746/websockets-11.0.3-py3-none-any.whl" }, { "algorithm": "sha256", - "hash": "232b6ba974f5d09b1b747ac232f3a3d8f86de401d7b565e837cc86988edf37ac", - "url": "https://files.pythonhosted.org/packages/07/55/1187816ffb02a5366839ec10069441188a4645c5f206c04ce702527adcb2/websockets-11.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" + "hash": "e052b8467dd07d4943936009f46ae5ce7b908ddcac3fda581656b1b19c083d9b", + "url": "https://files.pythonhosted.org/packages/03/28/3a51ffcf51ac45746639f83128908bbb1cd212aa631e42d15a7acebce5cb/websockets-11.0.3-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" }, { "algorithm": "sha256", - "hash": "3ffe251a31f37e65b9b9aca5d2d67fd091c234e530f13d9dce4a67959d5a3fba", - "url": "https://files.pythonhosted.org/packages/0e/74/787fce70aae0fd9ff90bf77432039d1939438a125773156cf0324715c591/websockets-11.0.2-cp38-cp38-musllinux_1_1_i686.whl" + "hash": "0ee68fe502f9031f19d495dae2c268830df2760c0524cbac5d759921ba8c8e82", + "url": "https://files.pythonhosted.org/packages/1b/3d/3dc77699fa4d003f2e810c321592f80f62b81d7b78483509de72ffe581fd/websockets-11.0.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl" }, { "algorithm": "sha256", - "hash": "e37a76ccd483a6457580077d43bc3dfe1fd784ecb2151fcb9d1c73f424deaeba", - "url": "https://files.pythonhosted.org/packages/14/ca/87f36bc5758c1ca28494914f2c13942755a841cc481583356663cd5f11d4/websockets-11.0.2-cp39-cp39-musllinux_1_1_x86_64.whl" + "hash": "e6316827e3e79b7b8e7d8e3b08f4e331af91a48e794d5d8b099928b6f0b85f20", + "url": "https://files.pythonhosted.org/packages/20/62/5c6039c4069912adb27889ddd000403a2de9e0fe6aebe439b4e6b128a6b8/websockets-11.0.3-pp38-pypy38_pp73-macosx_10_9_x86_64.whl" }, { "algorithm": "sha256", - "hash": "2acdc82099999e44fa7bd8c886f03c70a22b1d53ae74252f389be30d64fd6004", - "url": "https://files.pythonhosted.org/packages/19/69/b7fd42aa6f119828c13a578c4be861d2ee37d6c6142481b4c293a8a96ab5/websockets-11.0.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl" + "hash": "bee9fcb41db2a23bed96c6b6ead6489702c12334ea20a297aa095ce6d31370d0", + "url": "https://files.pythonhosted.org/packages/30/a5/d641f2a9a4b4079cfddbb0726fc1b914be76a610aaedb45e4760899a4ce1/websockets-11.0.3-cp38-cp38-musllinux_1_1_aarch64.whl" }, { "algorithm": "sha256", - "hash": "adf6385f677ed2e0b021845b36f55c43f171dab3a9ee0ace94da67302f1bc364", - "url": "https://files.pythonhosted.org/packages/2a/02/1b5e07f6cc7db9165d5007eba59d08c1ace5e30b0b7fab23cd4ca3be991d/websockets-11.0.2-cp38-cp38-musllinux_1_1_x86_64.whl" + "hash": "b67c6f5e5a401fc56394f191f00f9b3811fe843ee93f4a70df3c389d1adf857d", + "url": "https://files.pythonhosted.org/packages/32/2c/ab8ea64e9a7d8bf62a7ea7a037fb8d328d8bd46dbfe083787a9d452a148e/websockets-11.0.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl" }, { "algorithm": "sha256", - "hash": "ce69f5c742eefd039dce8622e99d811ef2135b69d10f9aa79fbf2fdcc1e56cd7", - "url": "https://files.pythonhosted.org/packages/2e/8b/dab160db6ff385efe034ae4907893720b4a5f23fb282f124f5a375827b72/websockets-11.0.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl" + "hash": "332d126167ddddec94597c2365537baf9ff62dfcc9db4266f263d455f2f031cb", + "url": "https://files.pythonhosted.org/packages/36/19/0da435afb26a6c47c0c045a82e414912aa2ac10de5721276a342bd9fdfee/websockets-11.0.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" }, { "algorithm": "sha256", - "hash": "87c69f50281126dcdaccd64d951fb57fbce272578d24efc59bce72cf264725d0", - "url": "https://files.pythonhosted.org/packages/30/cc/b119fab11fcd2f065ea0eb7cbf4fd1559187acdc7455baefebf4a79f11d9/websockets-11.0.2-cp39-cp39-macosx_11_0_arm64.whl" + "hash": "8531fdcad636d82c517b26a448dcfe62f720e1922b33c81ce695d0edb91eb931", + "url": "https://files.pythonhosted.org/packages/38/30/01a10fbf4cc1e7ffa07be9b0401501918fc9433d71fb7da4cfcef3bd26ca/websockets-11.0.3-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" }, { "algorithm": "sha256", - "hash": "3a2100b02d1aaf66dc48ff1b2a72f34f6ebc575a02bc0350cc8e9fbb35940166", - "url": "https://files.pythonhosted.org/packages/32/ff/03941fb1c875594b39ea1ca902b673517ff4f87b4ce7a58282f1159e5c7d/websockets-11.0.2-cp37-cp37m-macosx_10_9_x86_64.whl" + "hash": "6505c1b31274723ccaf5f515c1824a4ad2f0d191cec942666b3d0f3aa4cb4007", + "url": "https://files.pythonhosted.org/packages/38/ed/b8b133416536b6816e480594864e5950051db522714623eefc9e5275ec04/websockets-11.0.3-cp37-cp37m-musllinux_1_1_aarch64.whl" }, { "algorithm": "sha256", - "hash": "2eb042734e710d39e9bc58deab23a65bd2750e161436101488f8af92f183c239", - "url": "https://files.pythonhosted.org/packages/37/3b/6765dbaf2f245b710519893e46e39f40b279072664cc2e65f9915fcf02b6/websockets-11.0.2-cp37-cp37m-musllinux_1_1_x86_64.whl" + "hash": "2529338a6ff0eb0b50c7be33dc3d0e456381157a31eefc561771ee431134a97f", + "url": "https://files.pythonhosted.org/packages/44/a8/66c3a66b70b01a6c55fde486298766177fa11dd0d3a2c1cfc6820f25b4dc/websockets-11.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" }, { "algorithm": "sha256", - "hash": "3e79065ff6549dd3c765e7916067e12a9c91df2affea0ac51bcd302aaf7ad207", - "url": "https://files.pythonhosted.org/packages/3b/c5/0c98276e1f4d1db4b82f61e91fc99451fa7e303add19b688fa07dd900620/websockets-11.0.2-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" + "hash": "e1a99a7a71631f0efe727c10edfba09ea6bee4166a6f9c19aafb6c0b5917d09c", + "url": "https://files.pythonhosted.org/packages/58/05/2efb520317340ece74bfc4d88e8f011dd71a4e6c263000bfffb71a343685/websockets-11.0.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" }, { "algorithm": "sha256", - "hash": "ede13a6998ba2568b21825809d96e69a38dc43184bdeebbde3699c8baa21d015", - "url": "https://files.pythonhosted.org/packages/3b/ed/14377de838c057ee35f4bdac3f470c48b70982c5cdbc6d00cec5c3fbb18d/websockets-11.0.2-cp39-cp39-musllinux_1_1_aarch64.whl" + "hash": "df41b9bc27c2c25b486bae7cf42fccdc52ff181c8c387bfd026624a491c2671b", + "url": "https://files.pythonhosted.org/packages/66/89/799f595c67b97a8a17e13d2764e088f631616bd95668aaa4c04b7cada136/websockets-11.0.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl" }, { "algorithm": "sha256", - "hash": "95c09427c1c57206fe04277bf871b396476d5a8857fa1b99703283ee497c7a5d", - "url": "https://files.pythonhosted.org/packages/3b/f4/47c57f2c91fc45b04f892208cb33d499002abdb1f539918769d5681c6406/websockets-11.0.2-cp37-cp37m-musllinux_1_1_i686.whl" + "hash": "34fd59a4ac42dff6d4681d8843217137f6bc85ed29722f2f7222bd619d15e95b", + "url": "https://files.pythonhosted.org/packages/70/fc/71377f36ef3049f3bc7db7c0f3a7696929d5f836d7a18777131d994192a9/websockets-11.0.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl" }, { "algorithm": "sha256", - "hash": "b444366b605d2885f0034dd889faf91b4b47668dd125591e2c64bfde611ac7e1", - "url": "https://files.pythonhosted.org/packages/42/c0/f5fa70aae7a6983f35380cff5843b18fbb20077558aeaf34be845e0529a9/websockets-11.0.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl" + "hash": "97b52894d948d2f6ea480171a27122d77af14ced35f62e5c892ca2fae9344311", + "url": "https://files.pythonhosted.org/packages/72/89/0d150939f2e592ed78c071d69237ac1c872462cc62a750c5f592f3d4ab18/websockets-11.0.3-cp39-cp39-musllinux_1_1_x86_64.whl" }, { "algorithm": "sha256", - "hash": "320ddceefd2364d4afe6576195201a3632a6f2e6d207b0c01333e965b22dbc84", - "url": "https://files.pythonhosted.org/packages/4b/00/862efcce079d2ca56c7a6ec8c829f232000566b40305dc962d49f3250e6c/websockets-11.0.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl" + "hash": "0ac56b661e60edd453585f4bd68eb6a29ae25b5184fd5ba51e97652580458998", + "url": "https://files.pythonhosted.org/packages/78/b2/df5452031b02b857851139806308f2af7c749069e25bfe15f2d559ade6e7/websockets-11.0.3-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl" }, { "algorithm": "sha256", - "hash": "cb46d2c7631b2e6f10f7c8bac7854f7c5e5288f024f1c137d4633c79ead1e3c0", - "url": "https://files.pythonhosted.org/packages/4b/84/a1d7881bf310dd19d72108e7d503644e1b0d6088a60decb7fab92bbccf16/websockets-11.0.2-cp38-cp38-macosx_11_0_arm64.whl" + "hash": "69269f3a0b472e91125b503d3c0b3566bda26da0a3261c49f0027eb6075086d1", + "url": "https://files.pythonhosted.org/packages/8a/77/a04d2911f6e2b9e781ce7ffc1e8516b54b85f985369eec8c853fd619d8e8/websockets-11.0.3-cp39-cp39-musllinux_1_1_i686.whl" }, { "algorithm": "sha256", - "hash": "d70a438ef2a22a581d65ad7648e949d4ccd20e3c8ed7a90bbc46df4e60320891", - "url": "https://files.pythonhosted.org/packages/50/52/0e7e12f35035f031f0e0a7eff80b605d6b5e651f8254f3c0a73fab580a58/websockets-11.0.2-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" + "hash": "4841ed00f1026dfbced6fca7d963c4e7043aa832648671b5138008dc5a8f6d99", + "url": "https://files.pythonhosted.org/packages/8a/bd/a5e5973899d78d44a540f50a9e30b01c6771e8bf7883204ee762060cf95a/websockets-11.0.3-cp38-cp38-macosx_11_0_arm64.whl" }, { "algorithm": "sha256", - "hash": "25aae96c1060e85836552a113495db6d857400288161299d77b7b20f2ac569f2", - "url": "https://files.pythonhosted.org/packages/54/d7/b194887d5a56aa819da5081b82d0224e119f460424d6082f076a3c9a7945/websockets-11.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" + "hash": "1d5023a4b6a5b183dc838808087033ec5df77580485fc533e7dab2567851b0a4", + "url": "https://files.pythonhosted.org/packages/8b/97/34178f5f7c29e679372d597cebfeff2aa45991d741d938117d4616e81a74/websockets-11.0.3-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" }, { "algorithm": "sha256", - "hash": "46388a050d9e40316e58a3f0838c63caacb72f94129eb621a659a6e49bad27ce", - "url": "https://files.pythonhosted.org/packages/59/ca/cbde2c49cc95675a37914fe54d0e4ba7d3d3e99b6cb0aae36a6eef4e2607/websockets-11.0.2-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl" + "hash": "8c82f11964f010053e13daafdc7154ce7385ecc538989a354ccc7067fd7028fd", + "url": "https://files.pythonhosted.org/packages/8f/f2/8a3eb016be19743c7eb9e67c855df0fdfa5912534ffaf83a05b62667d761/websockets-11.0.3-cp39-cp39-macosx_10_9_x86_64.whl" }, { "algorithm": "sha256", - "hash": "dd906b0cdc417ea7a5f13bb3c6ca3b5fd563338dc596996cb0fdd7872d691c0a", - "url": "https://files.pythonhosted.org/packages/75/bf/eb54d8ff54a13fc788599f0cbc12ad2d6a23c11e6f813f0677f8008a3f8a/websockets-11.0.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl" + "hash": "c114e8da9b475739dde229fd3bc6b05a6537a88a578358bc8eb29b4030fac9c9", + "url": "https://files.pythonhosted.org/packages/99/23/43071c989c0f87f612e7bccee98d00b04bddd3aca0cdc1ffaf31f6f8a4b4/websockets-11.0.3-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl" }, { "algorithm": "sha256", - "hash": "0fb4480556825e4e6bf2eebdbeb130d9474c62705100c90e59f2f56459ddab42", - "url": "https://files.pythonhosted.org/packages/77/2e/821acedf0717f36e2b9ae6f8ba76c3c4389bd0bf823cc9b730bdf5970bcf/websockets-11.0.2-cp39-cp39-macosx_10_9_universal2.whl" + "hash": "3580dd9c1ad0701169e4d6fc41e878ffe05e6bdcaf3c412f9d559389d0c9e016", + "url": "https://files.pythonhosted.org/packages/a0/1a/3da73e69ebc00649d11ed836541c92c1a2df0b8a8aa641a2c8746e7c2b9c/websockets-11.0.3-cp39-cp39-macosx_11_0_arm64.whl" }, { "algorithm": "sha256", - "hash": "1b52def56d2a26e0e9c464f90cadb7e628e04f67b0ff3a76a4d9a18dfc35e3dd", - "url": "https://files.pythonhosted.org/packages/7c/92/48c9e2b0a8de05bba6823ca14bd58b581f2158fbce38a8ca8dccacf4eccb/websockets-11.0.2-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl" + "hash": "68b977f21ce443d6d378dbd5ca38621755f2063d6fdb3335bda981d552cfff86", + "url": "https://files.pythonhosted.org/packages/a0/39/acc3d4b15c5207ef7cca823c37eca8c74e3e1a1a63a397798986be3bdef7/websockets-11.0.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl" }, { "algorithm": "sha256", - "hash": "4c54086b2d2aec3c3cb887ad97e9c02c6be9f1d48381c7419a4aa932d31661e4", - "url": "https://files.pythonhosted.org/packages/81/ca/2ce8945870f08c0d856b55e6bc812551130189de27a971902e7b9528b5df/websockets-11.0.2-cp39-cp39-musllinux_1_1_i686.whl" + "hash": "dcacf2c7a6c3a84e720d1bb2b543c675bf6c40e460300b628bab1b1efc7c034c", + "url": "https://files.pythonhosted.org/packages/a6/1b/5c83c40f8d3efaf0bb2fdf05af94fb920f74842b7aaf31d7598e3ee44d58/websockets-11.0.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" }, { "algorithm": "sha256", - "hash": "dca9708eea9f9ed300394d4775beb2667288e998eb6f542cdb6c02027430c599", - "url": "https://files.pythonhosted.org/packages/83/8f/9a1c3e8e805053619f21c6cb15ddbc7876bf883a28fa99503fa58b4a8405/websockets-11.0.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" + "hash": "279e5de4671e79a9ac877427f4ac4ce93751b8823f276b681d04b2156713b9dd", + "url": "https://files.pythonhosted.org/packages/a6/9c/2356ecb952fd3992b73f7a897d65e57d784a69b94bb8d8fd5f97531e5c02/websockets-11.0.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" }, { "algorithm": "sha256", - "hash": "a4fe2442091ff71dee0769a10449420fd5d3b606c590f78dd2b97d94b7455640", - "url": "https://files.pythonhosted.org/packages/8c/62/1c966e6feed8c89faa79714ed3053fa0afd1b106bf0c44156c833f28c36a/websockets-11.0.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" + "hash": "de36fe9c02995c7e6ae6efe2e205816f5f00c22fd1fbf343d4d18c3d5ceac2f5", + "url": "https://files.pythonhosted.org/packages/a7/8c/7100e9cf310fe1d83d1ae1322203f4eb2b767a7c2b301c1e70db6270306f/websockets-11.0.3-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" }, { "algorithm": "sha256", - "hash": "b985ba2b9e972cf99ddffc07df1a314b893095f62c75bc7c5354a9c4647c6503", - "url": "https://files.pythonhosted.org/packages/96/42/ff89b6738393fc4ddf4ee0c4feedb68cd5ee834e89c52ec1916eb93b55e7/websockets-11.0.2-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" + "hash": "9d9acd80072abcc98bd2c86c3c9cd4ac2347b5a5a0cae7ed5c0ee5675f86d9af", + "url": "https://files.pythonhosted.org/packages/a7/f7/1e852351e8073c32885172a6bef64c95d14c13ff3634b01d4a1086321491/websockets-11.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl" }, { "algorithm": "sha256", - "hash": "e8b967a4849db6b567dec3f7dd5d97b15ce653e3497b8ce0814e470d5e074750", - "url": "https://files.pythonhosted.org/packages/98/93/bcf5ee63aad37e4a7b675eae39d55411611274fd4891e2c920cea9a3ff55/websockets-11.0.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" + "hash": "9f59a3c656fef341a99e3d63189852be7084c0e54b75734cde571182c087b152", + "url": "https://files.pythonhosted.org/packages/b5/a8/8900184ab0b06b6e620ba7e92cf2faa5caa9ba86e148541b8fff1c7b6646/websockets-11.0.3-cp37-cp37m-macosx_10_9_x86_64.whl" }, { "algorithm": "sha256", - "hash": "b1a69701eb98ed83dd099de4a686dc892c413d974fa31602bc00aca7cb988ac9", - "url": "https://files.pythonhosted.org/packages/9d/67/68e568bb4a0617529db2723c75958223b70b95921cd114b5fd13567db4d8/websockets-11.0.2.tar.gz" + "hash": "e063b1865974611313a3849d43f2c3f5368093691349cf3c7c8f8f75ad7cb280", + "url": "https://files.pythonhosted.org/packages/b6/96/0d586c25d043aeab9457dad8e407251e3baf314d871215f91847e7b995c4/websockets-11.0.3-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" }, { "algorithm": "sha256", - "hash": "954eb789c960fa5daaed3cfe336abc066941a5d456ff6be8f0e03dd89886bb4c", - "url": "https://files.pythonhosted.org/packages/a2/bd/d20b428950e6965bb6e0489c7e5508e6791b8989d1b9f84047765c28c213/websockets-11.0.2-cp38-cp38-musllinux_1_1_aarch64.whl" + "hash": "777354ee16f02f643a4c7f2b3eff8027a33c9861edc691a2003531f5da4f6bc8", + "url": "https://files.pythonhosted.org/packages/c0/21/cb9dfbbea8dc0ad89ced52630e7e61edb425fb9fdc6002f8d0c5dd26b94b/websockets-11.0.3-cp39-cp39-macosx_10_9_universal2.whl" }, { "algorithm": "sha256", - "hash": "392d409178db1e46d1055e51cc850136d302434e12d412a555e5291ab810f622", - "url": "https://files.pythonhosted.org/packages/a7/10/971a38996b8044209f527a01563accb479e7f52bd6e2b77a55c31cf8423f/websockets-11.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl" + "hash": "fb06eea71a00a7af0ae6aefbb932fb8a7df3cb390cc217d51a9ad7343de1b8d0", + "url": "https://files.pythonhosted.org/packages/c4/5b/60eccd7e9703bbe93fc4167d1e7ada7e8e8e51544122198d63fd8e3460b7/websockets-11.0.3-cp38-cp38-macosx_10_9_universal2.whl" }, { "algorithm": "sha256", - "hash": "3178d965ec204773ab67985a09f5696ca6c3869afeed0bb51703ea404a24e975", - "url": "https://files.pythonhosted.org/packages/aa/80/ec21babff00cc5cb27c10a99e4c03b670a9e27f26439091f979fee74538a/websockets-11.0.2-cp38-cp38-macosx_10_9_universal2.whl" + "hash": "1fdf26fa8a6a592f8f9235285b8affa72748dc12e964a5518c6c5e8f916716f7", + "url": "https://files.pythonhosted.org/packages/c4/f5/15998b164c183af0513bba744b51ecb08d396ff86c0db3b55d62624d1f15/websockets-11.0.3-cp39-cp39-musllinux_1_1_aarch64.whl" }, { "algorithm": "sha256", - "hash": "ec00401846569aaf018700249996143f567d50050c5b7b650148989f956547af", - "url": "https://files.pythonhosted.org/packages/b3/bd/65e44c75f0aa9b782bbfc11eded7f7f5b702b4e43c47d680006258136dac/websockets-11.0.2-cp39-cp39-macosx_10_9_x86_64.whl" + "hash": "1553cb82942b2a74dd9b15a018dce645d4e68674de2ca31ff13ebc2d9f283788", + "url": "https://files.pythonhosted.org/packages/c6/91/f36454b87edf10a95be9c7212d2dcb8c606ddbf7a183afdc498933acdd19/websockets-11.0.3-cp38-cp38-musllinux_1_1_x86_64.whl" }, { "algorithm": "sha256", - "hash": "955fcdb304833df2e172ce2492b7b47b4aab5dcc035a10e093d911a1916f2c87", - "url": "https://files.pythonhosted.org/packages/c1/a9/17672f611f8955dad4345a56438b0dc710f9be75ca47957779ee6b2f14f7/websockets-11.0.2-cp38-cp38-macosx_10_9_x86_64.whl" + "hash": "4b253869ea05a5a073ebfdcb5cb3b0266a57c3764cf6fe114e4cd90f4bfa5f5e", + "url": "https://files.pythonhosted.org/packages/ca/20/25211be61d50189650fb0ec6084b6d6339f5c7c6436a6c217608dcb553e4/websockets-11.0.3-cp38-cp38-musllinux_1_1_i686.whl" }, { "algorithm": "sha256", - "hash": "5c7de298371d913824f71b30f7685bb07ad13969c79679cca5b1f7f94fec012f", - "url": "https://files.pythonhosted.org/packages/c3/91/08c0ee33324f2648dcb9d96bd8c78cbbc20e5d7770917cc5176ba9663ea3/websockets-11.0.2-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" + "hash": "8a34e13a62a59c871064dfd8ffb150867e54291e46d4a7cf11d02c94a5275bae", + "url": "https://files.pythonhosted.org/packages/d1/ec/7e2b9bebc2e9b4a48404144106bbc6a7ace781feeb0e6a3829551e725fa5/websockets-11.0.3-cp38-cp38-macosx_10_9_x86_64.whl" }, { "algorithm": "sha256", - "hash": "2abeeae63154b7f63d9f764685b2d299e9141171b8b896688bd8baec6b3e2303", - "url": "https://files.pythonhosted.org/packages/d8/73/0de2391aa2fdc833032bfef415adf90193177263e9436f3c06fbbbadebe0/websockets-11.0.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl" + "hash": "88fc51d9a26b10fc331be344f1781224a375b78488fc343620184e95a4b27016", + "url": "https://files.pythonhosted.org/packages/d8/3b/2ed38e52eed4cf277f9df5f0463a99199a04d9e29c9e227cfafa57bd3993/websockets-11.0.3.tar.gz" }, { "algorithm": "sha256", - "hash": "daa1e8ea47507555ed7a34f8b49398d33dff5b8548eae3de1dc0ef0607273a33", - "url": "https://files.pythonhosted.org/packages/dd/b7/ed3575a038d2d7b242fb8ced354c7dbcc8c8ea170b7cf33b62f31df7896c/websockets-11.0.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" + "hash": "6f1a3f10f836fab6ca6efa97bb952300b20ae56b409414ca85bff2ad241d2a61", + "url": "https://files.pythonhosted.org/packages/d9/36/5741e62ccf629c8e38cc20f930491f8a33ce7dba972cae93dba3d6f02552/websockets-11.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" }, { "algorithm": "sha256", - "hash": "13bd5bebcd16a4b5e403061b8b9dcc5c77e7a71e3c57e072d8dff23e33f70fba", - "url": "https://files.pythonhosted.org/packages/e7/55/883b3d2fb2435d4d80cbe39237d0a1ad7f6014f05de21926e3b410a1eae6/websockets-11.0.2-cp37-cp37m-musllinux_1_1_aarch64.whl" + "hash": "f2e58f2c36cc52d41f2659e4c0cbf7353e28c8c9e63e30d8c6d3494dc9fdedcf", + "url": "https://files.pythonhosted.org/packages/e2/2f/3ad8ac4a9dc9d685e098e534180a36ed68fe2e85e82e225e00daec86bb94/websockets-11.0.3-pp37-pypy37_pp73-macosx_10_9_x86_64.whl" }, { "algorithm": "sha256", - "hash": "b2a573c8d71b7af937852b61e7ccb37151d719974146b5dc734aad350ef55a02", - "url": "https://files.pythonhosted.org/packages/f0/61/c1a45650b8526b19f2aeb9f3e03532e493e6470bd99c4f67c66f5e20915b/websockets-11.0.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" + "hash": "f467ba0050b7de85016b43f5a22b46383ef004c4f672148a8abf32bc999a87f0", + "url": "https://files.pythonhosted.org/packages/e9/26/1dfaa81788f61c485b4d65f1b28a19615e39f9c45100dce5e2cbf5ad1352/websockets-11.0.3-cp37-cp37m-musllinux_1_1_i686.whl" }, { "algorithm": "sha256", - "hash": "518ed6782d9916c5721ebd61bb7651d244178b74399028302c8617d0620af291", - "url": "https://files.pythonhosted.org/packages/f8/cb/1178fe699508fc820eead75a8f1848dbc95acdd9fb2530b784db1e4a8f58/websockets-11.0.2-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" + "hash": "1a073fc9ab1c8aff37c99f11f1641e16da517770e31a37265d2755282a5d28aa", + "url": "https://files.pythonhosted.org/packages/ec/3f/0c5cae14e9e86401105833383405787ae4caddd476a8fc5561259253dab7/websockets-11.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" } ], "project_name": "websockets", "requires_dists": [], "requires_python": ">=3.7", - "version": "11.0.2" + "version": "11.0.3" }, { "artifacts": [ @@ -2803,7 +2771,6 @@ "fastapi==0.78.0", "fasteners==0.16.3", "freezegun==1.2.1", - "humbug==0.2.7", "ijson==3.1.4", "importlib_resources==5.0.*", "mypy-typing-asserts==0.1.1", diff --git a/pants.toml b/pants.toml index 0d52eb3195d..43cffe12529 100644 --- a/pants.toml +++ b/pants.toml @@ -86,7 +86,6 @@ delegate_bootstrap = true enabled = true repo_id = "7775F8D5-FC58-4DBC-9302-D00AE4A1505F" - [cli.alias] all-changed = "--changed-since=HEAD --changed-dependents=transitive" run-pyupgrade = "--backend-packages=pants.backend.experimental.python.lint.pyupgrade fmt" diff --git a/src/python/pants/goal/anonymous_telemetry.py b/src/python/pants/goal/anonymous_telemetry.py index 2f1bc8ca77d..33483af99df 100644 --- a/src/python/pants/goal/anonymous_telemetry.py +++ b/src/python/pants/goal/anonymous_telemetry.py @@ -3,25 +3,8 @@ from __future__ import annotations -import json import logging -import re -import uuid -from dataclasses import dataclass -from typing import cast -from humbug.consent import HumbugConsent -from humbug.report import HumbugReporter, Modes, Report - -from pants.engine.internals.scheduler import Workunit -from pants.engine.rules import collect_rules, rule -from pants.engine.streaming_workunit_handler import ( - StreamingWorkunitContext, - WorkunitsCallback, - WorkunitsCallbackFactory, - WorkunitsCallbackFactoryRequest, -) -from pants.engine.unions import UnionRule from pants.option.option_types import BoolOption, StrOption from pants.option.subsystem import Subsystem from pants.util.docutil import doc_url @@ -29,11 +12,17 @@ logger = logging.getLogger(__name__) - -_bugout_access_token = "974b1acc-e052-4e5f-a45e-bae928e47bb0" _telemetry_docs_referral = f"See {doc_url('anonymous-telemetry')} for details" +# This subsystem is orphaned (but not quite deprecated/removed). +# We found that: +# - Most people disabled the telemetry +# - The telemetry we received wasn't being used for meaningful decisions +# - The implementation we had required humbug, which bloated Pants' environment with it and its dependencies +# +# The subsystem still exists, however, in hopes that a future implementation could be added seamlessly +# which addresses the above points. class AnonymousTelemetry(Subsystem): options_scope = "anonymous-telemetry" help = "Options related to sending anonymous stats to the Pants project, to aid development." @@ -71,150 +60,5 @@ class AnonymousTelemetry(Subsystem): ) -class AnonymousTelemetryCallback(WorkunitsCallback): - def __init__(self, unhashed_repo_id: str) -> None: - super().__init__() - self._unhashed_repo_id = unhashed_repo_id - - # Broken out into a staticmethod for testing. - @staticmethod - def validate_repo_id(unhashed_repo_id: str) -> bool: - return re.match(r"^[a-zA-Z0-9-_]{30,60}$", unhashed_repo_id) is not None - - @property - def can_finish_async(self) -> bool: - # Because we don't log anything, it's safe to finish in the background. - return True - - def __call__( - self, - *, - started_workunits: tuple[Workunit, ...], - completed_workunits: tuple[Workunit, ...], - finished: bool, - context: StreamingWorkunitContext, - ) -> None: - if not finished: - return - - # Assemble and send the telemetry. - # Note that this method is called with finished=True only after the - # StreamingWorkunitHandler context ends, i.e., after end_run() has been called, - # so the RunTracker will have had a chance to finalize its state. - telemetry_data = context.run_tracker.get_anonymous_telemetry_data(self._unhashed_repo_id) - # TODO: Add information about any errors that occurred. - - reporter = HumbugReporter( - name="pantsbuild/pants", - # We've already established consent at this point. - consent=HumbugConsent(True), - session_id=str(telemetry_data.get("run_id", uuid.uuid4())), - bugout_token=_bugout_access_token, - timeout_seconds=5, - # We don't want to spawn a thread in the engine, and we're - # already running in a background thread in pantsd. - mode=Modes.SYNCHRONOUS, - ) - - # This is copied from humbug code, to ensure that future changes to humbug - # don't add tags that inadvertently violate our anonymity promise. - system_tags = [ - f"source:{reporter.name}", - f"os:{reporter.system_information.os}", - f"arch:{reporter.system_information.machine}", - f"python:{reporter.system_information.python_version_major}", - "python:{}.{}".format( - reporter.system_information.python_version_major, - reporter.system_information.python_version_minor, - ), - f"python:{reporter.system_information.python_version}", - f"session:{reporter.session_id}", - ] - tags = ( - system_tags - + [ - f"pants_version:{telemetry_data.get('pants_version')}", - # This is hashed, unlike the contents of the unhashed_repo_id var. - f"repo:{telemetry_data.get('repo_id', 'UNKNOWN')}", - f"user:{telemetry_data.get('user_id', 'UNKNOWN')}", - f"machine:{telemetry_data.get('machine_id', 'UNKNOWN')}", - f"duration:{telemetry_data.get('duration', '0')}", - f"outcome:{telemetry_data.get('outcome', 'UNKNOWN')}", - ] - + [f"goal:{goal}" for goal in telemetry_data.get("standard_goals", [])] - ) - - report = Report( - title=f"pants run {reporter.session_id}", - tags=tags, - content=json.dumps(telemetry_data, sort_keys=True), - ) - reporter.publish(report) - - -@dataclass(frozen=True) -class AnonymousTelemetryCallbackFactoryRequest: - """A unique request type that is installed to trigger construction of the WorkunitsCallback.""" - - -@rule -def construct_callback( - _: AnonymousTelemetryCallbackFactoryRequest, anonymous_telemetry: AnonymousTelemetry -) -> WorkunitsCallbackFactory: - enabled = anonymous_telemetry.enabled - unhashed_repo_id = anonymous_telemetry.repo_id - - if anonymous_telemetry.options.is_default("enabled"): - logger.warning( - softwrap( - f""" - Please either set `enabled = true` in the [anonymous-telemetry] section of - pants.toml to enable sending anonymous stats to the Pants project to aid - development, or set `enabled = false` to disable it. No telemetry sent - for this run. An explicit setting will get rid of this message. - {_telemetry_docs_referral}. - """ - ) - ) - if enabled: - if unhashed_repo_id is None: - logger.error( - softwrap( - f""" - Please set `repo_id = ""` in the [anonymous-telemetry] section - of pants.toml, where `` is some fixed random identifier, such as - one generated by uuidgen. - - Example (you may copy this example as is, it is already using randomly generated UUID): - - [anonymous-telemetry] - repo_id = "{uuid.uuid4()}" - - No telemetry will be sent for this run. - {_telemetry_docs_referral}. - """ - ) - ) - enabled = False - elif not AnonymousTelemetryCallback.validate_repo_id(unhashed_repo_id): - logger.error( - softwrap( - """ - The repo_id option in the [anonymous-telemetry] scope must be between 30 and - 60 characters long, and consist of only alphanumeric characters, dashes - and underscores. - """ - ) - ) - enabled = False - - return WorkunitsCallbackFactory( - lambda: AnonymousTelemetryCallback(cast(str, unhashed_repo_id)) if enabled else None - ) - - def rules(): - return [ - UnionRule(WorkunitsCallbackFactoryRequest, AnonymousTelemetryCallbackFactoryRequest), - *collect_rules(), - ] + return AnonymousTelemetry.rules() diff --git a/src/python/pants/goal/anonymous_telemetry_integration_test.py b/src/python/pants/goal/anonymous_telemetry_integration_test.py deleted file mode 100644 index 142192f6717..00000000000 --- a/src/python/pants/goal/anonymous_telemetry_integration_test.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). -# Licensed under the Apache License, Version 2.0 (see LICENSE). - -from __future__ import annotations - -from pants.testutil.pants_integration_test import run_pants - -_no_explicit_setting_msg = "An explicit setting will get rid of this message" -_no_repo_id_msg = 'set `repo_id = ""` in the [anonymous-telemetry] section of pants.toml' -_bad_repo_id_msg = "must be between 30 and 60 characters long" - - -def test_warn_if_no_explicit_setting() -> None: - result = run_pants(["roots"], config={}) - result.assert_success() - assert _no_explicit_setting_msg in result.stderr - assert _no_repo_id_msg not in result.stderr - assert _bad_repo_id_msg not in result.stderr - - -def test_warn_if_repo_id_unset() -> None: - result = run_pants(["roots"], config={"anonymous-telemetry": {"enabled": True}}) - result.assert_success() - assert _no_explicit_setting_msg not in result.stderr - assert _no_repo_id_msg in result.stderr - assert _bad_repo_id_msg not in result.stderr - - -def test_warn_if_repo_id_invalid() -> None: - result = run_pants( - ["roots"], - config={"anonymous-telemetry": {"enabled": True, "repo_id": "tooshort"}}, - ) - result.assert_success() - assert _no_explicit_setting_msg not in result.stderr - assert _no_repo_id_msg not in result.stderr - assert _bad_repo_id_msg in result.stderr - - -def test_no_warn_if_explicitly_on() -> None: - result = run_pants( - ["roots"], - config={"anonymous-telemetry": {"enabled": True, "repo_id": 36 * "a"}}, - ) - result.assert_success() - assert _no_explicit_setting_msg not in result.stderr - assert _no_repo_id_msg not in result.stderr - assert _bad_repo_id_msg not in result.stderr - - -def test_no_warn_if_explicitly_off() -> None: - result = run_pants(["roots"], config={"anonymous-telemetry": {"enabled": False}}) - result.assert_success() - assert _no_explicit_setting_msg not in result.stderr - assert _no_repo_id_msg not in result.stderr - assert _bad_repo_id_msg not in result.stderr diff --git a/src/python/pants/goal/anonymous_telemetry_test.py b/src/python/pants/goal/anonymous_telemetry_test.py deleted file mode 100644 index 97547c8834f..00000000000 --- a/src/python/pants/goal/anonymous_telemetry_test.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). -# Licensed under the Apache License, Version 2.0 (see LICENSE). - -import pytest - -from pants.goal.anonymous_telemetry import AnonymousTelemetryCallback - - -@pytest.mark.parametrize( - "repo_id", - [ - "a" * 30, - "2" * 31, - "C" * 60, - "c1db8737-06b4-4aa8-b18f-8cde023eb524", - "D2E39BA4_BA82_4A85_99DC_9E99E4528D3F", - ], -) -def test_valid_repo_ids(repo_id) -> None: - assert AnonymousTelemetryCallback.validate_repo_id(repo_id) - - -@pytest.mark.parametrize( - "repo_id", - [ - "", - "x", - "a" * 29, - "2" * 61, - "@c1db8737-06b4-4aa8-b18f-8cde023eb524", - "D2E39BA4-BA82-4A85-99DC-9Eá9E4528D3F", - ], -) -def test_invalid_repo_ids(repo_id) -> None: - assert not AnonymousTelemetryCallback.validate_repo_id(repo_id)