From 1c56ab334256e20ec871b77c97de225c706aab0e Mon Sep 17 00:00:00 2001 From: Chris Burroughs Date: Sun, 5 Oct 2025 09:31:58 -0400 Subject: [PATCH 1/5] Upgrade to Pants 2.29.0 --- pants.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pants.toml b/pants.toml index cbe1e2e..5ddd07b 100644 --- a/pants.toml +++ b/pants.toml @@ -2,7 +2,7 @@ # Licensed under the Apache License, Version 2.0 (see LICENSE). [GLOBAL] -pants_version = "2.28.0" +pants_version = "2.29.0" backend_packages.add = [ "pants.backend.build_files.fmt.black", "pants.backend.python", From 5164ad216e9ca1fa67380f3ad5fa2ecd963775d1 Mon Sep 17 00:00:00 2001 From: Chris Burroughs Date: Sun, 5 Oct 2025 09:51:20 -0400 Subject: [PATCH 2/5] https://github.com/PyCQA/flake8/issues/1760 --- .flake8 | 10 ++- pants.toml | 4 +- python-default.lock | 173 ++++++++++++++++++++++++++++++-------------- 3 files changed, 129 insertions(+), 58 deletions(-) diff --git a/.flake8 b/.flake8 index 160c1b8..cf5d05d 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,9 @@ [flake8] +# E203 -> whitespace before ':' (conflicts with Black) +# E231 -> Bad trailing comma (conflicts with Black) +# E501 -> line too long (conflicts with Black) + extend-ignore: - E203, # whitespace before ':' (conflicts with Black) - E231, # Bad trailing comma (conflicts with Black) - E501, # line too long (conflicts with Black) + E203, + E231, + E501, diff --git a/pants.toml b/pants.toml index 5ddd07b..9c62618 100644 --- a/pants.toml +++ b/pants.toml @@ -26,10 +26,10 @@ root_patterns = ["/"] # this with the `interpreter_constraints` field. See # https://www.pantsbuild.org/docs/python-interpreter-compatibility. # -# Modify this if you don't have Python 3.9 on your machine. +# Modify this if you don't have Python 3.13 on your machine. # This can be a range, such as [">=3.8,<3.11"], but it's usually recommended to restrict # to a single minor version. -interpreter_constraints = ["==3.9.*"] +interpreter_constraints = ["==3.12.*"] # Enable the "resolves" mechanism, which turns on lockfiles for user code. See # https://www.pantsbuild.org/docs/python-third-party-dependencies. This also adds the diff --git a/python-default.lock b/python-default.lock index 41b799a..4f755f2 100644 --- a/python-default.lock +++ b/python-default.lock @@ -4,9 +4,9 @@ // // --- BEGIN PANTS LOCKFILE METADATA: DO NOT EDIT OR REMOVE --- // { -// "version": 3, +// "version": 4, // "valid_for_interpreter_constraints": [ -// "CPython==3.9.*" +// "CPython==3.12.*" // ], // "generated_with_requirements": [ // "ansicolors==1.1.8", @@ -17,7 +17,9 @@ // "manylinux": "manylinux2014", // "requirement_constraints": [], // "only_binary": [], -// "no_binary": [] +// "no_binary": [], +// "excludes": [], +// "overrides": [] // } // --- END PANTS LOCKFILE METADATA --- @@ -27,6 +29,8 @@ "allow_wheels": true, "build_isolation": true, "constraints": [], + "elide_unused_requires_dist": false, + "excluded": [], "locked_resolves": [ { "locked_requirements": [ @@ -52,101 +56,120 @@ "artifacts": [ { "algorithm": "sha256", - "hash": "99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1", - "url": "https://files.pythonhosted.org/packages/e0/44/827b2a91a5816512fcaf3cc4ebc465ccd5d598c45cefa6703fcf4a79018f/attrs-23.2.0-py3-none-any.whl" + "hash": "427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3", + "url": "https://files.pythonhosted.org/packages/77/06/bb80f5f86020c4551da315d78b3ab75e8228f89f0162f2c3a819e407941a/attrs-25.3.0-py3-none-any.whl" }, { "algorithm": "sha256", - "hash": "935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30", - "url": "https://files.pythonhosted.org/packages/e3/fc/f800d51204003fa8ae392c4e8278f256206e7a919b708eef054f5f4b650d/attrs-23.2.0.tar.gz" + "hash": "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b", + "url": "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz" } ], "project_name": "attrs", "requires_dists": [ - "attrs[tests-mypy]; extra == \"tests-no-zope\"", - "attrs[tests-no-zope]; extra == \"tests\"", - "attrs[tests]; extra == \"cov\"", - "attrs[tests]; extra == \"dev\"", - "cloudpickle; platform_python_implementation == \"CPython\" and extra == \"tests-no-zope\"", + "cloudpickle; platform_python_implementation == \"CPython\" and extra == \"benchmark\"", + "cloudpickle; platform_python_implementation == \"CPython\" and extra == \"cov\"", + "cloudpickle; platform_python_implementation == \"CPython\" and extra == \"dev\"", + "cloudpickle; platform_python_implementation == \"CPython\" and extra == \"tests\"", + "cogapp; extra == \"docs\"", "coverage[toml]>=5.3; extra == \"cov\"", "furo; extra == \"docs\"", - "hypothesis; extra == \"tests-no-zope\"", - "importlib-metadata; python_version < \"3.8\"", - "mypy>=1.6; (platform_python_implementation == \"CPython\" and python_version >= \"3.8\") and extra == \"tests-mypy\"", + "hypothesis; extra == \"benchmark\"", + "hypothesis; extra == \"cov\"", + "hypothesis; extra == \"dev\"", + "hypothesis; extra == \"tests\"", + "mypy>=1.11.1; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"benchmark\"", + "mypy>=1.11.1; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"cov\"", + "mypy>=1.11.1; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"dev\"", + "mypy>=1.11.1; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"tests\"", + "mypy>=1.11.1; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"tests-mypy\"", "myst-parser; extra == \"docs\"", - "pre-commit; extra == \"dev\"", - "pympler; extra == \"tests-no-zope\"", - "pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version >= \"3.8\") and extra == \"tests-mypy\"", - "pytest-xdist[psutil]; extra == \"tests-no-zope\"", - "pytest>=4.3.0; extra == \"tests-no-zope\"", + "pre-commit-uv; extra == \"dev\"", + "pympler; extra == \"benchmark\"", + "pympler; extra == \"cov\"", + "pympler; extra == \"dev\"", + "pympler; extra == \"tests\"", + "pytest-codspeed; extra == \"benchmark\"", + "pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"benchmark\"", + "pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"cov\"", + "pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"dev\"", + "pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"tests\"", + "pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"tests-mypy\"", + "pytest-xdist[psutil]; extra == \"benchmark\"", + "pytest-xdist[psutil]; extra == \"cov\"", + "pytest-xdist[psutil]; extra == \"dev\"", + "pytest-xdist[psutil]; extra == \"tests\"", + "pytest>=4.3.0; extra == \"benchmark\"", + "pytest>=4.3.0; extra == \"cov\"", + "pytest>=4.3.0; extra == \"dev\"", + "pytest>=4.3.0; extra == \"tests\"", "sphinx-notfound-page; extra == \"docs\"", "sphinx; extra == \"docs\"", "sphinxcontrib-towncrier; extra == \"docs\"", - "towncrier; extra == \"docs\"", - "zope-interface; extra == \"docs\"", - "zope-interface; extra == \"tests\"" + "towncrier; extra == \"docs\"" ], - "requires_python": ">=3.7", - "version": "23.2.0" + "requires_python": ">=3.8", + "version": "25.3.0" }, { "artifacts": [ { "algorithm": "sha256", - "hash": "b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374", - "url": "https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl" + "hash": "9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", + "url": "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl" }, { "algorithm": "sha256", - "hash": "2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", - "url": "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz" + "hash": "3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", + "url": "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz" } ], "project_name": "iniconfig", "requires_dists": [], - "requires_python": ">=3.7", - "version": "2.0.0" + "requires_python": ">=3.8", + "version": "2.1.0" }, { "artifacts": [ { "algorithm": "sha256", - "hash": "8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7", - "url": "https://files.pythonhosted.org/packages/ec/1a/610693ac4ee14fcdf2d9bf3c493370e4f2ef7ae2e19217d7a237ff42367d/packaging-23.2-py3-none-any.whl" + "hash": "29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", + "url": "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl" }, { "algorithm": "sha256", - "hash": "048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5", - "url": "https://files.pythonhosted.org/packages/fb/2b/9b9c33ffed44ee921d0967086d653047286054117d584f1b1a7c22ceaf7b/packaging-23.2.tar.gz" + "hash": "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", + "url": "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz" } ], "project_name": "packaging", "requires_dists": [], - "requires_python": ">=3.7", - "version": "23.2" + "requires_python": ">=3.8", + "version": "25.0" }, { "artifacts": [ { "algorithm": "sha256", - "hash": "7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981", - "url": "https://files.pythonhosted.org/packages/a5/5b/0cc789b59e8cc1bf288b38111d002d8c5917123194d45b29dcdac64723cc/pluggy-1.4.0-py3-none-any.whl" + "hash": "e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", + "url": "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl" }, { "algorithm": "sha256", - "hash": "8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be", - "url": "https://files.pythonhosted.org/packages/54/c6/43f9d44d92aed815e781ca25ba8c174257e27253a94630d21be8725a2b59/pluggy-1.4.0.tar.gz" + "hash": "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", + "url": "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz" } ], "project_name": "pluggy", "requires_dists": [ + "coverage; extra == \"testing\"", "pre-commit; extra == \"dev\"", "pytest-benchmark; extra == \"testing\"", "pytest; extra == \"testing\"", "tox; extra == \"dev\"" ], - "requires_python": ">=3.8", - "version": "1.4.0" + "requires_python": ">=3.9", + "version": "1.6.0" }, { "artifacts": [ @@ -248,19 +271,59 @@ "artifacts": [ { "algorithm": "sha256", - "hash": "939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", - "url": "https://files.pythonhosted.org/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl" + "hash": "cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc", + "url": "https://files.pythonhosted.org/packages/6e/c2/61d3e0f47e2b74ef40a68b9e6ad5984f6241a942f7cd3bbfbdbd03861ea9/tomli-2.2.1-py3-none-any.whl" + }, + { + "algorithm": "sha256", + "hash": "8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8", + "url": "https://files.pythonhosted.org/packages/03/b8/152c68bb84fc00396b83e7bbddd5ec0bd3dd409db4195e2a9b3e398ad2e3/tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl" + }, + { + "algorithm": "sha256", + "hash": "cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff", + "url": "https://files.pythonhosted.org/packages/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz" + }, + { + "algorithm": "sha256", + "hash": "4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea", + "url": "https://files.pythonhosted.org/packages/52/e1/f8af4c2fcde17500422858155aeb0d7e93477a0d59a98e56cbfe75070fd0/tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl" }, { "algorithm": "sha256", - "hash": "de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f", - "url": "https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3/tomli-2.0.1.tar.gz" + "hash": "db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222", + "url": "https://files.pythonhosted.org/packages/5c/51/51c3f2884d7bab89af25f678447ea7d297b53b5a3b5730a7cb2ef6069f07/tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" + }, + { + "algorithm": "sha256", + "hash": "b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e", + "url": "https://files.pythonhosted.org/packages/9c/de/6b432d66e986e501586da298e28ebeefd3edc2c780f3ad73d22566034239/tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl" + }, + { + "algorithm": "sha256", + "hash": "400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6", + "url": "https://files.pythonhosted.org/packages/9e/6e/fa2b916dced65763a5168c6ccb91066f7639bdc88b48adda990db10c8c0b/tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl" + }, + { + "algorithm": "sha256", + "hash": "40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77", + "url": "https://files.pythonhosted.org/packages/ab/df/bfa89627d13a5cc22402e441e8a931ef2108403db390ff3345c05253935e/tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl" + }, + { + "algorithm": "sha256", + "hash": "02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd", + "url": "https://files.pythonhosted.org/packages/b4/04/885d3b1f650e1153cbb93a6a9782c58a972b94ea4483ae4ac5cedd5e4a09/tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl" + }, + { + "algorithm": "sha256", + "hash": "4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192", + "url": "https://files.pythonhosted.org/packages/c8/d6/fc9267af9166f79ac528ff7e8c55c8181ded34eb4b0e93daa767b8841573/tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl" } ], "project_name": "tomli", "requires_dists": [], - "requires_python": ">=3.7", - "version": "2.0.1" + "requires_python": ">=3.8", + "version": "2.2.1" }, { "artifacts": [ @@ -284,9 +347,12 @@ "platform_tag": null } ], + "only_builds": [], + "only_wheels": [], + "overridden": [], "path_mappings": {}, - "pex_version": "2.1.148", - "pip_version": "23.1.2", + "pex_version": "2.55.2", + "pip_version": "24.2", "prefer_older_binary": false, "requirements": [ "ansicolors==1.1.8", @@ -295,7 +361,7 @@ "types-setuptools<58,>=56.2.0" ], "requires_python": [ - "==3.9.*" + "CPython==3.12.*" ], "resolver_version": "pip-2020-resolver", "style": "universal", @@ -304,5 +370,6 @@ "mac" ], "transitive": true, - "use_pep517": null + "use_pep517": null, + "use_system_time": false } From 0d83c6917a7cef241419fd46fa98027890b7eff9 Mon Sep 17 00:00:00 2001 From: Chris Burroughs Date: Sun, 5 Oct 2025 09:55:49 -0400 Subject: [PATCH 3/5] pkgutil --- helloworld/greet/greeting.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/helloworld/greet/greeting.py b/helloworld/greet/greeting.py index 6a5eb1a..12e30c9 100644 --- a/helloworld/greet/greeting.py +++ b/helloworld/greet/greeting.py @@ -3,11 +3,10 @@ from __future__ import annotations +import importlib import json import random -import pkg_resources - from helloworld.translator.translator import LanguageTranslator @@ -19,7 +18,7 @@ def __init__( translations if translations is not None else json.loads( - pkg_resources.resource_string(__name__, "translations.json") + importlib.resources.read_text(__name__, "translations.json") ) ) self._translator = LanguageTranslator(self._translations) From 0ea1563ed91d5ba8c7dfa44e6ca0dae734653327 Mon Sep 17 00:00:00 2001 From: Chris Burroughs Date: Sun, 5 Oct 2025 10:12:01 -0400 Subject: [PATCH 4/5] align --- .github/workflows/pants.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pants.yaml b/.github/workflows/pants.yaml index 9b8cab4..ceb31af 100644 --- a/.github/workflows/pants.yaml +++ b/.github/workflows/pants.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-24.04 strategy: matrix: - python-version: [3.9] + python-version: [3.12] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 From e49303ba523ea5315c1136aca865839c19c16fd5 Mon Sep 17 00:00:00 2001 From: Chris Burroughs Date: Sun, 5 Oct 2025 10:17:26 -0400 Subject: [PATCH 5/5] huh --- helloworld/greet/greeting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helloworld/greet/greeting.py b/helloworld/greet/greeting.py index 12e30c9..70c7675 100644 --- a/helloworld/greet/greeting.py +++ b/helloworld/greet/greeting.py @@ -3,7 +3,7 @@ from __future__ import annotations -import importlib +import importlib.resources import json import random