From 57106ebc413fc2af349486f8e8daa2f5ccb61cbf Mon Sep 17 00:00:00 2001 From: Krishnan Chandra Date: Mon, 26 Feb 2024 14:17:04 -0500 Subject: [PATCH 1/3] Upgrade pants.toml to version 2.19 --- pants.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pants.toml b/pants.toml index dfb564f..0e74a29 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.18.0" +pants_version = "2.19.0" backend_packages.add = [ "pants.backend.build_files.fmt.black", "pants.backend.python", From d53bfc1dd6ad733fdf1260163749c8961e42ee59 Mon Sep 17 00:00:00 2001 From: Krishnan Chandra Date: Mon, 26 Feb 2024 14:18:04 -0500 Subject: [PATCH 2/3] Fix export command to specify a resolve --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 098239f..411c691 100644 --- a/README.md +++ b/README.md @@ -172,5 +172,5 @@ pants count-loc '**/*' ## Create virtualenv for IDE integration ``` -pants export :: +pants export --resolve=python-default ``` From a1b28ead34861bda29945a667b26eb5a307a3bd3 Mon Sep 17 00:00:00 2001 From: Krishnan Chandra Date: Mon, 26 Feb 2024 14:34:59 -0500 Subject: [PATCH 3/3] Update lockfile and instructions --- README.md | 14 +++++++--- python-default.lock | 66 +++++++++++++++++++++------------------------ 2 files changed, 41 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 411c691..65507d7 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ An example repository to demonstrate Python support in Pants. See [pantsbuild.org](https://www.pantsbuild.org/docs) for much more detailed documentation. -This is only one possible way of laying out your project with Pants. See +This is only one possible way of laying out your project with Pants. See [pantsbuild.org/docs/source-roots#examples](https://www.pantsbuild.org/docs/source-roots#examples) for some other example layouts. @@ -31,8 +31,8 @@ pants help goals # Targets -Targets are a way of setting metadata for some part of your code, such as timeouts for tests and -entry points for binaries. Targets have types like `python_source`, `resources`, and +Targets are a way of setting metadata for some part of your code, such as timeouts for tests and +entry points for binaries. Targets have types like `python_source`, `resources`, and `pex_binary`. They are defined in `BUILD` files. Pants goals can be invoked on targets or directly on source files (which is often more intuitive and convenient). @@ -169,6 +169,14 @@ pants package helloworld/translator:dist ``` pants count-loc '**/*' ``` + +## Generate or update a lockfile containing the dependencies + +``` +pants generate-lockfiles --resolve=python-default +``` + + ## Create virtualenv for IDE integration ``` diff --git a/python-default.lock b/python-default.lock index 10982be..41b799a 100644 --- a/python-default.lock +++ b/python-default.lock @@ -52,47 +52,42 @@ "artifacts": [ { "algorithm": "sha256", - "hash": "29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836", - "url": "https://files.pythonhosted.org/packages/fb/6e/6f83bf616d2becdf333a1640f1d463fef3150e2e926b7010cb0f81c95e88/attrs-22.2.0-py3-none-any.whl" + "hash": "99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1", + "url": "https://files.pythonhosted.org/packages/e0/44/827b2a91a5816512fcaf3cc4ebc465ccd5d598c45cefa6703fcf4a79018f/attrs-23.2.0-py3-none-any.whl" }, { "algorithm": "sha256", - "hash": "c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99", - "url": "https://files.pythonhosted.org/packages/21/31/3f468da74c7de4fcf9b25591e682856389b3400b4b62f201e65f15ea3e07/attrs-22.2.0.tar.gz" + "hash": "935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30", + "url": "https://files.pythonhosted.org/packages/e3/fc/f800d51204003fa8ae392c4e8278f256206e7a919b708eef054f5f4b650d/attrs-23.2.0.tar.gz" } ], "project_name": "attrs", "requires_dists": [ - "attrs[docs,tests]; extra == \"dev\"", + "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 == \"tests_no_zope\"", - "coverage-enable-subprocess; extra == \"cov\"", "coverage[toml]>=5.3; extra == \"cov\"", "furo; extra == \"docs\"", "hypothesis; extra == \"tests-no-zope\"", - "hypothesis; extra == \"tests_no_zope\"", - "mypy<0.990,>=0.971; platform_python_implementation == \"CPython\" and extra == \"tests-no-zope\"", - "mypy<0.990,>=0.971; platform_python_implementation == \"CPython\" and 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\"", "myst-parser; extra == \"docs\"", + "pre-commit; extra == \"dev\"", "pympler; extra == \"tests-no-zope\"", - "pympler; extra == \"tests_no_zope\"", - "pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version < \"3.11\") and extra == \"tests-no-zope\"", - "pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version < \"3.11\") and 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-xdist[psutil]; extra == \"tests_no_zope\"", "pytest>=4.3.0; extra == \"tests-no-zope\"", - "pytest>=4.3.0; extra == \"tests_no_zope\"", "sphinx-notfound-page; extra == \"docs\"", "sphinx; extra == \"docs\"", "sphinxcontrib-towncrier; extra == \"docs\"", "towncrier; extra == \"docs\"", - "zope.interface; extra == \"docs\"", - "zope.interface; extra == \"tests\"" + "zope-interface; extra == \"docs\"", + "zope-interface; extra == \"tests\"" ], - "requires_python": ">=3.6", - "version": "22.2" + "requires_python": ">=3.7", + "version": "23.2.0" }, { "artifacts": [ @@ -110,49 +105,48 @@ "project_name": "iniconfig", "requires_dists": [], "requires_python": ">=3.7", - "version": "2" + "version": "2.0.0" }, { "artifacts": [ { "algorithm": "sha256", - "hash": "714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2", - "url": "https://files.pythonhosted.org/packages/ed/35/a31aed2993e398f6b09a790a181a7927eb14610ee8bbf02dc14d31677f1c/packaging-23.0-py3-none-any.whl" + "hash": "8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7", + "url": "https://files.pythonhosted.org/packages/ec/1a/610693ac4ee14fcdf2d9bf3c493370e4f2ef7ae2e19217d7a237ff42367d/packaging-23.2-py3-none-any.whl" }, { "algorithm": "sha256", - "hash": "b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97", - "url": "https://files.pythonhosted.org/packages/47/d5/aca8ff6f49aa5565df1c826e7bf5e85a6df852ee063600c1efa5b932968c/packaging-23.0.tar.gz" + "hash": "048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5", + "url": "https://files.pythonhosted.org/packages/fb/2b/9b9c33ffed44ee921d0967086d653047286054117d584f1b1a7c22ceaf7b/packaging-23.2.tar.gz" } ], "project_name": "packaging", "requires_dists": [], "requires_python": ">=3.7", - "version": "23" + "version": "23.2" }, { "artifacts": [ { "algorithm": "sha256", - "hash": "74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3", - "url": "https://files.pythonhosted.org/packages/9e/01/f38e2ff29715251cf25532b9082a1589ab7e4f571ced434f98d0139336dc/pluggy-1.0.0-py2.py3-none-any.whl" + "hash": "7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981", + "url": "https://files.pythonhosted.org/packages/a5/5b/0cc789b59e8cc1bf288b38111d002d8c5917123194d45b29dcdac64723cc/pluggy-1.4.0-py3-none-any.whl" }, { "algorithm": "sha256", - "hash": "4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159", - "url": "https://files.pythonhosted.org/packages/a1/16/db2d7de3474b6e37cbb9c008965ee63835bba517e22cdb8c35b5116b5ce1/pluggy-1.0.0.tar.gz" + "hash": "8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be", + "url": "https://files.pythonhosted.org/packages/54/c6/43f9d44d92aed815e781ca25ba8c174257e27253a94630d21be8725a2b59/pluggy-1.4.0.tar.gz" } ], "project_name": "pluggy", "requires_dists": [ - "importlib-metadata>=0.12; python_version < \"3.8\"", "pre-commit; extra == \"dev\"", "pytest-benchmark; extra == \"testing\"", "pytest; extra == \"testing\"", "tox; extra == \"dev\"" ], - "requires_python": ">=3.6", - "version": "1" + "requires_python": ">=3.8", + "version": "1.4.0" }, { "artifacts": [ @@ -170,7 +164,7 @@ "project_name": "py", "requires_dists": [], "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7", - "version": "1.11" + "version": "1.11.0" }, { "artifacts": [ @@ -248,7 +242,7 @@ "wincertstore==0.2; sys_platform == \"win32\" and extra == \"ssl\"" ], "requires_python": ">=3.6", - "version": "56.2" + "version": "56.2.0" }, { "artifacts": [ @@ -291,8 +285,8 @@ } ], "path_mappings": {}, - "pex_version": "2.1.108", - "pip_version": "20.3.4-patched", + "pex_version": "2.1.148", + "pip_version": "23.1.2", "prefer_older_binary": false, "requirements": [ "ansicolors==1.1.8",