Closed iainelder closed 1 year ago
See discussion on this topic in the Poetry forum. I've shared it there to get some insight from the Poetry experts.
Thanks! Interesting bug :)
It may be a bug in Poetry, but it's not a bug in awsapilib itself, so I'll close this here. To avoid the problem, I think either Poetry has to relax its parsing of PyPI project names, or the 2captcha-python
project has to change its name. Poetry doesn't like project names that start with digits.
awsapilib is now compatible with Poetry.
In python-poetry/poetry-core#607 I fixed it to accept dependency names starting with a number.
Poetry 1.6.0 and Poetry Core 1.7.0 contain my fix.
$ poetry --version
Poetry (version 1.6.1)
$ poetry new .
Created package tmp.2023_08_26.585ougjl in .
$ poetry add awsapilib
Creating virtualenv tmp-2023-08-26-585ougjl-aQHfh3WZ-py3.8 in /home/isme/.cache/pypoetry/virtualenvs
Using version ^3.1.3 for awsapilib
Updating dependencies
Resolving dependencies... Downloading https://files.pythonhosted.org/packages/43/d5/c29cd327cb646791f7b24Resolving dependencies... Downloading https://files.pythonhosted.org/packages/96/7f/9477016e1bfd5b87ce9fcResolving dependencies... (5.0s)
Package operations: 20 installs, 0 updates, 0 removals
• Installing six (1.16.0)
• Installing jmespath (1.0.1)
• Installing python-dateutil (2.8.2)
• Installing urllib3 (1.26.16)
• Installing botocore (1.31.35)
• Installing certifi (2023.7.22)
• Installing charset-normalizer (3.2.0)
• Installing idna (3.4)
• Installing requests (2.31.0)
• Installing s3transfer (0.6.2)
• Installing soupsieve (2.4.1)
• Installing typing-extensions (4.7.1)
• Installing 2captcha-python (1.2.1)
• Installing beautifulsoup4 (4.12.2)
• Installing boto3 (1.28.35)
• Installing boto3-type-annotations (0.3.1)
• Installing cachetools (5.3.1)
• Installing opnieuw (2.0.0)
• Installing pyotp (2.9.0)
• Installing awsapilib (3.1.3)
Writing lock file
$ poetry run python -c 'from awsapilib import AccountManager; print("OK")'
OK
Awesome!! 😎
Poetry skips the 2captcha dependency when resolving awsapilib's dependencies. It says:
The missing dependency causes the
AccountManager
class to fail with aModuleNotFoundError
.I can work around it by adding
2captcha-python
to my own project, but I'd rather not.Here's a full repro in an empty directory.