From 038361ea5a1c05a3aa5657581a1ce902ad6068c1 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 30 Nov 2023 14:25:06 -0500 Subject: [PATCH] tests: fix regex to include build numbers (#1099) --- docs/installation.md | 4 ++-- docs/troubleshooting.md | 4 ++-- scripts/list_test_packages.py | 3 ++- testdata/tests_packages/macos21-python3.7.txt | 2 +- testdata/tests_packages/macos21-python3.8.txt | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 2174ecfa4e..e8da2573bc 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -82,8 +82,8 @@ sudo PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install PACKAGE | `~/.local/pipx/venvs` | `platformdirs.user_data_dir()/pipx/venv` | | `~/.local/pipx/.cache` | `platformdirs.user_cache_dir()/pipx` | | `~/.local/pipx/logs` | `platformdirs.user_log_dir()/pipx/log` | - - `user_data_dir()`, `user_cache_dir()` and `user_log_dir()` resolve to appropriate platform-specific user data, cache and log directories. + + `user_data_dir()`, `user_cache_dir()` and `user_log_dir()` resolve to appropriate platform-specific user data, cache and log directories. See the [platformdirs documentation](https://platformdirs.readthedocs.io/en/latest/api.html#platforms) for details. ## Upgrade pipx diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 2e18488316..4246a8e6d9 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -123,11 +123,11 @@ rm -rf test_venv ## Pipx files not in expected locations according to documentation The default PIPX_HOME is `~/.local/pipx`, prior to the adoption of the XDG base -directory specification after version 1.2.0. To maintain compatibility with older +directory specification after version 1.2.0. To maintain compatibility with older versions, pipx will automatically detect the old paths and use them accordingly. For a map of old and new paths, See [Installation](installation.md#installation-options) -To migrate from the old path to the new path, you can remove the `~/.local/pipx` directory and +To migrate from the old path to the new path, you can remove the `~/.local/pipx` directory and reinstall all packages. For example, on Linux systems, you could read out `pipx`'s package information in JSON via `jq` (which you might need to install first): diff --git a/scripts/list_test_packages.py b/scripts/list_test_packages.py index cae97e1322..0f0d9b58b2 100644 --- a/scripts/list_test_packages.py +++ b/scripts/list_test_packages.py @@ -130,7 +130,8 @@ def create_test_packages_list( all_packages = [] for downloaded_filename in downloaded_list: wheel_re = re.search( - r"(.+)\-([^-]+)\-([^-]+)\-([^-]+)\-([^-]+)\.whl$", downloaded_filename + r"([^-]+)\-([^-]+)\-([^-]+)\-([^-]+)\-([^-]+)(-[^-]+)?\.whl$", + downloaded_filename, ) src_re = re.search(r"(.+)\-([^-]+)\.(?:tar.gz|zip)$", downloaded_filename) if wheel_re: diff --git a/testdata/tests_packages/macos21-python3.7.txt b/testdata/tests_packages/macos21-python3.7.txt index 4bc92d6847..7a61081e16 100644 --- a/testdata/tests_packages/macos21-python3.7.txt +++ b/testdata/tests_packages/macos21-python3.7.txt @@ -20,7 +20,7 @@ attrs==22.1.0 awscli==1.18.168 backcall==0.2.0 beautifulsoup4==4.11.1 -black-22.10.0==1fixedarch +black==22.10.0 black==22.8.0 bleach==5.0.1 boto3==1.26.20 diff --git a/testdata/tests_packages/macos21-python3.8.txt b/testdata/tests_packages/macos21-python3.8.txt index 0ffdc9f5c2..3094f29d49 100644 --- a/testdata/tests_packages/macos21-python3.8.txt +++ b/testdata/tests_packages/macos21-python3.8.txt @@ -21,7 +21,7 @@ attrs==22.1.0 awscli==1.18.168 backcall==0.2.0 beautifulsoup4==4.11.1 -black-22.10.0==1fixedarch +black==22.10.0 black==22.8.0 bleach==5.0.1 boto3==1.26.20