python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.62k stars 2.27k forks source link

Poetry does not install sshpubkeys package required by moto package. #3467

Closed pawelrubin closed 2 years ago

pawelrubin commented 3 years ago

Issue

Poetry does not install all requirements for moto package.

Result of pip check:

$ poetry run pip check
moto 1.3.16 requires sshpubkeys, which is not installed.

Result of poetry show moto

name         : moto
version      : 1.3.16
description  : A library that allows your python tests to easily mock out the boto library

dependencies
 - aws-xray-sdk >=0.93,<0.96 || >0.96
 - boto >=2.36.0
 - boto3 >=1.9.201
 - botocore >=1.12.201
 - cfn-lint >=0.4.0
 - cryptography >=2.3.0
 - docker >=2.5.1
 - ecdsa <0.15
 - idna >=2.5,<3
 - Jinja2 >=2.10.1
 - jsondiff >=1.1.2
 - MarkupSafe <2.0
 - mock *
 - more-itertools *
 - python-dateutil >=2.1,<3.0.0
 - python-jose >=3.1.0,<4.0.0
 - pytz *
 - PyYAML >=5.1
 - requests >=2.5
 - responses >=0.9.0
 - six >1.9
 - werkzeug *
 - xmltodict *
 - zipp *

Result of poetry run pip show moto

Name: moto
Version: 1.3.16
Summary: A library that allows your python tests to easily mock out the boto library
Home-page: https://github.com/spulec/moto
Author: Steve Pulec
Author-email: spulec@gmail.com
License: Apache
Location: /Users/pawelvewd/Library/Caches/pypoetry/virtualenvs/test-poetry-HW0mMbTY-py3.9/lib/python3.9/site-packages
Requires: pytz, werkzeug, six, more-itertools, setuptools, requests, botocore, aws-xray-sdk, boto3, python-jose, MarkupSafe, sshpubkeys, PyYAML, idna, python-dateutil, boto, zipp, cryptography, jsondiff, mock, ecdsa, responses, cfn-lint, docker, Jinja2, xmltodict
Required-by: 
sinoroc commented 3 years ago

Looks to me like sshpubkeys is an optional dependency of moto. So to install it you would have to specify an extra for moto. From reading the (unnecesarily complicated) setup.py file for moto 1..3.16 looks you might want the extra ec2 or all or server. So I don't think there is anything wrong with poetry here.

On the other hand, I do not understand why pip check thinks that sshpubkeys is needed and missing. This looks like it might be a pip bug. I don't think there is anything wrong with poetry here either.

pawelrubin commented 3 years ago

Thanks for the quick response @sinoroc!

moto setup.py is indeed complicated and it looks like sshpubkeys is an optional dependency.

However, when installing moto via pip install moto, pip will install sshpubkeys dependency.

This might be a pip bug regarding the installation of extra dependencies

mkniewallner commented 2 years ago

Closing, since Poetry's behavior is correct here.

github-actions[bot] commented 8 months ago

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.