Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Setuptools for Python 3.12 #244

Merged
merged 3 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/---bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ assignees: ''

<!-- Checked checkbox should look like this: [x] -->
- [ ] 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.

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Release type: patch

Resolve compatibility issue with Python 3.12
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 3 additions & 4 deletions virtualfish/loader/__init__.py
Original file line number Diff line number Diff line change
@@ -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__)))

Expand Down
2 changes: 1 addition & 1 deletion virtualfish/virtual.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down