Skip to content

Commit 910dff3

Browse files
authored
Merge pull request #244 from branchvincent/setuptools
2 parents 2593997 + 113494c commit 910dff3

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

.github/ISSUE_TEMPLATE/---bug-report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ assignees: ''
1717

1818
<!-- Checked checkbox should look like this: [x] -->
1919
- [ ] I am using Fish shell version 3.1 or higher.
20-
- [ ] I am using Python version 3.6 or higher.
20+
- [ ] I am using Python version 3.8 or higher.
2121
- [ ] 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.
2222
- [ ] If related to a plugin, I prefixed the issue title with the name of the plugin.
2323

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ repos:
3232
rev: v2.37.2
3333
hooks:
3434
- id: pyupgrade
35-
args: [--py36-plus]
35+
args: [--py38-plus]
3636

3737
- repo: https://github.com/hakancelikdev/unimport
3838
rev: 0.9.6

RELEASE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Release type: patch
2+
3+
Resolve compatibility issue with Python 3.12

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ classifiers = [
2222
"Tracker" = "https://github.com/justinmayer/virtualfish/issues"
2323

2424
[tool.poetry.dependencies]
25-
python = ">=3.7,<4.0"
25+
python = ">=3.8,<4.0"
2626
packaging = ">=21.3"
2727
pkgconfig = ">=1.5"
2828
psutil = ">=5.7"

virtualfish/loader/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
import logging
22
import os
33
import sys
4-
import pkg_resources
5-
4+
from importlib import metadata
65

76
log = logging.getLogger(__name__)
87

98

109
def load(plugins=(), full_install=True):
1110
try:
12-
version = pkg_resources.get_distribution("virtualfish").version
11+
version = metadata.version("virtualfish")
1312
commands = [f"set -g VIRTUALFISH_VERSION {version}"]
14-
except pkg_resources.DistributionNotFound:
13+
except metadata.PackageNotFoundError:
1514
commands = []
1615
base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
1716

virtualfish/virtual.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ end
417417

418418
function __vf_addpath --description "Adds a path to sys.path in this virtualenv"
419419
if set -q VIRTUAL_ENV
420-
set -l site_packages (eval "$VIRTUAL_ENV/bin/python -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())'")
420+
set -l site_packages (eval "$VIRTUAL_ENV/bin/python -c 'import sysconfig; print(sysconfig.get_path(\'platlib\'))'")
421421
set -l path_file $site_packages/_virtualenv_path_extensions.pth
422422

423423
set -l remove 0

0 commit comments

Comments
 (0)