diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5ad4fcd8..8039c71c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,100 +1,190 @@ -2018.6.0.dev0 (2018-06-18) -========================== - +2018.6.25 (2018-06-25) +====================== Features & Improvements ----------------------- -- Pipenv-created virtualenvs will now be associated with a ``.project`` folder (features can be implemented on top of this later or users may choose to use ``pipenv-pipes`` to take full advantage of this.) `#1861 `_ - -- Virtualenv names will now appear in prompts for most Windows users. `#2167 `_ - -- Added support for cmder shell paths with spaces. `#2168 `_ - -- Added nested JSON output to the ``pipenv graph`` command. `#2199 `_ - -- Dropped vendored pip 9 and vendored, patched, and migrated to pip 10. - Updated patched piptools version. `#2255 `_ - -- PyPI mirror URLs can now be set to override instances of PyPI urls by passing the ``--pypi-mirror`` argument from the command line or setting the ``PIPENV_PYPI_MIRROR`` environment variable. `#2281 `_ - -- Virtualenv activation lines will now avoid being written to some shell history files. `#2287 `_ - -- Pipenv will now only search for ``requirements.txt`` files when creating new projects, and during that time only if the user doesn't specify packages to pass in. `#2309 `_ - -- Added support for mounted drives via UNC paths. `#2331 `_ - -- Added support for Windows Subsystem for Linux bash shell detection. `#2363 `_ - +- Pipenv-created virtualenvs will now be associated with a ``.project`` folder + (features can be implemented on top of this later or users may choose to use + ``pipenv-pipes`` to take full advantage of this.) `#1861 + `_ + +- Virtualenv names will now appear in prompts for most Windows users. `#2167 + `_ + +- Added support for cmder shell paths with spaces. `#2168 + `_ + +- Added nested JSON output to the ``pipenv graph`` command. `#2199 + `_ + +- Dropped vendored pip 9 and vendored, patched, and migrated to pip 10. Updated + patched piptools version. `#2255 + `_ + +- PyPI mirror URLs can now be set to override instances of PyPI urls by passing + the ``--pypi-mirror`` argument from the command line or setting the + ``PIPENV_PYPI_MIRROR`` environment variable. `#2281 + `_ + +- Virtualenv activation lines will now avoid being written to some shell + history files. `#2287 `_ + +- Pipenv will now only search for ``requirements.txt`` files when creating new + projects, and during that time only if the user doesn't specify packages to + pass in. `#2309 `_ + +- Added support for mounted drives via UNC paths. `#2331 + `_ + +- Added support for Windows Subsystem for Linux bash shell detection. `#2363 + `_ + +- Pipenv will now generate hashes much more quickly by resolving them in a + single pass during locking. `#2384 + `_ + +- ``pipenv run`` will now avoid spawning additional ``COMSPEC`` instances to + run commands in when possible. `#2385 + `_ + +- Massive internal improvements to requirements parsing codebase, resolver, and + error messaging. `#2388 `_ + +- ``pipenv check`` now may take multiple of the additional argument + ``--ignore`` which takes a parameter ``cve_id`` for the purpose of ignoring + specific CVEs. `#2408 `_ + Behavior Changes ---------------- - Pipenv will now parse & capitalize ``platform_python_implementation`` markers + .. warning:: This could cause an issue if you have an out of date ``Pipfile`` + which lowercases the comparison value (e.g. ``cpython`` instead of + ``CPython``). `#2123 `_ + +- Pipenv will now only search for ``requirements.txt`` files when creating new + projects, and during that time only if the user doesn't specify packages to + pass in. `#2309 `_ - .. warning:: - - This could cause an issue if you have an out of date ``Pipfile`` which lowercases the comparison value (e.g. ``cpython`` instead of ``CPython``). `#2123 `_ - -- Pipenv will now only search for ``requirements.txt`` files when creating new projects, and during that time only if the user doesn't specify packages to pass in. `#2309 `_ - Bug Fixes --------- -- Massive internal improvements to requirements parsing codebase, resolver, and error messaging. `#1962 `_, +- Massive internal improvements to requirements parsing codebase, resolver, and + error messaging. `#1962 `_, `#2186 `_, `#2263 `_, `#2312 `_ - -- Pipenv will now parse & capitalize ``platform_python_implementation`` markers. `#2123 `_ - -- Fixed a bug with parsing and grouping old-style ``setup.py`` extras during resolution `#2142 `_ - -- Fixed a bug causing pipenv graph to throw unhelpful exceptions when running against empty or non-existent environments. `#2161 `_ - -- Fixed a bug which caused ``--system`` to incorrectly abort when users were in a virtualenv. `#2181 `_ - -- Removed vendored ``cacert.pem`` which could cause issues for some users with custom certificate settings. `#2193 `_ - -- Fixed a regression which led to direct invocations of ``virtualenv``, rather than calling it by module. `#2198 `_ - + +- Pipenv will now parse & capitalize ``platform_python_implementation`` + markers. `#2123 `_ + +- Fixed a bug with parsing and grouping old-style ``setup.py`` extras during + resolution `#2142 `_ + +- Fixed a bug causing pipenv graph to throw unhelpful exceptions when running + against empty or non-existent environments. `#2161 + `_ + +- Fixed a bug which caused ``--system`` to incorrectly abort when users were in + a virtualenv. `#2181 `_ + +- Removed vendored ``cacert.pem`` which could cause issues for some users with + custom certificate settings. `#2193 + `_ + +- Fixed a regression which led to direct invocations of ``virtualenv``, rather + than calling it by module. `#2198 + `_ + - Locking will now pin the correct VCS ref during ``pipenv update`` runs. - Running ``pipenv update`` with a new vcs ref specified in the ``Pipfile`` will now properly obtain, resolve, and install the specified dependency at the specified ref. `#2209 `_ + Running ``pipenv update`` with a new vcs ref specified in the ``Pipfile`` + will now properly obtain, resolve, and install the specified dependency at + the specified ref. `#2209 `_ + +- ``pipenv clean`` will now correctly ignore comments from ``pip freeze`` when + cleaning the environment. `#2262 + `_ + +- Resolution bugs causing packages for incompatible python versions to be + locked have been fixed. `#2267 + `_ + +- Fixed a bug causing pipenv graph to fail to display sometimes. `#2268 + `_ + +- Updated ``requirementslib`` to fix a bug in pipfile parsing affecting + relative path conversions. `#2269 + `_ + +- Windows executable discovery now leverages ``os.pathext``. `#2298 + `_ + +- Fixed a bug which caused ``--deploy --system`` to inadvertently create a + virtualenv before failing. `#2301 + `_ + +- Fixed an issue which led to a failure to unquote special characters in file + and wheel paths. `#2302 `_ + +- VCS dependencies are now manually obtained only if they do not match the + requested ref. `#2304 `_ + +- Added error handling functionality to properly cope with single-digit + ``Requires-Python`` metatdata with no specifiers. `#2377 + `_ + +- ``pipenv update`` will now always run the resolver and lock before ensuring + your dependencies are in sync with your lockfile. `#2379 + `_ + +- Resolved a bug in our patched resolvers which could cause nondeterministic + resolution failures in certain conditions. Running ``pipenv install`` with no + arguments in a project with only a ``Pipfile`` will now correctly lock first + for dependency resolution before installing. `#2384 + `_ + +- Patched ``python-dotenv`` to ensure that environment variables always get + encoded to the filesystem encoding. `#2386 + `_ + + +Improved Documentation +---------------------- + +- Update documentation wording to clarify Pipenv's overall role in the packaging ecosystem. `#2194 `_ -- ``pipenv clean`` will now correctly ignore comments from ``pip freeze`` when cleaning the environment. `#2262 `_ +- Added contribution documentation and guidelines. `#2205 `_ -- Resolution bugs causing packages for incompatible python versions to be locked have been fixed. `#2267 `_ - -- Fixed a bug causing pipenv graph to fail to display sometimes. `#2268 `_ - -- Updated ``requirementslib`` to fix a bug in pipfile parsing affecting relative path conversions. `#2269 `_ - -- Windows executable discovery now leverages ``os.pathext``. `#2298 `_ - -- Fixed a bug which caused ``--deploy --system`` to inadvertently create a virtualenv before failing. `#2301 `_ - -- Fixed an issue which led to a failure to unquote special characters in file and wheel paths. `#2302 `_ - -- VCS dependencies are now manually obtained only if they do not match the requested ref. `#2304 `_ - -- Added error handling functionality to properly cope with single-digit ``Requires-Python`` metatdata with no specifiers. `#2377 `_ - -- ``pipenv update`` will now always run the resolver and lock before ensuring your dependencies are in sync with your lockfile. `#2379 `_ +- Added instructions for supervisord compatibility. `#2215 `_ +- Fixed broken links to development philosophy and contribution documentation. `#2248 `_ + Vendored Libraries ------------------ -- Removed vendored ``cacert.pem`` which could cause issues for some users with custom certificate settings. `#2193 `_ - -- Dropped vendored pip 9 and vendored, patched, and migrated to pip 10. - Updated patched piptools version. `#2255 `_ - -- Updated ``requirementslib`` to fix a bug in pipfile parsing affecting relative path conversions. `#2269 `_ - -- Added custom shell detection library ``shellingham``, a port of our changes to ``pew``. `#2363 `_ - +- Removed vendored ``cacert.pem`` which could cause issues for some users with + custom certificate settings. `#2193 + `_ + +- Dropped vendored pip 9 and vendored, patched, and migrated to pip 10. Updated + patched piptools version. `#2255 + `_ + +- Updated ``requirementslib`` to fix a bug in pipfile parsing affecting + relative path conversions. `#2269 + `_ + +- Added custom shell detection library ``shellingham``, a port of our changes + to ``pew``. `#2363 `_ + +- Patched ``python-dotenv`` to ensure that environment variables always get + encoded to the filesystem encoding. `#2386 + `_ + - Updated vendored libraries. The following vendored libraries were updated: * distlib from version ``0.2.6`` to ``0.2.7``. diff --git a/HISTORY.txt b/HISTORY.txt index 8127c6b0..6f1797a2 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,4 +1,10 @@ - - Virtualenv names will now appear in prompts for most Windows users. 2167 feature +2018.6.25 + - Added error handling functionality to properly cope with single-digit `Requires-Python` metatdata with no specifiers. + - Pipenv will now generate hashes much more quickly by resolving them in a single pass during locking. + - `pipenv run` will now avoid spawning additional `COMSPEC` instances to run commands in when possible. + - `pipenv check` now may take multiple of the additional argument `--ignore` which takes a parameter `cve_id` for the purpose of ignoring specific CVEs. + - Patched `python-dotenv` to ensure that environment variables always get encoded to the filesystem encoding. + - Virtualenv names will now appear in prompts for most Windows users. - Resolver runtime and caching has been improved. - Improved virtualenv discovery when using `pipenv --venv`. - Improved error messages when failing to activate virtualenvs. diff --git a/news/1861.feature b/news/1861.feature deleted file mode 100644 index 2af59f0e..00000000 --- a/news/1861.feature +++ /dev/null @@ -1 +0,0 @@ -Pipenv-created virtualenvs will now be associated with a ``.project`` folder (features can be implemented on top of this later or users may choose to use ``pipenv-pipes`` to take full advantage of this.) diff --git a/news/1962.bugfix b/news/1962.bugfix deleted file mode 100644 index 2286baf7..00000000 --- a/news/1962.bugfix +++ /dev/null @@ -1 +0,0 @@ -Massive internal improvements to requirements parsing codebase, resolver, and error messaging. diff --git a/news/2123.behavior b/news/2123.behavior deleted file mode 100644 index 1afc3ace..00000000 --- a/news/2123.behavior +++ /dev/null @@ -1,5 +0,0 @@ -Pipenv will now parse & capitalize ``platform_python_implementation`` markers - - .. warning:: - - This could cause an issue if you have an out of date ``Pipfile`` which lowercases the comparison value (e.g. ``cpython`` instead of ``CPython``). diff --git a/news/2123.bugfix b/news/2123.bugfix deleted file mode 100644 index 6e7aee3d..00000000 --- a/news/2123.bugfix +++ /dev/null @@ -1 +0,0 @@ -Pipenv will now parse & capitalize ``platform_python_implementation`` markers. diff --git a/news/2142.bugfix b/news/2142.bugfix deleted file mode 100644 index 4a215216..00000000 --- a/news/2142.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed a bug with parsing and grouping old-style ``setup.py`` extras during resolution diff --git a/news/2161.bugfix b/news/2161.bugfix deleted file mode 100644 index ecab3232..00000000 --- a/news/2161.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed a bug causing pipenv graph to throw unhelpful exceptions when running against empty or non-existent environments. diff --git a/news/2167.feature b/news/2167.feature deleted file mode 100644 index 2ce83ecc..00000000 --- a/news/2167.feature +++ /dev/null @@ -1 +0,0 @@ -Virtualenv names will now appear in prompts for most Windows users. diff --git a/news/2168.feature b/news/2168.feature deleted file mode 100644 index ad280b2f..00000000 --- a/news/2168.feature +++ /dev/null @@ -1 +0,0 @@ -Added support for cmder shell paths with spaces. diff --git a/news/2181.bugfix b/news/2181.bugfix deleted file mode 100644 index f72cc260..00000000 --- a/news/2181.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed a bug which caused ``--system`` to incorrectly abort when users were in a virtualenv. diff --git a/news/2184.trivial b/news/2184.trivial deleted file mode 100644 index 14ffb69c..00000000 --- a/news/2184.trivial +++ /dev/null @@ -1 +0,0 @@ -Added an invoke task to generate patches against vendored dependencies. diff --git a/news/2186.bugfix b/news/2186.bugfix deleted file mode 100644 index 2286baf7..00000000 --- a/news/2186.bugfix +++ /dev/null @@ -1 +0,0 @@ -Massive internal improvements to requirements parsing codebase, resolver, and error messaging. diff --git a/news/2193.bugfix b/news/2193.bugfix deleted file mode 100644 index 133f8716..00000000 --- a/news/2193.bugfix +++ /dev/null @@ -1 +0,0 @@ -Removed vendored ``cacert.pem`` which could cause issues for some users with custom certificate settings. diff --git a/news/2193.vendor b/news/2193.vendor deleted file mode 100644 index 133f8716..00000000 --- a/news/2193.vendor +++ /dev/null @@ -1 +0,0 @@ -Removed vendored ``cacert.pem`` which could cause issues for some users with custom certificate settings. diff --git a/news/2194.docs b/news/2194.docs deleted file mode 100644 index 9bd3b876..00000000 --- a/news/2194.docs +++ /dev/null @@ -1 +0,0 @@ -Update documentation wording to clarify Pipenv's overall role in the packaging ecosystem. diff --git a/news/2198.bugfix b/news/2198.bugfix deleted file mode 100644 index 78ee0287..00000000 --- a/news/2198.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed a regression which led to direct invocations of ``virtualenv``, rather than calling it by module. diff --git a/news/2199.feature b/news/2199.feature deleted file mode 100644 index 32840747..00000000 --- a/news/2199.feature +++ /dev/null @@ -1 +0,0 @@ -Added nested JSON output to the ``pipenv graph`` command. diff --git a/news/2205.docs b/news/2205.docs deleted file mode 100644 index 4c34230c..00000000 --- a/news/2205.docs +++ /dev/null @@ -1 +0,0 @@ -Added contribution documentation and guidelines. diff --git a/news/2209.bugfix b/news/2209.bugfix deleted file mode 100644 index 8496363d..00000000 --- a/news/2209.bugfix +++ /dev/null @@ -1,2 +0,0 @@ -Locking will now pin the correct VCS ref during ``pipenv update`` runs. -Running ``pipenv update`` with a new vcs ref specified in the ``Pipfile`` will now properly obtain, resolve, and install the specified dependency at the specified ref. diff --git a/news/2215.docs b/news/2215.docs deleted file mode 100644 index f2308c26..00000000 --- a/news/2215.docs +++ /dev/null @@ -1 +0,0 @@ -Added instructions for supervisord compatibility. diff --git a/news/2248.docs b/news/2248.docs deleted file mode 100644 index 123a56c4..00000000 --- a/news/2248.docs +++ /dev/null @@ -1 +0,0 @@ -Fixed broken links to development philosophy and contribution documentation. diff --git a/news/2255.feature b/news/2255.feature deleted file mode 100644 index f78ef2c4..00000000 --- a/news/2255.feature +++ /dev/null @@ -1,2 +0,0 @@ -Dropped vendored pip 9 and vendored, patched, and migrated to pip 10. -Updated patched piptools version. diff --git a/news/2255.vendor b/news/2255.vendor deleted file mode 100644 index f78ef2c4..00000000 --- a/news/2255.vendor +++ /dev/null @@ -1,2 +0,0 @@ -Dropped vendored pip 9 and vendored, patched, and migrated to pip 10. -Updated patched piptools version. diff --git a/news/2262.bugfix b/news/2262.bugfix deleted file mode 100644 index 30bc4e98..00000000 --- a/news/2262.bugfix +++ /dev/null @@ -1 +0,0 @@ -``pipenv clean`` will now correctly ignore comments from ``pip freeze`` when cleaning the environment. diff --git a/news/2263.bugfix b/news/2263.bugfix deleted file mode 100644 index 2286baf7..00000000 --- a/news/2263.bugfix +++ /dev/null @@ -1 +0,0 @@ -Massive internal improvements to requirements parsing codebase, resolver, and error messaging. diff --git a/news/2267.bugfix b/news/2267.bugfix deleted file mode 100644 index c0d4ad41..00000000 --- a/news/2267.bugfix +++ /dev/null @@ -1 +0,0 @@ -Resolution bugs causing packages for incompatible python versions to be locked have been fixed. diff --git a/news/2268.bugfix b/news/2268.bugfix deleted file mode 100644 index 307580fa..00000000 --- a/news/2268.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed a bug causing pipenv graph to fail to display sometimes. diff --git a/news/2269.bugfix b/news/2269.bugfix deleted file mode 100644 index 223ffda2..00000000 --- a/news/2269.bugfix +++ /dev/null @@ -1 +0,0 @@ -Updated ``requirementslib`` to fix a bug in pipfile parsing affecting relative path conversions. diff --git a/news/2269.vendor b/news/2269.vendor deleted file mode 100644 index 223ffda2..00000000 --- a/news/2269.vendor +++ /dev/null @@ -1 +0,0 @@ -Updated ``requirementslib`` to fix a bug in pipfile parsing affecting relative path conversions. diff --git a/news/2281.feature b/news/2281.feature deleted file mode 100644 index 42f9fb76..00000000 --- a/news/2281.feature +++ /dev/null @@ -1 +0,0 @@ -PyPI mirror URLs can now be set to override instances of PyPI urls by passing the ``--pypi-mirror`` argument from the command line or setting the ``PIPENV_PYPI_MIRROR`` environment variable. diff --git a/news/2287.feature b/news/2287.feature deleted file mode 100644 index bea636a7..00000000 --- a/news/2287.feature +++ /dev/null @@ -1 +0,0 @@ -Virtualenv activation lines will now avoid being written to some shell history files. diff --git a/news/2298.bugfix b/news/2298.bugfix deleted file mode 100644 index b6a2709a..00000000 --- a/news/2298.bugfix +++ /dev/null @@ -1 +0,0 @@ -Windows executable discovery now leverages ``os.pathext``. diff --git a/news/2301.bugfix b/news/2301.bugfix deleted file mode 100644 index 0ad1ab5d..00000000 --- a/news/2301.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed a bug which caused ``--deploy --system`` to inadvertently create a virtualenv before failing. diff --git a/news/2302.bugfix b/news/2302.bugfix deleted file mode 100644 index 16b1cce2..00000000 --- a/news/2302.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fixed an issue which led to a failure to unquote special characters in file and wheel paths. diff --git a/news/2304.bugfix b/news/2304.bugfix deleted file mode 100644 index 86b9cccf..00000000 --- a/news/2304.bugfix +++ /dev/null @@ -1 +0,0 @@ -VCS dependencies are now manually obtained only if they do not match the requested ref. diff --git a/news/2307.trivial b/news/2307.trivial deleted file mode 100644 index 2db3d023..00000000 --- a/news/2307.trivial +++ /dev/null @@ -1 +0,0 @@ -Change function name of ``pipenv.utils.actually_resolve_reps`` to ``pipenv.utils.actually_resolve_deps``. diff --git a/news/2309.behavior b/news/2309.behavior deleted file mode 100644 index 2650524f..00000000 --- a/news/2309.behavior +++ /dev/null @@ -1 +0,0 @@ -Pipenv will now only search for ``requirements.txt`` files when creating new projects, and during that time only if the user doesn't specify packages to pass in. diff --git a/news/2309.feature b/news/2309.feature deleted file mode 100644 index 2650524f..00000000 --- a/news/2309.feature +++ /dev/null @@ -1 +0,0 @@ -Pipenv will now only search for ``requirements.txt`` files when creating new projects, and during that time only if the user doesn't specify packages to pass in. diff --git a/news/2311.trivial b/news/2311.trivial deleted file mode 100644 index d23379b0..00000000 --- a/news/2311.trivial +++ /dev/null @@ -1 +0,0 @@ -Removed unnecessary comma from documentation. diff --git a/news/2312.bugfix b/news/2312.bugfix deleted file mode 100644 index 2286baf7..00000000 --- a/news/2312.bugfix +++ /dev/null @@ -1 +0,0 @@ -Massive internal improvements to requirements parsing codebase, resolver, and error messaging. diff --git a/news/2312.trivial b/news/2312.trivial deleted file mode 100644 index baa7508f..00000000 --- a/news/2312.trivial +++ /dev/null @@ -1 +0,0 @@ -Added ``pipenv run`` suggestion for users who are first creating environment. diff --git a/news/2331.feature b/news/2331.feature deleted file mode 100644 index eff70e5e..00000000 --- a/news/2331.feature +++ /dev/null @@ -1 +0,0 @@ -Added support for mounted drives via UNC paths. diff --git a/news/2363.feature b/news/2363.feature deleted file mode 100644 index aee00776..00000000 --- a/news/2363.feature +++ /dev/null @@ -1 +0,0 @@ -Added support for Windows Subsystem for Linux bash shell detection. diff --git a/news/2363.vendor b/news/2363.vendor deleted file mode 100644 index 1ed55bce..00000000 --- a/news/2363.vendor +++ /dev/null @@ -1 +0,0 @@ -Added custom shell detection library ``shellingham``, a port of our changes to ``pew``. diff --git a/news/2368.vendor b/news/2368.vendor deleted file mode 100644 index 295fe842..00000000 --- a/news/2368.vendor +++ /dev/null @@ -1,15 +0,0 @@ -Updated vendored libraries. The following vendored libraries were updated: - -* distlib from version ``0.2.6`` to ``0.2.7``. -* jinja2 from version ``2.9.5`` to ``2.10``. -* pathlib2 from version ``2.1.0`` to ``2.3.2``. -* parse from version ``2.8.0`` to ``2.8.4``. -* pexpect from version ``2.5.2`` to ``2.6.0``. -* requests from version ``2.18.4`` to ``2.19.1``. -* idna from version ``2.6`` to ``2.7``. -* certifi from version ``2018.1.16`` to ``2018.4.16``. -* packaging from version ``16.8`` to ``17.1``. -* six from version ``1.10.0`` to ``1.11.0``. -* requirementslib from version ``0.2.0`` to ``1.0.1``. - -In addition, scandir was vendored and patched to avoid importing host system binaries when falling back to pathlib2. diff --git a/news/2377.bugfix b/news/2377.bugfix deleted file mode 100644 index 0d81056e..00000000 --- a/news/2377.bugfix +++ /dev/null @@ -1 +0,0 @@ -Added error handling functionality to properly cope with single-digit ``Requires-Python`` metatdata with no specifiers. diff --git a/news/2379.bugfix b/news/2379.bugfix deleted file mode 100644 index 06d678da..00000000 --- a/news/2379.bugfix +++ /dev/null @@ -1 +0,0 @@ -``pipenv update`` will now always run the resolver and lock before ensuring your dependencies are in sync with your lockfile. diff --git a/news/2384.bugfix b/news/2384.bugfix deleted file mode 100644 index 29181782..00000000 --- a/news/2384.bugfix +++ /dev/null @@ -1,2 +0,0 @@ -Resolved a bug in our patched resolvers which could cause nondeterministic resolution failures in certain conditions. -Running ``pipenv install`` with no arguments in a project with only a ``Pipfile`` will now correctly lock first for dependency resolution before installing. diff --git a/news/2384.feature b/news/2384.feature deleted file mode 100644 index a16cb18c..00000000 --- a/news/2384.feature +++ /dev/null @@ -1 +0,0 @@ -Pipenv will now generate hashes much more quickly by resolving them in a single pass during locking. diff --git a/news/2384.trivial b/news/2384.trivial deleted file mode 100644 index 89abf162..00000000 --- a/news/2384.trivial +++ /dev/null @@ -1,2 +0,0 @@ -Updated mocked pypi dependencies. -Removed ellipsis and em-dash characters from terminal output. diff --git a/news/2385.feature b/news/2385.feature deleted file mode 100644 index 17b3569c..00000000 --- a/news/2385.feature +++ /dev/null @@ -1 +0,0 @@ -``pipenv run`` will now avoid spawning additional ``COMSPEC`` instances to run commands in when possible.`` diff --git a/news/2386.bugfix b/news/2386.bugfix deleted file mode 100644 index ae0e87c7..00000000 --- a/news/2386.bugfix +++ /dev/null @@ -1 +0,0 @@ -Patched ``python-dotenv`` to ensure that environment variables always get encoded to the filesystem encoding. diff --git a/news/2386.vendor b/news/2386.vendor deleted file mode 100644 index ae0e87c7..00000000 --- a/news/2386.vendor +++ /dev/null @@ -1 +0,0 @@ -Patched ``python-dotenv`` to ensure that environment variables always get encoded to the filesystem encoding. diff --git a/news/2388.feature b/news/2388.feature deleted file mode 100644 index 2286baf7..00000000 --- a/news/2388.feature +++ /dev/null @@ -1 +0,0 @@ -Massive internal improvements to requirements parsing codebase, resolver, and error messaging. diff --git a/news/2417.bugfix b/news/2417.bugfix new file mode 100644 index 00000000..bb76c190 --- /dev/null +++ b/news/2417.bugfix @@ -0,0 +1 @@ +Fixed a logic error which caused ``--deploy --system`` to overwrite editable vcs packages in the pipfile before installing, which caused any installation to fail by default. diff --git a/news/2419.bugfix b/news/2419.bugfix new file mode 100644 index 00000000..fec7157a --- /dev/null +++ b/news/2419.bugfix @@ -0,0 +1 @@ +Updated requirementslib to fix an issue with properly quoting markers in VCS requirements. diff --git a/news/2419.vendor b/news/2419.vendor new file mode 100644 index 00000000..fec7157a --- /dev/null +++ b/news/2419.vendor @@ -0,0 +1 @@ +Updated requirementslib to fix an issue with properly quoting markers in VCS requirements. diff --git a/news/releasing.trivial.rst b/news/releasing.trivial.rst deleted file mode 100644 index b78d0081..00000000 --- a/news/releasing.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -Added release tasks for maintainers. diff --git a/pipenv/__version__.py b/pipenv/__version__.py index c938b87a..afc0a721 100644 --- a/pipenv/__version__.py +++ b/pipenv/__version__.py @@ -2,4 +2,4 @@ # // ) ) / / // ) ) //___) ) // ) ) || / / # //___/ / / / //___/ / // // / / || / / # // / / // ((____ // / / ||/ / -__version__ = '2018.6.0.dev0' +__version__ = '2018.6.26.dev0' diff --git a/pipenv/cli.py b/pipenv/cli.py index 4ff57353..5e7b470b 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -694,6 +694,12 @@ def run(command, args, three=None, python=False): default=False, help="Given a code path, show potentially unused dependencies.", ) +@option( + '--ignore', + '-i', + multiple=True, + help="Ignore specified vulnerability during safety checks." +) @argument('args', nargs=-1) def check( three=None, @@ -701,12 +707,17 @@ def check( system=False, unused=False, style=False, + ignore=None, args=None, ): from .core import do_check - do_check( - three=three, python=python, system=system, unused=unused, args=args + three=three, + python=python, + system=system, + unused=unused, + ignore=ignore, + args=args ) diff --git a/pipenv/core.py b/pipenv/core.py index 82d1b34b..4346f487 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -617,7 +617,7 @@ def ensure_project( # Automatically use an activated virtualenv. if PIPENV_USE_SYSTEM: system = True - if not project.pipfile_exists: + if not project.pipfile_exists and not deploy: project.touch_pipfile() # Skip virtualenv creation when --system was used. if not system: @@ -911,7 +911,6 @@ def do_create_virtualenv(python=None, site_packages=False): '-m', 'pipenv.pew', 'new', - project.virtualenv_name, '-d', '-a', project.project_directory, @@ -929,6 +928,8 @@ def do_create_virtualenv(python=None, site_packages=False): err=True, ) cmd = cmd + ['-p', python] + if not project.is_venv_in_project(): + cmd = cmd + ['--', project.virtualenv_name] # Actually create the virtualenv. with spinner(): try: @@ -1061,7 +1062,7 @@ def do_lock( u'{0} {1} {2}'.format( crayons.normal('Locking'), crayons.red('[{0}]'.format(settings['log_string'])), - crayons.normal('dependencies…'), + crayons.normal('dependencies...'), ), err=True, ) @@ -1268,7 +1269,8 @@ def do_init( cleanup_virtualenv(bare=False) sys.exit(1) # Ensure the Pipfile exists. - ensure_pipfile(system=system) + if not deploy: + ensure_pipfile(system=system) if not requirements_dir: cleanup_reqdir = True requirements_dir = TemporaryDirectory( @@ -1845,7 +1847,7 @@ def do_install( error, traceback = None, None click.echo( crayons.normal( - u'Requirements file provided! Importing into Pipfile...¦', + u'Requirements file provided! Importing into Pipfile...', bold=True, ), err=True, @@ -1915,7 +1917,8 @@ def do_install( package_name = False # Install editable local packages before locking - this gives us access to dist-info if project.pipfile_exists and ( - not project.lockfile_exists or not project.virtualenv_exists + # double negatives are for english readability, leave them alone. + (not project.lockfile_exists and not deploy) or (not project.virtualenv_exists and not system) ): section = project.editable_packages if not dev else project.editable_dev_packages for package in section.keys(): @@ -1952,7 +1955,7 @@ def do_install( except KeyError: pass # Install all dependencies, if none was provided. - # This basically ensures that we have a pipfile and lockfile, then it locks and + # This basically ensures that we have a pipfile and lockfile, then it locks and # installs from the lockfile if package_name is False: # Update project settings with pre preference. @@ -1972,7 +1975,7 @@ def do_install( pypi_mirror=pypi_mirror, ) - # This is for if the user passed in dependencies, then we want to maek sure we + # This is for if the user passed in dependencies, then we want to maek sure we else: for package_name in package_names: click.echo( @@ -2338,7 +2341,7 @@ def do_run(command, args, three=None, python=False): do_run_posix(script, command=command) -def do_check(three=None, python=False, system=False, unused=False, args=None): +def do_check(three=None, python=False, system=False, unused=False, ignore=None, args=None): if not system: # Ensure that virtualenv is available. ensure_project(three=three, python=python, validate=False, warn=False) @@ -2409,9 +2412,14 @@ def do_check(three=None, python=False, system=False, unused=False, args=None): python = which('python') else: python = system_which('python') + if ignore: + ignored = '--ignore {0}'.format('--ignore '.join(ignore)) + click.echo(crayons.normal('Notice: Ignoring CVE(s) {0}'.format(crayons.yellow(', '.join(ignore)))), err=True) + else: + ignored = '' c = delegator.run( - '"{0}" {1} check --json --key=1ab8d58f-5122e025-83674263-bc1e79e0'.format( - python, escape_grouped_arguments(path) + '"{0}" {1} check --json --key=1ab8d58f-5122e025-83674263-bc1e79e0 {2}'.format( + python, escape_grouped_arguments(path), ignored ) ) try: @@ -2564,6 +2572,8 @@ def do_sync( unused=False, sequential=False, pypi_mirror=None, + system=False, + deploy=False, ): # The lock file needs to exist because sync won't write to it. if not project.lockfile_exists: @@ -2576,8 +2586,8 @@ def do_sync( ) sys.exit(1) - # Ensure that virtualenv is available. - ensure_project(three=three, python=python, validate=False) + # Ensure that virtualenv is available if not system. + ensure_project(three=three, python=python, validate=False, deploy=deploy) # Install everything. requirements_dir = TemporaryDirectory( @@ -2590,6 +2600,8 @@ def do_sync( requirements_dir=requirements_dir, ignore_pipfile=True, # Don't check if Pipfile and lock match. pypi_mirror=pypi_mirror, + deploy=deploy, + system=system, ) requirements_dir.cleanup() click.echo(crayons.green('All dependencies are now up-to-date!')) diff --git a/pipenv/patched/piptools/repositories/pypi.py b/pipenv/patched/piptools/repositories/pypi.py index 3fee3d89..4a960d8f 100644 --- a/pipenv/patched/piptools/repositories/pypi.py +++ b/pipenv/patched/piptools/repositories/pypi.py @@ -19,7 +19,6 @@ from .._compat import ( PyPI, InstallRequirement, SafeFileCache, - InstallationError, ) from pipenv.patched.notpip._vendor.packaging.requirements import InvalidRequirement, Requirement @@ -27,6 +26,7 @@ from pipenv.patched.notpip._vendor.packaging.version import Version, InvalidVers from pipenv.patched.notpip._vendor.packaging.specifiers import SpecifierSet, InvalidSpecifier, Specifier from pipenv.patched.notpip._vendor.packaging.markers import Marker, Op, Value, Variable from pipenv.patched.notpip._vendor.pyparsing import ParseException +from pipenv.patched.notpip._internal.exceptions import InstallationError from ..cache import CACHE_DIR from pipenv.environments import PIPENV_CACHE_DIR @@ -278,13 +278,16 @@ class PyPIRepository(BaseRepository): if ireq.editable: try: dist = ireq.get_dist() + except InstallationError: + ireq.run_egg_info() + dist = ireq.get_dist() + except (TypeError, ValueError, AttributeError): + pass + else: if dist.has_metadata('requires.txt'): setup_requires = self.finder.get_extras_links( dist.get_metadata_lines('requires.txt') ) - except (TypeError, ValueError, AttributeError): - pass - try: # Pip < 9 and below reqset = RequirementSet( diff --git a/pipenv/utils.py b/pipenv/utils.py index 4c0db27c..a19f7ed0 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -856,11 +856,6 @@ def path_to_url(path): return Path(normalize_drive(os.path.abspath(path))).as_uri() -def get_converted_relative_path(path, relative_to=os.curdir): - """Given a vague relative path, return the path relative to the given location""" - return os.path.join('.', os.path.relpath(path, start=relative_to)) - - def walk_up(bottom): """Mimic os.walk, but walk 'up' instead of down the directory tree. From: https://gist.github.com/zdavkeos/1098474 diff --git a/pipenv/vendor/requirementslib/__init__.py b/pipenv/vendor/requirementslib/__init__.py index f3393c11..7e4acf40 100644 --- a/pipenv/vendor/requirementslib/__init__.py +++ b/pipenv/vendor/requirementslib/__init__.py @@ -1,5 +1,5 @@ # -*- coding=utf-8 -*- -__version__ = "1.0.5.dev0" +__version__ = "1.0.6" from .exceptions import RequirementError diff --git a/pipenv/vendor/requirementslib/models/requirements.py b/pipenv/vendor/requirementslib/models/requirements.py index 16d99863..6dc76e0d 100644 --- a/pipenv/vendor/requirementslib/models/requirements.py +++ b/pipenv/vendor/requirementslib/models/requirements.py @@ -649,7 +649,7 @@ class Requirement(object): @property def markers_as_pip(self): if self.markers: - return "; {0}".format(self.markers) + return "; {0}".format(self.markers.replace('"', "'")) return "" diff --git a/pipenv/vendor/requirementslib/utils.py b/pipenv/vendor/requirementslib/utils.py index 02511c93..4204d73a 100644 --- a/pipenv/vendor/requirementslib/utils.py +++ b/pipenv/vendor/requirementslib/utils.py @@ -2,6 +2,7 @@ from __future__ import absolute_import import logging import os +import posixpath import six from itertools import product @@ -60,20 +61,25 @@ def is_vcs(pipfile_entry): def get_converted_relative_path(path, relative_to=os.curdir): - """Given a vague relative path, return the path relative to the given location""" + """Convert `path` to be relative. + + Given a vague relative path, return the path relative to the given + location. + + This performs additional conversion to ensure the result is of POSIX form, + and starts with `./`, or is precisely `.`. + """ start = Path(relative_to) try: start = start.resolve() except OSError: start = start.absolute() - path = start.joinpath(".", path).relative_to(start) - # Normalize these to use forward slashes even on windows - if os.name == "nt": - relpath = os.altsep.join([".", path.as_posix()]) - relpath = os.sep.join([".", path.as_posix()]) - if relpath in ['./.', '.\\.']: - relpath = '.' - return relpath + path = start.joinpath(path).relative_to(start) + + relpath_s = posixpath.normpath(path.as_posix()) + if not (relpath_s == "." or relpath_s.startswith("./")): + relpath_s = posixpath.join(".", relpath_s) + return relpath_s def multi_split(s, split): diff --git a/pipenv/vendor/vendor.txt b/pipenv/vendor/vendor.txt index aa1e3126..a19294b7 100644 --- a/pipenv/vendor/vendor.txt +++ b/pipenv/vendor/vendor.txt @@ -27,7 +27,7 @@ requests==2.19.1 idna==2.7 urllib3==1.23 certifi==2018.4.16 -requirementslib==1.0.4 +requirementslib==1.0.6 attrs==18.1.0 distlib==0.2.7 packaging==17.1 diff --git a/setup.py b/setup.py index 7ba9c3d6..9a31430d 100644 --- a/setup.py +++ b/setup.py @@ -104,7 +104,7 @@ setup( author='Kenneth Reitz', author_email='me@kennethreitz.org', url='https://github.com/pypa/pipenv', - packages=find_packages(exclude=['tests']), + packages=find_packages(exclude=['tests', 'tasks']), entry_points={ 'console_scripts': [ 'pipenv=pipenv:cli', @@ -116,6 +116,7 @@ setup( '': ['LICENSE', 'NOTICES'], "pipenv.vendor.requests": ["*.pem"], "pipenv.vendor.certifi": ["*.pem"], + "pipenv.vendor.click_completion": ["*.j2"], "pipenv.patched.notpip._vendor.certifi": ["*.pem"], "pipenv.patched.notpip._vendor.requests": ["*.pem"], "pipenv.patched.notpip._vendor.distlib._backport": ["sysconfig.cfg"], diff --git a/tasks/release.py b/tasks/release.py index 260e46ac..d116a3b6 100644 --- a/tasks/release.py +++ b/tasks/release.py @@ -58,11 +58,11 @@ def generate_changelog(ctx, commit=False, draft=False): if draft: commit = False log('Writing draft to file...') - ctx.run('towncrier --draft > CHANGELOG.rst') + ctx.run('towncrier --draft > CHANGELOG.draft.rst') if commit: ctx.run('towncrier') log('Committing...') - ctx.run('git add .') + ctx.run('git add CHANGELOG.rst') ctx.run('git commit -m "Update changelog."') @@ -77,7 +77,7 @@ def tag_version(ctx, push=False): @invoke.task -def bump_version(ctx, dry_run=False, increment=True, release=False, dev=False, pre=False, tag=None, clear=False): +def bump_version(ctx, dry_run=False, increment=True, release=False, dev=False, pre=False, tag=None, clear=False, commit=False,): current_version = Version.parse(__version__) today = datetime.date.today() next_month_number = today.month + 1 if today.month != 12 else 1 @@ -111,3 +111,6 @@ def bump_version(ctx, dry_run=False, increment=True, release=False, dev=False, p else: log('Updating to: %s' % new_version.normalize()) version_file.write_text(file_contents.replace(__version__, str(new_version.normalize()))) + if commit: + log('Committing...') + ctx.run('git commit -s -m "Bumped version."') diff --git a/tasks/vendoring/patches/patched/piptools.patch b/tasks/vendoring/patches/patched/piptools.patch index 088aa06c..522c13d8 100644 --- a/tasks/vendoring/patches/patched/piptools.patch +++ b/tasks/vendoring/patches/patched/piptools.patch @@ -19,7 +19,7 @@ index 4e6174c..75f9b49 100644 # NOTE # We used to store the cache dir under ~/.pip-tools, which is not the diff --git a/pipenv/patched/piptools/repositories/pypi.py b/pipenv/patched/piptools/repositories/pypi.py -index 1c4b943..07cd667 100644 +index 1c4b943..c4e5b0e 100644 --- a/pipenv/patched/piptools/repositories/pypi.py +++ b/pipenv/patched/piptools/repositories/pypi.py @@ -4,6 +4,7 @@ from __future__ import (absolute_import, division, print_function, @@ -38,7 +38,6 @@ index 1c4b943..07cd667 100644 + PyPI, + InstallRequirement, + SafeFileCache, -+ InstallationError, ) +from pip._vendor.packaging.requirements import InvalidRequirement, Requirement @@ -46,6 +45,7 @@ index 1c4b943..07cd667 100644 +from pip._vendor.packaging.specifiers import SpecifierSet, InvalidSpecifier, Specifier +from pip._vendor.packaging.markers import Marker, Op, Value, Variable +from pip._vendor.pyparsing import ParseException ++from pip._internal.exceptions import InstallationError + from ..cache import CACHE_DIR +from pipenv.environments import PIPENV_CACHE_DIR @@ -223,10 +223,11 @@ index 1c4b943..07cd667 100644 """ Given a pinned or an editable InstallRequirement, returns a set of dependencies (also InstallRequirements, but not necessarily pinned). -@@ -155,6 +270,20 @@ class PyPIRepository(BaseRepository): +@@ -155,7 +270,24 @@ class PyPIRepository(BaseRepository): os.makedirs(download_dir) if not os.path.isdir(self._wheel_download_dir): os.makedirs(self._wheel_download_dir) +- + # Collect setup_requires info from local eggs. + # Do this after we call the preparer on these reqs to make sure their + # egg info has been created @@ -235,16 +236,20 @@ index 1c4b943..07cd667 100644 + if ireq.editable: + try: + dist = ireq.get_dist() ++ except InstallationError: ++ ireq.run_egg_info() ++ dist = ireq.get_dist() ++ except (TypeError, ValueError, AttributeError): ++ pass ++ else: + if dist.has_metadata('requires.txt'): + setup_requires = self.finder.get_extras_links( + dist.get_metadata_lines('requires.txt') + ) -+ except (TypeError, ValueError, AttributeError): -+ pass - try: # Pip < 9 and below -@@ -164,11 +293,14 @@ class PyPIRepository(BaseRepository): + reqset = RequirementSet( +@@ -164,11 +296,14 @@ class PyPIRepository(BaseRepository): download_dir=download_dir, wheel_download_dir=self._wheel_download_dir, session=self.session, @@ -261,7 +266,7 @@ index 1c4b943..07cd667 100644 ) except TypeError: # Pip >= 10 (new resolver!) -@@ -188,17 +320,97 @@ class PyPIRepository(BaseRepository): +@@ -188,17 +323,97 @@ class PyPIRepository(BaseRepository): finder=self.finder, session=self.session, upgrade_strategy="to-satisfy-only", @@ -362,7 +367,7 @@ index 1c4b943..07cd667 100644 return set(self._dependencies_cache[ireq]) def get_hashes(self, ireq): -@@ -217,24 +429,22 @@ class PyPIRepository(BaseRepository): +@@ -217,24 +432,22 @@ class PyPIRepository(BaseRepository): # We need to get all of the candidates that match our current version # pin, these will represent all of the files that could possibly # satisfy this constraint. diff --git a/tests/integration/test_cli.py b/tests/integration/test_cli.py index 34b78dfb..56ae2210 100644 --- a/tests/integration/test_cli.py +++ b/tests/integration/test_cli.py @@ -82,7 +82,14 @@ def test_pipenv_graph_reverse(PipenvInstance, pypi): def test_pipenv_check(PipenvInstance, pypi): with PipenvInstance(pypi=pypi) as p: p.pipenv('install requests==1.0.0') - assert 'requests' in p.pipenv('check').out + c = p.pipenv('check') + assert c.return_code != 0 + assert 'requests' in c.out + p.pipenv('uninstall requests') + p.pipenv('install six') + c = p.pipenv('check --ignore 35015') + assert c.return_code == 0 + assert 'Ignoring' in c.err @pytest.mark.cli diff --git a/tests/integration/test_install_basic.py b/tests/integration/test_install_basic.py index 047c9d78..71e3ed5d 100644 --- a/tests/integration/test_install_basic.py +++ b/tests/integration/test_install_basic.py @@ -276,7 +276,11 @@ def test_requirements_to_pipfile(PipenvInstance, pypi): @pytest.mark.install @pytest.mark.requirements def test_skip_requirements_when_pipfile(PipenvInstance, pypi): + """Ensure requirements.txt is NOT imported when + 1. We do `pipenv install [package]` + 2. A Pipfile already exists when we run `pipenv install`. + """ with PipenvInstance(chdir=True, pypi=pypi) as p: with open('requirements.txt', 'w') as f: f.write('requests==2.18.1\n') @@ -308,9 +312,8 @@ def test_clean_on_empty_venv(PipenvInstance, pypi): @pytest.mark.install def test_install_does_not_extrapolate_environ(PipenvInstance, pypi): - """This test is deisgned to make sure that pipenv ignores requirements.txt files - for projects that already exist (already have a Pipfile) as well as for times when a - package name is passed in to the install command.""" + """Ensure environment variables are not expanded in lock file. + """ with temp_environ(), PipenvInstance(pypi=pypi, chdir=True) as p: os.environ['PYPI_URL'] = pypi.url @@ -348,9 +351,11 @@ def test_editable_no_args(PipenvInstance): @pytest.mark.install @pytest.mark.virtualenv def test_install_venv_project_directory(PipenvInstance, pypi): - """Test pew's project functionality during virtualenv creation. Since .venv - virtualenvs are not created with pew, we need to swap to a workon_home based - virtualenv for this test""" + """Test pew's project functionality during virtualenv creation. + + Since .venv virtualenvs are not created with pew, we need to swap to a + workon_home based virtualenv for this test. + """ with PipenvInstance(pypi=pypi, chdir=True) as p: with temp_environ(), TemporaryDirectory(prefix='pipenv-', suffix='temp_workon_home') as workon_home: os.environ['WORKON_HOME'] = workon_home.name diff --git a/tests/integration/test_install_twists.py b/tests/integration/test_install_twists.py index 0a48bafb..8750d463 100644 --- a/tests/integration/test_install_twists.py +++ b/tests/integration/test_install_twists.py @@ -20,8 +20,7 @@ from flaky import flaky ['-e .[dev]', {'testpipenv': {'path': '.', 'editable': True, 'extras': ['dev']}}] ]) def test_local_extras_install(PipenvInstance, pypi, line, pipfile): - """Test -e .[extras] installs... note that the extras themselves - are currently not landing in the lockfile for reasons that are unclear. + """Ensure -e .[extras] installs. """ with PipenvInstance(pypi=pypi, chdir=True) as p: project = Project() diff --git a/tests/integration/test_pipenv.py b/tests/integration/test_pipenv.py index 82117704..7077d6e7 100644 --- a/tests/integration/test_pipenv.py +++ b/tests/integration/test_pipenv.py @@ -2,11 +2,20 @@ XXX: Try our best to reduce tests in this file. """ +import os +from tempfile import gettempdir, mkdtemp + +import mock +import pytest from pipenv.core import activate_virtualenv from pipenv.project import Project from pipenv.vendor import delegator -import pytest + +try: + from pathlib import Path +except ImportError: + from pipenv.vendor.pathlib2 import Path @pytest.mark.code @@ -92,3 +101,26 @@ def test_proper_names_unamanged_virtualenv(PipenvInstance, pypi): assert c.return_code == 0 project = Project() assert project.proper_names == [] + + +@pytest.mark.cli +def test_directory_with_leading_dash(PipenvInstance): + def mocked_mkdtemp(suffix, prefix, dir): + if suffix == '-project': + temp_dir = Path(gettempdir()) / '-dir-with-leading-dash' + temp_dir.mkdir() + return str(temp_dir) + else: + return mkdtemp(suffix, prefix, dir) + + with mock.patch('pipenv._compat.mkdtemp', side_effect=mocked_mkdtemp): + with PipenvInstance(chdir=True) as p: + # This environment variable is set in the context manager and will + # cause pipenv to use virtualenv, not pew. + del os.environ['PIPENV_VENV_IN_PROJECT'] + p.pipenv('--python python') + venv_path = p.pipenv('--venv').out.strip() + assert os.path.isdir(venv_path) + # Manually clean up environment, since PipenvInstance assumes that + # the virutalenv is in the project directory. + p.pipenv('--rm') \ No newline at end of file diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 7847551a..7fafdaa9 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -220,32 +220,6 @@ class TestUtils: assert pipenv.utils.is_valid_url(url) assert pipenv.utils.is_valid_url(not_url) is False - @pytest.mark.utils - @pytest.mark.parametrize( - 'input_path, expected', - [ - ('artifacts/file.zip', './artifacts/file.zip'), - ('./artifacts/file.zip', './artifacts/file.zip'), - ('../otherproject/file.zip', './../otherproject/file.zip'), - ], - ) - @pytest.mark.skipif(os.name == 'nt', reason='Nix-based file paths tested') - def test_nix_converted_relative_path(self, input_path, expected): - assert pipenv.utils.get_converted_relative_path(input_path) == expected - - @pytest.mark.utils - @pytest.mark.parametrize( - 'input_path, expected', - [ - ('artifacts/file.zip', '.\\artifacts\\file.zip'), - ('./artifacts/file.zip', '.\\artifacts\\file.zip'), - ('../otherproject/file.zip', '.\\..\\otherproject\\file.zip'), - ], - ) - @pytest.mark.skipif(os.name != 'nt', reason='Windows-based file paths tested') - def test_win_converted_relative_path(self, input_path, expected): - assert pipenv.utils.get_converted_relative_path(input_path) == expected - @pytest.mark.utils def test_download_file(self): url = "https://github.com/kennethreitz/pipenv/blob/master/README.rst"