Commit Graph

7285 Commits

Author SHA1 Message Date
Oz N Tiram 880f91c877 Merge pull request #4896 from den4uk/verify-hash-command
New command: verify Pipfile.lock hash is up to date
2022-02-10 11:14:31 +01:00
Oz N Tiram ef8253397f Merge pull request #4944 from smac89/patch-1
improve detection of CI
2022-02-10 11:13:35 +01:00
Oz N Tiram 0fba37ddf4 Merge pull request #4951 from tcsorrel/doc/conatiners
doc fix docker container title
2022-02-10 00:15:35 +01:00
Thomas Sorrel 1d8f08100b doc fix docker container title 2022-02-09 18:04:02 +01:00
smac89 652b492152 Create 4944.bugfix.mdB 2022-02-03 14:01:13 -06:00
smac89 4852924426 improve detection of CI 2022-02-03 13:51:44 -06:00
Oz N Tiram 23691015b2 Merge pull request #4936 from willhoh/main
fixed review from #4780, closes #4537
2022-01-31 21:36:58 +00:00
Willi Hohenstein 1f689478dc renamed variabel, only used in funktion scope 2022-01-31 15:37:30 +01:00
Willi Hohenstein 10ac2c8924 Merge branch 'pypa:main' into main 2022-01-31 12:23:20 +01:00
Willi Hohenstein daa08b0987 renamed variable to avoid confusion 2022-01-31 12:22:13 +01:00
pinfort b60d37a859 Pattern expansion for arguments was disabled on Windows
Fix #4937.
2022-01-30 22:20:15 +01:00
Willi Hohenstein 3408750a48 fixed review from #4780 2022-01-29 13:19:52 +01:00
Oz N Tiram 30a9b93262 Merge pull request #4929 from pypa/fix-typo-in-docker-docs
Fix typo in docker documnetation
2022-01-24 20:35:24 +01:00
Oz N Tiram 7db20507c1 Merge pull request #4930 from pypa/remove-dead-code
Remove dead code after exception
2022-01-24 20:35:09 +01:00
Oz N Tiram 05e494f068 Remove dead code after exception
Fix #4088
2022-01-23 21:20:59 +01:00
Oz N Tiram e6b15166f5 Fix typo in docker documnetation
This is now the correct path for running the application code.
2022-01-23 21:08:17 +01:00
Oz N Tiram a40adda5ef Update CONTRIBUTING.md 2022-01-21 10:18:30 +01:00
Oz N Tiram aa68371bf4 Merge pull request #4921 from pypa/update-contributing.rst-and-run-tests
Update contributing.rst and run tests
2022-01-14 09:39:40 +01:00
Oz N Tiram ecef2d48e9 Fix some typos in contributing.rst 2022-01-13 13:02:23 +01:00
Oz N Tiram 9a5b14bafd Clarify usage of run-tests.sh
Explain how to override the default Python binary and the
Python version used by pipenv.
2022-01-13 12:54:57 +01:00
Oz N Tiram e8e24444fb Remove circular reference to CONTRIBUING.md
Also restore the link to be cordial ...
2022-01-13 10:08:25 +01:00
Oz N Tiram 638c84628d Merge pull request #4922 from imomaliev/patch-1
Fix typo in docs/basics.rst for docker example
2022-01-13 09:54:09 +01:00
Sardorbek Imomaliev e9fa01620d Fix typo in docs/basics.rst for docker example 2022-01-13 14:17:34 +07:00
Frost Ming 75cbf170d9 Merge pull request #4920 from pypa/update-get-pipenv.py
Update get-pipenv.py
2022-01-13 08:35:51 +08:00
Oz N Tiram 5deb3af86a Remove the philosophy document
This document is no longer useful. KR has stepped down
and all the other maintainers are emeritus.

The rest of the philosophy is exlusive and could be removed
without doing any harm. KR still has earned his respect starting
this project.
2022-01-12 23:44:35 +01:00
Oz N Tiram d59c0de867 Update contributing.rst and refer to in CONTRIBUTING.md
There should be only one document describing how to contribute
to pipenv. Having both documents caused a drift between both.
2022-01-12 23:41:50 +01:00
Oz N Tiram 39a16f14da Fix run-tests.sh
The script was very much neglected ...
For example:

PIP_PROCESS_DEPENDENCY_LINKS

Is no longer used in pip. The TEST_SUITE variable was not used anywhere.

Dropped Python2.7 and added a variable to specify python version.
Set sensible defaults to all variables, and allow overriding them
from the calling shell, e.g.:
```
PIPENV_PYTHON=3.9 ./run-tests.sh
```

This was tested to work both on alpine linux and debian.
2022-01-12 23:37:26 +01:00
Oz N Tiram e353a0ee7b Update get-pipenv.py
This script has not been updated in 4 years. It lacked documentation
on how to create it and how it differs from upstream.

This updated version uses the current infrastructure of pypa/get-pip.
It uses a newer version of pip (pip 21.3.1 compare to pip 9.0.1, which
had an expired CA certificate).
2022-01-12 20:18:22 +01:00
Frost Ming d11cf30329 Merge pull request #4919 from pypa/jinja2-leftover-clean
Remove leftover include of jinja2 files
2022-01-12 22:05:31 +08:00
Oz N Tiram 9e28ef5082 Remove leftover include of jinja2 files
This was probably due to pipenv relying on Jinja2 in the
past.
However, Jinja2 was removed in 11229406ba
2022-01-12 13:51:16 +01:00
Oz N Tiram 9770d6e11c Merge pull request #4918 from pypa/multi-stage-build-with-pipenv
Document  usage of Pipenv in multistage docker build
2022-01-12 13:35:17 +01:00
Denis Sazonov 41e174898c docs update for cli verify command 2022-01-12 09:57:22 +00:00
Denis Sazonov c7dd39999e added news entry for 4893 issue 2022-01-12 09:57:07 +00:00
Oz N Tiram fa0452f7cc Document usage of Pipenv in multistage docker build
Also, add a note about running Pipenv as root (or Admin)
with a bold warning.
2022-01-11 22:43:32 +01:00
Oz N Tiram 223d627236 Merge pull request #4917 from oz123/document-running-as-root-and-usage-in-containers
Document running as root and usage in containers
2022-01-10 15:07:45 +01:00
Oz N Tiram b12c4fcac4 Update pipenv install output 2022-01-10 14:16:19 +01:00
Oz N Tiram 1448251e21 Add note about running pipenv as root
Also, document how to use pipenv in containers.

Issue #3130.
2022-01-10 14:05:52 +01:00
Frost Ming 4fa67914f7 Merge pull request #4915 from oz123/remove-dep-first
Remove vendored first
2022-01-10 15:48:40 +08:00
Oz N Tiram f276360dfc Remove vendored first
While first is nice to have, it adds a lot of code in vendor.
This patch achieves the same with less code in vendor (~80 lines less).
2022-01-10 00:10:12 +01:00
github-actions[bot] b21baade71 Bumped version.
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-08 15:34:16 +00:00
Frost Ming d378b9f91c Release v2022.1.8 2022-01-08 23:30:47 +08:00
Frost Ming 439782a8ae Merge pull request from GHSA-qc9x-gjcv-465w
fix TLS validation for requirements.txt
2022-01-08 22:28:26 +08:00
Milo Minderbinder 167909839a fix TLS validation for requirements.txt
Previously, due to a probable typo in the code for importing a
requirements file to create a new pipenv project, SSL/TLS validation was
disabled by default for any package index servers specified in the
requirements file with the `--index-url` or `--extra-index-url` options.

In addition, `--trusted-host` options in the requirements file would not
work as intended, because any host or host:port pair provided with these
options was incorrectly being matched against the full URLs of the
configured index server(s) (i.e. including the scheme, path, etc.),
instead of extracting and comparing with the host and port parts only,
as intended.

This PR fixes both of these issues, flipping the existing behavior to
require SSL/TLS validation by default, and optionally allowing TLS
validation to be disabled explicitly for specific host:port with the
`--trusted-host` option if provided.
2022-01-08 22:17:49 +08:00
Frost Ming 9cb42e1acb Merge pull request #4910 from jfly/update-run-tests-instructions 2022-01-08 14:17:49 +08:00
Jeremy Fleischman 08a7fcf1cd Oops, set the CI environment variable even earlier.
If I do something like `pytest tests/integration/test_cli.py`, something
about the ordering of imports means that `pipenv.environments` gets
loaded *before* `pytest_sessionstart` runs, which means that
`pipenv.environments.PIPENV_IS_CI` ends up false.
2022-01-07 00:12:15 -08:00
Jeremy Fleischman f42fcaa2b8 Misc doc updates (mostly around running tests)
This adds and documents a workaround for
https://github.com/pypa/pipenv/issues/4909. It feels a bit weird to
pretend to be CI just to run the test suite, though. Maybe we can do
something about that later.

I ran into a lot of trouble trying to get the tests to run when working
on https://github.com/pypa/pipenv/pull/4908, and that was largely
because the instructions in this CONTRIBUTING.md file seem to have
rotted.

1. The bit about "can be run very simply" is bogus. It's
   unfortunately not that simple right now.

2. `make test` (the docker approach) fails for me with this error:

    ```bash
    $ make test
    docker-compose up
    [+] Running 1/0
     ⠿ Container pipenv-pipenv-tests-1  Recreated                                                                  0.1s
    Attaching to pipenv-pipenv-tests-1
    pipenv-pipenv-tests-1  | Collecting certifi
    pipenv-pipenv-tests-1  |   Downloading https://files.pythonhosted.org/packages/37/45/946c02767aabb873146011e665728b680884cd8fe70dde973c640e45b775/certifi-2021.10.8-py2.py3-none-any.whl (149kB)
    pipenv-pipenv-tests-1  | Installing collected packages: certifi
    pipenv-pipenv-tests-1  | Successfully installed certifi-2021.10.8
    pipenv-pipenv-tests-1  | Path: /root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    pipenv-pipenv-tests-1  | Installing Pipenv...
    pipenv-pipenv-tests-1  | Obtaining file:///pipenv
    pipenv-pipenv-tests-1  |     Complete output from command python setup.py egg_info:
    pipenv-pipenv-tests-1  |     Traceback (most recent call last):
    pipenv-pipenv-tests-1  |       File "<string>", line 1, in <module>
    pipenv-pipenv-tests-1  |       File "/pipenv/setup.py", line 55
    pipenv-pipenv-tests-1  |         print(f"\033[1m{s}\033[0m")
    pipenv-pipenv-tests-1  |                                  ^
    pipenv-pipenv-tests-1  |     SyntaxError: invalid syntax
    pipenv-pipenv-tests-1  |
    pipenv-pipenv-tests-1  |     ----------------------------------------
    pipenv-pipenv-tests-1  | Command "python setup.py egg_info" failed with error code 1 in /pipenv/
    pipenv-pipenv-tests-1 exited with code 1
    ```

    The docker image it relies upon
    (https://hub.docker.com/r/kennethreitz/pipenv-tests) hasn't been
    updated in 4 years, so I assume it's just not something people use
    anymore?

3. Relatedly, there was a `Dockerfile` at the root of this repo that
   appears to be unused. Let me know if it's used somewhere I'm not
   realizing, I can add it back!

4. https://kennethreitz.org/essays/be-cordial-or-be-on-your-way seems to
   be a broken link now. I found
   https://kennethreitz.org/essays/2013/01/27/be-cordial-or-be-on-your-way
   on Google.

5. `./run-tests.sh` doesn't work for me. It's failing for the same
   reason described by @ncoghlan here:
   https://github.com/pypa/pip/issues/7953#issuecomment-611928262. He
   said something about a `PIPENV_BOOTSTRAP` environment variable, but I
   can't find any information about that.
2022-01-07 00:01:33 -08:00
Frost Ming c8f34ddb8a Merge pull request #4908 from jfly/issue-4885-custom-indices-lacking-hashes
Use a PackageFinder with `ignore_compatibility` when collecting hashes
2022-01-07 15:11:31 +08:00
Jeremy Fleischman 34652df63c Use a PackageFinder with ignore_compatibility when collecting hashes
This fixes https://github.com/pypa/pipenv/issues/4885
2022-01-06 22:01:43 -08:00
Frost Ming b0ebaf054e Merge pull request #4907 from milo-minderbinder/bugfix/requirements-file-options
disallow abbreviated forms of full option names
2022-01-06 15:12:30 +08:00
Milo Minderbinder d535301e1f disallow abbreviated forms of full option names
Previously, due to default behavior of ArgumentParser, global --index-url,
--extra-index-url, and --trusted-host options in requirements files could be
abbreviated (e.g. "--index" == "--index-url"). As a result, unexpected
behavior could occur during processing of a requirements file with these
shortened option names when using Pipenv, which could be exploited by a
malicious actor to surreptitiously insert pip options using non-obvious
abbreviations.

For example, adding a line with "--t example.com" to the
requirements file would cause Pipenv to treat example.com as trusted, even
when example.com presents an invalid TLS certificate.

This commit disables support for abbreviated options in the ArgumentParser,
to align Pipenv's behavior when parsing global options in a requirements
file with the behavior in pip, as expected.
2022-01-06 00:47:37 -05:00