Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
selection_prefs.py
Go to the documentation of this file.
1
from
typing
import
Optional
2
3
from
pip._internal.models.format_control
import
FormatControl
4
5
6
class
SelectionPreferences
:
7
"""
8
Encapsulates the candidate selection preferences for downloading
9
and installing files.
10
"""
11
12
__slots__ = [
13
"allow_yanked"
,
14
"allow_all_prereleases"
,
15
"format_control"
,
16
"prefer_binary"
,
17
"ignore_requires_python"
,
18
]
19
20
# Don't include an allow_yanked default value to make sure each call
21
# site considers whether yanked releases are allowed. This also causes
22
# that decision to be made explicit in the calling code, which helps
23
# people when reading the code.
24
def
__init__
(
25
self,
26
allow_yanked: bool,
27
allow_all_prereleases: bool =
False
,
28
format_control: Optional[FormatControl] =
None
,
29
prefer_binary: bool =
False
,
30
ignore_requires_python: Optional[bool] =
None
,
31
) ->
None
:
32
"""Create a SelectionPreferences object.
33
34
:param allow_yanked: Whether files marked as yanked (in the sense
35
of PEP 592) are permitted to be candidates for install.
36
:param format_control: A FormatControl object or None. Used to control
37
the selection of source packages / binary packages when consulting
38
the index and links.
39
:param prefer_binary: Whether to prefer an old, but valid, binary
40
dist over a new source dist.
41
:param ignore_requires_python: Whether to ignore incompatible
42
"Requires-Python" values in links. Defaults to False.
43
"""
44
if
ignore_requires_python
is
None
:
45
ignore_requires_python =
False
46
47
self.
allow_yanked
= allow_yanked
48
self.
allow_all_prereleases
= allow_all_prereleases
49
self.
format_control
= format_control
50
self.
prefer_binary
= prefer_binary
51
self.
ignore_requires_python
= ignore_requires_python
pip._internal.models.selection_prefs.SelectionPreferences
Definition
selection_prefs.py:6
pip._internal.models.selection_prefs.SelectionPreferences.ignore_requires_python
ignore_requires_python
Definition
selection_prefs.py:51
pip._internal.models.selection_prefs.SelectionPreferences.format_control
format_control
Definition
selection_prefs.py:49
pip._internal.models.selection_prefs.SelectionPreferences.__init__
None __init__(self, bool allow_yanked, bool allow_all_prereleases=False, Optional[FormatControl] format_control=None, bool prefer_binary=False, Optional[bool] ignore_requires_python=None)
Definition
selection_prefs.py:31
pip._internal.models.selection_prefs.SelectionPreferences.allow_all_prereleases
allow_all_prereleases
Definition
selection_prefs.py:48
pip._internal.models.selection_prefs.SelectionPreferences.prefer_binary
prefer_binary
Definition
selection_prefs.py:50
pip._internal.models.selection_prefs.SelectionPreferences.allow_yanked
allow_yanked
Definition
selection_prefs.py:47
pip._internal.models.format_control
Definition
format_control.py:1
venv
lib
python3.12
site-packages
pip
_internal
models
selection_prefs.py
Generated by
1.9.8