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

Difference vs. pip: installing cyptography #6102

Closed
dimaqq opened this issue Aug 2, 2022 · 8 comments
Closed

Difference vs. pip: installing cyptography #6102

dimaqq opened this issue Aug 2, 2022 · 8 comments

Comments

@dimaqq
Copy link
Contributor

dimaqq commented Aug 2, 2022

poetry add cryptography does not install cffi.
pip install cryptography installs cffi.

Which is actually correct?

@dimaqq
Copy link
Contributor Author

dimaqq commented Aug 2, 2022

Why it matters?
While many parts cryptography work without cffi, some parts require it.
Someone adds a dep to the project that depends on cryptography and the program fails at run-time because the transient-transient-dep is missing.

@clintonroy
Copy link
Contributor

poetry add cryptography does install cffi for me.

Updating dependencies
Resolving dependencies...
   1: fact: tester is 0.1.0
   1: derived: tester
   1: fact: tester depends on cryptography (^37.0.4)
   1: selecting tester (0.1.0)
   1: derived: cryptography (>=37.0.4,<38.0.0)
PyPI: 1 packages found for cryptography >=37.0.4,<38.0.0
   1: fact: cryptography (37.0.4) depends on cffi (>=1.12)
   1: selecting cryptography (37.0.4)
   1: derived: cffi (>=1.12)
PyPI: 16 packages found for cffi >=1.12
   1: fact: cffi (1.15.1) depends on pycparser (*)
   1: selecting cffi (1.15.1)
   1: derived: pycparser
PyPI: 21 packages found for pycparser *
   1: selecting pycparser (2.21)
   1: Version solving took 0.027 seconds.
   1: Tried 1 solutions.

Note the fact that cryptography depends on cffi.

If you can reproduce your issue, and give us a lot more details to be able to reproduce it please do so, otherwise please close this ticket.

@dimaqq
Copy link
Contributor Author

dimaqq commented Aug 2, 2022

@dimaqq
Copy link
Contributor Author

dimaqq commented Aug 2, 2022

Tested with Poetry version 1.1.14, Python 3.8 and 3.10 on Linux.

@dimaqq
Copy link
Contributor Author

dimaqq commented Aug 2, 2022

Somehow when I did poetry add cryptography in a fresh poetry project (as well as an existing project), cffi was not added to the lock file, while cryptography was.

However, if I do poetry lock, the lock file gets updated and looks reasonable (pycparser and cffi are included) and subsequent poetry intsall does install them.

So I guess the problem I'm seeing is that "poetry add x" doesn't properly "lock" the project. 🤔

@radoering
Copy link
Member

[metadata.files]
cryptography = []

Empty metadata files could be related to #5970. Since you are already using 1.1.14, maybe you have to clear your cache.

anthonyprintup added a commit to anthonyprintup/hunt-match-telemetry that referenced this issue Aug 3, 2022
@dimbleby
Copy link
Contributor

clear your cache and re-lock.

clearly this was #5970 and can be closed

Copy link

github-actions bot commented Mar 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants