anymail / django-anymail

Django email backends and webhooks for Amazon SES, Brevo (Sendinblue), MailerSend, Mailgun, Mailjet, Postmark, Postal, Resend, SendGrid, SparkPost, Unisender Go and more
https://anymail.dev
BSD 3-Clause "New" or "Revised" License
1.67k stars 129 forks source link

Can't lock with poetry #326

Closed Jessime closed 1 year ago

Jessime commented 1 year ago

Hi! I'm trying to run poetry lock and I'm running into issues. Namely, it doesn't resolve (which makes this a bit tricky because I don't have a traceback to share). But my pyproject.toml minimal example looks like:

[tool.poetry.dependencies]
# ------------------------------------------------------------------------------
python = "^3.11"
django-anymail = {version = "10.0", extras = ["amazon-ses"]} 

I've also tried version = "9.2".

If I run poetry -vvv lock, and run it for a while before killing it, the log ends with:

Falling back to installed packages to discover metadata for botocore
Found 0 compatible packages for botocore
 367: fact: no versions of botocore match >1.23.34,<1.23.35
 367: conflict: no versions of botocore match >1.23.34,<1.23.35
 367: ! botocore (>1.23.34,<1.23.35) is partially satisfied by not botocore (==1.23.34)
 367: ! which is caused by "botocore (1.23.34) depends on urllib3 (>=1.25.4,<1.27)"
 367: ! thus: botocore (>=1.23.34,<1.23.35) requires urllib3 (>=1.25.4,<1.27)
 367: fact: botocore (>=1.23.34,<1.23.35) requires urllib3 (>=1.25.4,<1.27)
 367: derived: not botocore (>=1.23.34,<1.23.35)
 367: derived: not boto3 (==1.20.34)
 367: fact: django (4.2.3) depends on asgiref (>=3.6.0,<4)
 367: fact: django (4.2.3) depends on sqlparse (>=0.3.1)
 367: fact: django (4.2.3) depends on tzdata (*)
 368: selecting django (4.2.3)
 368: derived: tzdata
 368: derived: sqlparse (>=0.3.1)
 368: derived: asgiref (>=3.6.0,<4)
^C 368: Version solving took 21.359 seconds.
 368: Tried 368 solutions.

Variations of this line:

 367: conflict: no versions of botocore match >1.23.34,<1.23.35

seem to appear in all of the aforementioned 368 attempted solutions. Maybe that's a clue?

Jessime commented 1 year ago

Ah! I'm not alone:

https://github.com/boto/boto3/issues/3778

So the problem here is with botocore. Should I close this issue?

Jessime commented 1 year ago

I'm going to close this issue. Work around is to also add urllib3 < 2:

https://github.com/boto/boto3/issues/3778#issuecomment-1632909418