Commit Graph

7253 Commits

Author SHA1 Message Date
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 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
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
Frost Ming 3ab4763d4a news for #4877 2022-01-04 19:11:06 +08:00
Frost Ming 14ddbbd8e2 Merge pull request #4899 from pypa/fix/reject-illegal-requirements-txt
Fix the index parsing to reject illegal requirements
2021-12-29 11:09:30 +08:00
Frost Ming 33cbabe20c fix pip location 2021-12-23 15:20:11 +08:00
Frost Ming a30ec71254 fix comment ignorance 2021-12-23 12:53:42 +08:00
Frost Ming 32146365bf remove the useless option 2021-12-23 11:27:23 +08:00
Frost Ming 3d678257b7 Fix the index parsing 2021-12-23 10:49:17 +08:00
Frost Ming cdde3f7bce Fix #4881 installation fails when extra index url is given 2021-11-25 22:34:14 +08:00
Frost Ming e69ce684f9 Merge pull request #4877 from ReazNahid/patch-1
duplicate parentheses removed
2021-11-24 12:08:28 +08:00
Frost Ming f0f6846fe2 Merge pull request #4878 from belkka/patch-1
Add a clickable link to PEP 508 in index.rst
2021-11-24 12:08:13 +08:00
belkka aec666e54d Add a clickable link to PEP 508 2021-11-24 05:47:34 +02:00
Frost Ming 1a5584e9a5 Release v2021.11.23 2021-11-23 23:24:23 +08:00
Reaz Nahid 789e25686f duplicate parentheses removed 2021-11-22 20:43:22 +06:00
Frost Ming ce1930d483 Merge pull request #4874 from pypa/fix/install-with-index-url
[bug] Fix a bug of source saving in Pipfile
2021-11-18 16:33:05 +08:00
Frost Ming eda189aad8 Add a test case to verify the fix 2021-11-18 15:26:30 +08:00
Frost Ming 29af360d34 Support index name in --index 2021-11-18 14:32:57 +08:00
Frost Ming 9c0c554064 add news entry 2021-11-18 12:49:41 +08:00
Frost Ming 317a39762c Fix a bug that index url is not correctly saved in Pipfile 2021-11-18 12:48:24 +08:00
Frost Ming 3dec34cae9 Merge pull request #4870 from pypa/vendor/charset-normalizer
[vendor] Update charset-normalizer
2021-11-17 16:01:57 +08:00
Frost Ming 4a244d2671 lock on windows python36 2021-11-17 14:41:00 +08:00
Frost Ming b90c469590 Update dependencies 2021-11-17 12:07:20 +08:00
Frost Ming 21b6a0839f Include py3.6 testing in CI matrix 2021-11-17 11:10:34 +08:00
Frost Ming ff4529a15e add news entry 2021-11-17 11:09:19 +08:00
Frost Ming eb39b8c81a Upgrade charset-normalizer to 2.0.7 2021-11-17 11:07:57 +08:00
Frost Ming eafcfb2c1e Fix a bug of deleting a virtualenv that is not managed by Pipenv
Close #4867
2021-11-17 00:06:13 +08:00
Frost Ming b0ceaed5bc Release v2021.11.15 2021-11-15 09:36:53 +08:00
Frost Ming 9889634d4c remove duplicate headings 2021-11-15 00:05:06 +08:00
Frost Ming b61fafe0c0 Update README with completion instruction 2021-11-15 00:02:23 +08:00
Frost Ming b503e8b3aa Update README with GH action badge 2021-11-12 16:31:53 +08:00
Frost Ming 47a73bb0a5 Merge pull request #4862 from pypa/vendor/update-click
Update vendored click to 8.0.3
2021-11-12 14:28:21 +08:00