Commit Graph

52 Commits

Author SHA1 Message Date
Steve Dower 53d28bae66 Added more tests and handling for short directory names 2019-02-04 14:48:41 -08:00
Steve Dower c31f19fcae Fixes #6169: AdjacentTempDirectory should fail on unwritable directory 2019-02-04 11:11:53 -08:00
Steve Dower b5dd2791b7 Make failed uninstalls roll back more reliably and better at avoiding naming conflicts (#6225) 2019-02-03 04:39:06 -08:00
Paul Moore c5dc6aa784
Merge pull request #6029 from zooba/issue-3055
Fixes #3055 Uninstall causes paths to exceed MAX_PATH limit
2018-12-06 09:23:29 +00:00
Paul Moore 087d8254a7
Merge pull request #5410 from wtolson/manylinux2010
Manylinux2010
2018-11-22 11:07:49 +00:00
Steve Dower 9257d58e1c Fix import ordering 2018-11-21 15:05:08 -08:00
Steve Dower f4bdd28e25 Fix linting issues 2018-11-21 14:13:45 -08:00
Steve Dower 1bf93a78cb Adds test for AdjacentTempDirectory._generate_names 2018-11-21 13:53:49 -08:00
Chris Jerdonek 07900ed732 Change VersionControl.get_src_requirement() to accept the project name. 2018-11-08 04:24:05 -08:00
Chris Jerdonek 0ecc9f0aca Add failing tests for redact_netloc(). 2018-10-29 22:13:55 -07:00
Chris Jerdonek b087f261fb Add failing tests. 2018-10-29 22:12:47 -07:00
Jon Dufresne 2d545dd9c8 Prefer io.BytesIO over six; available on all supported Pythons
On all supported Pythons, the io.BytesIO is always a stream
implementation using an in-memory bytes buffer. Makes code slightly more
forward compatible by reducing use of the six module.
2018-10-19 13:52:58 +02:00
Chris Jerdonek c72b752bf7
Improve TestUnpackArchives to also test the contents of the extracted files (#5891) 2018-10-19 03:58:51 -07:00
Tom Forbes 78371cc950 Redact basic authentication passwords from log messages (#5773)
Redact basic authentication passwords from URLs.
2018-10-19 02:06:10 -07:00
Chris Jerdonek 4afc1e3f69 Use *args in the test.
This incorporates a review suggestion of @pradyunsg.
2018-09-25 02:23:32 -07:00
Chris Jerdonek 520df5356f Add misc.make_vcs_requirement_url(). 2018-09-25 01:31:34 -07:00
Chris Jerdonek 58b21d18dc Add split_auth_from_netloc() to misc.py. 2018-07-25 10:35:50 -07:00
Jeremy Zafran 96dd6de889 made test_remove_auth_from_url a parameterized test 2018-05-17 10:21:34 -04:00
Mark Williams fde4a826b9 Preliminary manylinux2 support. 2018-05-15 09:09:56 -04:00
Jeremy Zafran 5bc94f3348 Move remove_auth_from_url and test from Subversion class to pip._internal.utils.misc 2018-04-27 00:41:54 -04:00
Pradyun Gedam ec3ee8a118
Add tests for call_subprocess 2018-01-21 16:55:41 +05:30
Pradyun Gedam 353a13ddff
isort: Include trailing commas 2017-11-21 13:23:59 +05:30
Dustin Ingram ff5b2013a0 Use correct executable name for completion command (#4755) 2017-10-12 10:59:53 +05:30
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Pradyun S. Gedam 9923c1ad7e Sort imports and minor Flake8 changes (#4520)
* Run isort on the codebase

Command: isort --recursive --skip __main__.py --skip _vendor -o pip._vendor -sd THIRDPARTY -m 5 -p pip -p tests ./pip ./tests

* 📰
2017-06-13 14:17:00 +02:00
David Tucker 7b88f2bbe4 Fall back to sys.getdefaultencoding in auto_decode (#4430)
* Test auto_decode when getpreferredencoding is None

* Fall back to sys.getdefaultencoding in auto_decode

* Add a news file fragment for 4184
2017-06-01 21:41:01 +02:00
Pradyun S. Gedam 0bdbee5c30 TemporaryDirectory abstraction (#4332)
* Rename BuildDirectory to TempDirectory

Because that's what it is.

* Use TempDirectory in more places (take 2)

* Fix indentation...

* 🎨

* Dumb mistake.

* Defer creation of temporary directory

* Misc

* Oops!

* Use better name

* Fix mistakes made in rebasing

* Remove unnecessary wrapping

* 📰

* Misc change to trigger a new CI build

* Make TempDirectory more robust

Update test accordingly

* 🎨 Remove unused import

* 🔧 Fix mistake made during merge

* Move kind to prefix

* Move delete initalization to __init__

* Remove unrelated message

* Improve existing test

* Oops.

* Add a test to verify that readonly files are also deleted

* 🎨

* Increase places where TempDirectory is used

* Remove unused import

* Improve tests, fix bug

* 🎨

* Update test for new behaviour

* Missed no_clean argument

* Make temp_dir private

* Delete the temporary directory based on no_clean

* Give TemporaryDirectory use a unique name

* 🎨

* 📝 Add basic documentation
2017-06-01 14:54:29 +02:00
Pradyun S. Gedam 1832569530 Sort all imports 2017-05-16 15:47:47 +05:30
Donald Stufft ceb7feed75 Update tests for the removal of Python 2.6 2017-03-18 14:52:14 -04:00
Xavier Fernandez 11cc37932c Abort install if Requires-Python do not match the running version 2016-10-27 18:43:59 +02:00
Nathaniel J. Smith a942fb9331 Report correct glibc version in pip user-agent (#3836) 2016-07-09 23:17:04 -04:00
Jakub Wilk 6dc28c1b31 Fix typos 2016-06-10 21:29:43 +02:00
Zvezdan Petkovic 4e2c1fa77c Use a realpath for the temporary build directory. (#3701)
Some systems have /tmp symlinked which confuses custom builds, such as
numpy. This ensures that real path is passed and that such builds
resolve their paths correctly during build and install.

Added test for the change and also for the previous related fix: #707

---

*This was migrated from pypa/pip#3079 to reparent it to the ``master``
branch. Please see original pull request for any previous discussion.*
2016-05-19 21:02:26 -04:00
Xavier Fernandez 50ed3d49e9 Check for PEP263 headers in req files 2016-03-07 11:08:59 +01:00
Xavier Fernandez b2ee4f8255 Simplify test
locale.getpreferredencoding(False) is not always utf8
2016-03-04 10:50:29 +01:00
Xavier Fernandez e2889268bd utils: decode requirement files according to their BOM if present 2016-03-04 10:50:29 +01:00
Xavier Fernandez 2956a3ef41 Add --all option to pip freeze
In order to include pip/setuptools/wheel in the freeze output
Closes #1610
2016-02-17 13:29:32 +01:00
Xavier Fernandez 227572f757 Make sure to keep the timestamp when untaring
closes #3201
2016-01-02 17:08:24 +01:00
Donald Stufft f39bc756e5 Merge branch 'develop' into hashes2 2015-11-06 18:46:09 -05:00
Xavier Fernandez f1bf7515c2 pip.index: remove INSTALLED_VERSION
closes #703
2015-11-04 22:52:44 +01:00
Erik Rose b0ef6ab5b4 Fix unicode errors in unit tests of Hashes under Python 3. 2015-09-25 12:24:32 -04:00
Erik Rose 1e41f01823 Add checks against requirements-file-dwelling hashes for most kinds of packages. Close #1175.
* Add --require-hashes option. This is handy in deployment scripts to force application authors to hash their requirements. It is also a convenient way to get pip to show computed hashes for a virgin, unhashed requirements file. Eventually, additions to `pip freeze` should fill a superset of this use case.
  * In --require-hashes mode, at least one hash is required to match for each requirement.
  * Option-based requirements (--sha256=...) turn on --require-hashes mode implicitly.
  * Internet-derived URL-based hashes are "necessary but not sufficient": they do not satisfy --require-hashes mode when they match, but they are still used to guard against transmission errors.
  * Other URL-based requirements (#md5=...) are treated just like flag-based ones, except they don't turn on --require-hashes.
* Complain informatively, with the most devastating errors first so you don't chase your tail all day only to run up against a brick wall at the end. This also means we don't complain that a hash is missing, only for the user to find, after fixing it, that we have no idea how to even compute a hash for that type of requirement.
  * Complain about unpinned requirements when hash-checking mode is on, lest they cause the user surprise later.
  * Complain about missing hashes.
  * Complain about requirement types we don't know how to hash (like VCS ones and local dirs).
* Have InstallRequirement keep its original Link around (original_link) so we can differentiate between URL hashes from requirements files and ones downloaded from the (untrustworthy) internet.
* Remove test_download_hashes, which is obsolete. Similar coverage is provided in test_utils.TestHashes and the various hash cases in test_req.py.
2015-09-24 22:16:00 -04:00
Thomas Kluyver 068dfd7bd9 Simplify tests using pytest fixtures 2015-03-20 16:09:34 -07:00
Thomas Kluyver 7034545111 Make pep8 linter happy 2015-03-19 09:35:53 -07:00
Thomas Kluyver 7982ecc1e8 Make pep8 a bit happier
Still not very happy
2015-03-18 17:45:53 -07:00
Thomas Kluyver e1989f0d1a Add test for normalize_path()
And call abspath() when not following symlinks
2015-03-18 16:02:30 -07:00
Paul Moore 584b2d0f82 Remove find_command - let subprocess.Popen search PATH for the VCS command to run 2015-03-11 11:37:39 +00:00
Paul Moore 18748b3de6 Make pip.utils.rmtree retry in case antivirus etc holds a directory 2015-02-04 20:34:24 +00:00
Marc Abramowitz 071174457f Separate pip freeze command from operation
By extracting the logic into pip.operations.freeze, the hope is that
folks could do a freeze programmatically more easily.
2014-12-16 06:50:20 -08:00
Paul Moore b0d173e435 Added unit tests for get_installed_distributions user_only 2014-10-15 23:03:44 +01:00