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

Fix pkgresources import #7866

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 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
7 changes: 7 additions & 0 deletions changelogs/unreleased/fix-pkgresources-import.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
description: Fixed dropped import from pkg_resources
sections:
bugfix: "Addressed breaking change in setuptools (core Python library)"
upgrade-note: "If you had previously constrained `setuptools<71` in your `pyproject.yml`, you may now drop the constraint"
destination-branches:
- master
- iso7
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iso6 will have its own PR because it has a second occurrence of this import.

8 changes: 2 additions & 6 deletions src/inmanta/moduletool.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from configparser import ConfigParser
from functools import total_ordering
from re import Pattern
from typing import IO, TYPE_CHECKING, Any, Optional
from typing import IO, Any, Optional

import click
import more_itertools
Expand Down Expand Up @@ -76,13 +76,9 @@
gitprovider,
)
from inmanta.stable_api import stable_api
from packaging.requirements import InvalidRequirement
from packaging.version import Version

if TYPE_CHECKING:
from packaging.requirements import InvalidRequirement
else:
from pkg_resources.extern.packaging.requirements import InvalidRequirement

LOGGER = logging.getLogger(__name__)


Expand Down