From b7ec2d4f37e30adc327db115417d93e7d223a2ad Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Wed, 24 Apr 2024 18:17:18 -0700 Subject: [PATCH 1/3] replace setuptools for python 3.12 --- virtualfish/loader/__init__.py | 7 +++---- virtualfish/virtual.fish | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/virtualfish/loader/__init__.py b/virtualfish/loader/__init__.py index 58573e2..3f86dc0 100644 --- a/virtualfish/loader/__init__.py +++ b/virtualfish/loader/__init__.py @@ -1,17 +1,16 @@ import logging import os import sys -import pkg_resources - +from importlib import metadata log = logging.getLogger(__name__) def load(plugins=(), full_install=True): try: - version = pkg_resources.get_distribution("virtualfish").version + version = metadata.version("virtualfish") commands = [f"set -g VIRTUALFISH_VERSION {version}"] - except pkg_resources.DistributionNotFound: + except metadata.PackageNotFoundError: commands = [] base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) diff --git a/virtualfish/virtual.fish b/virtualfish/virtual.fish index c6bcc1c..27daef2 100644 --- a/virtualfish/virtual.fish +++ b/virtualfish/virtual.fish @@ -417,7 +417,7 @@ end function __vf_addpath --description "Adds a path to sys.path in this virtualenv" if set -q VIRTUAL_ENV - set -l site_packages (eval "$VIRTUAL_ENV/bin/python -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())'") + set -l site_packages (eval "$VIRTUAL_ENV/bin/python -c 'import sysconfig; print(sysconfig.get_path(\'platlib\'))'") set -l path_file $site_packages/_virtualenv_path_extensions.pth set -l remove 0 From bb6239fee7b9f20684b3bd7328e407662879266e Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Wed, 24 Apr 2024 18:28:30 -0700 Subject: [PATCH 2/3] bump python to 3.8+ --- .github/ISSUE_TEMPLATE/---bug-report.md | 2 +- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/---bug-report.md b/.github/ISSUE_TEMPLATE/---bug-report.md index a90514f..7232adf 100644 --- a/.github/ISSUE_TEMPLATE/---bug-report.md +++ b/.github/ISSUE_TEMPLATE/---bug-report.md @@ -17,7 +17,7 @@ assignees: '' - [ ] I am using Fish shell version 3.1 or higher. -- [ ] I am using Python version 3.6 or higher. +- [ ] I am using Python version 3.8 or higher. - [ ] I have searched the [issues](https://github.com/justinmayer/virtualfish/issues?q=is%3Aissue) (including closed ones) and believe that this is not a duplicate. - [ ] If related to a plugin, I prefixed the issue title with the name of the plugin. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2aa0fc9..d9b523b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: rev: v2.37.2 hooks: - id: pyupgrade - args: [--py36-plus] + args: [--py38-plus] - repo: https://github.com/hakancelikdev/unimport rev: 0.9.6 diff --git a/pyproject.toml b/pyproject.toml index abca682..873f1d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Tracker" = "https://github.com/justinmayer/virtualfish/issues" [tool.poetry.dependencies] -python = ">=3.7,<4.0" +python = ">=3.8,<4.0" packaging = ">=21.3" pkgconfig = ">=1.5" psutil = ">=5.7" From 113494ce28682add464356fb4e6b13edba07f06b Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Thu, 25 Apr 2024 14:48:46 +0200 Subject: [PATCH 3/3] Prepare release --- RELEASE.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..59f5c88 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +Release type: patch + +Resolve compatibility issue with Python 3.12