Skip to content

Commit bb97aad

Browse files
authored
Upgrade to Pants 2.29.0 (#150)
1 parent fcee055 commit bb97aad

File tree

5 files changed

+133
-63
lines changed

5 files changed

+133
-63
lines changed

.flake8

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
[flake8]
2+
# E203 -> whitespace before ':' (conflicts with Black)
3+
# E231 -> Bad trailing comma (conflicts with Black)
4+
# E501 -> line too long (conflicts with Black)
5+
26
extend-ignore:
3-
E203, # whitespace before ':' (conflicts with Black)
4-
E231, # Bad trailing comma (conflicts with Black)
5-
E501, # line too long (conflicts with Black)
7+
E203,
8+
E231,
9+
E501,

.github/workflows/pants.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-24.04
2222
strategy:
2323
matrix:
24-
python-version: [3.9]
24+
python-version: [3.12]
2525
steps:
2626
- uses: actions/checkout@v4
2727
- uses: actions/setup-python@v5

helloworld/greet/greeting.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33

44
from __future__ import annotations
55

6+
import importlib.resources
67
import json
78
import random
89

9-
import pkg_resources
10-
1110
from helloworld.translator.translator import LanguageTranslator
1211

1312

@@ -19,7 +18,7 @@ def __init__(
1918
translations
2019
if translations is not None
2120
else json.loads(
22-
pkg_resources.resource_string(__name__, "translations.json")
21+
importlib.resources.read_text(__name__, "translations.json")
2322
)
2423
)
2524
self._translator = LanguageTranslator(self._translations)

pants.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

44
[GLOBAL]
5-
pants_version = "2.28.0"
5+
pants_version = "2.29.0"
66
backend_packages.add = [
77
"pants.backend.build_files.fmt.black",
88
"pants.backend.python",
@@ -26,10 +26,10 @@ root_patterns = ["/"]
2626
# this with the `interpreter_constraints` field. See
2727
# https://www.pantsbuild.org/docs/python-interpreter-compatibility.
2828
#
29-
# Modify this if you don't have Python 3.9 on your machine.
29+
# Modify this if you don't have Python 3.13 on your machine.
3030
# This can be a range, such as [">=3.8,<3.11"], but it's usually recommended to restrict
3131
# to a single minor version.
32-
interpreter_constraints = ["==3.9.*"]
32+
interpreter_constraints = ["==3.12.*"]
3333

3434
# Enable the "resolves" mechanism, which turns on lockfiles for user code. See
3535
# https://www.pantsbuild.org/docs/python-third-party-dependencies. This also adds the

python-default.lock

Lines changed: 120 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
//
55
// --- BEGIN PANTS LOCKFILE METADATA: DO NOT EDIT OR REMOVE ---
66
// {
7-
// "version": 3,
7+
// "version": 4,
88
// "valid_for_interpreter_constraints": [
9-
// "CPython==3.9.*"
9+
// "CPython==3.12.*"
1010
// ],
1111
// "generated_with_requirements": [
1212
// "ansicolors==1.1.8",
@@ -17,7 +17,9 @@
1717
// "manylinux": "manylinux2014",
1818
// "requirement_constraints": [],
1919
// "only_binary": [],
20-
// "no_binary": []
20+
// "no_binary": [],
21+
// "excludes": [],
22+
// "overrides": []
2123
// }
2224
// --- END PANTS LOCKFILE METADATA ---
2325

@@ -27,6 +29,8 @@
2729
"allow_wheels": true,
2830
"build_isolation": true,
2931
"constraints": [],
32+
"elide_unused_requires_dist": false,
33+
"excluded": [],
3034
"locked_resolves": [
3135
{
3236
"locked_requirements": [
@@ -52,101 +56,120 @@
5256
"artifacts": [
5357
{
5458
"algorithm": "sha256",
55-
"hash": "99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1",
56-
"url": "https://files.pythonhosted.org/packages/e0/44/827b2a91a5816512fcaf3cc4ebc465ccd5d598c45cefa6703fcf4a79018f/attrs-23.2.0-py3-none-any.whl"
59+
"hash": "427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3",
60+
"url": "https://files.pythonhosted.org/packages/77/06/bb80f5f86020c4551da315d78b3ab75e8228f89f0162f2c3a819e407941a/attrs-25.3.0-py3-none-any.whl"
5761
},
5862
{
5963
"algorithm": "sha256",
60-
"hash": "935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30",
61-
"url": "https://files.pythonhosted.org/packages/e3/fc/f800d51204003fa8ae392c4e8278f256206e7a919b708eef054f5f4b650d/attrs-23.2.0.tar.gz"
64+
"hash": "75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b",
65+
"url": "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz"
6266
}
6367
],
6468
"project_name": "attrs",
6569
"requires_dists": [
66-
"attrs[tests-mypy]; extra == \"tests-no-zope\"",
67-
"attrs[tests-no-zope]; extra == \"tests\"",
68-
"attrs[tests]; extra == \"cov\"",
69-
"attrs[tests]; extra == \"dev\"",
70-
"cloudpickle; platform_python_implementation == \"CPython\" and extra == \"tests-no-zope\"",
70+
"cloudpickle; platform_python_implementation == \"CPython\" and extra == \"benchmark\"",
71+
"cloudpickle; platform_python_implementation == \"CPython\" and extra == \"cov\"",
72+
"cloudpickle; platform_python_implementation == \"CPython\" and extra == \"dev\"",
73+
"cloudpickle; platform_python_implementation == \"CPython\" and extra == \"tests\"",
74+
"cogapp; extra == \"docs\"",
7175
"coverage[toml]>=5.3; extra == \"cov\"",
7276
"furo; extra == \"docs\"",
73-
"hypothesis; extra == \"tests-no-zope\"",
74-
"importlib-metadata; python_version < \"3.8\"",
75-
"mypy>=1.6; (platform_python_implementation == \"CPython\" and python_version >= \"3.8\") and extra == \"tests-mypy\"",
77+
"hypothesis; extra == \"benchmark\"",
78+
"hypothesis; extra == \"cov\"",
79+
"hypothesis; extra == \"dev\"",
80+
"hypothesis; extra == \"tests\"",
81+
"mypy>=1.11.1; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"benchmark\"",
82+
"mypy>=1.11.1; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"cov\"",
83+
"mypy>=1.11.1; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"dev\"",
84+
"mypy>=1.11.1; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"tests\"",
85+
"mypy>=1.11.1; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"tests-mypy\"",
7686
"myst-parser; extra == \"docs\"",
77-
"pre-commit; extra == \"dev\"",
78-
"pympler; extra == \"tests-no-zope\"",
79-
"pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version >= \"3.8\") and extra == \"tests-mypy\"",
80-
"pytest-xdist[psutil]; extra == \"tests-no-zope\"",
81-
"pytest>=4.3.0; extra == \"tests-no-zope\"",
87+
"pre-commit-uv; extra == \"dev\"",
88+
"pympler; extra == \"benchmark\"",
89+
"pympler; extra == \"cov\"",
90+
"pympler; extra == \"dev\"",
91+
"pympler; extra == \"tests\"",
92+
"pytest-codspeed; extra == \"benchmark\"",
93+
"pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"benchmark\"",
94+
"pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"cov\"",
95+
"pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"dev\"",
96+
"pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"tests\"",
97+
"pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version >= \"3.10\") and extra == \"tests-mypy\"",
98+
"pytest-xdist[psutil]; extra == \"benchmark\"",
99+
"pytest-xdist[psutil]; extra == \"cov\"",
100+
"pytest-xdist[psutil]; extra == \"dev\"",
101+
"pytest-xdist[psutil]; extra == \"tests\"",
102+
"pytest>=4.3.0; extra == \"benchmark\"",
103+
"pytest>=4.3.0; extra == \"cov\"",
104+
"pytest>=4.3.0; extra == \"dev\"",
105+
"pytest>=4.3.0; extra == \"tests\"",
82106
"sphinx-notfound-page; extra == \"docs\"",
83107
"sphinx; extra == \"docs\"",
84108
"sphinxcontrib-towncrier; extra == \"docs\"",
85-
"towncrier; extra == \"docs\"",
86-
"zope-interface; extra == \"docs\"",
87-
"zope-interface; extra == \"tests\""
109+
"towncrier; extra == \"docs\""
88110
],
89-
"requires_python": ">=3.7",
90-
"version": "23.2.0"
111+
"requires_python": ">=3.8",
112+
"version": "25.3.0"
91113
},
92114
{
93115
"artifacts": [
94116
{
95117
"algorithm": "sha256",
96-
"hash": "b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374",
97-
"url": "https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl"
118+
"hash": "9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760",
119+
"url": "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl"
98120
},
99121
{
100122
"algorithm": "sha256",
101-
"hash": "2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3",
102-
"url": "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz"
123+
"hash": "3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7",
124+
"url": "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz"
103125
}
104126
],
105127
"project_name": "iniconfig",
106128
"requires_dists": [],
107-
"requires_python": ">=3.7",
108-
"version": "2.0.0"
129+
"requires_python": ">=3.8",
130+
"version": "2.1.0"
109131
},
110132
{
111133
"artifacts": [
112134
{
113135
"algorithm": "sha256",
114-
"hash": "8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7",
115-
"url": "https://files.pythonhosted.org/packages/ec/1a/610693ac4ee14fcdf2d9bf3c493370e4f2ef7ae2e19217d7a237ff42367d/packaging-23.2-py3-none-any.whl"
136+
"hash": "29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484",
137+
"url": "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl"
116138
},
117139
{
118140
"algorithm": "sha256",
119-
"hash": "048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5",
120-
"url": "https://files.pythonhosted.org/packages/fb/2b/9b9c33ffed44ee921d0967086d653047286054117d584f1b1a7c22ceaf7b/packaging-23.2.tar.gz"
141+
"hash": "d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f",
142+
"url": "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz"
121143
}
122144
],
123145
"project_name": "packaging",
124146
"requires_dists": [],
125-
"requires_python": ">=3.7",
126-
"version": "23.2"
147+
"requires_python": ">=3.8",
148+
"version": "25.0"
127149
},
128150
{
129151
"artifacts": [
130152
{
131153
"algorithm": "sha256",
132-
"hash": "7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981",
133-
"url": "https://files.pythonhosted.org/packages/a5/5b/0cc789b59e8cc1bf288b38111d002d8c5917123194d45b29dcdac64723cc/pluggy-1.4.0-py3-none-any.whl"
154+
"hash": "e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746",
155+
"url": "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl"
134156
},
135157
{
136158
"algorithm": "sha256",
137-
"hash": "8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be",
138-
"url": "https://files.pythonhosted.org/packages/54/c6/43f9d44d92aed815e781ca25ba8c174257e27253a94630d21be8725a2b59/pluggy-1.4.0.tar.gz"
159+
"hash": "7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3",
160+
"url": "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz"
139161
}
140162
],
141163
"project_name": "pluggy",
142164
"requires_dists": [
165+
"coverage; extra == \"testing\"",
143166
"pre-commit; extra == \"dev\"",
144167
"pytest-benchmark; extra == \"testing\"",
145168
"pytest; extra == \"testing\"",
146169
"tox; extra == \"dev\""
147170
],
148-
"requires_python": ">=3.8",
149-
"version": "1.4.0"
171+
"requires_python": ">=3.9",
172+
"version": "1.6.0"
150173
},
151174
{
152175
"artifacts": [
@@ -248,19 +271,59 @@
248271
"artifacts": [
249272
{
250273
"algorithm": "sha256",
251-
"hash": "939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc",
252-
"url": "https://files.pythonhosted.org/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl"
274+
"hash": "cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc",
275+
"url": "https://files.pythonhosted.org/packages/6e/c2/61d3e0f47e2b74ef40a68b9e6ad5984f6241a942f7cd3bbfbdbd03861ea9/tomli-2.2.1-py3-none-any.whl"
276+
},
277+
{
278+
"algorithm": "sha256",
279+
"hash": "8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8",
280+
"url": "https://files.pythonhosted.org/packages/03/b8/152c68bb84fc00396b83e7bbddd5ec0bd3dd409db4195e2a9b3e398ad2e3/tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl"
281+
},
282+
{
283+
"algorithm": "sha256",
284+
"hash": "cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff",
285+
"url": "https://files.pythonhosted.org/packages/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz"
286+
},
287+
{
288+
"algorithm": "sha256",
289+
"hash": "4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea",
290+
"url": "https://files.pythonhosted.org/packages/52/e1/f8af4c2fcde17500422858155aeb0d7e93477a0d59a98e56cbfe75070fd0/tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl"
253291
},
254292
{
255293
"algorithm": "sha256",
256-
"hash": "de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f",
257-
"url": "https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3/tomli-2.0.1.tar.gz"
294+
"hash": "db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222",
295+
"url": "https://files.pythonhosted.org/packages/5c/51/51c3f2884d7bab89af25f678447ea7d297b53b5a3b5730a7cb2ef6069f07/tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
296+
},
297+
{
298+
"algorithm": "sha256",
299+
"hash": "b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e",
300+
"url": "https://files.pythonhosted.org/packages/9c/de/6b432d66e986e501586da298e28ebeefd3edc2c780f3ad73d22566034239/tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl"
301+
},
302+
{
303+
"algorithm": "sha256",
304+
"hash": "400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6",
305+
"url": "https://files.pythonhosted.org/packages/9e/6e/fa2b916dced65763a5168c6ccb91066f7639bdc88b48adda990db10c8c0b/tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl"
306+
},
307+
{
308+
"algorithm": "sha256",
309+
"hash": "40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77",
310+
"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"
311+
},
312+
{
313+
"algorithm": "sha256",
314+
"hash": "02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd",
315+
"url": "https://files.pythonhosted.org/packages/b4/04/885d3b1f650e1153cbb93a6a9782c58a972b94ea4483ae4ac5cedd5e4a09/tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl"
316+
},
317+
{
318+
"algorithm": "sha256",
319+
"hash": "4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192",
320+
"url": "https://files.pythonhosted.org/packages/c8/d6/fc9267af9166f79ac528ff7e8c55c8181ded34eb4b0e93daa767b8841573/tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"
258321
}
259322
],
260323
"project_name": "tomli",
261324
"requires_dists": [],
262-
"requires_python": ">=3.7",
263-
"version": "2.0.1"
325+
"requires_python": ">=3.8",
326+
"version": "2.2.1"
264327
},
265328
{
266329
"artifacts": [
@@ -284,9 +347,12 @@
284347
"platform_tag": null
285348
}
286349
],
350+
"only_builds": [],
351+
"only_wheels": [],
352+
"overridden": [],
287353
"path_mappings": {},
288-
"pex_version": "2.1.148",
289-
"pip_version": "23.1.2",
354+
"pex_version": "2.55.2",
355+
"pip_version": "24.2",
290356
"prefer_older_binary": false,
291357
"requirements": [
292358
"ansicolors==1.1.8",
@@ -295,7 +361,7 @@
295361
"types-setuptools<58,>=56.2.0"
296362
],
297363
"requires_python": [
298-
"==3.9.*"
364+
"CPython==3.12.*"
299365
],
300366
"resolver_version": "pip-2020-resolver",
301367
"style": "universal",
@@ -304,5 +370,6 @@
304370
"mac"
305371
],
306372
"transitive": true,
307-
"use_pep517": null
373+
"use_pep517": null,
374+
"use_system_time": false
308375
}

0 commit comments

Comments
 (0)