Commit Graph

3600 Commits

Author SHA1 Message Date
Jeff Tratner 511561122b Cache pipfile parsing
On a (390+ line) Pipfile, it takes ~5s to parse the entire thing :O.
Pipenv has to parse the pipfile repeatedly and all over the place, so
caching the contents speeds things up dramatically (at least in this
case).

This PR establishes a little cache based upon file location + md5sum of
contents for the pipfile (and the hashing is pretty fast here). Given
that the cache key is based on the file contents, should be completely
fine to do (only possible issue is if parsed_pipfile gets mutated -
which is why I've added a defensive deepcopy).

Without the deepcopy, cache hit takes ~0.09ms.
With the deepcopy, cache hit takes 1.19ms.

If we can confirm no need for deepcopy, would shave off a second or two
off really big Pipfiles.
2018-03-19 09:53:41 -07:00
kennethreitz 0760cf0a9c attempt
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
v11.8.3
2018-03-19 08:19:42 -04:00
kennethreitz 5aeab06b2c attempt to fix #1738
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-19 08:17:29 -04:00
kennethreitz c4ccc2292c allow_prereleases
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-19 06:54:02 -04:00
kennethreitz a0606e43e3 remove easter egg 2018-03-19 06:51:51 -04:00
kennethreitz 2bba03f973 pipenv --update
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-19 06:47:32 -04:00
kennethreitz 4c51214e7e remove --update
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-19 06:46:10 -04:00
kennethreitz c52300a5ca history / version
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
v11.8.2
2018-03-19 06:24:49 -04:00
kennethreitz 97e91527e0 Merge pull request #1774 from asherf/jerry
fix prepare_pip_source_args not properly handle user & pw in repo URLs
2018-03-19 06:21:07 -04:00
kennethreitz ed13dc48b5 new lockfile
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-19 06:18:34 -04:00
kennethreitz 1ea3a3f7cb pipfile
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-19 06:16:27 -04:00
kennethreitz 3ccb899a57 3.6
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-19 06:16:16 -04:00
kennethreitz da9331e148 Merge pull request #1768 from jtratner/fix-white-marker
Make white only for python 3 dev-packages
2018-03-19 06:15:43 -04:00
kennethreitz 23fa279894 Merge pull request #1751 from giuscri/reorder-install-requires
Reorder dependencies passed to setuptools's setup
2018-03-19 06:13:59 -04:00
kennethreitz 2fc1b8f74a Merge pull request #1771 from ksonj/master
Remove recommendation to add `passenv=HOME` in tox.ini
2018-03-19 06:13:39 -04:00
kennethreitz ca6551776e Merge pull request #1758 from uranusjr/more-robust-resolver-sys-path
Improve resolver path-patching
2018-03-19 06:12:24 -04:00
kennethreitz 2977d30b37 Merge pull request #1777 from puzan/fix_clear
Pass clear flag to resolver
2018-03-19 06:11:50 -04:00
kennethreitz a83e3ab88d Merge pull request #1778 from giuscri/pipfile-many-newlines
better cleanup_toml
2018-03-19 06:11:31 -04:00
kennethreitz b398cc93af Merge branch 'master' into pipfile-many-newlines 2018-03-19 06:11:04 -04:00
kennethreitz e6bf8313d9 Merge pull request #1772 from Hrxn/patch-2
Fix typo in README.rst
2018-03-19 06:10:35 -04:00
Giuseppe 1fca77f9b3 reorder dependencies passed to setuptools's setup
workaround for https://github.com/pypa/setuptools/issues/498
2018-03-18 13:28:23 +01:00
Giuseppe 68419d2328 better cleanup_toml
Before this commit Pipfile had a more
than neeeded newlines between sections.
2018-03-18 13:18:45 +01:00
Ilya Zonov 1318261fc2 Clear cache only once 2018-03-18 13:45:38 +03:00
Ilya Zonov b356c581b1 Pass clear flag to resolver 2018-03-18 13:22:41 +03:00
Asher Foa 31581b3f0c fix prepare_pip_source_args not properly handle user & pw in repo URLs 2018-03-17 16:25:44 -07:00
HRXN 7098621ea3 Fix typo in README.rst
use -> you
2018-03-17 21:24:25 +01:00
Kalle Jepsen 72bbd6206a Remove recommendation to add passenv=HOME to tox.ini
I believe `passenv=HOME` is no (or no longer?) necessary, as pipenv will
use the virtualenv it is running in. In addition this adds a
recommendation to add `--ignore-pipfile` to `pipenv install`, to protect
the locked dependency set from accidental changes.
2018-03-17 20:35:14 +01:00
Tzu-ping Chung 0d0d7e35b3 Improve resolver path-patching
Add the parent site-packages directory to sys.path *after* built-in
ones, and only when it does not already exist.

This should vastly improve the resolver's robustness against hostile
Python environments, such as #1753. It might help with issues like #693
as well, but I'm not sure (and not interested in figuring out either).
2018-03-17 10:08:07 +08:00
Dan Ryan 230d179cab Merge pull request #1763 from QasimK/master
pipenv.help output command formatting fixes
2018-03-16 20:25:33 -04:00
Dan Ryan c169362a50 Merge branch 'master' into master 2018-03-16 20:25:19 -04:00
Jeff Tratner 53911daa18 Make white only for python 3 2018-03-16 14:07:55 -07:00
kennethreitz 4dbfc3bd67 Merge pull request #1767 from jtratner/fix-clean-on-no-venv
Fix error on pipenv clean with empty virtualenv
2018-03-16 17:01:34 -04:00
Jeff Tratner c7e1abab24 Fix error on empty virtualenv and pipenv clean
Obv could also *not* create the empty virtualenv when running pipenv
clean, but in general can imagine this also occurring if you created an
empty virtualenv and then tried to do clean within it.

(installed packages was [''])
2018-03-16 13:58:59 -07:00
QasimK b6db3a45b3 Allow Markdown formatting to come back
GitHub does not respect the Markdown without an additional line break.
2018-03-16 13:49:42 +00:00
QasimK cd55e5e69b Help command should always terminate HTML
The <details> tag did not always close itself
2018-03-16 13:10:38 +00:00
kennethreitz fce2214e64 Merge pull request #1749 from pypa/ncoghlan-update-pyupio-legal-note-for-db-removal
Update `pipenv check` docs for Safety-DB removal
2018-03-15 07:35:26 -04:00
Nick Coghlan b493418c5d Merge branch 'master' into ncoghlan-update-pyupio-legal-note-for-db-removal 2018-03-15 21:21:06 +10:00
Nick Coghlan 993525b539 Update pipenv check docs for Safety-DB removal
We removed the embedded copy of Safety-DB, so there's
no longer any copyright concern about the CC-BY-NC-SA
license, but it does mean `pipenv check` may end up throttled
eventually as all requests to the backend API use a common
key.
2018-03-15 21:20:51 +10:00
kennethreitz 2282e7045f cleanup
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-15 07:20:43 -04:00
kennethreitz fea127fa19 Merge branch 'master' of github.com:pypa/pipenv 2018-03-15 07:04:26 -04:00
kennethreitz 71ad64cc6d white 2018-03-15 07:04:06 -04:00
kennethreitz 8aeb0eee8d white
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-15 06:57:35 -04:00
kennethreitz 312e2f6db2 pipfile/pipfile.lock
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-15 06:34:36 -04:00
kennethreitz fd0a6169ee history
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-14 19:20:31 -04:00
kennethreitz f383751158 history
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-14 19:20:13 -04:00
kennethreitz 052fe5362e remove safety db
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-14 19:19:06 -04:00
kennethreitz 7aa099cdd3 history
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
v11.8.0
2018-03-14 19:00:35 -04:00
kennethreitz 94e2ea3f6c locking bug
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-14 19:00:20 -04:00
kennethreitz 6896462570 fix #1745 2018-03-14 18:58:51 -04:00
kennethreitz 9bbf11486a debugging
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-14 18:49:57 -04:00