Commit Graph

28 Commits

Author SHA1 Message Date
Damian Shaw 2a0acb595c
Update and provide fixes for mypy pre-commit (#12389)
* Update mypy to 1.6.1

* Fix mypy "Source file found twice under different module names" error

* Ignore type of intialized abstract class in tests

* Use more specific type ignore method-assign

* Type ignore for message.get_all

* Remove unused type ignore

* Add SizedBuffer type for xmlrpc.client.Transport subclass

* Add Self type for RequestHandlerClass in test

* Add type ignore for shutil.rmtree onexc handler

* Quote SizedBuffer

* Add news entry

* Remove no longer correct comment

* Update self import

* Also ignore type onerror=handler

* Update news entry

* Update news entry
2023-11-07 09:39:01 +00:00
Paul Moore 7ba5a625bc Revert "Merge pull request #11487 from pelson/feature/base-prefix-config"
This reverts commit 56e5fa3c0f, reversing
changes made to 2c09e9c760.
2023-04-21 17:05:49 +01:00
Phil Elson b777bcda81 Add the "base" config level concept, to allow configuration of all virtual environments sharing the same base.
The new functionality serves a use case which was not previously possible with pip configuration files, namely the situation where you have a base Python installation and want to influence the pip configuration for all derivative virtual environments *without* changing the config for all other environments on a machine (global), or for all other environment run by the same user (user). Concretely, this could be used for a centrally managed network mounted filesystem based Python installation, from which multiple users can build virtual environments and inside which a specific pip configuration is needed (e.g. an index URL).
2022-10-06 09:33:38 +02:00
wim glenn 32f642d123 provide a better error message for "pip config get index-url" 2022-04-29 22:51:16 -05:00
wim glenn af20d93d71 placate pre-commit 2022-04-29 22:38:38 -05:00
wim glenn 4b35763d5f ``pip config`` normalizes names, converting underscores into dashes. closes #9330 2022-04-29 22:38:38 -05:00
Jon Dufresne 72937f6520 Complete type annotations for tests/conftest.py and tests/lib/* 2021-09-29 19:57:29 -07:00
Jon Dufresne 60c274be2d Complete type annotations of tests/unit/ directory 2021-09-23 05:44:54 -07:00
Pradyun Gedam 94999255d5
Reformat the codebase, with black 2021-08-20 13:37:49 +01:00
Andrey Bienkowski 50db373adb Lint 2021-02-10 13:38:21 +03:00
Andrey Bienkowski ab35018c04 Use unittest.mock instead of mock 2021-02-10 13:28:55 +03:00
Nguyễn Gia Phong c564a3d541 Use monkeypatch.setenv in config and option tests 2020-07-25 20:46:45 +07:00
Xavier Fernandez 645809944c
Move config files locations inside a function (#6736) 2019-07-20 22:29:24 +02:00
Steve Dower 293c91ee8a Configuration files may now also be stored under `sys.prefix` (#6268)
* Rename kinds.VENV to kinds.SITE and site_config_files to global_config_files
* Add tests for config file options
* Deprecate --venv in pip config
2019-03-07 11:14:56 +05:30
Pradyun Gedam 3350cc4516
bodge: Allow both str and repr to be used for configuration file name
This is because Python 2's and Python 3's configparser treat the two
differently and we're reusing that message.
2018-10-03 20:23:40 +05:30
Pradyun Gedam 29b12fa80b
Fix test to exactly match output 2018-09-30 23:04:46 +05:30
Pradyun Gedam 6a18c24803
Show error messages when configuration-related errors occur 2018-09-20 11:18:22 +05:30
Pradyun Gedam 353a13ddff
isort: Include trailing commas 2017-11-21 13:23:59 +05:30
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Pradyun S. Gedam 49abd55fe5 Configuration - Documentation updates (#4556) 2017-06-24 13:24:13 -04:00
Pradyun S. Gedam 4e47f04fe5 Sort imports 2017-06-13 23:41:31 +05:30
Pradyun S. Gedam bd850c0798 Improve tests 2017-05-20 12:56:13 +05:30
Pradyun S. Gedam 94d752e399 Add a test for environment config file 2017-05-20 12:56:13 +05:30
Pradyun S. Gedam b58419afc6 Use strings only 2017-05-20 12:56:13 +05:30
Pradyun S. Gedam 3efb452a2a Use an enum-like attribute to refer to configuration sources 2017-05-20 12:56:13 +05:30
Pradyun S. Gedam c9113e41db Rename site-wide to global 2017-05-20 12:56:13 +05:30
Pradyun S. Gedam 9063899e7d Move mixin to a helper module 2017-05-20 12:56:13 +05:30
Pradyun S. Gedam 4b44f4660f Add tests 2017-05-20 12:56:13 +05:30