Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendoring improvements #5182

Merged
merged 24 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5a7d2a4
Remove Python2 left overs
oz123 Jul 21, 2022
77fec3b
Remove functools32 backport
oz123 Jul 21, 2022
a06f5ea
Remove more backports
oz123 Jul 21, 2022
2475b63
Remove funcsigs
oz123 Jul 21, 2022
db3024b
Remove vendored and patched crayons
oz123 Jul 21, 2022
88ccc38
Clean reference to delegator
oz123 Jul 21, 2022
8519f03
Remove references to Python2.7 in RELEASING.md
oz123 Jul 21, 2022
29ce818
Remove vendor/Misc
oz123 Jul 22, 2022
a20aefe
Patch dparse locally - remove top level yaml import
oz123 Jul 25, 2022
dcaddb1
Remove vendoring on pyyaml
oz123 Jul 25, 2022
863110e
Remove charset_normalizer from list of vendored
oz123 Jul 25, 2022
0e007a0
Remove separate download of pyparsing license
oz123 Jul 25, 2022
5311f3c
Remove vendored yaml in yaml3
oz123 Jul 25, 2022
87567a6
Fix import paths in pip_shims.models
oz123 Jul 25, 2022
0e23937
Update tomlkit version we vendor
oz123 Jul 25, 2022
c33db83
Remove patch for tomlkit
oz123 Jul 25, 2022
6f7d11b
Update tomlkit==0.9.2
oz123 Jul 25, 2022
506f102
Remove patch to safety/__main__.py to handle pyyaml
oz123 Jul 25, 2022
bb153ee
Restore skeleton for update_safety task
oz123 Jul 25, 2022
805c8c1
Add some documentation on how to run tests locally.
oz123 Jul 25, 2022
8b2ca95
Patch import paths of safety
oz123 Jul 25, 2022
5ce10e0
Revert "Remove patch to safety/__main__.py to handle pyyaml"
oz123 Jul 25, 2022
66d4bae
Remove only insertion of YAML libs to safety
oz123 Jul 25, 2022
d55f311
Revert undesired change to pip_shims
oz123 Jul 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ submodules:
# e.g make tests RAMDISK=1
.PHONY: tests
tests: parallel ?= -n auto
tests: suite ?=
tests: submodules test-install
source $(get_venv_path)/bin/activate && \
pipenv run pytest -ra $(parallel) -vvv --full-trace --tb=long
Expand Down
10 changes: 3 additions & 7 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ Now we will need to update the lockfile. This is required to ensure tests run ag
# use the latest python here
$ export PIPENV_PYTHON=3.8
$ pipenv lock --dev
# Inspect the changes in a diff viewer, for example we should keep the python 2 dependencies to use for running tests
# Inspect the changes in a diff viewer, for example we should keep the older Python dependencies to use for running tests
# on completion, stage the relevant changes
$ export PIPENV_PYTHON=2.7
$ export PIPENV_PYTHON=3.7
$ pipenv lock --keep-outdated --dev
# this helps avoid overwriting the entire lockfile and should introduce only the changes required to run tests on python 2
# this helps avoid overwriting the entire lockfile and should introduce only the changes required to run tests on previous Python versions
# inspect the resulting lockfile and commit the changes
$ git commit
```
Expand All @@ -103,8 +103,6 @@ Test pipenv locally. If tests pass, you can go ahead and make a PR to merge what
```bash
$ export PIPENV_PYTHON=3.8
$ pipenv install --dev && pytest -ra tests
$ export PIPENV_PYTHON=2.7
$ pipenv install --dev && pytest -ra tests
```

## Check Spelling in Documentation
Expand Down Expand Up @@ -152,8 +150,6 @@ If in doubt, follow the basic instructions below.
8. Wait a week, then update version number to a canonical release and re-release on PyPI.org
10. Publicize on lists, Discourse, GitHub issues



## Looking ahead

Most of the pipenv related ecosystem libraries are using [GitHub actions](https://github.com/sarugaku/vistir/blob/master/.github/workflows/pypi_upload.yml) to automate releases when tags are pushed. Most likely we will look to move in this direction and simplify the process.
23 changes: 20 additions & 3 deletions docs/dev/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,11 @@ be aware of the following things when filing bug reports:
Run the tests
-------------

Two ways of running the tests are as follows:
There are a few ways of running the tests:

1. ``./run-tests.sh`` or ``run-tests.bat``
1. run-tests.sh

The scripts for bash or windows: ``./run-tests.sh`` and ``run-tests.bat``

Note that, you override the default Python Pipenv will use with
PIPENV_PYTHON and the Python binary name with PYTHON in case it
Expand All @@ -253,7 +255,9 @@ you run it before you open a PR. Taking this second approach,
will allow you, for example, to run a single test case, or
``fail fast`` if you need it.

2. Manually, which repeat the steps of the scripts above:
2. Manually

This repeats the steps of the scripts above:

.. code-block:: console

Expand All @@ -280,6 +284,19 @@ $ docker run --rm -v $(pwd):/usr/src -it python:3.7 bash
# bash run-tests.sh
```

3. Using the Makefile:

The Makefile automates all the task as in the script. However, it allows
one more fine grained control on every step. For example::

$ make ramdisk # create a ram disk to preserve your SSDs life
$ make ramdisk-virtualenv
$ make test suite="-m not cli" # run all tests but cli

or ::

$ make tests parallel="" suite="tests/integration/test_cli.py::test_pipenv_check"

It is important that your environment is setup correctly, and
this may take some work, for example, on a specific Mac installation, the following
steps may be needed:
Expand Down
1 change: 0 additions & 1 deletion pipenv/patched/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
- Pip is modified, to make it work with Pipenv's custom virtualenv locations.
- Pip is modified, to make it work with pip-tool modifications.
- Pip is modified, to make it resolve deep extras links.
- Crayons is upgraded.
- Safety is hacked together to always work on any system.
- TOML libraries are upgraded to... work.

Expand Down
22 changes: 0 additions & 22 deletions pipenv/patched/crayons.LICENSE

This file was deleted.

205 changes: 0 additions & 205 deletions pipenv/patched/crayons.py

This file was deleted.

3 changes: 0 additions & 3 deletions pipenv/patched/safety/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,5 @@ def insert_pipenv_dirs():

if __name__ == "__main__": # pragma: no cover
insert_pipenv_dirs()
yaml_lib = "pipenv.patched.yaml{0}".format(sys.version_info[0])
locals()[yaml_lib] = __import__(yaml_lib)
sys.modules["yaml"] = sys.modules[yaml_lib]
from pipenv.patched.safety.cli import cli
cli(prog_name="safety")
20 changes: 0 additions & 20 deletions pipenv/patched/yaml3/LICENSE

This file was deleted.

Loading