Damian Shaw
68529081c2
Enforce f-strings via Ruff ( #12393 )
2023-11-07 09:14:56 +00:00
Sander Van Balen
449522a828
minor fixes and linting
2023-09-06 15:16:22 +02:00
Sander Van Balen
f5602fa0b8
added message to invariant assertions
2023-09-06 15:12:17 +02:00
Sander Van Balen
5a01679022
Update src/pip/_internal/req/constructors.py
...
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2023-09-06 13:54:28 +02:00
Sander Van Balen
314d7c1254
simplified regex
2023-07-26 10:53:34 +02:00
Sander Van Balen
e6333bb4d1
linting
2023-07-26 10:32:58 +02:00
Sander Van Balen
39e1102800
fixed minor type errors
2023-07-25 17:33:09 +02:00
Sander Van Balen
7e8da6176f
clarification
2023-07-13 17:02:53 +02:00
Sander Van Balen
faa3289a94
use regex for requirement update
2023-07-13 16:40:56 +02:00
Sander Van Balen
49027d7de3
cleanup
2023-06-22 14:59:43 +02:00
Sander Van Balen
d09431feb5
fixes
2023-06-22 14:42:05 +02:00
Sander Van Balen
5f8f40eb1d
refinements
2023-06-22 11:08:33 +02:00
Sander Van Balen
937d8f0b61
partial improvement
2023-06-21 17:34:30 +02:00
q0w
110a26f0ed
Merge branch 'main' into per-req-config-settings
2023-04-09 18:12:41 +03:00
Stéphane Bidoul
7cb863e2fc
Stop propagating `config_settings` to dependencies ( #11941 )
2023-04-09 09:41:04 -05:00
q0w
13459a809b
Merge branch 'main' into per-req-config-settings
2023-03-30 11:18:31 +03:00
Pradyun Gedam
78ab4cf071
Bump all linters other than mypy ( #11901 )
2023-03-27 20:03:11 +01:00
q0w
cdec6b27ea
fix typing
2023-03-27 17:36:43 +03:00
Stéphane Bidoul
82f1ff0adb
Fix type of config_settings arguments
2023-03-27 14:01:36 +02:00
Stéphane Bidoul
efe9d4b762
Remove unused argument
2023-03-27 14:01:36 +02:00
Stéphane Bidoul
1d9d56ede7
Refactor handling of per requirement options
...
Move the conversion from options to function arguments up the call chain.
2023-03-27 14:01:36 +02:00
Stéphane Bidoul
a04748db8e
Remove support for the deprecated --install-options
2023-03-18 11:20:51 +01:00
Stéphane Bidoul
52fd6436a2
Fix propagation of user_supplied with URL constrains
2022-05-01 19:43:25 +02:00
Paul Moore
af28440792
Store config settings on the install requirement
2022-04-21 18:30:48 +01:00
Tzu-ping Chung
91f72674df
Remove pkg_resources from requirement parser
2021-12-04 17:57:33 +08:00
Stéphane Bidoul
ddfeaaef20
Reject projects that have neither a pyproject.toml nor a setup.py
2021-10-18 14:31:11 +02:00
Joseph Bylund
dee6690f06
Renames, moves, docstrings, comments
2021-10-07 07:11:33 -04:00
Joseph Bylund
bb8824439e
(joe) requirement creation is very expensive, and at least in my test case there were only ~200 unique requirement objects created in ~5-10 minutes of resolution time
2021-10-06 12:42:44 -04:00
Stéphane Bidoul
e5be3f796e
Add PEP 660 support (build_editable)
2021-09-28 23:04:51 +02:00
Pradyun Gedam
069b01932a
Blacken src/pip/_internal/req
...
Progresses the black formatting of the codebase further.
2021-07-24 09:47:54 +01:00
harupy
9d96e0777f
Convert type comments
2021-07-23 23:38:27 +09:00
Tzu-ping Chung
288bffc43c
Unify Python project root detection logic
...
A Python project root is now defined as containing a pyproject.toml, or
a setup.py (pre-PEP-517 legacy layout). After this patch, this logic
applies to all checks except parse_editable, where we check for setup.py
and setup.cfg instead since non-setuptools PEP 517 projects cannot be
installed as editable right now.
2021-06-19 15:29:04 +08:00
Stéphane Bidoul
8fc65ea53f
Merge pull request #9673 from mwchase/url-constraints-final-2
...
Support URL constraints in the new resolver
2021-04-18 12:31:45 +02:00
Max W Chase
4c69ab2a2c
Support URL constraints in the new resolver
...
Fixes #8253
2021-04-17 07:59:57 -04:00
Tzu-ping Chung
56a8f3d8bd
Typing fixes
2021-03-10 16:40:58 +08:00
KOLANICH
7a95720e79
Fixed --editable install for setuptools projects without setup.py.
...
Co-Authored-By: Tzu-ping Chung <uranusjr@gmail.com>
Co-Authored-By: Pradyun Gedam <3275593+pradyunsg@users.noreply.github.com>
2021-03-03 21:24:29 +03:00
Pradyun Gedam
baaf66f70d
Merge pull request #9591 from hexagonrecursion/open
...
Replace `open(file, 'r')` with `open(file)`
2021-02-23 13:37:25 +00:00
Pradyun Gedam
c2ba7c043b
Merge pull request #9606 from hexagonrecursion/fstr
2021-02-21 08:30:00 +00:00
Jon Dufresne
0945809afc
Remove typing.TYPE_CHECKING guards
...
The typing module has been available since Python 3.5. Guarding the
import has been unnecessary since dropping Python 2.
Some guards remain to either:
- Avoid circular imports
- Importing objects that are also guarded by typing.TYPE_CHECKING
- Avoid mypy_extensions dependency
2021-02-19 18:34:21 -08:00
Jon Dufresne
a6392bd62e
Replace pip._internal.utils.typing with stdlib typing
...
The stdlib module has been available since Python 3.5 and the
TYPE_CHECKING constant has been available since 3.5.2.
By using stdlib, this removes the need for pip to maintain its own
Python 2 typing compatibility shim.
2021-02-18 19:09:13 -08:00
Andrey Bienkowski
9b2cb894ba
Convert more str.format() calls to f-strings
2021-02-13 09:27:17 +03:00
Andrey Bienkowski
f13e10c915
Replace `open(file, 'r')` with `open(file)`
2021-02-10 13:20:11 +03:00
Paul Moore
d6a21011b3
Remove support for extras after specifier in requirements
2021-01-23 12:06:44 +00:00
Stéphane Bidoul
7ee22ba995
Show full list of supported VCS scheme in error message
...
When an editable requirement is neither a local directory nor
a URL with a supported VCS scheme, we show the full list
of supported VCS schemes in the error message.
2021-01-18 09:11:08 +01:00
Stéphane Bidoul
28bbf898ea
Improve syntax
...
Co-authored-by: Xavier Fernandez <xav.fernandez@gmail.com>
2021-01-18 09:11:07 +01:00
Stéphane Bidoul
b3761f6fab
Remove support for git+git@ pseudo VCS URLs.
...
Now that we don't need to support git@
pseudo-urls, we can simplify the test for
valid VCS URLs based on link.is_vcs, which
is turns is based on the URL scheme.
This also means we fail earlier if a git@ pseudo
URL is used.
Since VCS requirements are not validated to be URLs
in Requirement constructors, we can simplify update_editable.
2021-01-18 09:11:07 +01:00
Stéphane Bidoul
5385d8a6cd
Construct valid backends list for error message.
2021-01-18 09:08:24 +01:00
Pradyun Gedam
86afa89043
Merge pull request #9361 from jdufresne/f-strings
...
Use f-strings for simple string formatting
2020-12-26 10:24:18 +00:00
Jon Dufresne
cdcf74fb8e
Use f-strings for simple string formatting
...
Use pyupgrade to convert simple string formatting to use f-string
syntax. pyupgrade is intentionally timid and will not create an f-string
if it would make the expression longer or if the substitution parameters
are anything but simple names or dotted names.
2020-12-25 16:21:20 -08:00
Jon Dufresne
09b3d3a50b
Remove object from class definitions
...
Unnecessary since dropping Python 2 support. In Python 3, all classes
are new style classes.
2020-12-25 15:48:11 -08:00