From 2aea99d95f4766fbca86139f72a1e4985d10a30e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20S=C5=82awecki?= Date: Fri, 26 Jan 2024 20:10:51 +0100 Subject: [PATCH 1/2] BUG FIX: Use `Path.relative_to()` for Python 3.8 compatibility (#150) --- devtools/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devtools/__main__.py b/devtools/__main__.py index 2fbc79a..a5fa2f5 100644 --- a/devtools/__main__.py +++ b/devtools/__main__.py @@ -64,7 +64,9 @@ def install() -> int: print(f'Found path `{install_path}` to install devtools into `builtins`') print('To install devtools, run the following command:\n') print(f' python -m devtools print-code >> {install_path}\n') - if not install_path.is_relative_to(Path.home()): + try: + install_path.relative_to(Path.home()) + except ValueError: print('or maybe\n') print(f' python -m devtools print-code | sudo tee -a {install_path} > /dev/null\n') print('Note: "sudo" might be required because the path is in your home directory.') From 5022f1f6f1c55d871b1db208c9c1b2ab0df488fe Mon Sep 17 00:00:00 2001 From: Kinuax Date: Fri, 24 Jan 2025 20:11:42 +0100 Subject: [PATCH 2/2] Fix macos-latest and 3.7 tests (#155) --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3df53d6..e131174 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,15 +55,21 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu, macos, windows] + os: [ubuntu-latest, macos-latest, windows-latest] python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + exclude: + - os: macos-latest + python-version: '3.7' + include: + - os: macos-13 + python-version: '3.7' env: PYTHON: ${{ matrix.python-version }} OS: ${{ matrix.os }} EXTRAS: yes - runs-on: ${{ matrix.os }}-latest + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3