diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2b5187b319..fc2c577c4f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,67 @@ +2021.11.5 (2021-11-05) +====================== + + +Features & Improvements +----------------------- + +- Avoid sharing states but create project objects on demand. So that most integration test cases are able to switch to a in-process execution method. `#4757 `_ +- Shell-quote ``pip`` commands when logging. `#4760 `_ + +Bug Fixes +--------- + +- Ignore empty .venv in rood dir and create project name base virtual environment `#4790 `_ + +Vendored Libraries +------------------ + +- Update vendored dependencies + - ``attrs`` from ``20.3.0`` to ``21.2.0`` + - ``cerberus`` from ``1.3.2`` to ``1.3.4`` + - ``certifi`` from ``2020.11.8`` to ``2021.5.30`` + - ``chardet`` from ``3.0.4`` to ``4.0.0`` + - ``click`` from ``7.1.2`` to ``8.0.1`` + - ``distlib`` from ``0.3.1`` to ``0.3.2`` + - ``idna`` from ``2.10`` to ``3.2`` + - ``importlib-metadata`` from ``2.0.0`` to ``4.6.1`` + - ``importlib-resources`` from ``3.3.0`` to ``5.2.0`` + - ``jinja2`` from ``2.11.2`` to ``3.0.1`` + - ``markupsafe`` from ``1.1.1`` to ``2.0.1`` + - ``more-itertools`` from ``5.0.0`` to ``8.8.0`` + - ``packaging`` from ``20.8`` to ``21.0`` + - ``pep517`` from ``0.9.1`` to ``0.11.0`` + - ``pipdeptree`` from ``1.0.0`` to ``2.0.0`` + - ``ptyprocess`` from ``0.6.0`` to ``0.7.0`` + - ``python-dateutil`` from ``2.8.1`` to ``2.8.2`` + - ``python-dotenv`` from ``0.15.0`` to ``0.19.0`` + - ``pythonfinder`` from ``1.2.5`` to ``1.2.8`` + - ``requests`` from ``2.25.0`` to ``2.26.0`` + - ``shellingham`` from ``1.3.2`` to ``1.4.0`` + - ``six`` from ``1.15.0`` to ``1.16.0`` + - ``tomlkit`` from ``0.7.0`` to ``0.7.2`` + - ``urllib3`` from ``1.26.1`` to ``1.26.6`` + - ``zipp`` from ``1.2.0`` to ``3.5.0`` + + Add new vendored dependencies + - ``charset-normalizer 2.0.3`` + - ``termcolor 1.1.0`` + - ``tomli 1.1.0`` + - ``wheel 0.36.2`` `#4747 `_ +- Drop the dependencies for Python 2.7 compatibility purpose. `#4751 `_ +- Switch the dependency resolver from ``pip-tools`` to `pip`. + + Update vendor libraries: + - Update ``requirementslib`` from ``1.5.16`` to ``1.6.1`` + - Update ``pip-shims`` from ``0.5.6`` to ``0.6.0`` + - New vendor ``platformdirs 2.4.0`` `#4759 `_ + +Improved Documentation +---------------------- + +- remove prefixes on install commands for easy copy/pasting `#4792 `_ + + 2021.5.29 (2021-05-29) ====================== diff --git a/Pipfile.lock b/Pipfile.lock index 29363c2d53..0cf8406ba2 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -144,11 +144,11 @@ }, "docutils": { "hashes": [ - "sha256:a31688b2ea858517fa54293e5d5df06fbb875fb1f7e4c64529271b77781ca8fc", - "sha256:c1d5dab2b11d16397406a282e53953fe495a46d69ae329f55aa98a5c4e3c5fbb" + "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125", + "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==0.18" + "version": "==0.17.1" }, "execnet": { "hashes": [ diff --git a/docs/conf.py b/docs/conf.py index 96c43ad1b2..e5aa59532b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -39,7 +39,6 @@ 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx_click.ext', - 'sphinxcontrib.spelling', ] # Add any paths that contain templates here, relative to this directory. @@ -86,9 +85,6 @@ # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True -spelling_word_list_filename = "spelling_wordlist.txt" -spelling_show_suggestions = True - # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for diff --git a/docs/diagnose.rst b/docs/diagnose.rst index 17bf5b47bf..92a1e2649e 100644 --- a/docs/diagnose.rst +++ b/docs/diagnose.rst @@ -115,7 +115,7 @@ Add this line under ``[supervisord]`` section in ``/etc/supervisor/supervisord.c environment=LC_ALL='en_US.UTF-8',LANG='en_US.UTF-8' ☤ An exception is raised during ``Locking dependencies...`` ---------------------------------------------------------- +----------------------------------------------------------- Run ``pipenv lock --clear`` and try again. The lock sequence caches results to speed up subsequent runs. The cache may contain faulty results if a bug diff --git a/news/4747.vendor.rst b/news/4747.vendor.rst deleted file mode 100644 index 0133453f5b..0000000000 --- a/news/4747.vendor.rst +++ /dev/null @@ -1,32 +0,0 @@ -Update vendored dependencies -- ``attrs`` from ``20.3.0`` to ``21.2.0`` -- ``cerberus`` from ``1.3.2`` to ``1.3.4`` -- ``certifi`` from ``2020.11.8`` to ``2021.5.30`` -- ``chardet`` from ``3.0.4`` to ``4.0.0`` -- ``click`` from ``7.1.2`` to ``8.0.1`` -- ``distlib`` from ``0.3.1`` to ``0.3.2`` -- ``idna`` from ``2.10`` to ``3.2`` -- ``importlib-metadata`` from ``2.0.0`` to ``4.6.1`` -- ``importlib-resources`` from ``3.3.0`` to ``5.2.0`` -- ``jinja2`` from ``2.11.2`` to ``3.0.1`` -- ``markupsafe`` from ``1.1.1`` to ``2.0.1`` -- ``more-itertools`` from ``5.0.0`` to ``8.8.0`` -- ``packaging`` from ``20.8`` to ``21.0`` -- ``pep517`` from ``0.9.1`` to ``0.11.0`` -- ``pipdeptree`` from ``1.0.0`` to ``2.0.0`` -- ``ptyprocess`` from ``0.6.0`` to ``0.7.0`` -- ``python-dateutil`` from ``2.8.1`` to ``2.8.2`` -- ``python-dotenv`` from ``0.15.0`` to ``0.19.0`` -- ``pythonfinder`` from ``1.2.5`` to ``1.2.8`` -- ``requests`` from ``2.25.0`` to ``2.26.0`` -- ``shellingham`` from ``1.3.2`` to ``1.4.0`` -- ``six`` from ``1.15.0`` to ``1.16.0`` -- ``tomlkit`` from ``0.7.0`` to ``0.7.2`` -- ``urllib3`` from ``1.26.1`` to ``1.26.6`` -- ``zipp`` from ``1.2.0`` to ``3.5.0`` - -Add new vendored dependencies -- ``charset-normalizer 2.0.3`` -- ``termcolor 1.1.0`` -- ``tomli 1.1.0`` -- ``wheel 0.36.2`` diff --git a/news/4751.vendor.rst b/news/4751.vendor.rst deleted file mode 100644 index 0b948645e6..0000000000 --- a/news/4751.vendor.rst +++ /dev/null @@ -1 +0,0 @@ -Drop the dependencies for Python 2.7 compatibility purpose. diff --git a/news/4757.feature.rst b/news/4757.feature.rst deleted file mode 100644 index 7c93690276..0000000000 --- a/news/4757.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Avoid sharing states but create project objects on demand. So that most integration test cases are able to switch to a in-process execution method. diff --git a/news/4759.vendor.rst b/news/4759.vendor.rst deleted file mode 100644 index 98348a464b..0000000000 --- a/news/4759.vendor.rst +++ /dev/null @@ -1,6 +0,0 @@ -Switch the dependency resolver from ``pip-tools`` to `pip`. - -Update vendor libraries: -- Update ``requirementslib`` from ``1.5.16`` to ``1.6.1`` -- Update ``pip-shims`` from ``0.5.6`` to ``0.6.0`` -- New vendor ``platformdirs 2.4.0`` diff --git a/news/4760.feature.rst b/news/4760.feature.rst deleted file mode 100644 index dcabc3ac62..0000000000 --- a/news/4760.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Shell-quote ``pip`` commands when logging. diff --git a/news/4790.bugfix.rst b/news/4790.bugfix.rst deleted file mode 100644 index cc08fa29de..0000000000 --- a/news/4790.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Ignore empty .venv in rood dir and create project name base virtual environment diff --git a/news/4792.doc.rst b/news/4792.doc.rst deleted file mode 100644 index c90a930aca..0000000000 --- a/news/4792.doc.rst +++ /dev/null @@ -1 +0,0 @@ -remove prefixes on install commands for easy copy/pasting diff --git a/news/4813.trivial.rst b/news/4813.trivial.rst deleted file mode 100644 index 75c29e1d22..0000000000 --- a/news/4813.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -Remove the old issue template, since we have replaced it. diff --git a/news/towncrier_template.rst b/news/towncrier_template.rst index 0fca0c3ff7..d71025bd4e 100644 --- a/news/towncrier_template.rst +++ b/news/towncrier_template.rst @@ -1,3 +1,14 @@ +{% if top_line %} +{{ top_line }} +{{ top_underline * ((top_line)|length)}} +{% elif versiondata.name %} +{{ versiondata.name }} {{ versiondata.version }} ({{ versiondata.date }}) +{{ top_underline * ((versiondata.name + versiondata.version + versiondata.date)|length + 4)}} +{% else %} +{{ versiondata.version }} ({{ versiondata.date }}) +{{ top_underline * ((versiondata.version + versiondata.date)|length + 3)}} +{% endif %} + {% for section in sections %} {% set underline = "-" %} {% if section %} diff --git a/pipenv/__version__.py b/pipenv/__version__.py index 684b76a7e7..04cbd2becf 100644 --- a/pipenv/__version__.py +++ b/pipenv/__version__.py @@ -2,4 +2,4 @@ # // ) ) / / // ) ) //___) ) // ) ) || / / # //___/ / / / //___/ / // // / / || / / # // / / // ((____ // / / ||/ / -__version__ = "2021.5.30dev" +__version__ = "2021.11.5" diff --git a/pipenv/pipenv.1 b/pipenv/pipenv.1 index f390de7ec9..88ce121f7f 100644 --- a/pipenv/pipenv.1 +++ b/pipenv/pipenv.1 @@ -1,8 +1,5 @@ .\" Man page generated from reStructuredText. . -.TH "PIPENV" "1" "May 29, 2021" "2021.5.29" "pipenv" -.SH NAME -pipenv \- pipenv Documentation . .nr rst2man-indent-level 0 . @@ -30,6 +27,9 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. +.TH "PIPENV" "1" "Nov 05, 2021" "2021.11.5" "pipenv" +.SH NAME +pipenv \- pipenv Documentation \fI\%\fP\fI\%\fP\fI\%\fP .sp .ce @@ -196,11 +196,7 @@ it\(aqs a higher\-level tool that simplifies dependency management for common us cases. .SS ☤ Isolated Installation of Pipenv with Pipx .sp - -.nf -\(gaPipx\(ga_ -.fi - is a tool to help you install and run end\-user applications written in Python. It installs applications +\fI\%Pipx\fP is a tool to help you install and run end\-user applications written in Python. It installs applications into an isolated and clean environment on their own. To install pipx, just run: .INDENT 0.0 .INDENT 3.5 @@ -446,6 +442,69 @@ You might want to set \fBexport PIPENV_VENV_IN_PROJECT=1\fP in your .bashrc/.zsh .sp Congratulations, you now know how to install and use Python packages! ✨ 🍰 ✨ .SS Release and Version History +.SS 2021.11.5 (2021\-11\-05) +.SS Features & Improvements +.INDENT 0.0 +.IP \(bu 2 +Avoid sharing states but create project objects on demand. So that most integration test cases are able to switch to a in\-process execution method. \fI\%#4757\fP +.IP \(bu 2 +Shell\-quote \fBpip\fP commands when logging. \fI\%#4760\fP +.UNINDENT +.SS Bug Fixes +.INDENT 0.0 +.IP \(bu 2 +Ignore empty .venv in rood dir and create project name base virtual environment \fI\%#4790\fP +.UNINDENT +.SS Vendored Libraries +.INDENT 0.0 +.IP \(bu 2 +Update vendored dependencies +\- \fBattrs\fP from \fB20.3.0\fP to \fB21.2.0\fP +\- \fBcerberus\fP from \fB1.3.2\fP to \fB1.3.4\fP +\- \fBcertifi\fP from \fB2020.11.8\fP to \fB2021.5.30\fP +\- \fBchardet\fP from \fB3.0.4\fP to \fB4.0.0\fP +\- \fBclick\fP from \fB7.1.2\fP to \fB8.0.1\fP +\- \fBdistlib\fP from \fB0.3.1\fP to \fB0.3.2\fP +\- \fBidna\fP from \fB2.10\fP to \fB3.2\fP +\- \fBimportlib\-metadata\fP from \fB2.0.0\fP to \fB4.6.1\fP +\- \fBimportlib\-resources\fP from \fB3.3.0\fP to \fB5.2.0\fP +\- \fBjinja2\fP from \fB2.11.2\fP to \fB3.0.1\fP +\- \fBmarkupsafe\fP from \fB1.1.1\fP to \fB2.0.1\fP +\- \fBmore\-itertools\fP from \fB5.0.0\fP to \fB8.8.0\fP +\- \fBpackaging\fP from \fB20.8\fP to \fB21.0\fP +\- \fBpep517\fP from \fB0.9.1\fP to \fB0.11.0\fP +\- \fBpipdeptree\fP from \fB1.0.0\fP to \fB2.0.0\fP +\- \fBptyprocess\fP from \fB0.6.0\fP to \fB0.7.0\fP +\- \fBpython\-dateutil\fP from \fB2.8.1\fP to \fB2.8.2\fP +\- \fBpython\-dotenv\fP from \fB0.15.0\fP to \fB0.19.0\fP +\- \fBpythonfinder\fP from \fB1.2.5\fP to \fB1.2.8\fP +\- \fBrequests\fP from \fB2.25.0\fP to \fB2.26.0\fP +\- \fBshellingham\fP from \fB1.3.2\fP to \fB1.4.0\fP +\- \fBsix\fP from \fB1.15.0\fP to \fB1.16.0\fP +\- \fBtomlkit\fP from \fB0.7.0\fP to \fB0.7.2\fP +\- \fBurllib3\fP from \fB1.26.1\fP to \fB1.26.6\fP +\- \fBzipp\fP from \fB1.2.0\fP to \fB3.5.0\fP +.sp +Add new vendored dependencies +\- \fBcharset\-normalizer 2.0.3\fP +\- \fBtermcolor 1.1.0\fP +\- \fBtomli 1.1.0\fP +\- \fBwheel 0.36.2\fP \fI\%#4747\fP +.IP \(bu 2 +Drop the dependencies for Python 2.7 compatibility purpose. \fI\%#4751\fP +.IP \(bu 2 +Switch the dependency resolver from \fBpip\-tools\fP to \fIpip\fP\&. +.sp +Update vendor libraries: +\- Update \fBrequirementslib\fP from \fB1.5.16\fP to \fB1.6.1\fP +\- Update \fBpip\-shims\fP from \fB0.5.6\fP to \fB0.6.0\fP +\- New vendor \fBplatformdirs 2.4.0\fP \fI\%#4759\fP +.UNINDENT +.SS Improved Documentation +.INDENT 0.0 +.IP \(bu 2 +remove prefixes on install commands for easy copy/pasting \fI\%#4792\fP +.UNINDENT .SS 2021.5.29 (2021\-05\-29) .SS Bug Fixes .INDENT 0.0 @@ -2496,8 +2555,8 @@ production environments for reproducible builds. .INDENT 0.0 .INDENT 3.5 If you\(aqd like a \fBrequirements.txt\fP output of the lockfile, run \fB$ pipenv lock \-r\fP\&. -This will include all hashes, however (which is great!). To get a \fBrequirements.txt\fP -without hashes, use \fB$ pipenv run pip freeze\fP\&. +This will not include hashes, however. To get a \fBrequirements.txt\fP +you can also use \fB$ pipenv run pip freeze\fP\&. .UNINDENT .UNINDENT .SS Advanced Usage of Pipenv @@ -3164,13 +3223,6 @@ variables. To activate them, simply create the variable in your shell and pipenv will detect it. .INDENT 0.0 .TP -.B pipenv.environments.PIPENV_CACHE_DIR = \(aq/Users/fming/Library/Caches/pipenv\(aq -Location for Pipenv to store it\(aqs package cache. -.sp -Default is to use appdir\(aqs user cache directory. -.UNINDENT -.INDENT 0.0 -.TP .B pipenv.environments.PIPENV_COLORBLIND = False If set, disable terminal colors. .sp @@ -3179,211 +3231,13 @@ to show colors. .UNINDENT .INDENT 0.0 .TP -.B pipenv.environments.PIPENV_DEFAULT_PYTHON_VERSION = None -Use this Python version when creating new virtual environments by default. -.sp -This can be set to a version string, e.g. \fB3.6\fP, or a path. Default is to use -whatever Python Pipenv is installed under (i.e. \fBsys.executable\fP). Command -line flags (e.g. \fB\-\-python\fP, \fB\-\-three\fP, and \fB\-\-two\fP) are prioritized over -this configuration. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_DONT_LOAD_ENV = False -If set, Pipenv does not load the \fB\&.env\fP file. -.sp -Default is to load \fB\&.env\fP for \fBrun\fP and \fBshell\fP commands. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_DONT_USE_ASDF = False -If set, Pipenv does not attempt to install Python with asdf. -.sp -Default is to install Python automatically via asdf when needed, if possible. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_DONT_USE_PYENV = False -If set, Pipenv does not attempt to install Python with pyenv. -.sp -Default is to install Python automatically via pyenv when needed, if possible. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_DOTENV_LOCATION = None -If set, Pipenv loads the \fB\&.env\fP file at the specified location. -.sp -Default is to load \fB\&.env\fP from the project root, if found. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_EMULATOR = \(aq\(aq -If set, the terminal emulator\(aqs name for \fBpipenv shell\fP to use. -.sp -Default is to detect emulators automatically. This should be set if your -emulator, e.g. Cmder, cannot be detected correctly. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_HIDE_EMOJIS = False +.B pipenv.environments.PIPENV_HIDE_EMOJIS = True Disable emojis in output. .sp Default is to show emojis. This is automatically set on Windows. .UNINDENT .INDENT 0.0 .TP -.B pipenv.environments.PIPENV_IGNORE_VIRTUALENVS = False -If set, Pipenv will always assign a virtual environment for this project. -.sp -By default, Pipenv tries to detect whether it is run inside a virtual -environment, and reuses it if possible. This is usually the desired behavior, -and enables the user to use any user\-built environments with Pipenv. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_INSTALL_TIMEOUT = 900 -Max number of seconds to wait for package installation. -.sp -Defaults to 900 (15 minutes), a very long arbitrary time. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_MAX_DEPTH = 4 -Maximum number of directories to recursively search for a Pipfile. -.sp -Default is 3. See also \fBPIPENV_NO_INHERIT\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_MAX_RETRIES = 0 -Specify how many retries Pipenv should attempt for network requests. -.sp -Default is 0. Automatically set to 1 on CI environments for robust testing. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_MAX_ROUNDS = 16 -Tells Pipenv how many rounds of resolving to do for Pip\-Tools. -.sp -Default is 16, an arbitrary number that works most of the time. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_MAX_SUBPROCESS = 8 -How many subprocesses should Pipenv use when installing. -.sp -Default is 16, an arbitrary number that seems to work. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_NOSPIN = False -If set, disable terminal spinner. -.sp -This can make the logs cleaner. Automatically set on Windows, and in CI -environments. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_NO_INHERIT = False -Tell Pipenv not to inherit parent directories. -.sp -This is useful for deployment to avoid using the wrong current directory. -Overwrites \fBPIPENV_MAX_DEPTH\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_PIPFILE = None -If set, this specifies a custom Pipfile location. -.sp -When running pipenv from a location other than the same directory where the -Pipfile is located, instruct pipenv to find the Pipfile in the location -specified by this environment variable. -.sp -Default is to find Pipfile automatically in the current and parent directories. -See also \fBPIPENV_MAX_DEPTH\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_PYPI_MIRROR = \(aqhttps://mirrors.tencent.com/pypi/simple\(aq -If set, tells pipenv to override PyPI index urls with a mirror. -.sp -Default is to not mirror PyPI, i.e. use the real one, pypi.org. The -\fB\-\-pypi\-mirror\fP command line flag overwrites this. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_RESOLVE_VCS = True -Tells Pipenv whether to resolve all VCS dependencies in full. -.sp -As of Pipenv 2018.11.26, only editable VCS dependencies were resolved in full. -To retain this behavior and avoid handling any conflicts that arise from the new -approach, you may set this to \(aq0\(aq, \(aqoff\(aq, or \(aqfalse\(aq. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_SHELL = \(aq/bin/zsh\(aq -An absolute path to the preferred shell for \fBpipenv shell\fP\&. -.sp -Default is to detect automatically what shell is currently in use. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_SHELL_FANCY = False -If set, always use fancy mode when invoking \fBpipenv shell\fP\&. -.sp -Default is to use the compatibility shell if possible. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_SKIP_LOCK = False -If set, Pipenv won\(aqt lock dependencies automatically. -.sp -This might be desirable if a project has large number of dependencies, -because locking is an inherently slow operation. -.sp -Default is to lock dependencies and update \fBPipfile.lock\fP on each run. -.sp -NOTE: This only affects the \fBinstall\fP and \fBuninstall\fP commands. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_SPINNER = \(aqdots\(aq -Sets the default spinner type. -.sp -Spinners are identical to the \fBnode.js\fP spinners and can be found at -\fI\%https://github.com/sindresorhus/cli\-spinners\fP -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_TIMEOUT = 120 -Max number of seconds Pipenv will wait for virtualenv creation to complete. -.sp -Default is 120 seconds, an arbitrary number that seems to work. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_VENV_IN_PROJECT = False -If set, creates \fB\&.venv\fP in your project directory. -.sp -Default is to create new virtual environments in a global location. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIPENV_YES = False -If set, Pipenv automatically assumes "yes" at all prompts. -.sp -Default is to prompt the user for an answer if the current command line session -if interactive. -.UNINDENT -.INDENT 0.0 -.TP -.B pipenv.environments.PIP_EXISTS_ACTION = \(aqw\(aq -Specifies the value for pip\(aqs \-\-exists\-action option -.sp -Defaults to \fB(w)ipe\fP -.UNINDENT -.INDENT 0.0 -.TP .B pipenv.environments.env_to_bool(val) Convert \fBval\fP to boolean, returning True if truthy or False if falsey .INDENT 7.0 @@ -3673,1031 +3527,112 @@ You can force Pipenv to use a different cache location by setting the environmen .sp By default, Pipenv will initialize a project using whatever version of python the python3 is. Besides starting a project with the \fB\-\-three\fP or \fB\-\-two\fP flags, you can also use \fBPIPENV_DEFAULT_PYTHON_VERSION\fP to specify what version to use when starting a project when \fB\-\-three\fP or \fB\-\-two\fP aren\(aqt used. .SS Pipenv CLI Reference -.SS pipenv +.SS Frequently Encountered Pipenv Problems +.sp +Pipenv is constantly being improved by volunteers, but is still a very young +project with limited resources, and has some quirks that needs to be dealt +with. We need everyone’s help (including yours!). +.sp +Here are some common questions people have using Pipenv. Please take a look +below and see if they resolve your problem. +.sp +\fBNOTE:\fP +.INDENT 0.0 +.INDENT 3.5 +\fBMake sure you’re running the newest Pipenv version first!\fP +.UNINDENT +.UNINDENT +.SS ☤ Your dependencies could not be resolved +.sp +Make sure your dependencies actually \fIdo\fP resolve. If you’re confident they +are, you may need to clear your resolver cache. Run the following command: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C -pipenv [OPTIONS] COMMAND [ARGS]... +pipenv lock \-\-clear .ft P .fi .UNINDENT .UNINDENT -Options.INDENT 0.0 -.TP -.B \-\-where -Output project home information. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-venv -Output virtualenv information. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-py -Output Python interpreter information. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-envs -Output Environment Variable options. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-rm -Remove the virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-bare -Minimal output. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-completion -Output completion (to be executed by the shell). -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-man -Display manpage. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-support -Output diagnostic information for use in GitHub issues. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-site\-packages, \-\-no\-site\-packages -Enable site\-packages for the virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-python -Specify which version of Python virtualenv should use. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-three, \-\-two -Use Python 3/2 when creating virtualenv. -.UNINDENT +.sp +and try again. +.sp +If this does not work, try manually deleting the whole cache directory. It is +usually one of the following locations: .INDENT 0.0 -.TP -.B \-\-clear -Clears caches (pipenv, pip, and pip\-tools). +.IP \(bu 2 +\fB~/Library/Caches/pipenv\fP (macOS) +.IP \(bu 2 +\fB%LOCALAPPDATA%\epipenv\epipenv\eCache\fP (Windows) +.IP \(bu 2 +\fB~/.cache/pipenv\fP (other operating systems) .UNINDENT +.sp +Pipenv does not install pre\-releases (i.e. a version with an alpha/beta/etc. +suffix, such as \fI1.0b1\fP) by default. You will need to pass the \fB\-\-pre\fP flag +in your command, or set .INDENT 0.0 -.TP -.B \-v, \-\-verbose -Verbose mode. +.INDENT 3.5 +.sp +.nf +.ft C +[pipenv] +allow_prereleases = true +.ft P +.fi .UNINDENT -.INDENT 0.0 -.TP -.B \-\-pypi\-mirror -Specify a PyPI mirror. .UNINDENT +.sp +in your Pipfile. +.SS ☤ No module named +.sp +This is usually a result of mixing Pipenv with system packages. We \fIstrongly\fP +recommend installing Pipenv in an isolated environment. Uninstall all existing +Pipenv installations, and see installing\-pipenv to choose one of the +recommended way to install Pipenv instead. +.SS ☤ My pyenv\-installed Python is not found +.sp +Make sure you have \fBPYENV_ROOT\fP set correctly. Pipenv only supports CPython +distributions, with version name like \fB3.6.4\fP or similar. +.SS ☤ Pipenv does not respect pyenv’s global and local Python versions +.sp +Pipenv by default uses the Python it is installed against to create the +virtualenv. You can set the \fB\-\-python\fP option to \fB$(pyenv which python)\fP +to use your current pyenv interpreter. See specifying_versions for more +information. +.SS ☤ ValueError: unknown locale: UTF\-8 +.sp +macOS has a bug in its locale detection that prevents us from detecting your +shell encoding correctly. This can also be an issue on other systems if the +locale variables do not specify an encoding. +.sp +The workaround is to set the following two environment variables to a standard +localization format: .INDENT 0.0 -.TP -.B \-\-version -Show the version and exit. +.IP \(bu 2 +\fBLC_ALL\fP +.IP \(bu 2 +\fBLANG\fP .UNINDENT -.SS check .sp -Checks for PyUp Safety security vulnerabilities and against PEP 508 markers provided in Pipfile. +For Bash, for example, you can add the following to your \fB~/.bash_profile\fP: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C -pipenv check [OPTIONS] [ARGS]... +export LC_ALL=\(aqen_US.UTF\-8\(aq +export LANG=\(aqen_US.UTF\-8\(aq .ft P .fi .UNINDENT .UNINDENT -Options.INDENT 0.0 -.TP -.B \-\-unused -Given a code path, show potentially unused dependencies. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-db -Path to a local PyUp Safety vulnerabilities database. Default: ENV PIPENV_SAFETY_DB or None. -.UNINDENT -.INDENT 0.0 -.TP -.B \-i, \-\-ignore -Ignore specified vulnerability during PyUp Safety checks. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-output -Translates to \-\-json, \-\-full\-report or \-\-bare from PyUp Safety check -.INDENT 7.0 -.TP -.B Options -default|json|full\-report|bare -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-key -Safety API key from PyUp.io for scanning dependencies against a live vulnerabilities database. Leave blank for scanning against a database that only updates once a month. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-quiet -Quiet standard output, except vulnerability report. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-python -Specify which version of Python virtualenv should use. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-three, \-\-two -Use Python 3/2 when creating virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-clear -Clears caches (pipenv, pip, and pip\-tools). -.UNINDENT -.INDENT 0.0 -.TP -.B \-v, \-\-verbose -Verbose mode. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pypi\-mirror -Specify a PyPI mirror. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-system -System pip management. -.UNINDENT -Arguments.INDENT 0.0 -.TP -.B ARGS -Optional argument(s) -.UNINDENT -.SS clean -.sp -Uninstalls all packages not specified in Pipfile.lock. -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -pipenv clean [OPTIONS] -.ft P -.fi -.UNINDENT -.UNINDENT -Options.INDENT 0.0 -.TP -.B \-\-bare -Minimal output. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-dry\-run -Just output unneeded packages. -.UNINDENT -.INDENT 0.0 -.TP -.B \-v, \-\-verbose -Verbose mode. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-three, \-\-two -Use Python 3/2 when creating virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-python -Specify which version of Python virtualenv should use. -.UNINDENT -.SS graph -.sp -Displays currently\-installed dependency graph information. -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -pipenv graph [OPTIONS] -.ft P -.fi -.UNINDENT -.UNINDENT -Options.INDENT 0.0 -.TP -.B \-\-bare -Minimal output. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-json -Output JSON. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-json\-tree -Output JSON in nested tree. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-reverse -Reversed dependency graph. -.UNINDENT -.SS install -.sp -Installs provided packages and adds them to Pipfile, or (if no packages are given), installs all packages from Pipfile. -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -pipenv install [OPTIONS] [PACKAGES]... -.ft P -.fi -.UNINDENT -.UNINDENT -Options.INDENT 0.0 -.TP -.B \-\-system -System pip management. -.UNINDENT -.INDENT 0.0 -.TP -.B \-c, \-\-code -Install packages automatically discovered from import statements. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-deploy -Abort if the Pipfile.lock is out\-of\-date, or Python version is wrong. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-site\-packages, \-\-no\-site\-packages -Enable site\-packages for the virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-skip\-lock -Skip locking mechanisms and use the Pipfile instead during operation. -.UNINDENT -.INDENT 0.0 -.TP -.B \-e, \-\-editable -An editable Python package URL or path, often to a VCS repository. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-ignore\-pipfile -Ignore Pipfile when installing, using the Pipfile.lock. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-selective\-upgrade -Update specified packages. -.UNINDENT -.INDENT 0.0 -.TP -.B \-r, \-\-requirements -Import a requirements.txt file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-extra\-index\-url -URLs to the extra PyPI compatible indexes to query for package look\-ups. -.UNINDENT -.INDENT 0.0 -.TP -.B \-i, \-\-index -Target PyPI\-compatible package index url. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-sequential -Install dependencies one\-at\-a\-time, instead of concurrently. -.UNINDENT -.INDENT 0.0 -.TP -.B \-d, \-\-dev -Install both develop and default packages -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-keep\-outdated -Keep out\-dated dependencies from being updated in Pipfile.lock. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pre -Allow pre\-releases. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-python -Specify which version of Python virtualenv should use. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-three, \-\-two -Use Python 3/2 when creating virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-clear -Clears caches (pipenv, pip, and pip\-tools). -.UNINDENT -.INDENT 0.0 -.TP -.B \-v, \-\-verbose -Verbose mode. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pypi\-mirror -Specify a PyPI mirror. -.UNINDENT -Arguments.INDENT 0.0 -.TP -.B PACKAGES -Optional argument(s) -.UNINDENT -Environment variables.INDENT 0.0 -.TP -.B PIPENV_SKIP_LOCK -.INDENT 7.0 -.INDENT 3.5 -Provide a default for \fI\%\-\-skip\-lock\fP -.UNINDENT -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B PIP_EXTRA_INDEX_URL -.INDENT 7.0 -.INDENT 3.5 -Provide a default for \fI\%\-\-extra\-index\-url\fP -.UNINDENT -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B PIP_INDEX_URL -.INDENT 7.0 -.INDENT 3.5 -Provide a default for \fI\%\-i\fP -.UNINDENT -.UNINDENT -.UNINDENT -.SS lock -.sp -Generates Pipfile.lock. -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -pipenv lock [OPTIONS] -.ft P -.fi -.UNINDENT -.UNINDENT -Options.INDENT 0.0 -.TP -.B \-\-dev\-only -Emit development dependencies \fIonly\fP (overrides \-\-dev) -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-header, \-\-no\-header -Add header to generated requirements -.UNINDENT -.INDENT 0.0 -.TP -.B \-r, \-\-requirements -Generate output in requirements.txt format. -.UNINDENT -.INDENT 0.0 -.TP -.B \-d, \-\-dev -Generate both develop and default requirements -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-keep\-outdated -Keep out\-dated dependencies from being updated in Pipfile.lock. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pre -Allow pre\-releases. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-python -Specify which version of Python virtualenv should use. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-three, \-\-two -Use Python 3/2 when creating virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-clear -Clears caches (pipenv, pip, and pip\-tools). -.UNINDENT -.INDENT 0.0 -.TP -.B \-v, \-\-verbose -Verbose mode. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pypi\-mirror -Specify a PyPI mirror. -.UNINDENT -.SS open -.sp -View a given module in your editor. -.sp -This uses the EDITOR environment variable. You can temporarily override it, -for example: -.INDENT 0.0 -.INDENT 3.5 -EDITOR=atom pipenv open requests -.UNINDENT -.UNINDENT -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -pipenv open [OPTIONS] MODULE -.ft P -.fi -.UNINDENT -.UNINDENT -Options.INDENT 0.0 -.TP -.B \-\-python -Specify which version of Python virtualenv should use. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-three, \-\-two -Use Python 3/2 when creating virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-clear -Clears caches (pipenv, pip, and pip\-tools). -.UNINDENT -.INDENT 0.0 -.TP -.B \-v, \-\-verbose -Verbose mode. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pypi\-mirror -Specify a PyPI mirror. -.UNINDENT -Arguments.INDENT 0.0 -.TP -.B MODULE -Required argument -.UNINDENT -.SS run -.sp -Spawns a command installed into the virtualenv. -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -pipenv run [OPTIONS] COMMAND [ARGS]... -.ft P -.fi -.UNINDENT -.UNINDENT -Options.INDENT 0.0 -.TP -.B \-\-python -Specify which version of Python virtualenv should use. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-three, \-\-two -Use Python 3/2 when creating virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-clear -Clears caches (pipenv, pip, and pip\-tools). -.UNINDENT -.INDENT 0.0 -.TP -.B \-v, \-\-verbose -Verbose mode. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pypi\-mirror -Specify a PyPI mirror. -.UNINDENT -Arguments.INDENT 0.0 -.TP -.B COMMAND -Required argument -.UNINDENT -.INDENT 0.0 -.TP -.B ARGS -Optional argument(s) -.UNINDENT -.SS scripts -.sp -Lists scripts in current environment config. -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -pipenv scripts [OPTIONS] -.ft P -.fi -.UNINDENT -.UNINDENT -Options.INDENT 0.0 -.TP -.B \-\-python -Specify which version of Python virtualenv should use. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-three, \-\-two -Use Python 3/2 when creating virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-clear -Clears caches (pipenv, pip, and pip\-tools). -.UNINDENT -.INDENT 0.0 -.TP -.B \-v, \-\-verbose -Verbose mode. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pypi\-mirror -Specify a PyPI mirror. -.UNINDENT -.SS shell -.sp -Spawns a shell within the virtualenv. -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -pipenv shell [OPTIONS] [SHELL_ARGS]... -.ft P -.fi -.UNINDENT -.UNINDENT -Options.INDENT 0.0 -.TP -.B \-\-fancy -Run in shell in fancy mode. Make sure the shell have no path manipulating scripts. Run $pipenv shell for issues with compatibility mode. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-anyway -Always spawn a sub\-shell, even if one is already spawned. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pypi\-mirror -Specify a PyPI mirror. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-three, \-\-two -Use Python 3/2 when creating virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-python -Specify which version of Python virtualenv should use. -.UNINDENT -Arguments.INDENT 0.0 -.TP -.B SHELL_ARGS -Optional argument(s) -.UNINDENT -.SS sync -.sp -Installs all packages specified in Pipfile.lock. -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -pipenv sync [OPTIONS] -.ft P -.fi -.UNINDENT -.UNINDENT -Options.INDENT 0.0 -.TP -.B \-\-system -System pip management. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-bare -Minimal output. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-sequential -Install dependencies one\-at\-a\-time, instead of concurrently. -.UNINDENT -.INDENT 0.0 -.TP -.B \-d, \-\-dev -Install both develop and default packages -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-keep\-outdated -Keep out\-dated dependencies from being updated in Pipfile.lock. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pre -Allow pre\-releases. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-python -Specify which version of Python virtualenv should use. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-three, \-\-two -Use Python 3/2 when creating virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-clear -Clears caches (pipenv, pip, and pip\-tools). -.UNINDENT -.INDENT 0.0 -.TP -.B \-v, \-\-verbose -Verbose mode. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pypi\-mirror -Specify a PyPI mirror. -.UNINDENT -.SS uninstall -.sp -Uninstalls a provided package and removes it from Pipfile. -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -pipenv uninstall [OPTIONS] [PACKAGES]... -.ft P -.fi -.UNINDENT -.UNINDENT -Options.INDENT 0.0 -.TP -.B \-\-all\-dev -Uninstall all package from [dev\-packages]. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-all -Purge all package(s) from virtualenv. Does not edit Pipfile. -.UNINDENT -.INDENT 0.0 -.TP -.B \-e, \-\-editable -An editable Python package URL or path, often to a VCS repository. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-skip\-lock -Skip locking mechanisms and use the Pipfile instead during operation. -.UNINDENT -.INDENT 0.0 -.TP -.B \-d, \-\-dev -Deprecated (as it has no effect). May be removed in a future release. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-keep\-outdated -Keep out\-dated dependencies from being updated in Pipfile.lock. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pre -Allow pre\-releases. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-python -Specify which version of Python virtualenv should use. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-three, \-\-two -Use Python 3/2 when creating virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-clear -Clears caches (pipenv, pip, and pip\-tools). -.UNINDENT -.INDENT 0.0 -.TP -.B \-v, \-\-verbose -Verbose mode. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pypi\-mirror -Specify a PyPI mirror. -.UNINDENT -Arguments.INDENT 0.0 -.TP -.B PACKAGES -Optional argument(s) -.UNINDENT -Environment variables.INDENT 0.0 -.TP -.B PIPENV_SKIP_LOCK -.INDENT 7.0 -.INDENT 3.5 -Provide a default for \fI\%\-\-skip\-lock\fP -.UNINDENT -.UNINDENT -.UNINDENT -.SS update -.sp -Runs lock, then sync. -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -pipenv update [OPTIONS] [PACKAGES]... -.ft P -.fi -.UNINDENT -.UNINDENT -Options.INDENT 0.0 -.TP -.B \-\-bare -Minimal output. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-outdated -List out\-of\-date dependencies. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-dry\-run -List out\-of\-date dependencies. -.UNINDENT -.INDENT 0.0 -.TP -.B \-e, \-\-editable -An editable Python package URL or path, often to a VCS repository. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-ignore\-pipfile -Ignore Pipfile when installing, using the Pipfile.lock. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-selective\-upgrade -Update specified packages. -.UNINDENT -.INDENT 0.0 -.TP -.B \-r, \-\-requirements -Import a requirements.txt file. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-extra\-index\-url -URLs to the extra PyPI compatible indexes to query for package look\-ups. -.UNINDENT -.INDENT 0.0 -.TP -.B \-i, \-\-index -Target PyPI\-compatible package index url. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-sequential -Install dependencies one\-at\-a\-time, instead of concurrently. -.UNINDENT -.INDENT 0.0 -.TP -.B \-d, \-\-dev -Install both develop and default packages -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-keep\-outdated -Keep out\-dated dependencies from being updated in Pipfile.lock. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pre -Allow pre\-releases. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-python -Specify which version of Python virtualenv should use. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-three, \-\-two -Use Python 3/2 when creating virtualenv. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-clear -Clears caches (pipenv, pip, and pip\-tools). -.UNINDENT -.INDENT 0.0 -.TP -.B \-v, \-\-verbose -Verbose mode. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-pypi\-mirror -Specify a PyPI mirror. -.UNINDENT -Arguments.INDENT 0.0 -.TP -.B PACKAGES -Optional argument(s) -.UNINDENT -Environment variables.INDENT 0.0 -.TP -.B PIP_EXTRA_INDEX_URL -.INDENT 7.0 -.INDENT 3.5 -Provide a default for \fI\%\-\-extra\-index\-url\fP -.UNINDENT -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP -.B PIP_INDEX_URL -.INDENT 7.0 -.INDENT 3.5 -Provide a default for \fI\%\-i\fP -.UNINDENT -.UNINDENT -.UNINDENT -.SS Frequently Encountered Pipenv Problems -.sp -Pipenv is constantly being improved by volunteers, but is still a very young -project with limited resources, and has some quirks that needs to be dealt -with. We need everyone’s help (including yours!). -.sp -Here are some common questions people have using Pipenv. Please take a look -below and see if they resolve your problem. -.sp -\fBNOTE:\fP -.INDENT 0.0 -.INDENT 3.5 -\fBMake sure you’re running the newest Pipenv version first!\fP -.UNINDENT -.UNINDENT -.SS ☤ Your dependencies could not be resolved -.sp -Make sure your dependencies actually \fIdo\fP resolve. If you’re confident they -are, you may need to clear your resolver cache. Run the following command: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -pipenv lock \-\-clear -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -and try again. -.sp -If this does not work, try manually deleting the whole cache directory. It is -usually one of the following locations: -.INDENT 0.0 -.IP \(bu 2 -\fB~/Library/Caches/pipenv\fP (macOS) -.IP \(bu 2 -\fB%LOCALAPPDATA%\epipenv\epipenv\eCache\fP (Windows) -.IP \(bu 2 -\fB~/.cache/pipenv\fP (other operating systems) -.UNINDENT -.sp -Pipenv does not install pre\-releases (i.e. a version with an alpha/beta/etc. -suffix, such as \fI1.0b1\fP) by default. You will need to pass the \fB\-\-pre\fP flag -in your command, or set -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -[pipenv] -allow_prereleases = true -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -in your Pipfile. -.SS ☤ No module named -.sp -This is usually a result of mixing Pipenv with system packages. We \fIstrongly\fP -recommend installing Pipenv in an isolated environment. Uninstall all existing -Pipenv installations, and see installing\-pipenv to choose one of the -recommended way to install Pipenv instead. -.SS ☤ My pyenv\-installed Python is not found -.sp -Make sure you have \fBPYENV_ROOT\fP set correctly. Pipenv only supports CPython -distributions, with version name like \fB3.6.4\fP or similar. -.SS ☤ Pipenv does not respect pyenv’s global and local Python versions -.sp -Pipenv by default uses the Python it is installed against to create the -virtualenv. You can set the \fB\-\-python\fP option to \fB$(pyenv which python)\fP -to use your current pyenv interpreter. See specifying_versions for more -information. -.SS ☤ ValueError: unknown locale: UTF\-8 -.sp -macOS has a bug in its locale detection that prevents us from detecting your -shell encoding correctly. This can also be an issue on other systems if the -locale variables do not specify an encoding. -.sp -The workaround is to set the following two environment variables to a standard -localization format: -.INDENT 0.0 -.IP \(bu 2 -\fBLC_ALL\fP -.IP \(bu 2 -\fBLANG\fP -.UNINDENT -.sp -For Bash, for example, you can add the following to your \fB~/.bash_profile\fP: -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -export LC_ALL=\(aqen_US.UTF\-8\(aq -export LANG=\(aqen_US.UTF\-8\(aq -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -For Zsh, the file to edit is \fB~/.zshrc\fP\&. -.sp -\fBNOTE:\fP +.sp +For Zsh, the file to edit is \fB~/.zshrc\fP\&. +.sp +\fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 You can change both the \fBen_US\fP and \fBUTF\-8\fP part to the @@ -4708,22 +3643,6 @@ language/locale and encoding you use. .sp This may be related to your locale setting. See \fI\%☤ ValueError: unknown locale: UTF\-8\fP for a possible solution. -.SS ☤ \fBshell\fP does not show the virtualenv’s name in prompt -.sp -This is intentional. You can do it yourself with either shell plugins, or -clever \fBPS1\fP configuration. If you really want it back, use -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -pipenv shell \-c -.ft P -.fi -.UNINDENT -.UNINDENT -.sp -instead (not available on Windows). .SS ☤ Pipenv does not respect dependencies in setup.py .sp No, it does not, intentionally. Pipfile and setup.py serve different purposes, diff --git a/setup.py b/setup.py index 8080b96bc0..45049ba029 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ "towncrier", "bs4", "twine", - "sphinx<2", + "sphinx", "flake8>=3.3.0,<4.0", "black;python_version>='3.6'", "parver", diff --git a/tasks/release.py b/tasks/release.py index a292e3d7ac..058c546e72 100644 --- a/tasks/release.py +++ b/tasks/release.py @@ -3,12 +3,11 @@ import pathlib import re import sys +import subprocess import invoke from parver import Version -from towncrier._builder import find_fragments, render_fragments, split_fragments -from towncrier._settings import load_config from pipenv.__version__ import __version__ from pipenv.vendor.vistir.contextmanagers import temp_environ @@ -52,22 +51,7 @@ def get_build_dir(ctx): def _render_log(): """Totally tap into Towncrier internals to get an in-memory result. """ - config = load_config(ROOT) - definitions = config["types"] - fragments, fragment_filenames = find_fragments( - pathlib.Path(config["directory"]).absolute(), - config["sections"], - None, - definitions, - ) - rendered = render_fragments( - pathlib.Path(config["template"]).read_text(encoding="utf-8"), - config["issue_format"], - split_fragments(fragments, definitions), - definitions, - config["underlines"][1:], - False, # Don't add newlines to wrapped text. - ) + rendered = subprocess.check_output(["towncrier", "--draft"]).decode("utf-8") return rendered