From 966997c64d9ed012cb3125648fcde5c2ecfe981f Mon Sep 17 00:00:00 2001 From: frostming Date: Fri, 2 Aug 2019 10:01:47 +0800 Subject: [PATCH 01/83] PEEP-006: new behavior of `pipenv lock -r -d` --- peeps/PEEP-006.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 peeps/PEEP-006.md diff --git a/peeps/PEEP-006.md b/peeps/PEEP-006.md new file mode 100644 index 00000000..87304bba --- /dev/null +++ b/peeps/PEEP-006.md @@ -0,0 +1,30 @@ +# PEEP-006: Change the behavior of `-d` flag when generating requirement.txt + +Make the behavior of `pipenv lock -r -d` consistent with those in other commands: convert all dependencies. + +☤ + +If you type `pipenv lock --help` the help document says: + +```bash +-d, --dev Install both develop and default packages. [env var:PIPENV_DEV] +``` + +That is not accurate and confusing for `pipenv lock -r`, which only produces the develop requirments. + +This PEEP proposes to change the behavior of `pipenv lock -r -d` to produce **all** requirements, both develop +and default. Also, change the help string of `-d/--dev` to **"Generate both develop and default requirements"**. + +Introduce a new flag `--only` to restrict to develop requirements only. The flag does nothing when not combined with +`-d/--dev` flag. + +Display a warning message to remind users of the new `--only` flag and the behavior change, for the next several releases. + +## Impact + +The users relying on the old behavior will get more requirements listed in the ``dev-requirements.txt`` file, +which in most cases is harmless. They can just add `--only` flag to achieve the same thing before. + +## Related issues: + +- #3316 From 1fcb1b5bc195922602ef77a6e3fba2cb5c1c08c7 Mon Sep 17 00:00:00 2001 From: Tim Hughes Date: Wed, 15 Jan 2020 10:40:01 +0000 Subject: [PATCH 02/83] [docs] mention variable expansion in `.env` files fix #3610 --- docs/advanced.rst | 17 +++++++++++++++++ news/4100.doc.rst | 1 + 2 files changed, 18 insertions(+) create mode 100644 news/4100.doc.rst diff --git a/docs/advanced.rst b/docs/advanced.rst index 9efb798e..014bd62d 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -344,6 +344,21 @@ If a ``.env`` file is present in your project, ``$ pipenv shell`` and ``$ pipenv >>> os.environ['HELLO'] 'WORLD' +Shell like variable expansion is available in ``.env`` files using `${VARNAME}` syntax.:: + + $ cat .env + CONFIG_PATH=${HOME}/.config/foo + + $ pipenv run python + Loading .env environment variables… + Python 3.7.6 (default, Dec 19 2019, 22:52:49) + [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux + Type "help", "copyright", "credits" or "license" for more information. + >>> import os + >>> os.environ['CONFIG_PATH'] + '/home/kennethreitz/.config/foo' + + This is very useful for keeping production credentials out of your codebase. We do not recommend committing ``.env`` files into source control! @@ -355,6 +370,8 @@ To prevent pipenv from loading the ``.env`` file, set the ``PIPENV_DONT_LOAD_ENV $ PIPENV_DONT_LOAD_ENV=1 pipenv shell +See `theskumar/python-dotenv `_ for more information on ``.env`` files. + ☤ Custom Script Shortcuts ------------------------- diff --git a/news/4100.doc.rst b/news/4100.doc.rst new file mode 100644 index 00000000..050bdcca --- /dev/null +++ b/news/4100.doc.rst @@ -0,0 +1 @@ +More documentation for ``.env`` files From 603a20bf453cfe798286316467d073799f3a157e Mon Sep 17 00:00:00 2001 From: Sumana Harihareswara Date: Thu, 5 Mar 2020 20:48:40 -0500 Subject: [PATCH 03/83] Update links in documentation The canonical Pipenv documentation is now at pipenv.pypa.io. Also, the canonical GitHub repositories for Pipenv and Requests have changed, and some other communications links (Twitter, mailing list, "thank you") were no longer operational. This commit updates those and clarifies that Pipenv is a project maintained by the PyPA. Fixes #4137. Signed-off-by: Sumana Harihareswara --- .github/ISSUE_TEMPLATE/Bug_report.md | 2 +- .gitmodules | 4 ++-- LICENSE | 2 +- README.md | 5 ++--- docs/_templates/sidebarintro.html | 7 +++---- docs/_templates/sidebarlogo.html | 13 ++++++------- docs/advanced.rst | 4 ++-- docs/conf.py | 4 ++-- docs/dev/philosophy.rst | 2 ++ docs/index.rst | 3 --- docs/install.rst | 2 +- news/4137.doc | 1 + pipenv/pipenv.1 | 4 ++-- setup.py | 4 ++-- tests/integration/test_lock.py | 16 ++++++++-------- tests/unit/test_utils.py | 4 ++-- 16 files changed, 37 insertions(+), 40 deletions(-) create mode 100644 news/4137.doc diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index 30b70bf3..e516787f 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -5,7 +5,7 @@ about: Create a report to help us improve Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv. -Check the [diagnose documentation](https://pipenv.kennethreitz.org/en/latest/diagnose/) for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way. +Check the [diagnose documentation](https://pipenv.pypa.io/en/latest/diagnose/) for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way. Make sure to mention your debugging experience if the documented solution failed. diff --git a/.gitmodules b/.gitmodules index e2f779af..4f0f9fa2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,7 @@ url = https://github.com/pinax/pinax.git [submodule "tests/test_artifacts/git/requests"] path = tests/test_artifacts/git/requests - url = https://github.com/kennethreitz/requests.git + url = https://github.com/psf/requests.git [submodule "tests/test_artifacts/git/six"] path = tests/test_artifacts/git/six url = https://github.com/benjaminp/six.git @@ -24,7 +24,7 @@ url = https://github.com/pallets/flask.git [submodule "tests/test_artifacts/git/requests-2.18.4"] path = tests/test_artifacts/git/requests-2.18.4 - url = https://github.com/kennethreitz/requests + url = https://github.com/psf/requests [submodule "tests/pypi"] path = tests/pypi url = https://github.com/sarugaku/pipenv-test-artifacts.git diff --git a/LICENSE b/LICENSE index f5639bb0..ea28562e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright 2017 Kenneth Reitz +Copyright 2020 Python Packaging Authority Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index def7281f..a8f251db 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ Pipenv: Python Development Workflow for Humans [![image](https://img.shields.io/pypi/l/pipenv.svg)](https://python.org/pypi/pipenv) [![Azure Pipelines Build Status](https://dev.azure.com/pypa/pipenv/_apis/build/status/Pipenv%20CI?branchName=master)](https://dev.azure.com/pypa/pipenv/_build/latest?definitionId=16&branchName=master) [![image](https://img.shields.io/pypi/pyversions/pipenv.svg)](https://python.org/pypi/pipenv) -[![image](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/kennethreitz) ------------------------------------------------------------------------ @@ -56,7 +55,7 @@ Or, if you\'re using FreeBSD: # pkg install py36-pipenv -Otherwise, refer to the [documentation](https://pipenv.kennethreitz.org/en/latest/#install-pipenv-today) for instructions. +Otherwise, refer to the [documentation](https://pipenv.pypa.io/en/latest/#install-pipenv-today) for instructions. ✨🍰✨ @@ -297,4 +296,4 @@ Use the shell: ☤ Documentation --------------- -Documentation resides over at [pipenv.org](https://pipenv.kennethreitz.org/en/latest/). +Documentation resides over at [pipenv.pypa.io](https://pipenv.pypa.io/en/latest/). diff --git a/docs/_templates/sidebarintro.html b/docs/_templates/sidebarintro.html index 67c83d0e..cbf7e5f8 100644 --- a/docs/_templates/sidebarintro.html +++ b/docs/_templates/sidebarintro.html @@ -37,9 +37,8 @@

Stay Informed

Receive updates on new releases and upcoming projects.

-

-

Say Thanks!

-

Join Mailing List.

+

+

Join Mailing List.

Other Projects

@@ -47,7 +46,7 @@
  • Pipenv-Pipes
  • -

    More Kenneth Reitz projects:

    +

    More projects founded by Kenneth Reitz:

    • pep8.org
    • httpbin.org
    • diff --git a/docs/_templates/sidebarlogo.html b/docs/_templates/sidebarlogo.html index d574633f..59e8641e 100644 --- a/docs/_templates/sidebarlogo.html +++ b/docs/_templates/sidebarlogo.html @@ -38,12 +38,11 @@

      Stay Informed

      Receive updates on new releases and upcoming projects.

      -

      -

      -

      Say Thanks!

      -

      Join Mailing List.

      +

      +

      Join Mailing List.

      Other Projects

      @@ -51,7 +50,7 @@
    • Pipenv-Pipes
    -

    More Kenneth Reitz projects:

    +

    More projects founded by Kenneth Reitz: