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

Clarify arguments against Pipenv in README #488

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,25 +237,24 @@ At this point the rest of the resolution is straightforward since there is no mo

#### Install command

When you specify a package to the `install` command it will add it as a wildcard
dependency. This means that **any** version of this package can be installed which
can lead to compatibility issues.
When you specify a package to the `install` command without specifying any version constraints,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You only reworded original text, but it seems to me like it is not exactly valid argument in the first place, as your are supposed to use Pipfile.lock when using pipenv - it is even mentioned in the next sentence! it is constrained.
But then lets say for some unknown reason (which is an edge on its own) you lost your lock and rerun from Pipfile, unless you changed default package index (again, an edge case) you will get the same or newer version... so exactly the same thing as Poetry.

Due these reasons I don't really see how this argument is valid.
I guess it would make more sense if second sentence was: This means that your dependency list alone does not reflect minimal version requirements that project has been tested against.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference between Pipenv and Poetry in this regard is that by default Poetry pins the package to the latest semver compatible release. This saves you from the surprise when one of your other dependencies requires an earlier version that's incompatible with your code.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Pipfile.lock would save you from any potential disasters but the main point is about having a sensible default to create that lock from.

it will add it as a wildcard dependency. This means that **any** version of this package
can be installed which can lead to compatibility issues.

Also, you have to explicitly tell it to not update the locked packages when you
install new ones. This should be the default.

#### Remove command
#### Uninstall command

The `remove` command will only remove the package specified but not its dependencies
The `uninstall` command will only remove the package specified but not its dependencies
if they are no longer needed.

You either have to use `sync` or `clean` to fix that.
You have to use `clean` to fix that.

#### Too limited in scope

Finally, the `Pipfile` is just a replacement from `requirements.txt` and, in the end, you will still need to
populate your `setup.py` file (or `setup.cfg`) with the exact same dependencies you declared in your `Pipfile`.
So, in the end, you will still need to manage a few configuration files to properly setup your project.
Finally, the `Pipfile` is just an upgrade from `requirements.txt` and, in the end,
you will still need to manage a few configuration files to properly setup your project.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will still need a setup.py in most cases, you seem to be right to remove "with the exact same dependencies you declared in your Pipfile" bit,
but other stuff required for publishing the package, describing it or setting up entry points still has to be done in setup.py.

It is also is kinda strange that you are supposed to put one part of your dependencies in setup.py and second (dev?) in Pipfile. Then why there is support for [packages] in Pipfile in the first place? I find it personally quite confusing, which makes me think that Pipfile/setup.py overlap is one of the major arguments point why would one choose poetry over more popular pipenv.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pipenv doesn't explicitly support libraries which is why the weird workarounds are required to get it to play nice with a setup.py. It's only designed to be a wrapper around pip and virtualenv while handling the project's dependencies. There's a nice resource about the overlap here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is exactly the point of Too limited in scope argument. Adding this link would be nice too!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mention setup.py because "a few configuration files" kind of implies it. I'm not too sure if the link would be relevant since there are more files than just the setup.py so I'd like @sdispater's input on it.



## Commands
Expand Down