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

pkg_resources in current release (2.4.1) clashes with python 3.12 default venv #250

Closed
ideesnoires opened this issue Nov 9, 2023 · 2 comments

Comments

@ideesnoires
Copy link

please make a new release, it's fixed in HEAD 653c82c

here the python docs: https://docs.python.org/3/whatsnew/3.12.html#summary-release-highlights
"Do not pre-install setuptools in virtual environments created with venv. This means that distutils, setuptools, pkg_resources, and easy_install will no longer available by default; to access these run pip install setuptools in the activated virtual environment."

@AmoahDevLabs
Copy link

AmoahDevLabs commented Nov 23, 2023

This issue is with Python 3.12 and I suggest it should be fixed in no time because some projects using django-formtools are broken after system upgrade (Fedora 39). I guess all other distros that switched to Python 3.12 are having this issue as well.

Error:

venv/lib/python3.12/site-packages/formtools/init.py", line 2, in
from pkg_resources import DistributionNotFound, get_distribution
ModuleNotFoundError: No module named 'pkg_resources'

Where pkg_resources is called:
"venv/lib/python3.12/site-packages/formtools/init.py",

import django
from pkg_resources import DistributionNotFound, get_distribution

try:
version = get_distribution("django-formtools").version
except DistributionNotFound:
# package is not installed
version = None

if django.VERSION <= (3, 2):
default_app_config = 'formtools.apps.FormToolsConfig'

@claudep
Copy link
Contributor

claudep commented Nov 25, 2023

Closing as it's fixed in head. #253, then #254 will produce a new release.

@claudep claudep closed this as completed Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants