-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
No module named 'pkg_resources' during sdist build of dependency when mixing Poetry 1.2 and 1.1 #6328
Comments
This is impossible to reproduce without a |
We had the same issue but it's always the same
I don't think this behavior was changed or even documented somewhere in 1.2 release. The weird thing that we observed is changing |
UPDATE: Downgrading python from |
There's still no reproduction here, and the additional context makes this more confusing... When I refer to implicit inclusion of setuptools, I mean Poetry would basically ignore it in the environment unless it was explicitly configured in pyproject.toml, whereas 1.2 will record it to the lockfile/not special case it. It's a small line item in the changelog that doesn't affect most projects with well-defined dependencies, but some may get tripped up by implicit coupling they did not realize was there. Anyway, a Dockerfile or reproduction log is still needed to debug this -- if anyone turns one up please post it! |
I also encountered this after upgrading to 1.2.0 on both my development and production machines. For me, simply running Dependencies in pyproject.toml[tool.poetry.dependencies]
python = "~3.9"
django = "~4.0.7"
django-crispy-forms = "^1.14.0"
numpy = "^1.23.2"
pandas = "^1.4.4"
django-constance = "^2.9.1"
django-dbbackup = "^4.0.1"
django-extra-views = "^0.14.0"
django-extensions = "^3.1.3"
django-import-export = "^2.5.0"
django-anymail = {extras = ["mailgun"], version = "^8.6"}
django-filter = "^22.1"
django-widget-tweaks = "^1.4.12"
django-simple-history = "^3.0.0"
django-tinymce = "^3.5.0"
django-notifications-hq = "^1.6.0"
django-storages = {extras = ["boto3"], version = "^1.11.1"}
django-picklefield = "^3.1"
weasyprint = "^56.1"
mysqlclient = "^2.1.1"
django-htmx = "^1.12.2"
toml = "^0.10.2"
django-environ = "^0.9.0"
django-entangled = "^0.5.1"
django-admin-rangefilter = "^0.8.8"
setuptools = "^65.3.0" # after adding this both machines worked as they did before
[tool.poetry.group.dev.dependencies]
django-debug-toolbar = "^3.6.0"
[tool.poetry.group.test.dependencies]
freezegun = "^1.2.2"
coverage = "^6.4.4"
isort = "^5.9.3"
black = "^22.8.0"
pre-commit = "^2.14.0"
tblib = "^1.7.0"
pytest = "^7.1.3"
pytest-django = "^4.4.0"
pytest-xdist = {extras = ["psutil"], version = "^2.4.0"}
flake8 = "^5.0.4"
djlint = "^1.12.1"
|
I'm simplifying, but essentially what happens on 1.1 is Poetry will ignore |
poetry update
behaves differently on 1.2.0 compared to 1.13.0
any advice on how to deal with this presently? I am on poetry 1.2.2 and having the same pkg_resources issue it sounds like the issue in br3ndonland/inboard#55 where packages depending on pkg_resources can't locate it |
Declare a dependency on |
@neersighted - thanks, I'd done that and the issue is still there It looks like:
Also of note, this is on a mac today, but the same issue occurs on my linux machine. There are no open issues to do with this in web3. |
There are at least 2 libraries that have the same error (been on an evil comment/uncomment dig) {web3 and eth-utils}. As per this link, #6328 (comment), I've moved back from python 3.10.7 to python 3.10.5 and it is sorted, for now, after much weeping and gnashing of teeth! Posting in case this helps any poor soul. |
When setuptools dependency is declared, looks like version 1.1.14 has this error and 1.2.0 does not |
no reproduction, old, and almost certainly the fix was to declare an explicit dependency on setuptools all along let's close |
…version range supported) to fix issue with CI Issue behaviour and cause documented python-poetry/poetry#6328
…version range supported) to fix issue with CI Issue behaviour and cause documented python-poetry/poetry#6328
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
I updated my personal machine to 1.2.0. My CI/CD pipeline still uses 1.13.0 and is running on a
python:3.10-slim
docker container.I ran
poetry update dparse
on my local machine, with version 1.2.0. When running tmy CI/CD (Poetry 1.13.0),poetry run bandit application/ -r -c "pyproject.toml"
fails citing:ModuleNotFoundError: No module named 'pkg_resources'
However, after downgrading my personal machine to poetry 1.13.0 and running
poetry update dparse
(after reverting the previous changes), the CI/CD passes without error.Any reasons for this behaviour?
The text was updated successfully, but these errors were encountered: