-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Support Pipfile #3181
Comments
Thanks @stibbons. Contributions are always welcome, of course, if you'd like to submit a PR for this. |
I started playing with support for pipenv, it looks like it might be a drop in replacement for calls to pip install. We'll probably want to offer the option through our readthedocs.yml file, so this will take:
|
yes, it is a straigh replacement of pip (actually, a wrapper), you do |
You should actually do |
indeed |
I'm already using pipenv for other projects, so have some familiarity. I believe for our case, we actually want @tuukkamustonen this confuses me a little, but I've only recently started with pipenv and pipfile. What does ignoring the pipfile mean for projects that don't check in their pipfile.lock? It doesn't seem checking in pipfile.lock is a requirement. I suppose the most correct is check for pipfile.lock, if so, Some of these options will likely be added/allowed override through our readthedocs.yml, In the case of a |
Both side is ok. When you freeze the requirements.txt (ex using pip-tools), it act like when you use the lock file. |
@agjohnson I am new to pipenv as well, but as I understand it, if you run just
Yeah, if we are after deterministic builds, then the lock-file needs to be followed and
This is a good reminder. Neither pip-tools or pipenv (which uses pip-tools underneath) support "universal" lock files. So if you create the lockfile under python 3.6 on Windows and then run it on 3.4 on Linux, things may break, because lockfile expects 3.6/Windows environment. See https://github.com/kennethreitz/pipenv/issues/857 and jazzband/pip-tools#563.
Those projects won't get deterministic builds. It's ok, but should be documented. One of the main benefits with pipenv is to get deterministic builds (improvement over simple
I don't think |
Ah yes, so it seems that ignoring the Pipfile and relying on Pipfile.lock should be an option, but is off by default. Without universal lock files, we can't guarantee that the environment is the same OS or even python version as our build images.
It looks like if a Pipfile is missing and a requirements.txt is available, |
It does not change from requirements.txt, it may or may not be reproductible, depending on the work of the programmer... I would not bother, simply use the Later when universal lock file will be settled this can be adapted to Rtd, but this is not as "important" than in the travis build (because the artefact is the doc, not the actual wheel), and we dont have this ability in the travis. Or, simpler, you let the developer write its install line ( |
What's the status of this issue? Maybe there is something I can help with? |
Hey guys. |
No updates. Feel free to take this work on if you want. |
Hey guys, firstly, thanks for all the work you guys do on this project 😃 I've taken an interest in this issue, and I'd just like to note a few things down about how we expect people will use this feature, and which use cases we should accommodate for. People often get confused about how pipenv should be used, and thus I expect it will be difficult to please everyone with this feature. I am going to use the information provided in this section of pipenv's documentation as the main point of reference. Accommodating for the use cases and guidelines listed there should satisfy most developers. RTD's installation processSo currently, there are three stages to the installation process after the virtualenv is created:
How pipenv fits into these stagesInstallation of Now, some (or perhaps even "most") usages of pipenv would actually combine stages two and three, as many projects have However, as specified in the documentation linked above, Pipfiles are also capable of managing dependencies by themselves without relying on the project's The simplest and most malleable approach I can think of is doing Arguments to
|
@Tobotimus thanks, that's a great summary of the use case of pipenv, currently, we are doing a v2 of the configuration file https://github.com/orgs/rtfd/projects/2, I think this should be there. |
@stsewd Ah I see! Great. Unfortunately that link is a 404 for me, and I can't see any projects on rtfd's org page, however I did find the YAML file completion milestone, which I'm happy to help out with when I get some time 😄 I am a new here so still somewhat stumbling around. I've opened up #4254 as a patch to the old config, but I am more than happy to refactor it according to any new spec. Is there a feature branch of some sort for the new config? Thanks! |
We are moving the rtd-build repo to the readthedocs.org repo #4242, there are some ideas here https://docs.readthedocs.io/en/latest/design/yaml-file.html and this is kind of the base schema we have for the v2 https://github.com/rtfd/readthedocs.org/blob/master/readthedocs/rtd_tests/fixtures/spec/v2/schema.yml. There are some design decisions to make. |
Thanks very much, I suppose my approach from #4254 could easily adapt to that schema by simply placing the |
There is more work to finish up the porting process, so it would probably be best to wait for that process to be completed first. I suppose we can consider readthedocs_build frozen for now. Once things are ported, you can rework your PR to be housed here. For now, a separate PR that updates our v2 schema spec file would be the best way to start. You'll find tests and the schema here: This would be the best place to describe your changes and rationale for schema changes. The immediate feedback I'd have is that I don't like exposing a Edit: cc @Tobotimus, also 🎉 for the contribution! Sorry your PR landing right in the middle of a large project |
Is this still in the plans? My work uses pipenv exclusively. And without its support, i need to build some hack to make things work |
@stsewd You previously mentioned we should comment with projects running on pipenv. I maintain https://github.com/pyvec/docs.pyvec.org and https://github.com/honzajavorek/cojeapi. Both currently require developers of the docs to run (If anyone is interested in the linter, see this script. Works correctly with dependabot.) |
Hi everyone, sorry for the silence here. We are trying to decide if support pipenv or not.
Part of those decisions is that if we implement pipenv is something that we'll need to maintain for ever. Please, let us know your opinions. |
I personally stopped using Pipenv (still using Conda and Poetry). I think going with PEP 517 may be the best choice. |
Pipenv is still the best supported option. Editors like pycharm and spacemacs supports pipenv. Dependabot supports pipenv. The only tool that I use that doesn't support pipenv is readthedocs. I have no idea what will happen in the future. The fact pipenv hasn't been updated in over a year doesn't look good for pipenv. I see poetry[1] and flit[2] are actively maintained. Pip itself might be improved. However right now, I think pipenv, like it or not is the best option, and even if it does get replaced in the future I suspect it will be used by legacy projects for a long time. Personally, the sooner the Python community picks the preferred solution to solve the problems in Notes: [1] I tried poetry recently and found it didn't have a good way of migrating from an existing [2] Not familiar with flt - I guess I should have a look. |
In that case, is there any plans to support poetry? Currently I cannot use
the product with Pipenv or Poetry unless I hack the repo locally, and then
of course its overwritten on every update.
…On Tue, Nov 26, 2019 at 2:04 PM Santos Gallegos ***@***.***> wrote:
Hi everyone, sorry for the silence here. We are trying to decide if
support pipenv or not.
- One thing is that pipenv isn't (or going to) adopting PEP 517 pypa/pipenv#2787
(comment)
<pypa/pipenv#2787 (comment)>
like other tools like poetry or flit did (this allows us to just call pip
and don't implement more options in the config file).
- Last release of pipenv was one year ago
https://pypi.org/project/pipenv/#history, we are not sure about what
direction the project is going to take.
- Pipenv is slow when resolving deps, we already have the same problem
with conda. But conda did an improvement recently, so pipenv could have
improvements in that area over time too.
- We may try to support pipenv in an experimental way (we already have
a PR kind of ready with pipenv support), so we can remove/change it without
any guaranty.
Part of those decisions is that if we implement pipenv is something that
we'll need to maintain for ever. Please, let us know your opinions.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3181?email_source=notifications&email_token=ABGUL7JZGO2MZLY7WMZJ6X3QVVQJJA5CNFSM4EAMFA62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFG5UDI#issuecomment-558750221>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGUL7JU6HHROEZP6IWAE3TQVVQJJANCNFSM4EAMFA6Q>
.
|
@petersmithca You should be able to use poetry now https://poetry.eustace.io/docs/pyproject/#poetry-and-pep-517 |
I meant will read the docs work with poetry to build my documentation.
…On Wed, Nov 27, 2019 at 11:18 AM Santos Gallegos ***@***.***> wrote:
In that case, is there any plans to support poetry?
You should be able to use poetry now
https://poetry.eustace.io/docs/pyproject/#poetry-and-pep-517
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3181?email_source=notifications&email_token=ABGUL7P7B5C5HSU4DDSMDNTQV2FTBA5CNFSM4EAMFA62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFJ2NGY#issuecomment-559130267>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGUL7KI4LUTHYUITCB7YYLQV2FTBANCNFSM4EAMFA6Q>
.
|
Yes, we don't call poetry directly, but it's called with pip (that's PEP 517) |
oh ok. cool thank you
…On Wed, Nov 27, 2019 at 11:22 AM Santos Gallegos ***@***.***> wrote:
I meant will read the docs work with poetry to build my documentation.
Yes, we don't call poetry directly, but it's called with pip (that's PEP
517)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3181?email_source=notifications&email_token=ABGUL7M2WA2SR2JL54AIIG3QV2GEPA5CNFSM4EAMFA62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFJ25CA#issuecomment-559132296>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGUL7OXN4AK63UAIL7TO3LQV2GEPANCNFSM4EAMFA6Q>
.
|
My understanding is that pip is going to start supporting the |
@zbeekman Do you have a source for that understanding? |
Thanks for all the input so far, everyone. This is helpful to have.
I feel the same way to a certain degree. RTD might be overly opinionated about process and tooling, but if we're looking to support the Python community at-large, we probably should have more flexibility in our workflow. One option I've raised, and this option is not being actively considered at this moment, is to implement pipenv support as an "experimental" feature. That would mean that pipenv is not supported by core team (we can't help with support requests), and pipenv support could go away (though we'd deprecate with warnings). Normally I'd probably vote as hard pass on pipenv support at this point, but this is a highly requested feature still -- even given some of the arguments against pipenv. The question that I think core team needs more answers to, if you are a pipenv user, is "why not use poetry?". Our decisions on pipenv might be further skewed because we're not users of either tool in daily development, so poetry feels synonymous with pipenv -- only RTD actually supports poetry. |
One of the reasons I started to use pipenv (and not poetry) back then was wider support for Pipfile in integrations - e.g. dependabot, GitHub (security warnings), Snyk, Heroku, or now.sh support Pipfile for specifying dependencies alongside requirements.txt, while support for pyproject.toml and poetry is still rare. Last time I checked I noticed dependabot now supports it, but I doubt about the others. RTD was actually the only place where I had to figure out hacks for Pipfile, and where poetry is supported sooner. I don’t know which tool wins the users in the end, but to me it feels like people desperately wanted to have something like pip + virtualenv and when pipenv appeared, they jumped on using it. Poetry wasn’t so well known and when I learned about it, I felt like it’s distraction from finally having one tool to rule the ecosystem. Later people realized pipenv’s flaws and started going back to pip or looking for alternatives, discovering poetry. I feel like this process is still happening. The tooling catches up with noticing poetry, but pipenv was mass-adopted earlier and is supported “everywhere” already. Today, like many, I see pipenv’s limitations and I think of migrating to poetry, but I won’t do it until the tooling I use catches up. |
Requirements are needed to generate the documentation. Pipfile is not supported yet (see readthedocs/readthedocs.org#3181). We also have to mock gi because ReadTheDocs don’t provide the packages needed to install pygobject.
Requirements are needed to generate the documentation. Pipfile is not supported yet (see readthedocs/readthedocs.org#3181). We also have to mock gi because ReadTheDocs don’t provide the packages needed to install pygobject.
Requirements are needed to generate the documentation. Pipfile is not supported yet (see readthedocs/readthedocs.org#3181). We also have to mock gi because ReadTheDocs don’t provide the packages needed to install pygobject.
Requirements are needed to generate the documentation. Pipfile is not supported yet (see readthedocs/readthedocs.org#3181). We also have to mock gi because ReadTheDocs don’t provide the packages needed to install pygobject.
Had a hard time continuing to use pipenv for dependency management while working with readthedocs automated builds. Migrated over to Poetry and its PEP517 compliance will allow for easier use with readthedocs and less overhead overall. Here are the sources I used to help make this decision: * python-poetry/poetry#1145 * python-poetry/poetry#1941 * readthedocs/readthedocs.org#3181
The lack of activity on this issue + the recent (from ~2018 onwards) governance and maintenance problems of Pipenv + lack of standardization around Pipfiles + discussion in pypa/packaging.python.org#912, pypa/packaging.python.org#701, and related issues make me think that the interest for Pipfile support on Read the Docs has greatly decreased and that it might be a dead end. In particular, I copy-paste a fragment I wrote on pypa/packaging.python.org#912:
I think it is very unlikely that pip gains support of Pipfiles. In any case, even if I'm wrong about Pipfile long-term success, I think it's fair to say that we won't implement support for it in the short nor medium-term. For "alternative" package managers, Poetry has much better support, is actively developed, it's engaging with the PyPA to bring forward new standards (like PEP 621 and others), and supports generating For "classical" approaches, pip has improved a lot, and pip-tools provides a lightweight way to freeze application requirements using existing formats (metadata files, The community is working hard to achieve consensus on the next-generation lock files. Discussions started in February 2019, then PEP 665 was proposed, next we had PEP 665, take 2 a couple of weeks ago, and the discussion is still ongoing. Whatever comes out of this, we will probably strive for supporting existing standards, rather than specific tools that do their own thing. Therefore, I am going to go ahead and close this. |
We don't support Pipfile and we decided we won't implement it for now (see #3181). I'm removing it from the schema and also its tests.
We don't support Pipfile and we decided we won't implement it for now (see #3181). I'm removing it from the schema and also its tests.
I prefer using
Pipfile
overrequirements.txt
. Please support this file format to set up the virtual environment.The text was updated successfully, but these errors were encountered: