Initial commit: UlHub workspace
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
__version__ = "2.1.0"
|
||||
|
||||
|
||||
class MQTTException(Exception):
|
||||
pass
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5004
test/.venv/lib/python3.12/site-packages/paho/mqtt/client.py
Normal file
5004
test/.venv/lib/python3.12/site-packages/paho/mqtt/client.py
Normal file
File diff suppressed because it is too large
Load Diff
113
test/.venv/lib/python3.12/site-packages/paho/mqtt/enums.py
Normal file
113
test/.venv/lib/python3.12/site-packages/paho/mqtt/enums.py
Normal file
@@ -0,0 +1,113 @@
|
||||
import enum
|
||||
|
||||
|
||||
class MQTTErrorCode(enum.IntEnum):
|
||||
MQTT_ERR_AGAIN = -1
|
||||
MQTT_ERR_SUCCESS = 0
|
||||
MQTT_ERR_NOMEM = 1
|
||||
MQTT_ERR_PROTOCOL = 2
|
||||
MQTT_ERR_INVAL = 3
|
||||
MQTT_ERR_NO_CONN = 4
|
||||
MQTT_ERR_CONN_REFUSED = 5
|
||||
MQTT_ERR_NOT_FOUND = 6
|
||||
MQTT_ERR_CONN_LOST = 7
|
||||
MQTT_ERR_TLS = 8
|
||||
MQTT_ERR_PAYLOAD_SIZE = 9
|
||||
MQTT_ERR_NOT_SUPPORTED = 10
|
||||
MQTT_ERR_AUTH = 11
|
||||
MQTT_ERR_ACL_DENIED = 12
|
||||
MQTT_ERR_UNKNOWN = 13
|
||||
MQTT_ERR_ERRNO = 14
|
||||
MQTT_ERR_QUEUE_SIZE = 15
|
||||
MQTT_ERR_KEEPALIVE = 16
|
||||
|
||||
|
||||
class MQTTProtocolVersion(enum.IntEnum):
|
||||
MQTTv31 = 3
|
||||
MQTTv311 = 4
|
||||
MQTTv5 = 5
|
||||
|
||||
|
||||
class CallbackAPIVersion(enum.Enum):
|
||||
"""Defined the arguments passed to all user-callback.
|
||||
|
||||
See each callbacks for details: `on_connect`, `on_connect_fail`, `on_disconnect`, `on_message`, `on_publish`,
|
||||
`on_subscribe`, `on_unsubscribe`, `on_log`, `on_socket_open`, `on_socket_close`,
|
||||
`on_socket_register_write`, `on_socket_unregister_write`
|
||||
"""
|
||||
VERSION1 = 1
|
||||
"""The version used with paho-mqtt 1.x before introducing CallbackAPIVersion.
|
||||
|
||||
This version had different arguments depending if MQTTv5 or MQTTv3 was used. `Properties` & `ReasonCode` were missing
|
||||
on some callback (apply only to MQTTv5).
|
||||
|
||||
This version is deprecated and will be removed in version 3.0.
|
||||
"""
|
||||
VERSION2 = 2
|
||||
""" This version fix some of the shortcoming of previous version.
|
||||
|
||||
Callback have the same signature if using MQTTv5 or MQTTv3. `ReasonCode` are used in MQTTv3.
|
||||
"""
|
||||
|
||||
|
||||
class MessageType(enum.IntEnum):
|
||||
CONNECT = 0x10
|
||||
CONNACK = 0x20
|
||||
PUBLISH = 0x30
|
||||
PUBACK = 0x40
|
||||
PUBREC = 0x50
|
||||
PUBREL = 0x60
|
||||
PUBCOMP = 0x70
|
||||
SUBSCRIBE = 0x80
|
||||
SUBACK = 0x90
|
||||
UNSUBSCRIBE = 0xA0
|
||||
UNSUBACK = 0xB0
|
||||
PINGREQ = 0xC0
|
||||
PINGRESP = 0xD0
|
||||
DISCONNECT = 0xE0
|
||||
AUTH = 0xF0
|
||||
|
||||
|
||||
class LogLevel(enum.IntEnum):
|
||||
MQTT_LOG_INFO = 0x01
|
||||
MQTT_LOG_NOTICE = 0x02
|
||||
MQTT_LOG_WARNING = 0x04
|
||||
MQTT_LOG_ERR = 0x08
|
||||
MQTT_LOG_DEBUG = 0x10
|
||||
|
||||
|
||||
class ConnackCode(enum.IntEnum):
|
||||
CONNACK_ACCEPTED = 0
|
||||
CONNACK_REFUSED_PROTOCOL_VERSION = 1
|
||||
CONNACK_REFUSED_IDENTIFIER_REJECTED = 2
|
||||
CONNACK_REFUSED_SERVER_UNAVAILABLE = 3
|
||||
CONNACK_REFUSED_BAD_USERNAME_PASSWORD = 4
|
||||
CONNACK_REFUSED_NOT_AUTHORIZED = 5
|
||||
|
||||
|
||||
class _ConnectionState(enum.Enum):
|
||||
MQTT_CS_NEW = enum.auto()
|
||||
MQTT_CS_CONNECT_ASYNC = enum.auto()
|
||||
MQTT_CS_CONNECTING = enum.auto()
|
||||
MQTT_CS_CONNECTED = enum.auto()
|
||||
MQTT_CS_CONNECTION_LOST = enum.auto()
|
||||
MQTT_CS_DISCONNECTING = enum.auto()
|
||||
MQTT_CS_DISCONNECTED = enum.auto()
|
||||
|
||||
|
||||
class MessageState(enum.IntEnum):
|
||||
MQTT_MS_INVALID = 0
|
||||
MQTT_MS_PUBLISH = 1
|
||||
MQTT_MS_WAIT_FOR_PUBACK = 2
|
||||
MQTT_MS_WAIT_FOR_PUBREC = 3
|
||||
MQTT_MS_RESEND_PUBREL = 4
|
||||
MQTT_MS_WAIT_FOR_PUBREL = 5
|
||||
MQTT_MS_RESEND_PUBCOMP = 6
|
||||
MQTT_MS_WAIT_FOR_PUBCOMP = 7
|
||||
MQTT_MS_SEND_PUBREC = 8
|
||||
MQTT_MS_QUEUED = 9
|
||||
|
||||
|
||||
class PahoClientMode(enum.IntEnum):
|
||||
MQTT_CLIENT = 0
|
||||
MQTT_BRIDGE = 1
|
||||
78
test/.venv/lib/python3.12/site-packages/paho/mqtt/matcher.py
Normal file
78
test/.venv/lib/python3.12/site-packages/paho/mqtt/matcher.py
Normal file
@@ -0,0 +1,78 @@
|
||||
class MQTTMatcher:
|
||||
"""Intended to manage topic filters including wildcards.
|
||||
|
||||
Internally, MQTTMatcher use a prefix tree (trie) to store
|
||||
values associated with filters, and has an iter_match()
|
||||
method to iterate efficiently over all filters that match
|
||||
some topic name."""
|
||||
|
||||
class Node:
|
||||
__slots__ = '_children', '_content'
|
||||
|
||||
def __init__(self):
|
||||
self._children = {}
|
||||
self._content = None
|
||||
|
||||
def __init__(self):
|
||||
self._root = self.Node()
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
"""Add a topic filter :key to the prefix tree
|
||||
and associate it to :value"""
|
||||
node = self._root
|
||||
for sym in key.split('/'):
|
||||
node = node._children.setdefault(sym, self.Node())
|
||||
node._content = value
|
||||
|
||||
def __getitem__(self, key):
|
||||
"""Retrieve the value associated with some topic filter :key"""
|
||||
try:
|
||||
node = self._root
|
||||
for sym in key.split('/'):
|
||||
node = node._children[sym]
|
||||
if node._content is None:
|
||||
raise KeyError(key)
|
||||
return node._content
|
||||
except KeyError as ke:
|
||||
raise KeyError(key) from ke
|
||||
|
||||
def __delitem__(self, key):
|
||||
"""Delete the value associated with some topic filter :key"""
|
||||
lst = []
|
||||
try:
|
||||
parent, node = None, self._root
|
||||
for k in key.split('/'):
|
||||
parent, node = node, node._children[k]
|
||||
lst.append((parent, k, node))
|
||||
# TODO
|
||||
node._content = None
|
||||
except KeyError as ke:
|
||||
raise KeyError(key) from ke
|
||||
else: # cleanup
|
||||
for parent, k, node in reversed(lst):
|
||||
if node._children or node._content is not None:
|
||||
break
|
||||
del parent._children[k]
|
||||
|
||||
def iter_match(self, topic):
|
||||
"""Return an iterator on all values associated with filters
|
||||
that match the :topic"""
|
||||
lst = topic.split('/')
|
||||
normal = not topic.startswith('$')
|
||||
def rec(node, i=0):
|
||||
if i == len(lst):
|
||||
if node._content is not None:
|
||||
yield node._content
|
||||
else:
|
||||
part = lst[i]
|
||||
if part in node._children:
|
||||
for content in rec(node._children[part], i + 1):
|
||||
yield content
|
||||
if '+' in node._children and (normal or i > 0):
|
||||
for content in rec(node._children['+'], i + 1):
|
||||
yield content
|
||||
if '#' in node._children and (normal or i > 0):
|
||||
content = node._children['#']._content
|
||||
if content is not None:
|
||||
yield content
|
||||
return rec(self._root)
|
||||
@@ -0,0 +1,43 @@
|
||||
"""
|
||||
*******************************************************************
|
||||
Copyright (c) 2017, 2019 IBM Corp.
|
||||
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are made available under the terms of the Eclipse Public License v2.0
|
||||
and Eclipse Distribution License v1.0 which accompany this distribution.
|
||||
|
||||
The Eclipse Public License is available at
|
||||
http://www.eclipse.org/legal/epl-v20.html
|
||||
and the Eclipse Distribution License is available at
|
||||
http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
|
||||
Contributors:
|
||||
Ian Craggs - initial implementation and/or documentation
|
||||
*******************************************************************
|
||||
"""
|
||||
|
||||
|
||||
class PacketTypes:
|
||||
|
||||
"""
|
||||
Packet types class. Includes the AUTH packet for MQTT v5.0.
|
||||
|
||||
Holds constants for each packet type such as PacketTypes.PUBLISH
|
||||
and packet name strings: PacketTypes.Names[PacketTypes.PUBLISH].
|
||||
|
||||
"""
|
||||
|
||||
indexes = range(1, 16)
|
||||
|
||||
# Packet types
|
||||
CONNECT, CONNACK, PUBLISH, PUBACK, PUBREC, PUBREL, \
|
||||
PUBCOMP, SUBSCRIBE, SUBACK, UNSUBSCRIBE, UNSUBACK, \
|
||||
PINGREQ, PINGRESP, DISCONNECT, AUTH = indexes
|
||||
|
||||
# Dummy packet type for properties use - will delay only applies to will
|
||||
WILLMESSAGE = 99
|
||||
|
||||
Names = ( "reserved", \
|
||||
"Connect", "Connack", "Publish", "Puback", "Pubrec", "Pubrel", \
|
||||
"Pubcomp", "Subscribe", "Suback", "Unsubscribe", "Unsuback", \
|
||||
"Pingreq", "Pingresp", "Disconnect", "Auth")
|
||||
421
test/.venv/lib/python3.12/site-packages/paho/mqtt/properties.py
Normal file
421
test/.venv/lib/python3.12/site-packages/paho/mqtt/properties.py
Normal file
@@ -0,0 +1,421 @@
|
||||
# *******************************************************************
|
||||
# Copyright (c) 2017, 2019 IBM Corp.
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License v2.0
|
||||
# and Eclipse Distribution License v1.0 which accompany this distribution.
|
||||
#
|
||||
# The Eclipse Public License is available at
|
||||
# http://www.eclipse.org/legal/epl-v20.html
|
||||
# and the Eclipse Distribution License is available at
|
||||
# http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
#
|
||||
# Contributors:
|
||||
# Ian Craggs - initial implementation and/or documentation
|
||||
# *******************************************************************
|
||||
|
||||
import struct
|
||||
|
||||
from .packettypes import PacketTypes
|
||||
|
||||
|
||||
class MQTTException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class MalformedPacket(MQTTException):
|
||||
pass
|
||||
|
||||
|
||||
def writeInt16(length):
|
||||
# serialize a 16 bit integer to network format
|
||||
return bytearray(struct.pack("!H", length))
|
||||
|
||||
|
||||
def readInt16(buf):
|
||||
# deserialize a 16 bit integer from network format
|
||||
return struct.unpack("!H", buf[:2])[0]
|
||||
|
||||
|
||||
def writeInt32(length):
|
||||
# serialize a 32 bit integer to network format
|
||||
return bytearray(struct.pack("!L", length))
|
||||
|
||||
|
||||
def readInt32(buf):
|
||||
# deserialize a 32 bit integer from network format
|
||||
return struct.unpack("!L", buf[:4])[0]
|
||||
|
||||
|
||||
def writeUTF(data):
|
||||
# data could be a string, or bytes. If string, encode into bytes with utf-8
|
||||
if not isinstance(data, bytes):
|
||||
data = bytes(data, "utf-8")
|
||||
return writeInt16(len(data)) + data
|
||||
|
||||
|
||||
def readUTF(buffer, maxlen):
|
||||
if maxlen >= 2:
|
||||
length = readInt16(buffer)
|
||||
else:
|
||||
raise MalformedPacket("Not enough data to read string length")
|
||||
maxlen -= 2
|
||||
if length > maxlen:
|
||||
raise MalformedPacket("Length delimited string too long")
|
||||
buf = buffer[2:2+length].decode("utf-8")
|
||||
# look for chars which are invalid for MQTT
|
||||
for c in buf: # look for D800-DFFF in the UTF string
|
||||
ord_c = ord(c)
|
||||
if ord_c >= 0xD800 and ord_c <= 0xDFFF:
|
||||
raise MalformedPacket("[MQTT-1.5.4-1] D800-DFFF found in UTF-8 data")
|
||||
if ord_c == 0x00: # look for null in the UTF string
|
||||
raise MalformedPacket("[MQTT-1.5.4-2] Null found in UTF-8 data")
|
||||
if ord_c == 0xFEFF:
|
||||
raise MalformedPacket("[MQTT-1.5.4-3] U+FEFF in UTF-8 data")
|
||||
return buf, length+2
|
||||
|
||||
|
||||
def writeBytes(buffer):
|
||||
return writeInt16(len(buffer)) + buffer
|
||||
|
||||
|
||||
def readBytes(buffer):
|
||||
length = readInt16(buffer)
|
||||
return buffer[2:2+length], length+2
|
||||
|
||||
|
||||
class VariableByteIntegers: # Variable Byte Integer
|
||||
"""
|
||||
MQTT variable byte integer helper class. Used
|
||||
in several places in MQTT v5.0 properties.
|
||||
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def encode(x):
|
||||
"""
|
||||
Convert an integer 0 <= x <= 268435455 into multi-byte format.
|
||||
Returns the buffer converted from the integer.
|
||||
"""
|
||||
if not 0 <= x <= 268435455:
|
||||
raise ValueError(f"Value {x!r} must be in range 0-268435455")
|
||||
buffer = b''
|
||||
while 1:
|
||||
digit = x % 128
|
||||
x //= 128
|
||||
if x > 0:
|
||||
digit |= 0x80
|
||||
buffer += bytes([digit])
|
||||
if x == 0:
|
||||
break
|
||||
return buffer
|
||||
|
||||
@staticmethod
|
||||
def decode(buffer):
|
||||
"""
|
||||
Get the value of a multi-byte integer from a buffer
|
||||
Return the value, and the number of bytes used.
|
||||
|
||||
[MQTT-1.5.5-1] the encoded value MUST use the minimum number of bytes necessary to represent the value
|
||||
"""
|
||||
multiplier = 1
|
||||
value = 0
|
||||
bytes = 0
|
||||
while 1:
|
||||
bytes += 1
|
||||
digit = buffer[0]
|
||||
buffer = buffer[1:]
|
||||
value += (digit & 127) * multiplier
|
||||
if digit & 128 == 0:
|
||||
break
|
||||
multiplier *= 128
|
||||
return (value, bytes)
|
||||
|
||||
|
||||
class Properties:
|
||||
"""MQTT v5.0 properties class.
|
||||
|
||||
See Properties.names for a list of accepted property names along with their numeric values.
|
||||
|
||||
See Properties.properties for the data type of each property.
|
||||
|
||||
Example of use::
|
||||
|
||||
publish_properties = Properties(PacketTypes.PUBLISH)
|
||||
publish_properties.UserProperty = ("a", "2")
|
||||
publish_properties.UserProperty = ("c", "3")
|
||||
|
||||
First the object is created with packet type as argument, no properties will be present at
|
||||
this point. Then properties are added as attributes, the name of which is the string property
|
||||
name without the spaces.
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, packetType):
|
||||
self.packetType = packetType
|
||||
self.types = ["Byte", "Two Byte Integer", "Four Byte Integer", "Variable Byte Integer",
|
||||
"Binary Data", "UTF-8 Encoded String", "UTF-8 String Pair"]
|
||||
|
||||
self.names = {
|
||||
"Payload Format Indicator": 1,
|
||||
"Message Expiry Interval": 2,
|
||||
"Content Type": 3,
|
||||
"Response Topic": 8,
|
||||
"Correlation Data": 9,
|
||||
"Subscription Identifier": 11,
|
||||
"Session Expiry Interval": 17,
|
||||
"Assigned Client Identifier": 18,
|
||||
"Server Keep Alive": 19,
|
||||
"Authentication Method": 21,
|
||||
"Authentication Data": 22,
|
||||
"Request Problem Information": 23,
|
||||
"Will Delay Interval": 24,
|
||||
"Request Response Information": 25,
|
||||
"Response Information": 26,
|
||||
"Server Reference": 28,
|
||||
"Reason String": 31,
|
||||
"Receive Maximum": 33,
|
||||
"Topic Alias Maximum": 34,
|
||||
"Topic Alias": 35,
|
||||
"Maximum QoS": 36,
|
||||
"Retain Available": 37,
|
||||
"User Property": 38,
|
||||
"Maximum Packet Size": 39,
|
||||
"Wildcard Subscription Available": 40,
|
||||
"Subscription Identifier Available": 41,
|
||||
"Shared Subscription Available": 42
|
||||
}
|
||||
|
||||
self.properties = {
|
||||
# id: type, packets
|
||||
# payload format indicator
|
||||
1: (self.types.index("Byte"), [PacketTypes.PUBLISH, PacketTypes.WILLMESSAGE]),
|
||||
2: (self.types.index("Four Byte Integer"), [PacketTypes.PUBLISH, PacketTypes.WILLMESSAGE]),
|
||||
3: (self.types.index("UTF-8 Encoded String"), [PacketTypes.PUBLISH, PacketTypes.WILLMESSAGE]),
|
||||
8: (self.types.index("UTF-8 Encoded String"), [PacketTypes.PUBLISH, PacketTypes.WILLMESSAGE]),
|
||||
9: (self.types.index("Binary Data"), [PacketTypes.PUBLISH, PacketTypes.WILLMESSAGE]),
|
||||
11: (self.types.index("Variable Byte Integer"),
|
||||
[PacketTypes.PUBLISH, PacketTypes.SUBSCRIBE]),
|
||||
17: (self.types.index("Four Byte Integer"),
|
||||
[PacketTypes.CONNECT, PacketTypes.CONNACK, PacketTypes.DISCONNECT]),
|
||||
18: (self.types.index("UTF-8 Encoded String"), [PacketTypes.CONNACK]),
|
||||
19: (self.types.index("Two Byte Integer"), [PacketTypes.CONNACK]),
|
||||
21: (self.types.index("UTF-8 Encoded String"),
|
||||
[PacketTypes.CONNECT, PacketTypes.CONNACK, PacketTypes.AUTH]),
|
||||
22: (self.types.index("Binary Data"),
|
||||
[PacketTypes.CONNECT, PacketTypes.CONNACK, PacketTypes.AUTH]),
|
||||
23: (self.types.index("Byte"),
|
||||
[PacketTypes.CONNECT]),
|
||||
24: (self.types.index("Four Byte Integer"), [PacketTypes.WILLMESSAGE]),
|
||||
25: (self.types.index("Byte"), [PacketTypes.CONNECT]),
|
||||
26: (self.types.index("UTF-8 Encoded String"), [PacketTypes.CONNACK]),
|
||||
28: (self.types.index("UTF-8 Encoded String"),
|
||||
[PacketTypes.CONNACK, PacketTypes.DISCONNECT]),
|
||||
31: (self.types.index("UTF-8 Encoded String"),
|
||||
[PacketTypes.CONNACK, PacketTypes.PUBACK, PacketTypes.PUBREC,
|
||||
PacketTypes.PUBREL, PacketTypes.PUBCOMP, PacketTypes.SUBACK,
|
||||
PacketTypes.UNSUBACK, PacketTypes.DISCONNECT, PacketTypes.AUTH]),
|
||||
33: (self.types.index("Two Byte Integer"),
|
||||
[PacketTypes.CONNECT, PacketTypes.CONNACK]),
|
||||
34: (self.types.index("Two Byte Integer"),
|
||||
[PacketTypes.CONNECT, PacketTypes.CONNACK]),
|
||||
35: (self.types.index("Two Byte Integer"), [PacketTypes.PUBLISH]),
|
||||
36: (self.types.index("Byte"), [PacketTypes.CONNACK]),
|
||||
37: (self.types.index("Byte"), [PacketTypes.CONNACK]),
|
||||
38: (self.types.index("UTF-8 String Pair"),
|
||||
[PacketTypes.CONNECT, PacketTypes.CONNACK,
|
||||
PacketTypes.PUBLISH, PacketTypes.PUBACK,
|
||||
PacketTypes.PUBREC, PacketTypes.PUBREL, PacketTypes.PUBCOMP,
|
||||
PacketTypes.SUBSCRIBE, PacketTypes.SUBACK,
|
||||
PacketTypes.UNSUBSCRIBE, PacketTypes.UNSUBACK,
|
||||
PacketTypes.DISCONNECT, PacketTypes.AUTH, PacketTypes.WILLMESSAGE]),
|
||||
39: (self.types.index("Four Byte Integer"),
|
||||
[PacketTypes.CONNECT, PacketTypes.CONNACK]),
|
||||
40: (self.types.index("Byte"), [PacketTypes.CONNACK]),
|
||||
41: (self.types.index("Byte"), [PacketTypes.CONNACK]),
|
||||
42: (self.types.index("Byte"), [PacketTypes.CONNACK]),
|
||||
}
|
||||
|
||||
def allowsMultiple(self, compressedName):
|
||||
return self.getIdentFromName(compressedName) in [11, 38]
|
||||
|
||||
def getIdentFromName(self, compressedName):
|
||||
# return the identifier corresponding to the property name
|
||||
result = -1
|
||||
for name in self.names.keys():
|
||||
if compressedName == name.replace(' ', ''):
|
||||
result = self.names[name]
|
||||
break
|
||||
return result
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
name = name.replace(' ', '')
|
||||
privateVars = ["packetType", "types", "names", "properties"]
|
||||
if name in privateVars:
|
||||
object.__setattr__(self, name, value)
|
||||
else:
|
||||
# the name could have spaces in, or not. Remove spaces before assignment
|
||||
if name not in [aname.replace(' ', '') for aname in self.names.keys()]:
|
||||
raise MQTTException(
|
||||
f"Property name must be one of {self.names.keys()}")
|
||||
# check that this attribute applies to the packet type
|
||||
if self.packetType not in self.properties[self.getIdentFromName(name)][1]:
|
||||
raise MQTTException(f"Property {name} does not apply to packet type {PacketTypes.Names[self.packetType]}")
|
||||
|
||||
# Check for forbidden values
|
||||
if not isinstance(value, list):
|
||||
if name in ["ReceiveMaximum", "TopicAlias"] \
|
||||
and (value < 1 or value > 65535):
|
||||
|
||||
raise MQTTException(f"{name} property value must be in the range 1-65535")
|
||||
elif name in ["TopicAliasMaximum"] \
|
||||
and (value < 0 or value > 65535):
|
||||
|
||||
raise MQTTException(f"{name} property value must be in the range 0-65535")
|
||||
elif name in ["MaximumPacketSize", "SubscriptionIdentifier"] \
|
||||
and (value < 1 or value > 268435455):
|
||||
|
||||
raise MQTTException(f"{name} property value must be in the range 1-268435455")
|
||||
elif name in ["RequestResponseInformation", "RequestProblemInformation", "PayloadFormatIndicator"] \
|
||||
and (value != 0 and value != 1):
|
||||
|
||||
raise MQTTException(
|
||||
f"{name} property value must be 0 or 1")
|
||||
|
||||
if self.allowsMultiple(name):
|
||||
if not isinstance(value, list):
|
||||
value = [value]
|
||||
if hasattr(self, name):
|
||||
value = object.__getattribute__(self, name) + value
|
||||
object.__setattr__(self, name, value)
|
||||
|
||||
def __str__(self):
|
||||
buffer = "["
|
||||
first = True
|
||||
for name in self.names.keys():
|
||||
compressedName = name.replace(' ', '')
|
||||
if hasattr(self, compressedName):
|
||||
if not first:
|
||||
buffer += ", "
|
||||
buffer += f"{compressedName} : {getattr(self, compressedName)}"
|
||||
first = False
|
||||
buffer += "]"
|
||||
return buffer
|
||||
|
||||
def json(self):
|
||||
data = {}
|
||||
for name in self.names.keys():
|
||||
compressedName = name.replace(' ', '')
|
||||
if hasattr(self, compressedName):
|
||||
val = getattr(self, compressedName)
|
||||
if compressedName == 'CorrelationData' and isinstance(val, bytes):
|
||||
data[compressedName] = val.hex()
|
||||
else:
|
||||
data[compressedName] = val
|
||||
return data
|
||||
|
||||
def isEmpty(self):
|
||||
rc = True
|
||||
for name in self.names.keys():
|
||||
compressedName = name.replace(' ', '')
|
||||
if hasattr(self, compressedName):
|
||||
rc = False
|
||||
break
|
||||
return rc
|
||||
|
||||
def clear(self):
|
||||
for name in self.names.keys():
|
||||
compressedName = name.replace(' ', '')
|
||||
if hasattr(self, compressedName):
|
||||
delattr(self, compressedName)
|
||||
|
||||
def writeProperty(self, identifier, type, value):
|
||||
buffer = b""
|
||||
buffer += VariableByteIntegers.encode(identifier) # identifier
|
||||
if type == self.types.index("Byte"): # value
|
||||
buffer += bytes([value])
|
||||
elif type == self.types.index("Two Byte Integer"):
|
||||
buffer += writeInt16(value)
|
||||
elif type == self.types.index("Four Byte Integer"):
|
||||
buffer += writeInt32(value)
|
||||
elif type == self.types.index("Variable Byte Integer"):
|
||||
buffer += VariableByteIntegers.encode(value)
|
||||
elif type == self.types.index("Binary Data"):
|
||||
buffer += writeBytes(value)
|
||||
elif type == self.types.index("UTF-8 Encoded String"):
|
||||
buffer += writeUTF(value)
|
||||
elif type == self.types.index("UTF-8 String Pair"):
|
||||
buffer += writeUTF(value[0]) + writeUTF(value[1])
|
||||
return buffer
|
||||
|
||||
def pack(self):
|
||||
# serialize properties into buffer for sending over network
|
||||
buffer = b""
|
||||
for name in self.names.keys():
|
||||
compressedName = name.replace(' ', '')
|
||||
if hasattr(self, compressedName):
|
||||
identifier = self.getIdentFromName(compressedName)
|
||||
attr_type = self.properties[identifier][0]
|
||||
if self.allowsMultiple(compressedName):
|
||||
for prop in getattr(self, compressedName):
|
||||
buffer += self.writeProperty(identifier,
|
||||
attr_type, prop)
|
||||
else:
|
||||
buffer += self.writeProperty(identifier, attr_type,
|
||||
getattr(self, compressedName))
|
||||
return VariableByteIntegers.encode(len(buffer)) + buffer
|
||||
|
||||
def readProperty(self, buffer, type, propslen):
|
||||
if type == self.types.index("Byte"):
|
||||
value = buffer[0]
|
||||
valuelen = 1
|
||||
elif type == self.types.index("Two Byte Integer"):
|
||||
value = readInt16(buffer)
|
||||
valuelen = 2
|
||||
elif type == self.types.index("Four Byte Integer"):
|
||||
value = readInt32(buffer)
|
||||
valuelen = 4
|
||||
elif type == self.types.index("Variable Byte Integer"):
|
||||
value, valuelen = VariableByteIntegers.decode(buffer)
|
||||
elif type == self.types.index("Binary Data"):
|
||||
value, valuelen = readBytes(buffer)
|
||||
elif type == self.types.index("UTF-8 Encoded String"):
|
||||
value, valuelen = readUTF(buffer, propslen)
|
||||
elif type == self.types.index("UTF-8 String Pair"):
|
||||
value, valuelen = readUTF(buffer, propslen)
|
||||
buffer = buffer[valuelen:] # strip the bytes used by the value
|
||||
value1, valuelen1 = readUTF(buffer, propslen - valuelen)
|
||||
value = (value, value1)
|
||||
valuelen += valuelen1
|
||||
return value, valuelen
|
||||
|
||||
def getNameFromIdent(self, identifier):
|
||||
rc = None
|
||||
for name in self.names:
|
||||
if self.names[name] == identifier:
|
||||
rc = name
|
||||
return rc
|
||||
|
||||
def unpack(self, buffer):
|
||||
self.clear()
|
||||
# deserialize properties into attributes from buffer received from network
|
||||
propslen, VBIlen = VariableByteIntegers.decode(buffer)
|
||||
buffer = buffer[VBIlen:] # strip the bytes used by the VBI
|
||||
propslenleft = propslen
|
||||
while propslenleft > 0: # properties length is 0 if there are none
|
||||
identifier, VBIlen2 = VariableByteIntegers.decode(
|
||||
buffer) # property identifier
|
||||
buffer = buffer[VBIlen2:] # strip the bytes used by the VBI
|
||||
propslenleft -= VBIlen2
|
||||
attr_type = self.properties[identifier][0]
|
||||
value, valuelen = self.readProperty(
|
||||
buffer, attr_type, propslenleft)
|
||||
buffer = buffer[valuelen:] # strip the bytes used by the value
|
||||
propslenleft -= valuelen
|
||||
propname = self.getNameFromIdent(identifier)
|
||||
compressedName = propname.replace(' ', '')
|
||||
if not self.allowsMultiple(compressedName) and hasattr(self, compressedName):
|
||||
raise MQTTException(
|
||||
f"Property '{property}' must not exist more than once")
|
||||
setattr(self, propname, value)
|
||||
return self, propslen + VBIlen
|
||||
306
test/.venv/lib/python3.12/site-packages/paho/mqtt/publish.py
Normal file
306
test/.venv/lib/python3.12/site-packages/paho/mqtt/publish.py
Normal file
@@ -0,0 +1,306 @@
|
||||
# Copyright (c) 2014 Roger Light <roger@atchoo.org>
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License v2.0
|
||||
# and Eclipse Distribution License v1.0 which accompany this distribution.
|
||||
#
|
||||
# The Eclipse Public License is available at
|
||||
# http://www.eclipse.org/legal/epl-v20.html
|
||||
# and the Eclipse Distribution License is available at
|
||||
# http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
#
|
||||
# Contributors:
|
||||
# Roger Light - initial API and implementation
|
||||
|
||||
"""
|
||||
This module provides some helper functions to allow straightforward publishing
|
||||
of messages in a one-shot manner. In other words, they are useful for the
|
||||
situation where you have a single/multiple messages you want to publish to a
|
||||
broker, then disconnect and nothing else is required.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import collections
|
||||
from collections.abc import Iterable
|
||||
from typing import TYPE_CHECKING, Any, List, Tuple, Union
|
||||
|
||||
from paho.mqtt.enums import CallbackAPIVersion, MQTTProtocolVersion
|
||||
from paho.mqtt.properties import Properties
|
||||
from paho.mqtt.reasoncodes import ReasonCode
|
||||
|
||||
from .. import mqtt
|
||||
from . import client as paho
|
||||
|
||||
if TYPE_CHECKING:
|
||||
try:
|
||||
from typing import NotRequired, Required, TypedDict # type: ignore
|
||||
except ImportError:
|
||||
from typing_extensions import NotRequired, Required, TypedDict
|
||||
|
||||
try:
|
||||
from typing import Literal
|
||||
except ImportError:
|
||||
from typing_extensions import Literal # type: ignore
|
||||
|
||||
|
||||
|
||||
class AuthParameter(TypedDict, total=False):
|
||||
username: Required[str]
|
||||
password: NotRequired[str]
|
||||
|
||||
|
||||
class TLSParameter(TypedDict, total=False):
|
||||
ca_certs: Required[str]
|
||||
certfile: NotRequired[str]
|
||||
keyfile: NotRequired[str]
|
||||
tls_version: NotRequired[int]
|
||||
ciphers: NotRequired[str]
|
||||
insecure: NotRequired[bool]
|
||||
|
||||
|
||||
class MessageDict(TypedDict, total=False):
|
||||
topic: Required[str]
|
||||
payload: NotRequired[paho.PayloadType]
|
||||
qos: NotRequired[int]
|
||||
retain: NotRequired[bool]
|
||||
|
||||
MessageTuple = Tuple[str, paho.PayloadType, int, bool]
|
||||
|
||||
MessagesList = List[Union[MessageDict, MessageTuple]]
|
||||
|
||||
|
||||
def _do_publish(client: paho.Client):
|
||||
"""Internal function"""
|
||||
|
||||
message = client._userdata.popleft()
|
||||
|
||||
if isinstance(message, dict):
|
||||
client.publish(**message)
|
||||
elif isinstance(message, (tuple, list)):
|
||||
client.publish(*message)
|
||||
else:
|
||||
raise TypeError('message must be a dict, tuple, or list')
|
||||
|
||||
|
||||
def _on_connect(client: paho.Client, userdata: MessagesList, flags, reason_code, properties):
|
||||
"""Internal v5 callback"""
|
||||
if reason_code == 0:
|
||||
if len(userdata) > 0:
|
||||
_do_publish(client)
|
||||
else:
|
||||
raise mqtt.MQTTException(paho.connack_string(reason_code))
|
||||
|
||||
|
||||
def _on_publish(
|
||||
client: paho.Client, userdata: collections.deque[MessagesList], mid: int, reason_codes: ReasonCode, properties: Properties,
|
||||
) -> None:
|
||||
"""Internal callback"""
|
||||
#pylint: disable=unused-argument
|
||||
|
||||
if len(userdata) == 0:
|
||||
client.disconnect()
|
||||
else:
|
||||
_do_publish(client)
|
||||
|
||||
|
||||
def multiple(
|
||||
msgs: MessagesList,
|
||||
hostname: str = "localhost",
|
||||
port: int = 1883,
|
||||
client_id: str = "",
|
||||
keepalive: int = 60,
|
||||
will: MessageDict | None = None,
|
||||
auth: AuthParameter | None = None,
|
||||
tls: TLSParameter | None = None,
|
||||
protocol: MQTTProtocolVersion = paho.MQTTv311,
|
||||
transport: Literal["tcp", "websockets"] = "tcp",
|
||||
proxy_args: Any | None = None,
|
||||
) -> None:
|
||||
"""Publish multiple messages to a broker, then disconnect cleanly.
|
||||
|
||||
This function creates an MQTT client, connects to a broker and publishes a
|
||||
list of messages. Once the messages have been delivered, it disconnects
|
||||
cleanly from the broker.
|
||||
|
||||
:param msgs: a list of messages to publish. Each message is either a dict or a
|
||||
tuple.
|
||||
|
||||
If a dict, only the topic must be present. Default values will be
|
||||
used for any missing arguments. The dict must be of the form:
|
||||
|
||||
msg = {'topic':"<topic>", 'payload':"<payload>", 'qos':<qos>,
|
||||
'retain':<retain>}
|
||||
topic must be present and may not be empty.
|
||||
If payload is "", None or not present then a zero length payload
|
||||
will be published.
|
||||
If qos is not present, the default of 0 is used.
|
||||
If retain is not present, the default of False is used.
|
||||
|
||||
If a tuple, then it must be of the form:
|
||||
("<topic>", "<payload>", qos, retain)
|
||||
|
||||
:param str hostname: the address of the broker to connect to.
|
||||
Defaults to localhost.
|
||||
|
||||
:param int port: the port to connect to the broker on. Defaults to 1883.
|
||||
|
||||
:param str client_id: the MQTT client id to use. If "" or None, the Paho library will
|
||||
generate a client id automatically.
|
||||
|
||||
:param int keepalive: the keepalive timeout value for the client. Defaults to 60
|
||||
seconds.
|
||||
|
||||
:param will: a dict containing will parameters for the client: will = {'topic':
|
||||
"<topic>", 'payload':"<payload">, 'qos':<qos>, 'retain':<retain>}.
|
||||
Topic is required, all other parameters are optional and will
|
||||
default to None, 0 and False respectively.
|
||||
Defaults to None, which indicates no will should be used.
|
||||
|
||||
:param auth: a dict containing authentication parameters for the client:
|
||||
auth = {'username':"<username>", 'password':"<password>"}
|
||||
Username is required, password is optional and will default to None
|
||||
if not provided.
|
||||
Defaults to None, which indicates no authentication is to be used.
|
||||
|
||||
:param tls: a dict containing TLS configuration parameters for the client:
|
||||
dict = {'ca_certs':"<ca_certs>", 'certfile':"<certfile>",
|
||||
'keyfile':"<keyfile>", 'tls_version':"<tls_version>",
|
||||
'ciphers':"<ciphers">, 'insecure':"<bool>"}
|
||||
ca_certs is required, all other parameters are optional and will
|
||||
default to None if not provided, which results in the client using
|
||||
the default behaviour - see the paho.mqtt.client documentation.
|
||||
Alternatively, tls input can be an SSLContext object, which will be
|
||||
processed using the tls_set_context method.
|
||||
Defaults to None, which indicates that TLS should not be used.
|
||||
|
||||
:param str transport: set to "tcp" to use the default setting of transport which is
|
||||
raw TCP. Set to "websockets" to use WebSockets as the transport.
|
||||
|
||||
:param proxy_args: a dictionary that will be given to the client.
|
||||
"""
|
||||
|
||||
if not isinstance(msgs, Iterable):
|
||||
raise TypeError('msgs must be an iterable')
|
||||
if len(msgs) == 0:
|
||||
raise ValueError('msgs is empty')
|
||||
|
||||
client = paho.Client(
|
||||
CallbackAPIVersion.VERSION2,
|
||||
client_id=client_id,
|
||||
userdata=collections.deque(msgs),
|
||||
protocol=protocol,
|
||||
transport=transport,
|
||||
)
|
||||
|
||||
client.enable_logger()
|
||||
client.on_publish = _on_publish
|
||||
client.on_connect = _on_connect # type: ignore
|
||||
|
||||
if proxy_args is not None:
|
||||
client.proxy_set(**proxy_args)
|
||||
|
||||
if auth:
|
||||
username = auth.get('username')
|
||||
if username:
|
||||
password = auth.get('password')
|
||||
client.username_pw_set(username, password)
|
||||
else:
|
||||
raise KeyError("The 'username' key was not found, this is "
|
||||
"required for auth")
|
||||
|
||||
if will is not None:
|
||||
client.will_set(**will)
|
||||
|
||||
if tls is not None:
|
||||
if isinstance(tls, dict):
|
||||
insecure = tls.pop('insecure', False)
|
||||
# mypy don't get that tls no longer contains the key insecure
|
||||
client.tls_set(**tls) # type: ignore[misc]
|
||||
if insecure:
|
||||
# Must be set *after* the `client.tls_set()` call since it sets
|
||||
# up the SSL context that `client.tls_insecure_set` alters.
|
||||
client.tls_insecure_set(insecure)
|
||||
else:
|
||||
# Assume input is SSLContext object
|
||||
client.tls_set_context(tls)
|
||||
|
||||
client.connect(hostname, port, keepalive)
|
||||
client.loop_forever()
|
||||
|
||||
|
||||
def single(
|
||||
topic: str,
|
||||
payload: paho.PayloadType = None,
|
||||
qos: int = 0,
|
||||
retain: bool = False,
|
||||
hostname: str = "localhost",
|
||||
port: int = 1883,
|
||||
client_id: str = "",
|
||||
keepalive: int = 60,
|
||||
will: MessageDict | None = None,
|
||||
auth: AuthParameter | None = None,
|
||||
tls: TLSParameter | None = None,
|
||||
protocol: MQTTProtocolVersion = paho.MQTTv311,
|
||||
transport: Literal["tcp", "websockets"] = "tcp",
|
||||
proxy_args: Any | None = None,
|
||||
) -> None:
|
||||
"""Publish a single message to a broker, then disconnect cleanly.
|
||||
|
||||
This function creates an MQTT client, connects to a broker and publishes a
|
||||
single message. Once the message has been delivered, it disconnects cleanly
|
||||
from the broker.
|
||||
|
||||
:param str topic: the only required argument must be the topic string to which the
|
||||
payload will be published.
|
||||
|
||||
:param payload: the payload to be published. If "" or None, a zero length payload
|
||||
will be published.
|
||||
|
||||
:param int qos: the qos to use when publishing, default to 0.
|
||||
|
||||
:param bool retain: set the message to be retained (True) or not (False).
|
||||
|
||||
:param str hostname: the address of the broker to connect to.
|
||||
Defaults to localhost.
|
||||
|
||||
:param int port: the port to connect to the broker on. Defaults to 1883.
|
||||
|
||||
:param str client_id: the MQTT client id to use. If "" or None, the Paho library will
|
||||
generate a client id automatically.
|
||||
|
||||
:param int keepalive: the keepalive timeout value for the client. Defaults to 60
|
||||
seconds.
|
||||
|
||||
:param will: a dict containing will parameters for the client: will = {'topic':
|
||||
"<topic>", 'payload':"<payload">, 'qos':<qos>, 'retain':<retain>}.
|
||||
Topic is required, all other parameters are optional and will
|
||||
default to None, 0 and False respectively.
|
||||
Defaults to None, which indicates no will should be used.
|
||||
|
||||
:param auth: a dict containing authentication parameters for the client:
|
||||
Username is required, password is optional and will default to None
|
||||
auth = {'username':"<username>", 'password':"<password>"}
|
||||
if not provided.
|
||||
Defaults to None, which indicates no authentication is to be used.
|
||||
|
||||
:param tls: a dict containing TLS configuration parameters for the client:
|
||||
dict = {'ca_certs':"<ca_certs>", 'certfile':"<certfile>",
|
||||
'keyfile':"<keyfile>", 'tls_version':"<tls_version>",
|
||||
'ciphers':"<ciphers">, 'insecure':"<bool>"}
|
||||
ca_certs is required, all other parameters are optional and will
|
||||
default to None if not provided, which results in the client using
|
||||
the default behaviour - see the paho.mqtt.client documentation.
|
||||
Defaults to None, which indicates that TLS should not be used.
|
||||
Alternatively, tls input can be an SSLContext object, which will be
|
||||
processed using the tls_set_context method.
|
||||
|
||||
:param transport: set to "tcp" to use the default setting of transport which is
|
||||
raw TCP. Set to "websockets" to use WebSockets as the transport.
|
||||
|
||||
:param proxy_args: a dictionary that will be given to the client.
|
||||
"""
|
||||
|
||||
msg: MessageDict = {'topic':topic, 'payload':payload, 'qos':qos, 'retain':retain}
|
||||
|
||||
multiple([msg], hostname, port, client_id, keepalive, will, auth, tls,
|
||||
protocol, transport, proxy_args)
|
||||
223
test/.venv/lib/python3.12/site-packages/paho/mqtt/reasoncodes.py
Normal file
223
test/.venv/lib/python3.12/site-packages/paho/mqtt/reasoncodes.py
Normal file
@@ -0,0 +1,223 @@
|
||||
# *******************************************************************
|
||||
# Copyright (c) 2017, 2019 IBM Corp.
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License v2.0
|
||||
# and Eclipse Distribution License v1.0 which accompany this distribution.
|
||||
#
|
||||
# The Eclipse Public License is available at
|
||||
# http://www.eclipse.org/legal/epl-v20.html
|
||||
# and the Eclipse Distribution License is available at
|
||||
# http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
#
|
||||
# Contributors:
|
||||
# Ian Craggs - initial implementation and/or documentation
|
||||
# *******************************************************************
|
||||
|
||||
import functools
|
||||
import warnings
|
||||
from typing import Any
|
||||
|
||||
from .packettypes import PacketTypes
|
||||
|
||||
|
||||
@functools.total_ordering
|
||||
class ReasonCode:
|
||||
"""MQTT version 5.0 reason codes class.
|
||||
|
||||
See ReasonCode.names for a list of possible numeric values along with their
|
||||
names and the packets to which they apply.
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, packetType: int, aName: str ="Success", identifier: int =-1):
|
||||
"""
|
||||
packetType: the type of the packet, such as PacketTypes.CONNECT that
|
||||
this reason code will be used with. Some reason codes have different
|
||||
names for the same identifier when used a different packet type.
|
||||
|
||||
aName: the String name of the reason code to be created. Ignored
|
||||
if the identifier is set.
|
||||
|
||||
identifier: an integer value of the reason code to be created.
|
||||
|
||||
"""
|
||||
|
||||
self.packetType = packetType
|
||||
self.names = {
|
||||
0: {"Success": [PacketTypes.CONNACK, PacketTypes.PUBACK,
|
||||
PacketTypes.PUBREC, PacketTypes.PUBREL, PacketTypes.PUBCOMP,
|
||||
PacketTypes.UNSUBACK, PacketTypes.AUTH],
|
||||
"Normal disconnection": [PacketTypes.DISCONNECT],
|
||||
"Granted QoS 0": [PacketTypes.SUBACK]},
|
||||
1: {"Granted QoS 1": [PacketTypes.SUBACK]},
|
||||
2: {"Granted QoS 2": [PacketTypes.SUBACK]},
|
||||
4: {"Disconnect with will message": [PacketTypes.DISCONNECT]},
|
||||
16: {"No matching subscribers":
|
||||
[PacketTypes.PUBACK, PacketTypes.PUBREC]},
|
||||
17: {"No subscription found": [PacketTypes.UNSUBACK]},
|
||||
24: {"Continue authentication": [PacketTypes.AUTH]},
|
||||
25: {"Re-authenticate": [PacketTypes.AUTH]},
|
||||
128: {"Unspecified error": [PacketTypes.CONNACK, PacketTypes.PUBACK,
|
||||
PacketTypes.PUBREC, PacketTypes.SUBACK, PacketTypes.UNSUBACK,
|
||||
PacketTypes.DISCONNECT], },
|
||||
129: {"Malformed packet":
|
||||
[PacketTypes.CONNACK, PacketTypes.DISCONNECT]},
|
||||
130: {"Protocol error":
|
||||
[PacketTypes.CONNACK, PacketTypes.DISCONNECT]},
|
||||
131: {"Implementation specific error": [PacketTypes.CONNACK,
|
||||
PacketTypes.PUBACK, PacketTypes.PUBREC, PacketTypes.SUBACK,
|
||||
PacketTypes.UNSUBACK, PacketTypes.DISCONNECT], },
|
||||
132: {"Unsupported protocol version": [PacketTypes.CONNACK]},
|
||||
133: {"Client identifier not valid": [PacketTypes.CONNACK]},
|
||||
134: {"Bad user name or password": [PacketTypes.CONNACK]},
|
||||
135: {"Not authorized": [PacketTypes.CONNACK, PacketTypes.PUBACK,
|
||||
PacketTypes.PUBREC, PacketTypes.SUBACK, PacketTypes.UNSUBACK,
|
||||
PacketTypes.DISCONNECT], },
|
||||
136: {"Server unavailable": [PacketTypes.CONNACK]},
|
||||
137: {"Server busy": [PacketTypes.CONNACK, PacketTypes.DISCONNECT]},
|
||||
138: {"Banned": [PacketTypes.CONNACK]},
|
||||
139: {"Server shutting down": [PacketTypes.DISCONNECT]},
|
||||
140: {"Bad authentication method":
|
||||
[PacketTypes.CONNACK, PacketTypes.DISCONNECT]},
|
||||
141: {"Keep alive timeout": [PacketTypes.DISCONNECT]},
|
||||
142: {"Session taken over": [PacketTypes.DISCONNECT]},
|
||||
143: {"Topic filter invalid":
|
||||
[PacketTypes.SUBACK, PacketTypes.UNSUBACK, PacketTypes.DISCONNECT]},
|
||||
144: {"Topic name invalid":
|
||||
[PacketTypes.CONNACK, PacketTypes.PUBACK,
|
||||
PacketTypes.PUBREC, PacketTypes.DISCONNECT]},
|
||||
145: {"Packet identifier in use":
|
||||
[PacketTypes.PUBACK, PacketTypes.PUBREC,
|
||||
PacketTypes.SUBACK, PacketTypes.UNSUBACK]},
|
||||
146: {"Packet identifier not found":
|
||||
[PacketTypes.PUBREL, PacketTypes.PUBCOMP]},
|
||||
147: {"Receive maximum exceeded": [PacketTypes.DISCONNECT]},
|
||||
148: {"Topic alias invalid": [PacketTypes.DISCONNECT]},
|
||||
149: {"Packet too large": [PacketTypes.CONNACK, PacketTypes.DISCONNECT]},
|
||||
150: {"Message rate too high": [PacketTypes.DISCONNECT]},
|
||||
151: {"Quota exceeded": [PacketTypes.CONNACK, PacketTypes.PUBACK,
|
||||
PacketTypes.PUBREC, PacketTypes.SUBACK, PacketTypes.DISCONNECT], },
|
||||
152: {"Administrative action": [PacketTypes.DISCONNECT]},
|
||||
153: {"Payload format invalid":
|
||||
[PacketTypes.PUBACK, PacketTypes.PUBREC, PacketTypes.DISCONNECT]},
|
||||
154: {"Retain not supported":
|
||||
[PacketTypes.CONNACK, PacketTypes.DISCONNECT]},
|
||||
155: {"QoS not supported":
|
||||
[PacketTypes.CONNACK, PacketTypes.DISCONNECT]},
|
||||
156: {"Use another server":
|
||||
[PacketTypes.CONNACK, PacketTypes.DISCONNECT]},
|
||||
157: {"Server moved":
|
||||
[PacketTypes.CONNACK, PacketTypes.DISCONNECT]},
|
||||
158: {"Shared subscription not supported":
|
||||
[PacketTypes.SUBACK, PacketTypes.DISCONNECT]},
|
||||
159: {"Connection rate exceeded":
|
||||
[PacketTypes.CONNACK, PacketTypes.DISCONNECT]},
|
||||
160: {"Maximum connect time":
|
||||
[PacketTypes.DISCONNECT]},
|
||||
161: {"Subscription identifiers not supported":
|
||||
[PacketTypes.SUBACK, PacketTypes.DISCONNECT]},
|
||||
162: {"Wildcard subscription not supported":
|
||||
[PacketTypes.SUBACK, PacketTypes.DISCONNECT]},
|
||||
}
|
||||
if identifier == -1:
|
||||
if packetType == PacketTypes.DISCONNECT and aName == "Success":
|
||||
aName = "Normal disconnection"
|
||||
self.set(aName)
|
||||
else:
|
||||
self.value = identifier
|
||||
self.getName() # check it's good
|
||||
|
||||
def __getName__(self, packetType, identifier):
|
||||
"""
|
||||
Get the reason code string name for a specific identifier.
|
||||
The name can vary by packet type for the same identifier, which
|
||||
is why the packet type is also required.
|
||||
|
||||
Used when displaying the reason code.
|
||||
"""
|
||||
if identifier not in self.names:
|
||||
raise KeyError(identifier)
|
||||
names = self.names[identifier]
|
||||
namelist = [name for name in names.keys() if packetType in names[name]]
|
||||
if len(namelist) != 1:
|
||||
raise ValueError(f"Expected exactly one name, found {namelist!r}")
|
||||
return namelist[0]
|
||||
|
||||
def getId(self, name):
|
||||
"""
|
||||
Get the numeric id corresponding to a reason code name.
|
||||
|
||||
Used when setting the reason code for a packetType
|
||||
check that only valid codes for the packet are set.
|
||||
"""
|
||||
for code in self.names.keys():
|
||||
if name in self.names[code].keys():
|
||||
if self.packetType in self.names[code][name]:
|
||||
return code
|
||||
raise KeyError(f"Reason code name not found: {name}")
|
||||
|
||||
def set(self, name):
|
||||
self.value = self.getId(name)
|
||||
|
||||
def unpack(self, buffer):
|
||||
c = buffer[0]
|
||||
name = self.__getName__(self.packetType, c)
|
||||
self.value = self.getId(name)
|
||||
return 1
|
||||
|
||||
def getName(self):
|
||||
"""Returns the reason code name corresponding to the numeric value which is set.
|
||||
"""
|
||||
return self.__getName__(self.packetType, self.value)
|
||||
|
||||
def __eq__(self, other):
|
||||
if isinstance(other, int):
|
||||
return self.value == other
|
||||
if isinstance(other, str):
|
||||
return other == str(self)
|
||||
if isinstance(other, ReasonCode):
|
||||
return self.value == other.value
|
||||
return False
|
||||
|
||||
def __lt__(self, other):
|
||||
if isinstance(other, int):
|
||||
return self.value < other
|
||||
if isinstance(other, ReasonCode):
|
||||
return self.value < other.value
|
||||
return NotImplemented
|
||||
|
||||
def __repr__(self):
|
||||
try:
|
||||
packet_name = PacketTypes.Names[self.packetType]
|
||||
except IndexError:
|
||||
packet_name = "Unknown"
|
||||
|
||||
return f"ReasonCode({packet_name}, {self.getName()!r})"
|
||||
|
||||
def __str__(self):
|
||||
return self.getName()
|
||||
|
||||
def json(self):
|
||||
return self.getName()
|
||||
|
||||
def pack(self):
|
||||
return bytearray([self.value])
|
||||
|
||||
@property
|
||||
def is_failure(self) -> bool:
|
||||
return self.value >= 0x80
|
||||
|
||||
|
||||
class _CompatibilityIsInstance(type):
|
||||
def __instancecheck__(self, other: Any) -> bool:
|
||||
return isinstance(other, ReasonCode)
|
||||
|
||||
|
||||
class ReasonCodes(ReasonCode, metaclass=_CompatibilityIsInstance):
|
||||
def __init__(self, *args, **kwargs):
|
||||
warnings.warn("ReasonCodes is deprecated, use ReasonCode (singular) instead",
|
||||
category=DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
super().__init__(*args, **kwargs)
|
||||
281
test/.venv/lib/python3.12/site-packages/paho/mqtt/subscribe.py
Normal file
281
test/.venv/lib/python3.12/site-packages/paho/mqtt/subscribe.py
Normal file
@@ -0,0 +1,281 @@
|
||||
# Copyright (c) 2016 Roger Light <roger@atchoo.org>
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License v2.0
|
||||
# and Eclipse Distribution License v1.0 which accompany this distribution.
|
||||
#
|
||||
# The Eclipse Public License is available at
|
||||
# http://www.eclipse.org/legal/epl-v20.html
|
||||
# and the Eclipse Distribution License is available at
|
||||
# http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
#
|
||||
# Contributors:
|
||||
# Roger Light - initial API and implementation
|
||||
|
||||
"""
|
||||
This module provides some helper functions to allow straightforward subscribing
|
||||
to topics and retrieving messages. The two functions are simple(), which
|
||||
returns one or messages matching a set of topics, and callback() which allows
|
||||
you to pass a callback for processing of messages.
|
||||
"""
|
||||
|
||||
from .. import mqtt
|
||||
from . import client as paho
|
||||
|
||||
|
||||
def _on_connect(client, userdata, flags, reason_code, properties):
|
||||
"""Internal callback"""
|
||||
if reason_code != 0:
|
||||
raise mqtt.MQTTException(paho.connack_string(reason_code))
|
||||
|
||||
if isinstance(userdata['topics'], list):
|
||||
for topic in userdata['topics']:
|
||||
client.subscribe(topic, userdata['qos'])
|
||||
else:
|
||||
client.subscribe(userdata['topics'], userdata['qos'])
|
||||
|
||||
|
||||
def _on_message_callback(client, userdata, message):
|
||||
"""Internal callback"""
|
||||
userdata['callback'](client, userdata['userdata'], message)
|
||||
|
||||
|
||||
def _on_message_simple(client, userdata, message):
|
||||
"""Internal callback"""
|
||||
|
||||
if userdata['msg_count'] == 0:
|
||||
return
|
||||
|
||||
# Don't process stale retained messages if 'retained' was false
|
||||
if message.retain and not userdata['retained']:
|
||||
return
|
||||
|
||||
userdata['msg_count'] = userdata['msg_count'] - 1
|
||||
|
||||
if userdata['messages'] is None and userdata['msg_count'] == 0:
|
||||
userdata['messages'] = message
|
||||
client.disconnect()
|
||||
return
|
||||
|
||||
userdata['messages'].append(message)
|
||||
if userdata['msg_count'] == 0:
|
||||
client.disconnect()
|
||||
|
||||
|
||||
def callback(callback, topics, qos=0, userdata=None, hostname="localhost",
|
||||
port=1883, client_id="", keepalive=60, will=None, auth=None,
|
||||
tls=None, protocol=paho.MQTTv311, transport="tcp",
|
||||
clean_session=True, proxy_args=None):
|
||||
"""Subscribe to a list of topics and process them in a callback function.
|
||||
|
||||
This function creates an MQTT client, connects to a broker and subscribes
|
||||
to a list of topics. Incoming messages are processed by the user provided
|
||||
callback. This is a blocking function and will never return.
|
||||
|
||||
:param callback: function with the same signature as `on_message` for
|
||||
processing the messages received.
|
||||
|
||||
:param topics: either a string containing a single topic to subscribe to, or a
|
||||
list of topics to subscribe to.
|
||||
|
||||
:param int qos: the qos to use when subscribing. This is applied to all topics.
|
||||
|
||||
:param userdata: passed to the callback
|
||||
|
||||
:param str hostname: the address of the broker to connect to.
|
||||
Defaults to localhost.
|
||||
|
||||
:param int port: the port to connect to the broker on. Defaults to 1883.
|
||||
|
||||
:param str client_id: the MQTT client id to use. If "" or None, the Paho library will
|
||||
generate a client id automatically.
|
||||
|
||||
:param int keepalive: the keepalive timeout value for the client. Defaults to 60
|
||||
seconds.
|
||||
|
||||
:param will: a dict containing will parameters for the client: will = {'topic':
|
||||
"<topic>", 'payload':"<payload">, 'qos':<qos>, 'retain':<retain>}.
|
||||
Topic is required, all other parameters are optional and will
|
||||
default to None, 0 and False respectively.
|
||||
|
||||
Defaults to None, which indicates no will should be used.
|
||||
|
||||
:param auth: a dict containing authentication parameters for the client:
|
||||
auth = {'username':"<username>", 'password':"<password>"}
|
||||
Username is required, password is optional and will default to None
|
||||
if not provided.
|
||||
Defaults to None, which indicates no authentication is to be used.
|
||||
|
||||
:param tls: a dict containing TLS configuration parameters for the client:
|
||||
dict = {'ca_certs':"<ca_certs>", 'certfile':"<certfile>",
|
||||
'keyfile':"<keyfile>", 'tls_version':"<tls_version>",
|
||||
'ciphers':"<ciphers">, 'insecure':"<bool>"}
|
||||
ca_certs is required, all other parameters are optional and will
|
||||
default to None if not provided, which results in the client using
|
||||
the default behaviour - see the paho.mqtt.client documentation.
|
||||
Alternatively, tls input can be an SSLContext object, which will be
|
||||
processed using the tls_set_context method.
|
||||
Defaults to None, which indicates that TLS should not be used.
|
||||
|
||||
:param str transport: set to "tcp" to use the default setting of transport which is
|
||||
raw TCP. Set to "websockets" to use WebSockets as the transport.
|
||||
|
||||
:param clean_session: a boolean that determines the client type. If True,
|
||||
the broker will remove all information about this client
|
||||
when it disconnects. If False, the client is a persistent
|
||||
client and subscription information and queued messages
|
||||
will be retained when the client disconnects.
|
||||
Defaults to True.
|
||||
|
||||
:param proxy_args: a dictionary that will be given to the client.
|
||||
"""
|
||||
|
||||
if qos < 0 or qos > 2:
|
||||
raise ValueError('qos must be in the range 0-2')
|
||||
|
||||
callback_userdata = {
|
||||
'callback':callback,
|
||||
'topics':topics,
|
||||
'qos':qos,
|
||||
'userdata':userdata}
|
||||
|
||||
client = paho.Client(
|
||||
paho.CallbackAPIVersion.VERSION2,
|
||||
client_id=client_id,
|
||||
userdata=callback_userdata,
|
||||
protocol=protocol,
|
||||
transport=transport,
|
||||
clean_session=clean_session,
|
||||
)
|
||||
client.enable_logger()
|
||||
|
||||
client.on_message = _on_message_callback
|
||||
client.on_connect = _on_connect
|
||||
|
||||
if proxy_args is not None:
|
||||
client.proxy_set(**proxy_args)
|
||||
|
||||
if auth:
|
||||
username = auth.get('username')
|
||||
if username:
|
||||
password = auth.get('password')
|
||||
client.username_pw_set(username, password)
|
||||
else:
|
||||
raise KeyError("The 'username' key was not found, this is "
|
||||
"required for auth")
|
||||
|
||||
if will is not None:
|
||||
client.will_set(**will)
|
||||
|
||||
if tls is not None:
|
||||
if isinstance(tls, dict):
|
||||
insecure = tls.pop('insecure', False)
|
||||
client.tls_set(**tls)
|
||||
if insecure:
|
||||
# Must be set *after* the `client.tls_set()` call since it sets
|
||||
# up the SSL context that `client.tls_insecure_set` alters.
|
||||
client.tls_insecure_set(insecure)
|
||||
else:
|
||||
# Assume input is SSLContext object
|
||||
client.tls_set_context(tls)
|
||||
|
||||
client.connect(hostname, port, keepalive)
|
||||
client.loop_forever()
|
||||
|
||||
|
||||
def simple(topics, qos=0, msg_count=1, retained=True, hostname="localhost",
|
||||
port=1883, client_id="", keepalive=60, will=None, auth=None,
|
||||
tls=None, protocol=paho.MQTTv311, transport="tcp",
|
||||
clean_session=True, proxy_args=None):
|
||||
"""Subscribe to a list of topics and return msg_count messages.
|
||||
|
||||
This function creates an MQTT client, connects to a broker and subscribes
|
||||
to a list of topics. Once "msg_count" messages have been received, it
|
||||
disconnects cleanly from the broker and returns the messages.
|
||||
|
||||
:param topics: either a string containing a single topic to subscribe to, or a
|
||||
list of topics to subscribe to.
|
||||
|
||||
:param int qos: the qos to use when subscribing. This is applied to all topics.
|
||||
|
||||
:param int msg_count: the number of messages to retrieve from the broker.
|
||||
if msg_count == 1 then a single MQTTMessage will be returned.
|
||||
if msg_count > 1 then a list of MQTTMessages will be returned.
|
||||
|
||||
:param bool retained: If set to True, retained messages will be processed the same as
|
||||
non-retained messages. If set to False, retained messages will
|
||||
be ignored. This means that with retained=False and msg_count=1,
|
||||
the function will return the first message received that does
|
||||
not have the retained flag set.
|
||||
|
||||
:param str hostname: the address of the broker to connect to.
|
||||
Defaults to localhost.
|
||||
|
||||
:param int port: the port to connect to the broker on. Defaults to 1883.
|
||||
|
||||
:param str client_id: the MQTT client id to use. If "" or None, the Paho library will
|
||||
generate a client id automatically.
|
||||
|
||||
:param int keepalive: the keepalive timeout value for the client. Defaults to 60
|
||||
seconds.
|
||||
|
||||
:param will: a dict containing will parameters for the client: will = {'topic':
|
||||
"<topic>", 'payload':"<payload">, 'qos':<qos>, 'retain':<retain>}.
|
||||
Topic is required, all other parameters are optional and will
|
||||
default to None, 0 and False respectively.
|
||||
Defaults to None, which indicates no will should be used.
|
||||
|
||||
:param auth: a dict containing authentication parameters for the client:
|
||||
auth = {'username':"<username>", 'password':"<password>"}
|
||||
Username is required, password is optional and will default to None
|
||||
if not provided.
|
||||
Defaults to None, which indicates no authentication is to be used.
|
||||
|
||||
:param tls: a dict containing TLS configuration parameters for the client:
|
||||
dict = {'ca_certs':"<ca_certs>", 'certfile':"<certfile>",
|
||||
'keyfile':"<keyfile>", 'tls_version':"<tls_version>",
|
||||
'ciphers':"<ciphers">, 'insecure':"<bool>"}
|
||||
ca_certs is required, all other parameters are optional and will
|
||||
default to None if not provided, which results in the client using
|
||||
the default behaviour - see the paho.mqtt.client documentation.
|
||||
Alternatively, tls input can be an SSLContext object, which will be
|
||||
processed using the tls_set_context method.
|
||||
Defaults to None, which indicates that TLS should not be used.
|
||||
|
||||
:param protocol: the MQTT protocol version to use. Defaults to MQTTv311.
|
||||
|
||||
:param transport: set to "tcp" to use the default setting of transport which is
|
||||
raw TCP. Set to "websockets" to use WebSockets as the transport.
|
||||
|
||||
:param clean_session: a boolean that determines the client type. If True,
|
||||
the broker will remove all information about this client
|
||||
when it disconnects. If False, the client is a persistent
|
||||
client and subscription information and queued messages
|
||||
will be retained when the client disconnects.
|
||||
Defaults to True. If protocol is MQTTv50, clean_session
|
||||
is ignored.
|
||||
|
||||
:param proxy_args: a dictionary that will be given to the client.
|
||||
"""
|
||||
|
||||
if msg_count < 1:
|
||||
raise ValueError('msg_count must be > 0')
|
||||
|
||||
# Set ourselves up to return a single message if msg_count == 1, or a list
|
||||
# if > 1.
|
||||
if msg_count == 1:
|
||||
messages = None
|
||||
else:
|
||||
messages = []
|
||||
|
||||
# Ignore clean_session if protocol is MQTTv50, otherwise Client will raise
|
||||
if protocol == paho.MQTTv5:
|
||||
clean_session = None
|
||||
|
||||
userdata = {'retained':retained, 'msg_count':msg_count, 'messages':messages}
|
||||
|
||||
callback(_on_message_simple, topics, qos, userdata, hostname, port,
|
||||
client_id, keepalive, will, auth, tls, protocol, transport,
|
||||
clean_session, proxy_args)
|
||||
|
||||
return userdata['messages']
|
||||
@@ -0,0 +1,113 @@
|
||||
"""
|
||||
*******************************************************************
|
||||
Copyright (c) 2017, 2019 IBM Corp.
|
||||
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are made available under the terms of the Eclipse Public License v2.0
|
||||
and Eclipse Distribution License v1.0 which accompany this distribution.
|
||||
|
||||
The Eclipse Public License is available at
|
||||
http://www.eclipse.org/legal/epl-v20.html
|
||||
and the Eclipse Distribution License is available at
|
||||
http://www.eclipse.org/org/documents/edl-v10.php.
|
||||
|
||||
Contributors:
|
||||
Ian Craggs - initial implementation and/or documentation
|
||||
*******************************************************************
|
||||
"""
|
||||
|
||||
|
||||
|
||||
class MQTTException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class SubscribeOptions:
|
||||
"""The MQTT v5.0 subscribe options class.
|
||||
|
||||
The options are:
|
||||
qos: As in MQTT v3.1.1.
|
||||
noLocal: True or False. If set to True, the subscriber will not receive its own publications.
|
||||
retainAsPublished: True or False. If set to True, the retain flag on received publications will be as set
|
||||
by the publisher.
|
||||
retainHandling: RETAIN_SEND_ON_SUBSCRIBE, RETAIN_SEND_IF_NEW_SUB or RETAIN_DO_NOT_SEND
|
||||
Controls when the broker should send retained messages:
|
||||
- RETAIN_SEND_ON_SUBSCRIBE: on any successful subscribe request
|
||||
- RETAIN_SEND_IF_NEW_SUB: only if the subscribe request is new
|
||||
- RETAIN_DO_NOT_SEND: never send retained messages
|
||||
"""
|
||||
|
||||
# retain handling options
|
||||
RETAIN_SEND_ON_SUBSCRIBE, RETAIN_SEND_IF_NEW_SUB, RETAIN_DO_NOT_SEND = range(
|
||||
0, 3)
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
qos: int = 0,
|
||||
noLocal: bool = False,
|
||||
retainAsPublished: bool = False,
|
||||
retainHandling: int = RETAIN_SEND_ON_SUBSCRIBE,
|
||||
):
|
||||
"""
|
||||
qos: 0, 1 or 2. 0 is the default.
|
||||
noLocal: True or False. False is the default and corresponds to MQTT v3.1.1 behavior.
|
||||
retainAsPublished: True or False. False is the default and corresponds to MQTT v3.1.1 behavior.
|
||||
retainHandling: RETAIN_SEND_ON_SUBSCRIBE, RETAIN_SEND_IF_NEW_SUB or RETAIN_DO_NOT_SEND
|
||||
RETAIN_SEND_ON_SUBSCRIBE is the default and corresponds to MQTT v3.1.1 behavior.
|
||||
"""
|
||||
object.__setattr__(self, "names",
|
||||
["QoS", "noLocal", "retainAsPublished", "retainHandling"])
|
||||
self.QoS = qos # bits 0,1
|
||||
self.noLocal = noLocal # bit 2
|
||||
self.retainAsPublished = retainAsPublished # bit 3
|
||||
self.retainHandling = retainHandling # bits 4 and 5: 0, 1 or 2
|
||||
if self.retainHandling not in (0, 1, 2):
|
||||
raise AssertionError(f"Retain handling should be 0, 1 or 2, not {self.retainHandling}")
|
||||
if self.QoS not in (0, 1, 2):
|
||||
raise AssertionError(f"QoS should be 0, 1 or 2, not {self.QoS}")
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
if name not in self.names:
|
||||
raise MQTTException(
|
||||
f"{name} Attribute name must be one of {self.names}")
|
||||
object.__setattr__(self, name, value)
|
||||
|
||||
def pack(self):
|
||||
if self.retainHandling not in (0, 1, 2):
|
||||
raise AssertionError(f"Retain handling should be 0, 1 or 2, not {self.retainHandling}")
|
||||
if self.QoS not in (0, 1, 2):
|
||||
raise AssertionError(f"QoS should be 0, 1 or 2, not {self.QoS}")
|
||||
noLocal = 1 if self.noLocal else 0
|
||||
retainAsPublished = 1 if self.retainAsPublished else 0
|
||||
data = [(self.retainHandling << 4) | (retainAsPublished << 3) |
|
||||
(noLocal << 2) | self.QoS]
|
||||
return bytes(data)
|
||||
|
||||
def unpack(self, buffer):
|
||||
b0 = buffer[0]
|
||||
self.retainHandling = ((b0 >> 4) & 0x03)
|
||||
self.retainAsPublished = True if ((b0 >> 3) & 0x01) == 1 else False
|
||||
self.noLocal = True if ((b0 >> 2) & 0x01) == 1 else False
|
||||
self.QoS = (b0 & 0x03)
|
||||
if self.retainHandling not in (0, 1, 2):
|
||||
raise AssertionError(f"Retain handling should be 0, 1 or 2, not {self.retainHandling}")
|
||||
if self.QoS not in (0, 1, 2):
|
||||
raise AssertionError(f"QoS should be 0, 1 or 2, not {self.QoS}")
|
||||
return 1
|
||||
|
||||
def __repr__(self):
|
||||
return str(self)
|
||||
|
||||
def __str__(self):
|
||||
return "{QoS="+str(self.QoS)+", noLocal="+str(self.noLocal) +\
|
||||
", retainAsPublished="+str(self.retainAsPublished) +\
|
||||
", retainHandling="+str(self.retainHandling)+"}"
|
||||
|
||||
def json(self):
|
||||
data = {
|
||||
"QoS": self.QoS,
|
||||
"noLocal": self.noLocal,
|
||||
"retainAsPublished": self.retainAsPublished,
|
||||
"retainHandling": self.retainHandling,
|
||||
}
|
||||
return data
|
||||
@@ -0,0 +1 @@
|
||||
pip
|
||||
@@ -0,0 +1,635 @@
|
||||
Metadata-Version: 2.3
|
||||
Name: paho-mqtt
|
||||
Version: 2.1.0
|
||||
Summary: MQTT version 5.0/3.1.1 client class
|
||||
Project-URL: Homepage, http://eclipse.org/paho
|
||||
Author-email: Roger Light <roger@atchoo.org>
|
||||
License: EPL-2.0 OR BSD-3-Clause
|
||||
License-File: LICENSE.txt
|
||||
Keywords: paho
|
||||
Classifier: Development Status :: 4 - Beta
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved
|
||||
Classifier: Natural Language :: English
|
||||
Classifier: Operating System :: MacOS :: MacOS X
|
||||
Classifier: Operating System :: Microsoft :: Windows
|
||||
Classifier: Operating System :: POSIX
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.7
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Topic :: Communications
|
||||
Classifier: Topic :: Internet
|
||||
Requires-Python: >=3.7
|
||||
Provides-Extra: proxy
|
||||
Requires-Dist: pysocks; extra == 'proxy'
|
||||
Description-Content-Type: text/x-rst
|
||||
|
||||
Eclipse Paho™ MQTT Python Client
|
||||
================================
|
||||
|
||||
The `full documentation is available here <documentation_>`_.
|
||||
|
||||
**Warning breaking change** - Release 2.0 contains a breaking change; see the `release notes <https://github.com/eclipse/paho.mqtt.python/releases/tag/v2.0.0>`_ and `migration details <https://eclipse.dev/paho/files/paho.mqtt.python/html/migrations.html>`_.
|
||||
|
||||
This document describes the source code for the `Eclipse Paho <http://eclipse.org/paho/>`_ MQTT Python client library, which implements versions 5.0, 3.1.1, and 3.1 of the MQTT protocol.
|
||||
|
||||
This code provides a client class which enables applications to connect to an `MQTT <http://mqtt.org/>`_ broker to publish messages, and to subscribe to topics and receive published messages. It also provides some helper functions to make publishing one off messages to an MQTT server very straightforward.
|
||||
|
||||
It supports Python 3.7+.
|
||||
|
||||
The MQTT protocol is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. Designed as an extremely lightweight publish/subscribe messaging transport, it is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium.
|
||||
|
||||
Paho is an `Eclipse Foundation <https://www.eclipse.org/org/foundation/>`_ project.
|
||||
|
||||
Contents
|
||||
--------
|
||||
|
||||
* Installation_
|
||||
* `Known limitations`_
|
||||
* `Usage and API`_
|
||||
* `Getting Started`_
|
||||
* `Client`_
|
||||
* `Network loop`_
|
||||
* `Callbacks`_
|
||||
* `Logger`_
|
||||
* `External event loop support`_
|
||||
* `Global helper functions`_
|
||||
* `Publish`_
|
||||
* `Single`_
|
||||
* `Multiple`_
|
||||
* `Subscribe`_
|
||||
* `Simple`_
|
||||
* `Using Callback`_
|
||||
* `Reporting bugs`_
|
||||
* `More information`_
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
The latest stable version is available in the Python Package Index (PyPi) and can be installed using
|
||||
|
||||
::
|
||||
|
||||
pip install paho-mqtt
|
||||
|
||||
Or with ``virtualenv``:
|
||||
|
||||
::
|
||||
|
||||
virtualenv paho-mqtt
|
||||
source paho-mqtt/bin/activate
|
||||
pip install paho-mqtt
|
||||
|
||||
To obtain the full code, including examples and tests, you can clone the git repository:
|
||||
|
||||
::
|
||||
|
||||
git clone https://github.com/eclipse/paho.mqtt.python
|
||||
|
||||
|
||||
Once you have the code, it can be installed from your repository as well:
|
||||
|
||||
::
|
||||
|
||||
cd paho.mqtt.python
|
||||
pip install -e .
|
||||
|
||||
To perform all tests (including MQTT v5 tests), you also need to clone paho.mqtt.testing in paho.mqtt.python folder::
|
||||
|
||||
git clone https://github.com/eclipse/paho.mqtt.testing.git
|
||||
cd paho.mqtt.testing
|
||||
git checkout a4dc694010217b291ee78ee13a6d1db812f9babd
|
||||
|
||||
Known limitations
|
||||
-----------------
|
||||
|
||||
The following are the known unimplemented MQTT features.
|
||||
|
||||
When ``clean_session`` is False, the session is only stored in memory and not persisted. This means that
|
||||
when the client is restarted (not just reconnected, the object is recreated usually because the
|
||||
program was restarted) the session is lost. This results in a possible message loss.
|
||||
|
||||
The following part of the client session is lost:
|
||||
|
||||
* QoS 2 messages which have been received from the server, but have not been completely acknowledged.
|
||||
|
||||
Since the client will blindly acknowledge any PUBCOMP (last message of a QoS 2 transaction), it
|
||||
won't hang but will lose this QoS 2 message.
|
||||
|
||||
* QoS 1 and QoS 2 messages which have been sent to the server, but have not been completely acknowledged.
|
||||
|
||||
This means that messages passed to ``publish()`` may be lost. This could be mitigated by taking care
|
||||
that all messages passed to ``publish()`` have a corresponding ``on_publish()`` call or use `wait_for_publish`.
|
||||
|
||||
It also means that the broker may have the QoS2 message in the session. Since the client starts
|
||||
with an empty session it don't know it and will reuse the mid. This is not yet fixed.
|
||||
|
||||
Also, when ``clean_session`` is True, this library will republish QoS > 0 message across network
|
||||
reconnection. This means that QoS > 0 message won't be lost. But the standard says that
|
||||
we should discard any message for which the publish packet was sent. Our choice means that
|
||||
we are not compliant with the standard and it's possible for QoS 2 to be received twice.
|
||||
|
||||
You should set ``clean_session = False`` if you need the QoS 2 guarantee of only one delivery.
|
||||
|
||||
Usage and API
|
||||
-------------
|
||||
|
||||
Detailed API documentation `is available online <documentation_>`_ or could be built from ``docs/`` and samples are available in the `examples`_ directory.
|
||||
|
||||
The package provides two modules, a full `Client` and few `helpers` for simple publishing or subscribing.
|
||||
|
||||
Getting Started
|
||||
***************
|
||||
|
||||
Here is a very simple example that subscribes to the broker $SYS topic tree and prints out the resulting messages:
|
||||
|
||||
.. code:: python
|
||||
|
||||
import paho.mqtt.client as mqtt
|
||||
|
||||
# The callback for when the client receives a CONNACK response from the server.
|
||||
def on_connect(client, userdata, flags, reason_code, properties):
|
||||
print(f"Connected with result code {reason_code}")
|
||||
# Subscribing in on_connect() means that if we lose the connection and
|
||||
# reconnect then subscriptions will be renewed.
|
||||
client.subscribe("$SYS/#")
|
||||
|
||||
# The callback for when a PUBLISH message is received from the server.
|
||||
def on_message(client, userdata, msg):
|
||||
print(msg.topic+" "+str(msg.payload))
|
||||
|
||||
mqttc = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)
|
||||
mqttc.on_connect = on_connect
|
||||
mqttc.on_message = on_message
|
||||
|
||||
mqttc.connect("mqtt.eclipseprojects.io", 1883, 60)
|
||||
|
||||
# Blocking call that processes network traffic, dispatches callbacks and
|
||||
# handles reconnecting.
|
||||
# Other loop*() functions are available that give a threaded interface and a
|
||||
# manual interface.
|
||||
mqttc.loop_forever()
|
||||
|
||||
Client
|
||||
******
|
||||
|
||||
You can use the client class as an instance, within a class or by subclassing. The general usage flow is as follows:
|
||||
|
||||
* Create a client instance
|
||||
* Connect to a broker using one of the ``connect*()`` functions
|
||||
* Call one of the ``loop*()`` functions to maintain network traffic flow with the broker
|
||||
* Use ``subscribe()`` to subscribe to a topic and receive messages
|
||||
* Use ``publish()`` to publish messages to the broker
|
||||
* Use ``disconnect()`` to disconnect from the broker
|
||||
|
||||
Callbacks will be called to allow the application to process events as necessary. These callbacks are described below.
|
||||
|
||||
Network loop
|
||||
````````````
|
||||
|
||||
These functions are the driving force behind the client. If they are not
|
||||
called, incoming network data will not be processed and outgoing network data
|
||||
will not be sent. There are four options for managing the
|
||||
network loop. Three are described here, the fourth in "External event loop
|
||||
support" below. Do not mix the different loop functions.
|
||||
|
||||
loop_start() / loop_stop()
|
||||
''''''''''''''''''''''''''
|
||||
|
||||
.. code:: python
|
||||
|
||||
mqttc.loop_start()
|
||||
|
||||
while True:
|
||||
temperature = sensor.blocking_read()
|
||||
mqttc.publish("paho/temperature", temperature)
|
||||
|
||||
mqttc.loop_stop()
|
||||
|
||||
These functions implement a threaded interface to the network loop. Calling
|
||||
`loop_start()` once, before or after ``connect*()``, runs a thread in the
|
||||
background to call `loop()` automatically. This frees up the main thread for
|
||||
other work that may be blocking. This call also handles reconnecting to the
|
||||
broker. Call `loop_stop()` to stop the background thread.
|
||||
The loop is also stopped if you call `disconnect()`.
|
||||
|
||||
loop_forever()
|
||||
''''''''''''''
|
||||
|
||||
.. code:: python
|
||||
|
||||
mqttc.loop_forever(retry_first_connection=False)
|
||||
|
||||
This is a blocking form of the network loop and will not return until the
|
||||
client calls `disconnect()`. It automatically handles reconnecting.
|
||||
|
||||
Except for the first connection attempt when using `connect_async`, use
|
||||
``retry_first_connection=True`` to make it retry the first connection.
|
||||
|
||||
*Warning*: This might lead to situations where the client keeps connecting to an
|
||||
non existing host without failing.
|
||||
|
||||
loop()
|
||||
''''''
|
||||
|
||||
.. code:: python
|
||||
|
||||
run = True
|
||||
while run:
|
||||
rc = mqttc.loop(timeout=1.0)
|
||||
if rc != 0:
|
||||
# need to handle error, possible reconnecting or stopping the application
|
||||
|
||||
Call regularly to process network events. This call waits in ``select()`` until
|
||||
the network socket is available for reading or writing, if appropriate, then
|
||||
handles the incoming/outgoing data. This function blocks for up to ``timeout``
|
||||
seconds. ``timeout`` must not exceed the ``keepalive`` value for the client or
|
||||
your client will be regularly disconnected by the broker.
|
||||
|
||||
Using this kind of loop, require you to handle reconnection strategie.
|
||||
|
||||
|
||||
Callbacks
|
||||
`````````
|
||||
|
||||
The interface to interact with paho-mqtt include various callback that are called by
|
||||
the library when some events occur.
|
||||
|
||||
The callbacks are functions defined in your code, to implement the require action on those events. This could
|
||||
be simply printing received message or much more complex behaviour.
|
||||
|
||||
Callbacks API is versioned, and the selected version is the `CallbackAPIVersion` you provided to `Client`
|
||||
constructor. Currently two version are supported:
|
||||
|
||||
* ``CallbackAPIVersion.VERSION1``: it's the historical version used in paho-mqtt before version 2.0.
|
||||
It's the API used before the introduction of `CallbackAPIVersion`.
|
||||
This version is deprecated and will be removed in paho-mqtt version 3.0.
|
||||
* ``CallbackAPIVersion.VERSION2``: This version is more consistent between protocol MQTT 3.x and MQTT 5.x. It's also
|
||||
much more usable with MQTT 5.x since reason code and properties are always provided when available.
|
||||
It's recommended for all user to upgrade to this version. It's highly recommended for MQTT 5.x user.
|
||||
|
||||
The following callbacks exists:
|
||||
|
||||
* `on_connect()`: called when the CONNACK from the broker is received. The call could be for a refused connection,
|
||||
check the reason_code to see if the connection is successful or rejected.
|
||||
* `on_connect_fail()`: called by `loop_forever()` and `loop_start()` when the TCP connection failed to establish.
|
||||
This callback is not called when using `connect()` or `reconnect()` directly. It's only called following
|
||||
an automatic (re)connection made by `loop_start()` and `loop_forever()`
|
||||
* `on_disconnect()`: called when the connection is closed.
|
||||
* `on_message()`: called when a MQTT message is received from the broker.
|
||||
* `on_publish()`: called when an MQTT message was sent to the broker. Depending on QoS level the callback is called
|
||||
at different moment:
|
||||
|
||||
* For QoS == 0, it's called as soon as the message is sent over the network. This could be before the corresponding ``publish()`` return.
|
||||
* For QoS == 1, it's called when the corresponding PUBACK is received from the broker
|
||||
* For QoS == 2, it's called when the corresponding PUBCOMP is received from the broker
|
||||
* `on_subscribe()`: called when the SUBACK is received from the broker
|
||||
* `on_unsubscribe()`: called when the UNSUBACK is received from the broker
|
||||
* `on_log()`: called when the library log a message
|
||||
* `on_socket_open`, `on_socket_close`, `on_socket_register_write`, `on_socket_unregister_write`: callbacks used for external loop support. See below for details.
|
||||
|
||||
For the signature of each callback, see the `online documentation <documentation_>`_.
|
||||
|
||||
Subscriber example
|
||||
''''''''''''''''''
|
||||
|
||||
.. code:: python
|
||||
|
||||
import paho.mqtt.client as mqtt
|
||||
|
||||
def on_subscribe(client, userdata, mid, reason_code_list, properties):
|
||||
# Since we subscribed only for a single channel, reason_code_list contains
|
||||
# a single entry
|
||||
if reason_code_list[0].is_failure:
|
||||
print(f"Broker rejected you subscription: {reason_code_list[0]}")
|
||||
else:
|
||||
print(f"Broker granted the following QoS: {reason_code_list[0].value}")
|
||||
|
||||
def on_unsubscribe(client, userdata, mid, reason_code_list, properties):
|
||||
# Be careful, the reason_code_list is only present in MQTTv5.
|
||||
# In MQTTv3 it will always be empty
|
||||
if len(reason_code_list) == 0 or not reason_code_list[0].is_failure:
|
||||
print("unsubscribe succeeded (if SUBACK is received in MQTTv3 it success)")
|
||||
else:
|
||||
print(f"Broker replied with failure: {reason_code_list[0]}")
|
||||
client.disconnect()
|
||||
|
||||
def on_message(client, userdata, message):
|
||||
# userdata is the structure we choose to provide, here it's a list()
|
||||
userdata.append(message.payload)
|
||||
# We only want to process 10 messages
|
||||
if len(userdata) >= 10:
|
||||
client.unsubscribe("$SYS/#")
|
||||
|
||||
def on_connect(client, userdata, flags, reason_code, properties):
|
||||
if reason_code.is_failure:
|
||||
print(f"Failed to connect: {reason_code}. loop_forever() will retry connection")
|
||||
else:
|
||||
# we should always subscribe from on_connect callback to be sure
|
||||
# our subscribed is persisted across reconnections.
|
||||
client.subscribe("$SYS/#")
|
||||
|
||||
mqttc = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)
|
||||
mqttc.on_connect = on_connect
|
||||
mqttc.on_message = on_message
|
||||
mqttc.on_subscribe = on_subscribe
|
||||
mqttc.on_unsubscribe = on_unsubscribe
|
||||
|
||||
mqttc.user_data_set([])
|
||||
mqttc.connect("mqtt.eclipseprojects.io")
|
||||
mqttc.loop_forever()
|
||||
print(f"Received the following message: {mqttc.user_data_get()}")
|
||||
|
||||
publisher example
|
||||
'''''''''''''''''
|
||||
|
||||
.. code:: python
|
||||
|
||||
import time
|
||||
import paho.mqtt.client as mqtt
|
||||
|
||||
def on_publish(client, userdata, mid, reason_code, properties):
|
||||
# reason_code and properties will only be present in MQTTv5. It's always unset in MQTTv3
|
||||
try:
|
||||
userdata.remove(mid)
|
||||
except KeyError:
|
||||
print("on_publish() is called with a mid not present in unacked_publish")
|
||||
print("This is due to an unavoidable race-condition:")
|
||||
print("* publish() return the mid of the message sent.")
|
||||
print("* mid from publish() is added to unacked_publish by the main thread")
|
||||
print("* on_publish() is called by the loop_start thread")
|
||||
print("While unlikely (because on_publish() will be called after a network round-trip),")
|
||||
print(" this is a race-condition that COULD happen")
|
||||
print("")
|
||||
print("The best solution to avoid race-condition is using the msg_info from publish()")
|
||||
print("We could also try using a list of acknowledged mid rather than removing from pending list,")
|
||||
print("but remember that mid could be re-used !")
|
||||
|
||||
unacked_publish = set()
|
||||
mqttc = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)
|
||||
mqttc.on_publish = on_publish
|
||||
|
||||
mqttc.user_data_set(unacked_publish)
|
||||
mqttc.connect("mqtt.eclipseprojects.io")
|
||||
mqttc.loop_start()
|
||||
|
||||
# Our application produce some messages
|
||||
msg_info = mqttc.publish("paho/test/topic", "my message", qos=1)
|
||||
unacked_publish.add(msg_info.mid)
|
||||
|
||||
msg_info2 = mqttc.publish("paho/test/topic", "my message2", qos=1)
|
||||
unacked_publish.add(msg_info2.mid)
|
||||
|
||||
# Wait for all message to be published
|
||||
while len(unacked_publish):
|
||||
time.sleep(0.1)
|
||||
|
||||
# Due to race-condition described above, the following way to wait for all publish is safer
|
||||
msg_info.wait_for_publish()
|
||||
msg_info2.wait_for_publish()
|
||||
|
||||
mqttc.disconnect()
|
||||
mqttc.loop_stop()
|
||||
|
||||
|
||||
Logger
|
||||
``````
|
||||
|
||||
The Client emit some log message that could be useful during troubleshooting. The easiest way to
|
||||
enable logs is the call `enable_logger()`. It's possible to provide a custom logger or let the
|
||||
default logger being used.
|
||||
|
||||
Example:
|
||||
|
||||
.. code:: python
|
||||
|
||||
import logging
|
||||
import paho.mqtt.client as mqtt
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
mqttc = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)
|
||||
mqttc.enable_logger()
|
||||
|
||||
mqttc.connect("mqtt.eclipseprojects.io", 1883, 60)
|
||||
mqttc.loop_start()
|
||||
|
||||
# Do additional action needed, publish, subscribe, ...
|
||||
[...]
|
||||
|
||||
It's also possible to define a on_log callback that will receive a copy of all log messages. Example:
|
||||
|
||||
.. code:: python
|
||||
|
||||
import paho.mqtt.client as mqtt
|
||||
|
||||
def on_log(client, userdata, paho_log_level, messages):
|
||||
if paho_log_level == mqtt.LogLevel.MQTT_LOG_ERR:
|
||||
print(message)
|
||||
|
||||
mqttc = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)
|
||||
mqttc.on_log = on_log
|
||||
|
||||
mqttc.connect("mqtt.eclipseprojects.io", 1883, 60)
|
||||
mqttc.loop_start()
|
||||
|
||||
# Do additional action needed, publish, subscribe, ...
|
||||
[...]
|
||||
|
||||
|
||||
The correspondence with Paho logging levels and standard ones is the following:
|
||||
|
||||
==================== ===============
|
||||
Paho logging
|
||||
==================== ===============
|
||||
``MQTT_LOG_ERR`` ``logging.ERROR``
|
||||
``MQTT_LOG_WARNING`` ``logging.WARNING``
|
||||
``MQTT_LOG_NOTICE`` ``logging.INFO`` *(no direct equivalent)*
|
||||
``MQTT_LOG_INFO`` ``logging.INFO``
|
||||
``MQTT_LOG_DEBUG`` ``logging.DEBUG``
|
||||
==================== ===============
|
||||
|
||||
|
||||
External event loop support
|
||||
```````````````````````````
|
||||
|
||||
To support other network loop like asyncio (see examples_), the library expose some
|
||||
method and callback to support those use-case.
|
||||
|
||||
The following loop method exists:
|
||||
|
||||
* `loop_read`: should be called when the socket is ready for reading.
|
||||
* `loop_write`: should be called when the socket is ready for writing AND the library want to write data.
|
||||
* `loop_misc`: should be called every few seconds to handle message retrying and pings.
|
||||
|
||||
In pseudo code, it give the following:
|
||||
|
||||
.. code:: python
|
||||
|
||||
while run:
|
||||
if need_read:
|
||||
mqttc.loop_read()
|
||||
if need_write:
|
||||
mqttc.loop_write()
|
||||
mqttc.loop_misc()
|
||||
|
||||
if not need_read and not need_write:
|
||||
# But don't wait more than few seconds, loop_misc() need to be called regularly
|
||||
wait_for_change_in_need_read_or_write()
|
||||
updated_need_read_and_write()
|
||||
|
||||
The tricky part is implementing the update of need_read / need_write and wait for condition change. To support
|
||||
this, the following method exists:
|
||||
|
||||
* `socket()`: which return the socket object when the TCP connection is open.
|
||||
This call is particularly useful for select_ based loops. See ``examples/loop_select.py``.
|
||||
* `want_write()`: return true if there is data waiting to be written. This is close to the
|
||||
``need_writew`` of above pseudo-code, but you should also check whether the socket is ready for writing.
|
||||
* callbacks ``on_socket_*``:
|
||||
|
||||
* `on_socket_open`: called when the socket is opened.
|
||||
* `on_socket_close`: called when the socket is about to be closed.
|
||||
* `on_socket_register_write`: called when there is data the client want to write on the socket
|
||||
* `on_socket_unregister_write`: called when there is no more data to write on the socket.
|
||||
|
||||
Callbacks are particularly useful for event loops where you register or unregister a socket
|
||||
for reading+writing. See ``examples/loop_asyncio.py`` for an example.
|
||||
|
||||
.. _select: https://docs.python.org/3/library/select.html#select.select
|
||||
|
||||
The callbacks are always called in this order:
|
||||
|
||||
- `on_socket_open`
|
||||
- Zero or more times:
|
||||
|
||||
- `on_socket_register_write`
|
||||
- `on_socket_unregister_write`
|
||||
|
||||
- `on_socket_close`
|
||||
|
||||
Global helper functions
|
||||
```````````````````````
|
||||
|
||||
The client module also offers some global helper functions.
|
||||
|
||||
``topic_matches_sub(sub, topic)`` can be used to check whether a ``topic``
|
||||
matches a ``subscription``.
|
||||
|
||||
For example:
|
||||
|
||||
the topic ``foo/bar`` would match the subscription ``foo/#`` or ``+/bar``
|
||||
|
||||
the topic ``non/matching`` would not match the subscription ``non/+/+``
|
||||
|
||||
|
||||
Publish
|
||||
*******
|
||||
|
||||
This module provides some helper functions to allow straightforward publishing
|
||||
of messages in a one-shot manner. In other words, they are useful for the
|
||||
situation where you have a single/multiple messages you want to publish to a
|
||||
broker, then disconnect with nothing else required.
|
||||
|
||||
The two functions provided are `single()` and `multiple()`.
|
||||
|
||||
Both functions include support for MQTT v5.0, but do not currently let you
|
||||
set any properties on connection or when sending messages.
|
||||
|
||||
Single
|
||||
``````
|
||||
|
||||
Publish a single message to a broker, then disconnect cleanly.
|
||||
|
||||
Example:
|
||||
|
||||
.. code:: python
|
||||
|
||||
import paho.mqtt.publish as publish
|
||||
|
||||
publish.single("paho/test/topic", "payload", hostname="mqtt.eclipseprojects.io")
|
||||
|
||||
Multiple
|
||||
````````
|
||||
|
||||
Publish multiple messages to a broker, then disconnect cleanly.
|
||||
|
||||
Example:
|
||||
|
||||
.. code:: python
|
||||
|
||||
from paho.mqtt.enums import MQTTProtocolVersion
|
||||
import paho.mqtt.publish as publish
|
||||
|
||||
msgs = [{'topic':"paho/test/topic", 'payload':"multiple 1"},
|
||||
("paho/test/topic", "multiple 2", 0, False)]
|
||||
publish.multiple(msgs, hostname="mqtt.eclipseprojects.io", protocol=MQTTProtocolVersion.MQTTv5)
|
||||
|
||||
|
||||
Subscribe
|
||||
*********
|
||||
|
||||
This module provides some helper functions to allow straightforward subscribing
|
||||
and processing of messages.
|
||||
|
||||
The two functions provided are `simple()` and `callback()`.
|
||||
|
||||
Both functions include support for MQTT v5.0, but do not currently let you
|
||||
set any properties on connection or when subscribing.
|
||||
|
||||
Simple
|
||||
``````
|
||||
|
||||
Subscribe to a set of topics and return the messages received. This is a
|
||||
blocking function.
|
||||
|
||||
Example:
|
||||
|
||||
.. code:: python
|
||||
|
||||
import paho.mqtt.subscribe as subscribe
|
||||
|
||||
msg = subscribe.simple("paho/test/topic", hostname="mqtt.eclipseprojects.io")
|
||||
print("%s %s" % (msg.topic, msg.payload))
|
||||
|
||||
Using Callback
|
||||
``````````````
|
||||
|
||||
Subscribe to a set of topics and process the messages received using a user
|
||||
provided callback.
|
||||
|
||||
Example:
|
||||
|
||||
.. code:: python
|
||||
|
||||
import paho.mqtt.subscribe as subscribe
|
||||
|
||||
def on_message_print(client, userdata, message):
|
||||
print("%s %s" % (message.topic, message.payload))
|
||||
userdata["message_count"] += 1
|
||||
if userdata["message_count"] >= 5:
|
||||
# it's possible to stop the program by disconnecting
|
||||
client.disconnect()
|
||||
|
||||
subscribe.callback(on_message_print, "paho/test/topic", hostname="mqtt.eclipseprojects.io", userdata={"message_count": 0})
|
||||
|
||||
|
||||
Reporting bugs
|
||||
--------------
|
||||
|
||||
Please report bugs in the issues tracker at https://github.com/eclipse/paho.mqtt.python/issues.
|
||||
|
||||
More information
|
||||
----------------
|
||||
|
||||
Discussion of the Paho clients takes place on the `Eclipse paho-dev mailing list <https://dev.eclipse.org/mailman/listinfo/paho-dev>`_.
|
||||
|
||||
General questions about the MQTT protocol itself (not this library) are discussed in the `MQTT Google Group <https://groups.google.com/forum/?fromgroups#!forum/mqtt>`_.
|
||||
|
||||
There is much more information available via the `MQTT community site <http://mqtt.org/>`_.
|
||||
|
||||
.. _examples: https://github.com/eclipse/paho.mqtt.python/tree/master/examples
|
||||
.. _documentation: https://eclipse.dev/paho/files/paho.mqtt.python/html/client.html
|
||||
@@ -0,0 +1,29 @@
|
||||
paho/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
paho/__pycache__/__init__.cpython-312.pyc,,
|
||||
paho/mqtt/__init__.py,sha256=D0jPAtaZau0deGs4-DBSNj_wvBmCGRLtI-AUtfAxJzU,65
|
||||
paho/mqtt/__pycache__/__init__.cpython-312.pyc,,
|
||||
paho/mqtt/__pycache__/client.cpython-312.pyc,,
|
||||
paho/mqtt/__pycache__/enums.cpython-312.pyc,,
|
||||
paho/mqtt/__pycache__/matcher.cpython-312.pyc,,
|
||||
paho/mqtt/__pycache__/packettypes.cpython-312.pyc,,
|
||||
paho/mqtt/__pycache__/properties.cpython-312.pyc,,
|
||||
paho/mqtt/__pycache__/publish.cpython-312.pyc,,
|
||||
paho/mqtt/__pycache__/reasoncodes.cpython-312.pyc,,
|
||||
paho/mqtt/__pycache__/subscribe.cpython-312.pyc,,
|
||||
paho/mqtt/__pycache__/subscribeoptions.cpython-312.pyc,,
|
||||
paho/mqtt/client.py,sha256=Wj8Pc7NEVBgoWGqQ95pr7suOQ5bYuBBkvCkgwahTYYo,202624
|
||||
paho/mqtt/enums.py,sha256=4iGMsOtVUXHK_cOfDJxncBDbq1eluGbm3HaiI1jPq8I,2977
|
||||
paho/mqtt/matcher.py,sha256=VIbFAQoaKrPArQf_qNT_BM1FMJKxW38Ok27R3w2G-B0,2783
|
||||
paho/mqtt/packettypes.py,sha256=CNSNDyHGsPGhCrk9CBUnpNXxA0nEnzEaVg4Krb6RoOQ,1453
|
||||
paho/mqtt/properties.py,sha256=JEuKvHJtliHvN7py-iMLWdQ0jsxpiWbaIOkCfvU6hyQ,17369
|
||||
paho/mqtt/publish.py,sha256=4imGVhhbrqHUVNmfiwgQ1BPPj3HWWvXcjx5DQIj_Oig,11576
|
||||
paho/mqtt/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
paho/mqtt/reasoncodes.py,sha256=x12KK6-kSO0-KFNanoGDuNzHHJx6zpNm6PAGyrzuSXk,9648
|
||||
paho/mqtt/subscribe.py,sha256=KAkgTewUu5of4sd7hsAriB0l6_gMQLIYxfJrOvQg6ds,11667
|
||||
paho/mqtt/subscribeoptions.py,sha256=bWGVKG3qdc9IPlqpbRSbL84c0gK2Bbi7Mgp6k5G3GdM,4846
|
||||
paho_mqtt-2.1.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
paho_mqtt-2.1.0.dist-info/METADATA,sha256=rcfCP_Qax2rFWJZAIt11AsqacMMkA4WeLCKD4He_ojA,23463
|
||||
paho_mqtt-2.1.0.dist-info/RECORD,,
|
||||
paho_mqtt-2.1.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
paho_mqtt-2.1.0.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
||||
paho_mqtt-2.1.0.dist-info/licenses/LICENSE.txt,sha256=ZkCLBJJJw72wuh7ShfVCLOZ-Nx1AFRvr1NgGr0VP_nw,156
|
||||
@@ -0,0 +1,4 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: hatchling 1.24.2
|
||||
Root-Is-Purelib: true
|
||||
Tag: py3-none-any
|
||||
@@ -0,0 +1,3 @@
|
||||
This project is dual licensed under the Eclipse Public License 2.0 and the
|
||||
Eclipse Distribution License 1.0 as described in the epl-v20 and edl-v10 files.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
pip
|
||||
@@ -0,0 +1,109 @@
|
||||
Metadata-Version: 2.4
|
||||
Name: pip
|
||||
Version: 26.1.2
|
||||
Summary: The PyPA recommended tool for installing Python packages.
|
||||
Author-email: The pip developers <distutils-sig@python.org>
|
||||
Requires-Python: >=3.10
|
||||
Description-Content-Type: text/x-rst
|
||||
License-Expression: MIT
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: Topic :: Software Development :: Build Tools
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3 :: Only
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Programming Language :: Python :: 3.11
|
||||
Classifier: Programming Language :: Python :: 3.12
|
||||
Classifier: Programming Language :: Python :: 3.13
|
||||
Classifier: Programming Language :: Python :: 3.14
|
||||
Classifier: Programming Language :: Python :: Implementation :: CPython
|
||||
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
||||
License-File: AUTHORS.txt
|
||||
License-File: LICENSE.txt
|
||||
License-File: src/pip/_vendor/cachecontrol/LICENSE.txt
|
||||
License-File: src/pip/_vendor/certifi/LICENSE
|
||||
License-File: src/pip/_vendor/distlib/LICENSE.txt
|
||||
License-File: src/pip/_vendor/distro/LICENSE
|
||||
License-File: src/pip/_vendor/idna/LICENSE.md
|
||||
License-File: src/pip/_vendor/msgpack/COPYING
|
||||
License-File: src/pip/_vendor/packaging/LICENSE
|
||||
License-File: src/pip/_vendor/packaging/LICENSE.APACHE
|
||||
License-File: src/pip/_vendor/packaging/LICENSE.BSD
|
||||
License-File: src/pip/_vendor/pkg_resources/LICENSE
|
||||
License-File: src/pip/_vendor/platformdirs/LICENSE
|
||||
License-File: src/pip/_vendor/pygments/LICENSE
|
||||
License-File: src/pip/_vendor/pyproject_hooks/LICENSE
|
||||
License-File: src/pip/_vendor/requests/LICENSE
|
||||
License-File: src/pip/_vendor/resolvelib/LICENSE
|
||||
License-File: src/pip/_vendor/rich/LICENSE
|
||||
License-File: src/pip/_vendor/tomli/LICENSE
|
||||
License-File: src/pip/_vendor/tomli_w/LICENSE
|
||||
License-File: src/pip/_vendor/truststore/LICENSE
|
||||
License-File: src/pip/_vendor/urllib3/LICENSE.txt
|
||||
Project-URL: Changelog, https://pip.pypa.io/en/stable/news/
|
||||
Project-URL: Documentation, https://pip.pypa.io
|
||||
Project-URL: Homepage, https://pip.pypa.io/
|
||||
Project-URL: Source, https://github.com/pypa/pip
|
||||
|
||||
pip - The Python Package Installer
|
||||
==================================
|
||||
|
||||
.. |pypi-version| image:: https://img.shields.io/pypi/v/pip.svg
|
||||
:target: https://pypi.org/project/pip/
|
||||
:alt: PyPI
|
||||
|
||||
.. |python-versions| image:: https://img.shields.io/pypi/pyversions/pip
|
||||
:target: https://pypi.org/project/pip
|
||||
:alt: PyPI - Python Version
|
||||
|
||||
.. |docs-badge| image:: https://readthedocs.org/projects/pip/badge/?version=latest
|
||||
:target: https://pip.pypa.io/en/latest
|
||||
:alt: Documentation
|
||||
|
||||
|pypi-version| |python-versions| |docs-badge|
|
||||
|
||||
pip is the `package installer`_ for Python. You can use pip to install packages from the `Python Package Index`_ and other indexes.
|
||||
|
||||
Please take a look at our documentation for how to install and use pip:
|
||||
|
||||
* `Installation`_
|
||||
* `Usage`_
|
||||
|
||||
We release updates regularly, with a new version every 3 months. Find more details in our documentation:
|
||||
|
||||
* `Release notes`_
|
||||
* `Release process`_
|
||||
|
||||
If you find bugs, need help, or want to talk to the developers, please use our mailing lists or chat rooms:
|
||||
|
||||
* `Issue tracking`_
|
||||
* `Discourse channel`_
|
||||
* `User IRC`_
|
||||
|
||||
If you want to get involved, head over to GitHub to get the source code, look at our development documentation and feel free to jump on the developer mailing lists and chat rooms:
|
||||
|
||||
* `GitHub page`_
|
||||
* `Development documentation`_
|
||||
* `Development IRC`_
|
||||
|
||||
Code of Conduct
|
||||
---------------
|
||||
|
||||
Everyone interacting in the pip project's codebases, issue trackers, chat
|
||||
rooms, and mailing lists is expected to follow the `PSF Code of Conduct`_.
|
||||
|
||||
.. _package installer: https://packaging.python.org/guides/tool-recommendations/
|
||||
.. _Python Package Index: https://pypi.org
|
||||
.. _Installation: https://pip.pypa.io/en/stable/installation/
|
||||
.. _Usage: https://pip.pypa.io/en/stable/
|
||||
.. _Release notes: https://pip.pypa.io/en/stable/news.html
|
||||
.. _Release process: https://pip.pypa.io/en/latest/development/release-process/
|
||||
.. _GitHub page: https://github.com/pypa/pip
|
||||
.. _Development documentation: https://pip.pypa.io/en/latest/development
|
||||
.. _Issue tracking: https://github.com/pypa/pip/issues
|
||||
.. _Discourse channel: https://discuss.python.org/c/packaging
|
||||
.. _User IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa
|
||||
.. _Development IRC: https://kiwiirc.com/nextclient/#ircs://irc.libera.chat:+6697/pypa-dev
|
||||
.. _PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
|
||||
|
||||
@@ -0,0 +1,865 @@
|
||||
../../../bin/pip,sha256=90-j4ZsGtPPV5jE9ZteNYqNOsDURbQsgX8LH9n18joo,246
|
||||
../../../bin/pip3,sha256=90-j4ZsGtPPV5jE9ZteNYqNOsDURbQsgX8LH9n18joo,246
|
||||
../../../bin/pip3.12,sha256=90-j4ZsGtPPV5jE9ZteNYqNOsDURbQsgX8LH9n18joo,246
|
||||
pip-26.1.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
pip-26.1.2.dist-info/METADATA,sha256=F4Mt5Htdwj5GJTuhZGJSADbyjZon1cMBV3hJUspOabI,4566
|
||||
pip-26.1.2.dist-info/RECORD,,
|
||||
pip-26.1.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip-26.1.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
||||
pip-26.1.2.dist-info/entry_points.txt,sha256=Vhf8s0IYgX37mtd4vGL73BPcxdKnqeCFPzB5-d30x8o,84
|
||||
pip-26.1.2.dist-info/licenses/AUTHORS.txt,sha256=W3NHm_-toJFgRMspxHqyA2AhXjyDj_LnVi7N_LEWRb0,11869
|
||||
pip-26.1.2.dist-info/licenses/LICENSE.txt,sha256=Y0MApmnUmurmWxLGxIySTFGkzfPR_whtw0VtyLyqIQQ,1093
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt,sha256=hu7uh74qQ_P_H1ZJb0UfaSQ5JvAl_tuwM2ZsMExMFhs,558
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/certifi/LICENSE,sha256=6TcW2mucDVpKHfYP5pWzcPBpVgPSH2-D8FPkLPwQyvc,989
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/distlib/LICENSE.txt,sha256=gI4QyKarjesUn_mz-xn0R6gICUYG1xKpylf-rTVSWZ0,14531
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/distro/LICENSE,sha256=y16Ofl9KOYjhBjwULGDcLfdWBfTEZRXnduOspt-XbhQ,11325
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/idna/LICENSE.md,sha256=t6M2q_OwThgOwGXN0W5wXQeeHMehT5EKpukYfza5zYc,1541
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/msgpack/COPYING,sha256=SS3tuoXaWHL3jmCRvNH-pHTWYNNay03ulkuKqz8AdCc,614
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/packaging/LICENSE,sha256=ytHvW9NA1z4HS6YU0m996spceUDD2MNIUuZcSQlobEg,197
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.APACHE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.BSD,sha256=tw5-m3QvHMb5SLNMFqo5_-zpQZY2S8iP8NIYDwAo-sU,1344
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/pkg_resources/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/platformdirs/LICENSE,sha256=KeD9YukphQ6G6yjD_czwzv30-pSHkBHP-z0NS-1tTbY,1089
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/pygments/LICENSE,sha256=qdZvHVJt8C4p3Oc0NtNOVuhjL0bCdbvf_HBWnogvnxc,1331
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/pyproject_hooks/LICENSE,sha256=GyKwSbUmfW38I6Z79KhNjsBLn9-xpR02DkK0NCyLQVQ,1081
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/requests/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/resolvelib/LICENSE,sha256=84j9OMrRMRLB3A9mm76A5_hFQe26-3LzAw0sp2QsPJ0,751
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/rich/LICENSE,sha256=3u18F6QxgVgZCj6iOcyHmlpQJxzruYrnAl9I--WNyhU,1056
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/tomli/LICENSE,sha256=uAgWsNUwuKzLTCIReDeQmEpuO2GSLCte6S8zcqsnQv4,1072
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/tomli_w/LICENSE,sha256=uAgWsNUwuKzLTCIReDeQmEpuO2GSLCte6S8zcqsnQv4,1072
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/truststore/LICENSE,sha256=M757fo-k_Rmxdg4ajtimaL2rhSyRtpLdQUJLy3Jan8o,1086
|
||||
pip-26.1.2.dist-info/licenses/src/pip/_vendor/urllib3/LICENSE.txt,sha256=Ew46ZNX91dCWp1JpRjSn2d8oRGnehuVzIQAmgEHj1oY,1093
|
||||
pip/__init__.py,sha256=NpSDjf-9JVVAM7YXP0vDMDHmOrRWcfZ3OUgS7xquzy4,355
|
||||
pip/__main__.py,sha256=rOZRtrXjDBzY24niaxTnd9ZHHWL7B0EawVdLoJ3nI6c,874
|
||||
pip/__pip-runner__.py,sha256=720Mt6h07Uce52v80EOF__JYauoLw9b7Pfs_5B91isg,1451
|
||||
pip/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/__pycache__/__main__.cpython-312.pyc,,
|
||||
pip/__pycache__/__pip-runner__.cpython-312.pyc,,
|
||||
pip/_internal/__init__.py,sha256=S7i9Dn9aSZS0MG-2Wrve3dV9TImPzvQn5jjhp9t_uf0,511
|
||||
pip/_internal/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/__pycache__/build_env.cpython-312.pyc,,
|
||||
pip/_internal/__pycache__/cache.cpython-312.pyc,,
|
||||
pip/_internal/__pycache__/configuration.cpython-312.pyc,,
|
||||
pip/_internal/__pycache__/exceptions.cpython-312.pyc,,
|
||||
pip/_internal/__pycache__/main.cpython-312.pyc,,
|
||||
pip/_internal/__pycache__/pyproject.cpython-312.pyc,,
|
||||
pip/_internal/__pycache__/self_outdated_check.cpython-312.pyc,,
|
||||
pip/_internal/__pycache__/wheel_builder.cpython-312.pyc,,
|
||||
pip/_internal/build_env.py,sha256=XpgOIlTQLgz3PvDT2n7j2NzX_rVFZLCIG7t7b2ddhcM,21911
|
||||
pip/_internal/cache.py,sha256=nMh48Yv3yu1HS1yCdscouu6B6B5zYBWdV6bhqs7gL-E,10345
|
||||
pip/_internal/cli/__init__.py,sha256=Iqg_tKA771XuMO1P4t_sDHnSKPzkUb9D0DqunAmw_ko,131
|
||||
pip/_internal/cli/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/cli/__pycache__/autocompletion.cpython-312.pyc,,
|
||||
pip/_internal/cli/__pycache__/base_command.cpython-312.pyc,,
|
||||
pip/_internal/cli/__pycache__/cmdoptions.cpython-312.pyc,,
|
||||
pip/_internal/cli/__pycache__/command_context.cpython-312.pyc,,
|
||||
pip/_internal/cli/__pycache__/index_command.cpython-312.pyc,,
|
||||
pip/_internal/cli/__pycache__/main.cpython-312.pyc,,
|
||||
pip/_internal/cli/__pycache__/main_parser.cpython-312.pyc,,
|
||||
pip/_internal/cli/__pycache__/parser.cpython-312.pyc,,
|
||||
pip/_internal/cli/__pycache__/progress_bars.cpython-312.pyc,,
|
||||
pip/_internal/cli/__pycache__/req_command.cpython-312.pyc,,
|
||||
pip/_internal/cli/__pycache__/spinners.cpython-312.pyc,,
|
||||
pip/_internal/cli/__pycache__/status_codes.cpython-312.pyc,,
|
||||
pip/_internal/cli/autocompletion.py,sha256=ZG2cM03nlcNrs-WG_SFTW46isx9s2Go5lUD_8-iv70o,7193
|
||||
pip/_internal/cli/base_command.py,sha256=-oJs5lKaPD2RXBuByBfKvumAa1XNYVthv0Pm0RXwGgA,9579
|
||||
pip/_internal/cli/cmdoptions.py,sha256=QHfUaPmZNMumZJPS5Jmavh8jNbI7T3Vi8BYVEkqFHxY,37593
|
||||
pip/_internal/cli/command_context.py,sha256=kmu3EWZbfBega1oDamnGJTA_UaejhIQNuMj2CVmMXu0,817
|
||||
pip/_internal/cli/index_command.py,sha256=PTcKSd-J3bUalzDO9kNvZ3mEGiJXix32Q4fPwkxSXIc,7094
|
||||
pip/_internal/cli/main.py,sha256=ljDQBkvBtC8xTjOdb6rDJzJUNi1s-PnVR_W5C-Mq0Dk,3137
|
||||
pip/_internal/cli/main_parser.py,sha256=YjzJAjqf78ARNsLlnJT9l6fNbpyDPJA-arOIXYsK5Ik,4403
|
||||
pip/_internal/cli/parser.py,sha256=EIFExrWX_1nrl1Ib--GOor70WYqLtduHByenb1u9xH4,13827
|
||||
pip/_internal/cli/progress_bars.py,sha256=IW1PH5n2FPqUBTP7ULQ5Yu-wyNNO9XGY3g1PT4RMu44,4706
|
||||
pip/_internal/cli/req_command.py,sha256=KmCppnkf7M6SvJIVrds0ng83HFMZ2z4Y6pg1yCnyjDM,17484
|
||||
pip/_internal/cli/spinners.py,sha256=EJzZIZNyUtJljp3-WjcsyIrqxW-HUsfWzhuW84n_Tqw,7362
|
||||
pip/_internal/cli/status_codes.py,sha256=sEFHUaUJbqv8iArL3HAtcztWZmGOFX01hTesSytDEh0,116
|
||||
pip/_internal/commands/__init__.py,sha256=aNeCbQurGWihfhQq7BqaLXHqWDQ0i3I04OS7kxK6plQ,4026
|
||||
pip/_internal/commands/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/cache.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/check.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/completion.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/configuration.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/debug.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/download.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/freeze.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/hash.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/help.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/index.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/inspect.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/install.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/list.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/lock.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/search.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/show.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/uninstall.cpython-312.pyc,,
|
||||
pip/_internal/commands/__pycache__/wheel.cpython-312.pyc,,
|
||||
pip/_internal/commands/cache.py,sha256=XjT7kjY8GSISMksFHsLvjS9Ogfi5extNlUUv-dUoWCM,9142
|
||||
pip/_internal/commands/check.py,sha256=hVFBQezQ3zj4EydoWbFQj_afPUppMt7r9JPAlY22U6Y,2244
|
||||
pip/_internal/commands/completion.py,sha256=LjvRIZ6QUiDXJL3IOMFeD-_J97HfjMGgEk0j2tWGu1U,4565
|
||||
pip/_internal/commands/configuration.py,sha256=6gNOGrVWnOLU15zUnAiNuOMhf76RRIZvCdVD0degPRk,10105
|
||||
pip/_internal/commands/debug.py,sha256=EvBLsRjcTRMrOuyHkLlJS6XODLBbasNlvVzce7cbRvo,6543
|
||||
pip/_internal/commands/download.py,sha256=LUNVobuvCdagjLBuPBaxHeBiHEiIe03fTO2m6ahC8qw,5178
|
||||
pip/_internal/commands/freeze.py,sha256=fxoW8AAc-bAqB_fXdNq2VnZ3JfWkFMg-bR6LcdDVO7A,3099
|
||||
pip/_internal/commands/hash.py,sha256=GO9pRN3wXC2kQaovK57TaLYBMc3IltOH92O6QEw6YE0,1679
|
||||
pip/_internal/commands/help.py,sha256=Bz3LcjNQXkz4Cu__pL4CZ86o4-HNLZj1NZWdlJhjuu0,1108
|
||||
pip/_internal/commands/index.py,sha256=ZhvgaAu6mkyts25L33mdBw8dfi50rTNJOYLO8GNgM7Y,5514
|
||||
pip/_internal/commands/inspect.py,sha256=Lmy7-WHZ7juHp-txjK7U74X3jr5cfvgOMDICyKitriM,3184
|
||||
pip/_internal/commands/install.py,sha256=wwtHYQ3UoDxXcMysjTRnbWO8Zeg_C-_Nk9SgMfDHAgo,33733
|
||||
pip/_internal/commands/list.py,sha256=7_YwtPHN-RbWPHhCp1hajXN_zNxR9UdsHGUuVJzAVNQ,13638
|
||||
pip/_internal/commands/lock.py,sha256=145ihjUK_-7gP8O65XPDi_xMhlh5hne1ptkHdfnbAnQ,6027
|
||||
pip/_internal/commands/search.py,sha256=zbMsX_YASj6kXA6XIBgTDv0bGK51xG-CV3IynZJcE-c,5782
|
||||
pip/_internal/commands/show.py,sha256=oLVJIfKWmDKm0SsQGEi3pozNiqrXjTras_fbBSYKpBA,8066
|
||||
pip/_internal/commands/uninstall.py,sha256=CsOihqvb6ZA6O67L70oXeoLHeOfNzMM88H9g-9aocgw,3868
|
||||
pip/_internal/commands/wheel.py,sha256=L9vEzJ_E42scF_Hgh5X4Hk39nqJDKxGg4u7glDYbNWc,5880
|
||||
pip/_internal/configuration.py,sha256=WxwwSwY_Bm6QzDgf32BsujEyO8dgRedegCpgbUfDvM8,14568
|
||||
pip/_internal/distributions/__init__.py,sha256=Hq6kt6gXBgjNit5hTTWLAzeCNOKoB-N0pGYSqehrli8,858
|
||||
pip/_internal/distributions/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/distributions/__pycache__/base.cpython-312.pyc,,
|
||||
pip/_internal/distributions/__pycache__/installed.cpython-312.pyc,,
|
||||
pip/_internal/distributions/__pycache__/sdist.cpython-312.pyc,,
|
||||
pip/_internal/distributions/__pycache__/wheel.cpython-312.pyc,,
|
||||
pip/_internal/distributions/base.py,sha256=l-OTCAIs25lsapejA6IYpPZxSM5-BET4sdZDkql8jiY,1830
|
||||
pip/_internal/distributions/installed.py,sha256=kgIEE_1NzjZxLBSC-v5s64uOFZlVEt3aPrjTtL6x2XY,929
|
||||
pip/_internal/distributions/sdist.py,sha256=RYwQIbuxpKy6OjlBZCAefxpMDaoocUQ4dFtheGsiTOQ,6627
|
||||
pip/_internal/distributions/wheel.py,sha256=_HbG0OehF8dwj4UX-xV__tXLwgPus9OjMEf2NTRqBbE,1364
|
||||
pip/_internal/exceptions.py,sha256=PXzGfBmUF3rKQQjCAMcJ1fszBw6naL1nTK8CXhIi7zo,32166
|
||||
pip/_internal/index/__init__.py,sha256=tzwMH_fhQeubwMqHdSivasg1cRgTSbNg2CiMVnzMmyU,29
|
||||
pip/_internal/index/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/index/__pycache__/collector.cpython-312.pyc,,
|
||||
pip/_internal/index/__pycache__/package_finder.cpython-312.pyc,,
|
||||
pip/_internal/index/__pycache__/sources.cpython-312.pyc,,
|
||||
pip/_internal/index/collector.py,sha256=R7Gcx_4GEoSEI-iazfAZVEPG3Lp6mbZT4lbAD6NjAc0,16144
|
||||
pip/_internal/index/package_finder.py,sha256=fX9lRlfiUkoC96rIiYg4M_bDWVNUpaX2TzXx_FP-aoI,41347
|
||||
pip/_internal/index/sources.py,sha256=nXJkOjhLy-O2FsrKU9RIqCOqgY2PsoKWybtZjjRgqU0,8639
|
||||
pip/_internal/locations/__init__.py,sha256=iP9yVZn_4iPuNcaUNh2A_vJLcvUZ-8y4zvKLDVEqaM0,14022
|
||||
pip/_internal/locations/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/locations/__pycache__/_distutils.cpython-312.pyc,,
|
||||
pip/_internal/locations/__pycache__/_sysconfig.cpython-312.pyc,,
|
||||
pip/_internal/locations/__pycache__/base.cpython-312.pyc,,
|
||||
pip/_internal/locations/_distutils.py,sha256=jpFj4V00rD9IR3vA9TqrGkwcdNVFc58LsChZavge9JY,5975
|
||||
pip/_internal/locations/_sysconfig.py,sha256=8CpTjtxaCzHSCrKpaxWnHE7aKcJrRJRmntR1ZLVysLk,7779
|
||||
pip/_internal/locations/base.py,sha256=AImjYJWxOtDkc0KKc6Y4Gz677cg91caMA4L94B9FZEg,2550
|
||||
pip/_internal/main.py,sha256=1cHqjsfFCrMFf3B5twzocxTJUdHMLoXUpy5lJoFqUi8,338
|
||||
pip/_internal/metadata/__init__.py,sha256=vp-JAxiWg_-l5F8AT0Jcey72uUnh8CDwwol9-KktHZ8,5824
|
||||
pip/_internal/metadata/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/metadata/__pycache__/_json.cpython-312.pyc,,
|
||||
pip/_internal/metadata/__pycache__/base.cpython-312.pyc,,
|
||||
pip/_internal/metadata/__pycache__/pkg_resources.cpython-312.pyc,,
|
||||
pip/_internal/metadata/_json.py,sha256=hNvnMHOXLAyNlzirWhPL9Nx2CvCqa1iRma6Osq1YfV8,2711
|
||||
pip/_internal/metadata/base.py,sha256=BGuMenlcQT8i7j9iclrfdC3vSwgvhr8gjn955cCy16s,25420
|
||||
pip/_internal/metadata/importlib/__init__.py,sha256=jUUidoxnHcfITHHaAWG1G2i5fdBYklv_uJcjo2x7VYE,135
|
||||
pip/_internal/metadata/importlib/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/metadata/importlib/__pycache__/_compat.cpython-312.pyc,,
|
||||
pip/_internal/metadata/importlib/__pycache__/_dists.cpython-312.pyc,,
|
||||
pip/_internal/metadata/importlib/__pycache__/_envs.cpython-312.pyc,,
|
||||
pip/_internal/metadata/importlib/_compat.py,sha256=sneVh4_6WxQZK4ljdl3ylVuP-q0ttSqbgl9mWt0HnOg,2804
|
||||
pip/_internal/metadata/importlib/_dists.py,sha256=c738sVAKF_zhhyFOIKmLlMadRvGOfEdqcoKjznwpYUI,8711
|
||||
pip/_internal/metadata/importlib/_envs.py,sha256=H3qVLXVh4LWvrPvu_ekXf3dfbtwnlhNJQP2pxXpccfU,5333
|
||||
pip/_internal/metadata/pkg_resources.py,sha256=NO76ZrfR2-LKJTyaXrmQoGhmJMArALvacrlZHViSDT8,10544
|
||||
pip/_internal/models/__init__.py,sha256=AjmCEBxX_MH9f_jVjIGNCFJKYCYeSEe18yyvNx4uRKQ,62
|
||||
pip/_internal/models/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/models/__pycache__/candidate.cpython-312.pyc,,
|
||||
pip/_internal/models/__pycache__/direct_url.cpython-312.pyc,,
|
||||
pip/_internal/models/__pycache__/format_control.cpython-312.pyc,,
|
||||
pip/_internal/models/__pycache__/index.cpython-312.pyc,,
|
||||
pip/_internal/models/__pycache__/installation_report.cpython-312.pyc,,
|
||||
pip/_internal/models/__pycache__/link.cpython-312.pyc,,
|
||||
pip/_internal/models/__pycache__/release_control.cpython-312.pyc,,
|
||||
pip/_internal/models/__pycache__/scheme.cpython-312.pyc,,
|
||||
pip/_internal/models/__pycache__/search_scope.cpython-312.pyc,,
|
||||
pip/_internal/models/__pycache__/selection_prefs.cpython-312.pyc,,
|
||||
pip/_internal/models/__pycache__/target_python.cpython-312.pyc,,
|
||||
pip/_internal/models/__pycache__/wheel.cpython-312.pyc,,
|
||||
pip/_internal/models/candidate.py,sha256=5TqwJU0YOogo3EsIPohaqQ3Z4hfU4BNNyBYBEJs6Wxw,720
|
||||
pip/_internal/models/direct_url.py,sha256=9RS3TQAXknwLd8JOOZWlbBV6WZFs9qn-YAYk0VQ8R_Q,944
|
||||
pip/_internal/models/format_control.py,sha256=PwemYG1L27BM0f1KP61rm24wShENFyxqlD1TWu34alc,2471
|
||||
pip/_internal/models/index.py,sha256=tYnL8oxGi4aSNWur0mG8DAP7rC6yuha_MwJO8xw0crI,1030
|
||||
pip/_internal/models/installation_report.py,sha256=U4MlXWFB-8ev_yheuMO9T2m_y5b4C-hOzVaoHVobl38,2846
|
||||
pip/_internal/models/link.py,sha256=zti5UCx1hT03etYqm6MCqFd714clmTgX8rTZT9CKZDQ,21992
|
||||
pip/_internal/models/release_control.py,sha256=31Jh-ZHsTIBZLe-7uPNoYLiRSWXAjEI1jGNxwqLKd4A,3365
|
||||
pip/_internal/models/scheme.py,sha256=G-O9KElabcXqbPwfE_66lzX5fGahh3Gu6DAkz_9ZhJw,558
|
||||
pip/_internal/models/search_scope.py,sha256=_i-Gj_w_FwZAvTs7WhjslBDD70J-8hmIdjXByI8uEZQ,4461
|
||||
pip/_internal/models/selection_prefs.py,sha256=0teekwSVxW5MOk0WPG5Novw5q_XJjxijcd75kZO6E9g,1503
|
||||
pip/_internal/models/target_python.py,sha256=I0eFS-eia3kwhrOvgsphFZtNAB2IwXZ9Sr9fp6IjBP4,4243
|
||||
pip/_internal/models/wheel.py,sha256=1SdfDvN7ALTsbyZ9EOsNy1GPirP1n6EjHyzPrZyLSh8,2920
|
||||
pip/_internal/network/__init__.py,sha256=FMy06P__y6jMjUc8z3ZcQdKF-pmZ2zM14_vBeHPGhUI,49
|
||||
pip/_internal/network/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/network/__pycache__/auth.cpython-312.pyc,,
|
||||
pip/_internal/network/__pycache__/cache.cpython-312.pyc,,
|
||||
pip/_internal/network/__pycache__/download.cpython-312.pyc,,
|
||||
pip/_internal/network/__pycache__/lazy_wheel.cpython-312.pyc,,
|
||||
pip/_internal/network/__pycache__/session.cpython-312.pyc,,
|
||||
pip/_internal/network/__pycache__/utils.cpython-312.pyc,,
|
||||
pip/_internal/network/__pycache__/xmlrpc.cpython-312.pyc,,
|
||||
pip/_internal/network/auth.py,sha256=ITcuLus7666whNVJSINuNMRZzNoGHwmqhRnP6hEu0ok,20846
|
||||
pip/_internal/network/cache.py,sha256=kmRXKQrG9E26xQRj211LHeEGpDg_SlYU9Dn1fJ-AMeI,4862
|
||||
pip/_internal/network/download.py,sha256=8ilZxTWBm9J1TEpupFE56VQ5js3L81rv3X0rZwfBPTg,12625
|
||||
pip/_internal/network/lazy_wheel.py,sha256=y9gVksdJCSjnLfYzs_m3DYUAtl3hc_k-xFPDBd9DgOs,7646
|
||||
pip/_internal/network/session.py,sha256=WEVgDmI-973anw7dheGs5HN1P6QGzS_kHlZlYazCQ8M,19856
|
||||
pip/_internal/network/utils.py,sha256=ACsXd1msqNCidHVXsu7LHUSr8NgaypcOKQ4KG-Z_wJM,4091
|
||||
pip/_internal/network/xmlrpc.py,sha256=_-Rnk3vOff8uF9hAGmT6SLALflY1gMBcbGwS12fb_Y4,1830
|
||||
pip/_internal/operations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_internal/operations/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/operations/__pycache__/check.cpython-312.pyc,,
|
||||
pip/_internal/operations/__pycache__/freeze.cpython-312.pyc,,
|
||||
pip/_internal/operations/__pycache__/prepare.cpython-312.pyc,,
|
||||
pip/_internal/operations/build/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_internal/operations/build/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/operations/build/__pycache__/build_tracker.cpython-312.pyc,,
|
||||
pip/_internal/operations/build/__pycache__/metadata.cpython-312.pyc,,
|
||||
pip/_internal/operations/build/__pycache__/metadata_editable.cpython-312.pyc,,
|
||||
pip/_internal/operations/build/__pycache__/wheel.cpython-312.pyc,,
|
||||
pip/_internal/operations/build/__pycache__/wheel_editable.cpython-312.pyc,,
|
||||
pip/_internal/operations/build/build_tracker.py,sha256=W3b5cmkMWPaE6QIwfzsTayJo7-OlxFHWDxfPuax1KcE,4771
|
||||
pip/_internal/operations/build/metadata.py,sha256=INHaeiRfOiLYCXApfDNRo9Cw2xI4VwTc0KItvfdfOjk,1421
|
||||
pip/_internal/operations/build/metadata_editable.py,sha256=oWudMsnjy4loO_Jy7g4N9nxsnaEX_iDlVRgCy7pu1rs,1509
|
||||
pip/_internal/operations/build/wheel.py,sha256=3bP-nNiJ4S8JvMaBnyessXQUBhxTqt1GBx6DQ1iPJDY,1136
|
||||
pip/_internal/operations/build/wheel_editable.py,sha256=q3kfElclM6FutVbFwE87JOTpVWt5ixDf3_UkHAIVfz4,1478
|
||||
pip/_internal/operations/check.py,sha256=yC2XWth6iehGGE_fj7XRJLjVKBsTIG3ZoWRkFi3rOwc,5894
|
||||
pip/_internal/operations/freeze.py,sha256=PDdY-y_ZtZZJLAKcaWPIGRKAGW7DXR48f0aMRU0j7BA,9854
|
||||
pip/_internal/operations/install/__init__.py,sha256=ak-UETcQPKlFZaWoYKWu5QVXbpFBvg0sXc3i0O4vSYY,50
|
||||
pip/_internal/operations/install/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/operations/install/__pycache__/wheel.cpython-312.pyc,,
|
||||
pip/_internal/operations/install/wheel.py,sha256=uVPbKD_RqQKdVOP1l0TP_KliNuQWGmtPLH6naPAO9Tc,28614
|
||||
pip/_internal/operations/prepare.py,sha256=Gx6r57LG_guvAYGqKUdu_68rHPPkO7CQ_qc2wKnYyss,29046
|
||||
pip/_internal/pyproject.py,sha256=J-sTWqC-XfsKQgz9m1bypMWZPHItsSHzIN_NWeIRmhM,4555
|
||||
pip/_internal/req/__init__.py,sha256=WcY9z7D3rlIKX1QY8_tRnAsS_poebiGGdtQ7EJ5JQQo,3041
|
||||
pip/_internal/req/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/req/__pycache__/constructors.cpython-312.pyc,,
|
||||
pip/_internal/req/__pycache__/pep723.cpython-312.pyc,,
|
||||
pip/_internal/req/__pycache__/req_dependency_group.cpython-312.pyc,,
|
||||
pip/_internal/req/__pycache__/req_file.cpython-312.pyc,,
|
||||
pip/_internal/req/__pycache__/req_install.cpython-312.pyc,,
|
||||
pip/_internal/req/__pycache__/req_set.cpython-312.pyc,,
|
||||
pip/_internal/req/__pycache__/req_uninstall.cpython-312.pyc,,
|
||||
pip/_internal/req/constructors.py,sha256=EXgbMUcAtBaNj6cYms0ZweIxNOSoOPcQG8EqXl9HYhM,22918
|
||||
pip/_internal/req/pep723.py,sha256=JsG1p3CaVcW8cjclD2kDj7d9qtVrNQaevY_UnKh00tk,1242
|
||||
pip/_internal/req/req_dependency_group.py,sha256=PrWKtlwI8xbWnWEKjXs9RkrpQx2_h02ABefYT0ZdeQg,3145
|
||||
pip/_internal/req/req_file.py,sha256=idVj4uVd8yQIBQojoulL1ceXGr1Qk8ongXzwI4vTTss,20521
|
||||
pip/_internal/req/req_install.py,sha256=VVzO8UIp6TOU_QCEoSxYdkG39z54pKPQjg8Z6z4WbNM,31845
|
||||
pip/_internal/req/req_set.py,sha256=awkqIXnYA4Prmsj0Qb3zhqdbYUmXd-1o0P-KZ3mvRQs,2828
|
||||
pip/_internal/req/req_uninstall.py,sha256=dCmOHt-9RaJBq921L4tMH3PmIBDetGplnbjRKXmGt00,24099
|
||||
pip/_internal/resolution/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_internal/resolution/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/resolution/__pycache__/base.cpython-312.pyc,,
|
||||
pip/_internal/resolution/base.py,sha256=RIsqSP79olPdOgtPKW-oOQ364ICVopehA6RfGkRfe2s,577
|
||||
pip/_internal/resolution/legacy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_internal/resolution/legacy/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/resolution/legacy/__pycache__/resolver.cpython-312.pyc,,
|
||||
pip/_internal/resolution/legacy/resolver.py,sha256=pMwU11FO1jeWB2vX-wvA5fdyDBPWH6Dccj9qEdh1Z3M,24061
|
||||
pip/_internal/resolution/resolvelib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_internal/resolution/resolvelib/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/resolution/resolvelib/__pycache__/base.cpython-312.pyc,,
|
||||
pip/_internal/resolution/resolvelib/__pycache__/candidates.cpython-312.pyc,,
|
||||
pip/_internal/resolution/resolvelib/__pycache__/factory.cpython-312.pyc,,
|
||||
pip/_internal/resolution/resolvelib/__pycache__/found_candidates.cpython-312.pyc,,
|
||||
pip/_internal/resolution/resolvelib/__pycache__/provider.cpython-312.pyc,,
|
||||
pip/_internal/resolution/resolvelib/__pycache__/reporter.cpython-312.pyc,,
|
||||
pip/_internal/resolution/resolvelib/__pycache__/requirements.cpython-312.pyc,,
|
||||
pip/_internal/resolution/resolvelib/__pycache__/resolver.cpython-312.pyc,,
|
||||
pip/_internal/resolution/resolvelib/base.py,sha256=g3qtckAh3E34y-5HrYLlYnOZ9SiPGDISzsqhaRDUAqQ,5903
|
||||
pip/_internal/resolution/resolvelib/candidates.py,sha256=4v3A2Q7gS1a1tbMbpho9HliFW4fRmHFuzj8fa7ThZ6c,20912
|
||||
pip/_internal/resolution/resolvelib/factory.py,sha256=gWRrcgr64br0ecF_PPxKfneXEzr0k-Solv2X9z3Goj0,36771
|
||||
pip/_internal/resolution/resolvelib/found_candidates.py,sha256=8bZYDCZLXSdLHy_s1o5f4r15HmKvqFUhzBUQOF21Lr4,6018
|
||||
pip/_internal/resolution/resolvelib/provider.py,sha256=X3nrCcVTer3mZSEy-13KiPFBJYmhfWJdA1cr-Gn1q7M,12150
|
||||
pip/_internal/resolution/resolvelib/reporter.py,sha256=tEC7MF8IqGU4Ww9t61YVfNFKtoaQpb6-AwLZptJz1VE,3918
|
||||
pip/_internal/resolution/resolvelib/requirements.py,sha256=Izl9n8nc188lA1BSPS8QxfudfDQPHgngw-ij6hXt0nQ,8239
|
||||
pip/_internal/resolution/resolvelib/resolver.py,sha256=wQ94Hkep-7kWEHAc-NbMJhmzeEzgEAtxeBxyKVzZoeo,13437
|
||||
pip/_internal/self_outdated_check.py,sha256=9XxOXPqsZlKceTP2tZS7I7rXjodnqd3GrIQ8U0_L8BM,8097
|
||||
pip/_internal/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_internal/utils/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/_jaraco_text.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/_log.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/appdirs.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/compat.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/compatibility_tags.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/datetime.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/deprecation.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/direct_url_helpers.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/egg_link.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/entrypoints.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/filesystem.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/filetypes.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/glibc.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/hashes.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/logging.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/misc.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/packaging.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/pylock.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/retry.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/subprocess.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/temp_dir.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/unpacking.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/urls.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/virtualenv.cpython-312.pyc,,
|
||||
pip/_internal/utils/__pycache__/wheel.cpython-312.pyc,,
|
||||
pip/_internal/utils/_jaraco_text.py,sha256=M15uUPIh5NpP1tdUGBxRau6q1ZAEtI8-XyLEETscFfE,3350
|
||||
pip/_internal/utils/_log.py,sha256=-jHLOE_THaZz5BFcCnoSL9EYAtJ0nXem49s9of4jvKw,1015
|
||||
pip/_internal/utils/appdirs.py,sha256=LrzDPZMKVh0rubtCx9vu3XlZbLCSug6VSj4Qsvt66BA,1681
|
||||
pip/_internal/utils/compat.py,sha256=C9LHXJAKkwAH8Hn3nPkz9EYK3rqPBeO_IXkOG2zzsdQ,2514
|
||||
pip/_internal/utils/compatibility_tags.py,sha256=DiNSLqpuruXUamGQwOJ2WZByDGLTGaXi9O-Xf8fOi34,6630
|
||||
pip/_internal/utils/datetime.py,sha256=kuJOf1mW8G5tRFN6jWardddS-9qSaR53lK1jmx3NTZY,868
|
||||
pip/_internal/utils/deprecation.py,sha256=oEQltmCq44LQ6EP7NF5bZySMf-wCifoyy9jl361BnVM,4319
|
||||
pip/_internal/utils/direct_url_helpers.py,sha256=WCCPJnmoPHz7kiYePrEcVAen2lDpCT9WQVImoHHWCO8,3363
|
||||
pip/_internal/utils/egg_link.py,sha256=YWfsrbmfcrfWgqQYy6OuIjsyb9IfL1q_2v4zsms1WjI,2459
|
||||
pip/_internal/utils/entrypoints.py,sha256=uPjAyShKObdotjQjJUzprQ6r3xQvDIZwUYfHHqZ7Dok,3324
|
||||
pip/_internal/utils/filesystem.py,sha256=GBB42pbxmUgdRAbSgLTRrWQEapyLCDSjxT21DN4QjU8,6812
|
||||
pip/_internal/utils/filetypes.py,sha256=sEMa38qaqjvx1Zid3OCAUja31BOBU-USuSMPBvU3yjo,689
|
||||
pip/_internal/utils/glibc.py,sha256=sEh8RJJLYSdRvTqAO4THVPPA-YSDVLD4SI9So-bxX1U,3726
|
||||
pip/_internal/utils/hashes.py,sha256=38-bCOJSHippQ7r9RttrMHxb2mv3EARt1Gw8kFmW73g,5040
|
||||
pip/_internal/utils/logging.py,sha256=6lJWMC6c7_aD_i4sdgaaeb-Tm3kWpYg0hba_V1-OLnE,13414
|
||||
pip/_internal/utils/misc.py,sha256=-fF_rOhxBxp57kwGlNl3XziBcs0gCf6D05wxZ-mkoTc,23704
|
||||
pip/_internal/utils/packaging.py,sha256=s5tpUmFumwV0H9JSTzryrIY4JwQM8paGt7Sm7eNwt2Y,1601
|
||||
pip/_internal/utils/pylock.py,sha256=T4qyd-TWb54wIO5_DdwASATtU7gi08IGEa_-pdFR7HE,9358
|
||||
pip/_internal/utils/retry.py,sha256=83wReEB2rcntMZ5VLd7ascaYSjn_kLdlQCqxILxWkPM,1461
|
||||
pip/_internal/utils/subprocess.py,sha256=r4-Ba_Yc3uZXQpi0K4pZFsCT_QqdSvtF3XJ-204QWaA,8983
|
||||
pip/_internal/utils/temp_dir.py,sha256=D9c8D7WOProOO8GGDqpBeVSj10NGFmunG0o2TodjjIU,9307
|
||||
pip/_internal/utils/unpacking.py,sha256=qG9dJp4onk6sXI8adTN0PMTSj-kjjGCtNZnzWsIMVUg,13584
|
||||
pip/_internal/utils/urls.py,sha256=aF_eg9ul5d8bMCxfSSSxQcfs-OpJdbStYqZHoy2K1RE,1601
|
||||
pip/_internal/utils/virtualenv.py,sha256=mX-UPyw1MPxhwUxKhbqWWX70J6PHXAJjVVrRnG0h9mc,3455
|
||||
pip/_internal/utils/wheel.py,sha256=YdRuj6MicG-Q9Mg03FbUv1WTLam6Lc7AgijY4voVyis,4468
|
||||
pip/_internal/vcs/__init__.py,sha256=UAqvzpbi0VbZo3Ub6skEeZAw-ooIZR-zX_WpCbxyCoU,596
|
||||
pip/_internal/vcs/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_internal/vcs/__pycache__/bazaar.cpython-312.pyc,,
|
||||
pip/_internal/vcs/__pycache__/git.cpython-312.pyc,,
|
||||
pip/_internal/vcs/__pycache__/mercurial.cpython-312.pyc,,
|
||||
pip/_internal/vcs/__pycache__/subversion.cpython-312.pyc,,
|
||||
pip/_internal/vcs/__pycache__/versioncontrol.cpython-312.pyc,,
|
||||
pip/_internal/vcs/bazaar.py,sha256=3W1eHjkYx2vc6boeb2NBh4I_rlGAXM-vrzfNhLm1Rxg,3734
|
||||
pip/_internal/vcs/git.py,sha256=TTeqDuzS-_BFSNuUStVWmE2nGDpKuvUhBBJk_CCQXV0,19144
|
||||
pip/_internal/vcs/mercurial.py,sha256=w1ZJWLKqNP1onEjkfjlwBVnMqPZNSIER8ayjQcnTq4w,5575
|
||||
pip/_internal/vcs/subversion.py,sha256=uUgdPvxmvEB8Qwtjr0Hc0XgFjbiNi5cbvI4vARLOJXo,11787
|
||||
pip/_internal/vcs/versioncontrol.py,sha256=Ma_HMZBVveSkeYvxacvqeujnkSIaF1XjxTsS3BwcJ8E,22599
|
||||
pip/_internal/wheel_builder.py,sha256=yvEULStZtty9Kplp89tDis3hGdyKQ-2BUbFLmJ_5ink,9010
|
||||
pip/_vendor/README.rst,sha256=t7IinjaiuwUh812XmVApQHJb8pTw33U8A9URqy6GlF4,9222
|
||||
pip/_vendor/__init__.py,sha256=WzusPTGWIMeQQWSVJ0h2rafGkVTa9WKJ2HT-2-EoZrU,4907
|
||||
pip/_vendor/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/cachecontrol/LICENSE.txt,sha256=hu7uh74qQ_P_H1ZJb0UfaSQ5JvAl_tuwM2ZsMExMFhs,558
|
||||
pip/_vendor/cachecontrol/__init__.py,sha256=GxwRkm_TQBtPZpfpVK9r6S9dAy2DVnVgDVHJKTiPZ1k,820
|
||||
pip/_vendor/cachecontrol/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/cachecontrol/__pycache__/_cmd.cpython-312.pyc,,
|
||||
pip/_vendor/cachecontrol/__pycache__/adapter.cpython-312.pyc,,
|
||||
pip/_vendor/cachecontrol/__pycache__/cache.cpython-312.pyc,,
|
||||
pip/_vendor/cachecontrol/__pycache__/controller.cpython-312.pyc,,
|
||||
pip/_vendor/cachecontrol/__pycache__/filewrapper.cpython-312.pyc,,
|
||||
pip/_vendor/cachecontrol/__pycache__/heuristics.cpython-312.pyc,,
|
||||
pip/_vendor/cachecontrol/__pycache__/serialize.cpython-312.pyc,,
|
||||
pip/_vendor/cachecontrol/__pycache__/wrapper.cpython-312.pyc,,
|
||||
pip/_vendor/cachecontrol/_cmd.py,sha256=iist2EpzJvDVIhMAxXq8iFnTBsiZAd6iplxfmNboNyk,1737
|
||||
pip/_vendor/cachecontrol/adapter.py,sha256=W-HW-l01gyCsnxkOyCbqx7sxrWYoBbKrDsKkVVQN6NE,6586
|
||||
pip/_vendor/cachecontrol/cache.py,sha256=OXwv7Fn2AwnKNiahJHnjtvaKLndvVLv_-zO-ltlV9qI,1953
|
||||
pip/_vendor/cachecontrol/caches/__init__.py,sha256=dtrrroK5BnADR1GWjCZ19aZ0tFsMfvFBtLQQU1sp_ag,303
|
||||
pip/_vendor/cachecontrol/caches/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/cachecontrol/caches/__pycache__/file_cache.cpython-312.pyc,,
|
||||
pip/_vendor/cachecontrol/caches/__pycache__/redis_cache.cpython-312.pyc,,
|
||||
pip/_vendor/cachecontrol/caches/file_cache.py,sha256=d8upFmy_zwaCmlbWEVBlLXFddt8Zw8c5SFpxeOZsdfw,4117
|
||||
pip/_vendor/cachecontrol/caches/redis_cache.py,sha256=9rmqwtYu_ljVkW6_oLqbC7EaX_a8YT_yLuna-eS0dgo,1386
|
||||
pip/_vendor/cachecontrol/controller.py,sha256=xBauC-vUSu5GsJsxD4-W-JaKqqbBz0MN6Zv8PA2N8hI,19102
|
||||
pip/_vendor/cachecontrol/filewrapper.py,sha256=DhxC_rSk-beKdbsYhfvBUDovQHX9r3gHH_jP9-q_mKk,4354
|
||||
pip/_vendor/cachecontrol/heuristics.py,sha256=gqMXU8w0gQuEQiSdu3Yg-0vd9kW7nrWKbLca75rheGE,4881
|
||||
pip/_vendor/cachecontrol/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_vendor/cachecontrol/serialize.py,sha256=HQd2IllQ05HzPkVLMXTF2uX5mjEQjDBkxCqUJUODpZk,5163
|
||||
pip/_vendor/cachecontrol/wrapper.py,sha256=hsGc7g8QGQTT-4f8tgz3AM5qwScg6FO0BSdLSRdEvpU,1417
|
||||
pip/_vendor/certifi/LICENSE,sha256=6TcW2mucDVpKHfYP5pWzcPBpVgPSH2-D8FPkLPwQyvc,989
|
||||
pip/_vendor/certifi/__init__.py,sha256=c9eaYufv1pSLl0Q8QNcMiMLLH4WquDcxdPyKjmI4opY,94
|
||||
pip/_vendor/certifi/__main__.py,sha256=1k3Cr95vCxxGRGDljrW3wMdpZdL3Nhf0u1n-k2qdsCY,255
|
||||
pip/_vendor/certifi/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/certifi/__pycache__/__main__.cpython-312.pyc,,
|
||||
pip/_vendor/certifi/__pycache__/core.cpython-312.pyc,,
|
||||
pip/_vendor/certifi/cacert.pem,sha256=_JFloSQDJj5-v72te-ej6sD6XTJdPHBGXyjTaQByyig,272441
|
||||
pip/_vendor/certifi/core.py,sha256=gu_ECVI1m3Rq0ytpsNE61hgQGcKaOAt9Rs9G8KsTCOI,3442
|
||||
pip/_vendor/certifi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_vendor/distlib/LICENSE.txt,sha256=gI4QyKarjesUn_mz-xn0R6gICUYG1xKpylf-rTVSWZ0,14531
|
||||
pip/_vendor/distlib/__init__.py,sha256=Deo3uo98aUyIfdKJNqofeSEFWwDzrV2QeGLXLsgq0Ag,625
|
||||
pip/_vendor/distlib/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/distlib/__pycache__/compat.cpython-312.pyc,,
|
||||
pip/_vendor/distlib/__pycache__/resources.cpython-312.pyc,,
|
||||
pip/_vendor/distlib/__pycache__/scripts.cpython-312.pyc,,
|
||||
pip/_vendor/distlib/__pycache__/util.cpython-312.pyc,,
|
||||
pip/_vendor/distlib/compat.py,sha256=2jRSjRI4o-vlXeTK2BCGIUhkc6e9ZGhSsacRM5oseTw,41467
|
||||
pip/_vendor/distlib/resources.py,sha256=LwbPksc0A1JMbi6XnuPdMBUn83X7BPuFNWqPGEKI698,10820
|
||||
pip/_vendor/distlib/scripts.py,sha256=Qvp76E9Jc3IgyYubnpqI9fS7eseGOe4FjpeVKqKt9Iw,18612
|
||||
pip/_vendor/distlib/t32.exe,sha256=a0GV5kCoWsMutvliiCKmIgV98eRZ33wXoS-XrqvJQVs,97792
|
||||
pip/_vendor/distlib/t64-arm.exe,sha256=68TAa32V504xVBnufojh0PcenpR3U4wAqTqf-MZqbPw,182784
|
||||
pip/_vendor/distlib/t64.exe,sha256=gaYY8hy4fbkHYTTnA4i26ct8IQZzkBG2pRdy0iyuBrc,108032
|
||||
pip/_vendor/distlib/util.py,sha256=vMPGvsS4j9hF6Y9k3Tyom1aaHLb0rFmZAEyzeAdel9w,66682
|
||||
pip/_vendor/distlib/w32.exe,sha256=R4csx3-OGM9kL4aPIzQKRo5TfmRSHZo6QWyLhDhNBks,91648
|
||||
pip/_vendor/distlib/w64-arm.exe,sha256=xdyYhKj0WDcVUOCb05blQYvzdYIKMbmJn2SZvzkcey4,168448
|
||||
pip/_vendor/distlib/w64.exe,sha256=ejGf-rojoBfXseGLpya6bFTFPWRG21X5KvU8J5iU-K0,101888
|
||||
pip/_vendor/distro/LICENSE,sha256=y16Ofl9KOYjhBjwULGDcLfdWBfTEZRXnduOspt-XbhQ,11325
|
||||
pip/_vendor/distro/__init__.py,sha256=2fHjF-SfgPvjyNZ1iHh_wjqWdR_Yo5ODHwZC0jLBPhc,981
|
||||
pip/_vendor/distro/__main__.py,sha256=bu9d3TifoKciZFcqRBuygV3GSuThnVD_m2IK4cz96Vs,64
|
||||
pip/_vendor/distro/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/distro/__pycache__/__main__.cpython-312.pyc,,
|
||||
pip/_vendor/distro/__pycache__/distro.cpython-312.pyc,,
|
||||
pip/_vendor/distro/distro.py,sha256=XqbefacAhDT4zr_trnbA15eY8vdK4GTghgmvUGrEM_4,49430
|
||||
pip/_vendor/distro/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_vendor/idna/LICENSE.md,sha256=t6M2q_OwThgOwGXN0W5wXQeeHMehT5EKpukYfza5zYc,1541
|
||||
pip/_vendor/idna/__init__.py,sha256=MPqNDLZbXqGaNdXxAFhiqFPKEQXju2jNQhCey6-5eJM,868
|
||||
pip/_vendor/idna/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/idna/__pycache__/codec.cpython-312.pyc,,
|
||||
pip/_vendor/idna/__pycache__/compat.cpython-312.pyc,,
|
||||
pip/_vendor/idna/__pycache__/core.cpython-312.pyc,,
|
||||
pip/_vendor/idna/__pycache__/idnadata.cpython-312.pyc,,
|
||||
pip/_vendor/idna/__pycache__/intranges.cpython-312.pyc,,
|
||||
pip/_vendor/idna/__pycache__/package_data.cpython-312.pyc,,
|
||||
pip/_vendor/idna/__pycache__/uts46data.cpython-312.pyc,,
|
||||
pip/_vendor/idna/codec.py,sha256=M2SGWN7cs_6B32QmKTyTN6xQGZeYQgQ2wiX3_DR6loE,3438
|
||||
pip/_vendor/idna/compat.py,sha256=RzLy6QQCdl9784aFhb2EX9EKGCJjg0P3PilGdeXXcx8,316
|
||||
pip/_vendor/idna/core.py,sha256=P26_XVycuMTZ1R2mNK1ZREVzM5mvTzdabBXfyZVU1Lc,13246
|
||||
pip/_vendor/idna/idnadata.py,sha256=SG8jhaGE53iiD6B49pt2pwTv_UvClciWE-N54oR2p4U,79623
|
||||
pip/_vendor/idna/intranges.py,sha256=amUtkdhYcQG8Zr-CoMM_kVRacxkivC1WgxN1b63KKdU,1898
|
||||
pip/_vendor/idna/package_data.py,sha256=_CUavOxobnbyNG2FLyHoN8QHP3QM9W1tKuw7eq9QwBk,21
|
||||
pip/_vendor/idna/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_vendor/idna/uts46data.py,sha256=H9J35VkD0F9L9mKOqjeNGd2A-Va6FlPoz6Jz4K7h-ps,243725
|
||||
pip/_vendor/msgpack/COPYING,sha256=SS3tuoXaWHL3jmCRvNH-pHTWYNNay03ulkuKqz8AdCc,614
|
||||
pip/_vendor/msgpack/__init__.py,sha256=RA8gcqK17YpkxBnNwXJVa1oa2LygWDgfF1nA1NPw3mo,1109
|
||||
pip/_vendor/msgpack/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/msgpack/__pycache__/exceptions.cpython-312.pyc,,
|
||||
pip/_vendor/msgpack/__pycache__/ext.cpython-312.pyc,,
|
||||
pip/_vendor/msgpack/__pycache__/fallback.cpython-312.pyc,,
|
||||
pip/_vendor/msgpack/exceptions.py,sha256=dCTWei8dpkrMsQDcjQk74ATl9HsIBH0ybt8zOPNqMYc,1081
|
||||
pip/_vendor/msgpack/ext.py,sha256=kteJv03n9tYzd5oo3xYopVTo4vRaAxonBQQJhXohZZo,5726
|
||||
pip/_vendor/msgpack/fallback.py,sha256=0g1Pzp0vtmBEmJ5w9F3s_-JMVURP8RS4G1cc5TRaAsI,32390
|
||||
pip/_vendor/packaging/LICENSE,sha256=ytHvW9NA1z4HS6YU0m996spceUDD2MNIUuZcSQlobEg,197
|
||||
pip/_vendor/packaging/LICENSE.APACHE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
|
||||
pip/_vendor/packaging/LICENSE.BSD,sha256=tw5-m3QvHMb5SLNMFqo5_-zpQZY2S8iP8NIYDwAo-sU,1344
|
||||
pip/_vendor/packaging/__init__.py,sha256=QhMEdPu2XogrJzV3S0KWS6t7l0I9k8EeDRJl4fnw87s,494
|
||||
pip/_vendor/packaging/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/_elffile.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/_manylinux.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/_musllinux.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/_parser.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/_structures.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/_tokenizer.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/dependency_groups.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/direct_url.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/errors.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/markers.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/metadata.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/pylock.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/requirements.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/specifiers.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/tags.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/utils.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/__pycache__/version.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/_elffile.py,sha256=-sKkptYqzYw2-x3QByJa5mB4rfPWu1pxkZHRx1WAFCY,3211
|
||||
pip/_vendor/packaging/_manylinux.py,sha256=Hf6nB0cOrayEs96-p3oIXAgGnFquv20DO5l-o2_Xnv0,9559
|
||||
pip/_vendor/packaging/_musllinux.py,sha256=Z6swjH3MA7XS3qXnmMN7QPhqP3fnoYI0eQ18e9-HgAE,2707
|
||||
pip/_vendor/packaging/_parser.py,sha256=Kf2nsDw4c54X82pY8ba4F02Bve6OygGMAjL-Begqcew,11698
|
||||
pip/_vendor/packaging/_structures.py,sha256=60jRbF78p8z5MKnNd6cAprgOadCJHV0DlmUmRBqFZcs,1109
|
||||
pip/_vendor/packaging/_tokenizer.py,sha256=tFU2Wr-ZZJdAbkXLEJo7qUQDJaIkfft9DqaifiEND7A,5391
|
||||
pip/_vendor/packaging/dependency_groups.py,sha256=XZIAVFK9uHG4RCGprmJn3VInUWMesxha_kytJuMO9eY,10218
|
||||
pip/_vendor/packaging/direct_url.py,sha256=eKmbDiPP1sLV4Mj_kCSZqqknrIyVO9Sr7JpF8KCjp4U,10917
|
||||
pip/_vendor/packaging/errors.py,sha256=6hfEYXAf8v_IF65-lFadJOMIieBP2xIKtyEXjG1nGIs,2680
|
||||
pip/_vendor/packaging/licenses/__init__.py,sha256=_Jx0XRiD_58palsWnyLrLuh59ZpGCPIPXLKdZo9OJvQ,7293
|
||||
pip/_vendor/packaging/licenses/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/licenses/__pycache__/_spdx.cpython-312.pyc,,
|
||||
pip/_vendor/packaging/licenses/_spdx.py,sha256=WW7DXiyg68up_YND_wpRYlr1SHhiV4FfJLQffghhMxQ,51122
|
||||
pip/_vendor/packaging/markers.py,sha256=QixBVcb9D2HjwEYiuhpNkbqk9znPRbU8zNX0kR1RIrU,17067
|
||||
pip/_vendor/packaging/metadata.py,sha256=crAh0E3GVGVqPlu6EdRFsaG-Y6UYznTUqjuGKRGPv6c,38770
|
||||
pip/_vendor/packaging/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_vendor/packaging/pylock.py,sha256=G_1gncTmDbRLY1jo4VDI9Uw-b5IErh_Q9V_BbVJTmD8,33890
|
||||
pip/_vendor/packaging/requirements.py,sha256=Q-BdEHVW5K785GBXt7RcP4UEsdIKWoWFqlrHjR4WV50,4395
|
||||
pip/_vendor/packaging/specifiers.py,sha256=3XBcSslm-YQEEEO_zrv4F6dR5wRxs4ErJvJ0vjNBfGM,71550
|
||||
pip/_vendor/packaging/tags.py,sha256=ANYHZxYQVp9BlOQYOHU5ArDNVIpTFl4KlbocYVBWnFs,34236
|
||||
pip/_vendor/packaging/utils.py,sha256=M7-JMKic2sP1YtV_8aW7eVGB-x3ADuKCiSrsVeCd2Uo,9848
|
||||
pip/_vendor/packaging/version.py,sha256=Mcu7Tf6Y1i0gQ4FXv4t0g8cbL5joAEshjgIpz_2vISI,38393
|
||||
pip/_vendor/pkg_resources/LICENSE,sha256=htoPAa6uRjSKPD1GUZXcHOzN55956HdppkuNoEsqR0E,1023
|
||||
pip/_vendor/pkg_resources/__init__.py,sha256=vbTJ0_ruUgGxQjlEqsruFmiNPVyh2t9q-zyTDT053xI,124451
|
||||
pip/_vendor/pkg_resources/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/platformdirs/LICENSE,sha256=KeD9YukphQ6G6yjD_czwzv30-pSHkBHP-z0NS-1tTbY,1089
|
||||
pip/_vendor/platformdirs/__init__.py,sha256=UfeSHWl8AeTtbOBOoHAxK4dODOWkZtfy-m_i7cWdJ8c,22344
|
||||
pip/_vendor/platformdirs/__main__.py,sha256=jBJ8zb7Mpx5ebcqF83xrpO94MaeCpNGHVf9cvDN2JLg,1505
|
||||
pip/_vendor/platformdirs/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/platformdirs/__pycache__/__main__.cpython-312.pyc,,
|
||||
pip/_vendor/platformdirs/__pycache__/android.cpython-312.pyc,,
|
||||
pip/_vendor/platformdirs/__pycache__/api.cpython-312.pyc,,
|
||||
pip/_vendor/platformdirs/__pycache__/macos.cpython-312.pyc,,
|
||||
pip/_vendor/platformdirs/__pycache__/unix.cpython-312.pyc,,
|
||||
pip/_vendor/platformdirs/__pycache__/version.cpython-312.pyc,,
|
||||
pip/_vendor/platformdirs/__pycache__/windows.cpython-312.pyc,,
|
||||
pip/_vendor/platformdirs/android.py,sha256=r0DshVBf-RO1jXJGX8C4Til7F1XWt-bkdWMgmvEiaYg,9013
|
||||
pip/_vendor/platformdirs/api.py,sha256=wPHOlwOsfz2oqQZ6A2FcCu5kEAj-JondzoNOHYFQ0h8,9281
|
||||
pip/_vendor/platformdirs/macos.py,sha256=0XoOgin1NK7Qki7iskD-oS8xKxw6bXgoKEgdqpCRAFQ,6322
|
||||
pip/_vendor/platformdirs/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_vendor/platformdirs/unix.py,sha256=WZmkUA--L3JNRGmz32s35YfoD3ica6xKIPdCV_HhLcs,10458
|
||||
pip/_vendor/platformdirs/version.py,sha256=BI_dKLSMwlkl57vlxZnT8oVjPiUC2W_sdx_8_h99HeQ,704
|
||||
pip/_vendor/platformdirs/windows.py,sha256=XvCfklGUMVxJbXit51jpYMN-lNeScPB82qS1CAeplL0,10362
|
||||
pip/_vendor/pygments/LICENSE,sha256=qdZvHVJt8C4p3Oc0NtNOVuhjL0bCdbvf_HBWnogvnxc,1331
|
||||
pip/_vendor/pygments/__init__.py,sha256=8uNqJCCwXqbEx5aSsBr0FykUQOBDKBihO5mPqiw1aqo,2983
|
||||
pip/_vendor/pygments/__main__.py,sha256=WrndpSe6i1ckX_SQ1KaxD9CTKGzD0EuCOFxcbwFpoLU,353
|
||||
pip/_vendor/pygments/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/__main__.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/console.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/filter.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/formatter.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/lexer.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/modeline.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/plugin.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/regexopt.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/scanner.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/sphinxext.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/style.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/token.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/unistring.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/__pycache__/util.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/console.py,sha256=AagDWqwea2yBWf10KC9ptBgMpMjxKp8yABAmh-NQOVk,1718
|
||||
pip/_vendor/pygments/filter.py,sha256=YLtpTnZiu07nY3oK9nfR6E9Y1FBHhP5PX8gvkJWcfag,1910
|
||||
pip/_vendor/pygments/filters/__init__.py,sha256=4U4jtA0X3iP83uQnB9-TI-HDSw8E8y8zMYHa0UjbbaI,40392
|
||||
pip/_vendor/pygments/filters/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/formatter.py,sha256=KZQMmyo_xkOIkQG8g66LYEkBh1bx7a0HyGCBcvhI9Ew,4390
|
||||
pip/_vendor/pygments/formatters/__init__.py,sha256=KTwBmnXlaopJhQDOemVHYHskiDghuq-08YtP6xPNJPg,5385
|
||||
pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/formatters/_mapping.py,sha256=1Cw37FuQlNacnxRKmtlPX4nyLoX9_ttko5ZwscNUZZ4,4176
|
||||
pip/_vendor/pygments/lexer.py,sha256=_kBrOJ_NT5Tl0IVM0rA9c8eysP6_yrlGzEQI0eVYB-A,35349
|
||||
pip/_vendor/pygments/lexers/__init__.py,sha256=wbIME35GH7bI1B9rNPJFqWT-ij_RApZDYPUlZycaLzA,12115
|
||||
pip/_vendor/pygments/lexers/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/lexers/__pycache__/_mapping.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/lexers/__pycache__/python.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/lexers/_mapping.py,sha256=l4tCXM8e9aPC2BD6sjIr0deT-J-z5tHgCwL-p1fS0PE,77602
|
||||
pip/_vendor/pygments/lexers/python.py,sha256=vxjn1cOHclIKJKxoyiBsQTY65GHbkZtZRuKQ2AVCKaw,53853
|
||||
pip/_vendor/pygments/modeline.py,sha256=K5eSkR8GS1r5OkXXTHOcV0aM_6xpk9eWNEIAW-OOJ2g,1005
|
||||
pip/_vendor/pygments/plugin.py,sha256=tPx0rJCTIZ9ioRgLNYG4pifCbAwTRUZddvLw-NfAk2w,1891
|
||||
pip/_vendor/pygments/regexopt.py,sha256=wXaP9Gjp_hKAdnICqoDkRxAOQJSc4v3X6mcxx3z-TNs,3072
|
||||
pip/_vendor/pygments/scanner.py,sha256=nNcETRR1tRuiTaHmHSTTECVYFPcLf6mDZu1e4u91A9E,3092
|
||||
pip/_vendor/pygments/sphinxext.py,sha256=5x7Zh9YlU6ISJ31dMwduiaanb5dWZnKg3MyEQsseNnQ,7981
|
||||
pip/_vendor/pygments/style.py,sha256=PlOZqlsnTVd58RGy50vkA2cXQ_lP5bF5EGMEBTno6DA,6420
|
||||
pip/_vendor/pygments/styles/__init__.py,sha256=x9ebctfyvCAFpMTlMJ5YxwcNYBzjgq6zJaKkNm78r4M,2042
|
||||
pip/_vendor/pygments/styles/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/styles/__pycache__/_mapping.cpython-312.pyc,,
|
||||
pip/_vendor/pygments/styles/_mapping.py,sha256=6lovFUE29tz6EsV3XYY4hgozJ7q1JL7cfO3UOlgnS8w,3312
|
||||
pip/_vendor/pygments/token.py,sha256=WbdWGhYm_Vosb0DDxW9lHNPgITXfWTsQmHt6cy9RbcM,6226
|
||||
pip/_vendor/pygments/unistring.py,sha256=al-_rBemRuGvinsrM6atNsHTmJ6DUbw24q2O2Ru1cBc,63208
|
||||
pip/_vendor/pygments/util.py,sha256=oRtSpiAo5jM9ulntkvVbgXUdiAW57jnuYGB7t9fYuhc,10031
|
||||
pip/_vendor/pyproject_hooks/LICENSE,sha256=GyKwSbUmfW38I6Z79KhNjsBLn9-xpR02DkK0NCyLQVQ,1081
|
||||
pip/_vendor/pyproject_hooks/__init__.py,sha256=cPB_a9LXz5xvsRbX1o2qyAdjLatZJdQ_Lc5McNX-X7Y,691
|
||||
pip/_vendor/pyproject_hooks/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/pyproject_hooks/__pycache__/_impl.cpython-312.pyc,,
|
||||
pip/_vendor/pyproject_hooks/_impl.py,sha256=jY-raxnmyRyB57ruAitrJRUzEexuAhGTpgMygqx67Z4,14936
|
||||
pip/_vendor/pyproject_hooks/_in_process/__init__.py,sha256=MJNPpfIxcO-FghxpBbxkG1rFiQf6HOUbV4U5mq0HFns,557
|
||||
pip/_vendor/pyproject_hooks/_in_process/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/pyproject_hooks/_in_process/__pycache__/_in_process.cpython-312.pyc,,
|
||||
pip/_vendor/pyproject_hooks/_in_process/_in_process.py,sha256=qcXMhmx__MIJq10gGHW3mA4Tl8dy8YzHMccwnNoKlw0,12216
|
||||
pip/_vendor/pyproject_hooks/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_vendor/requests/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
||||
pip/_vendor/requests/__init__.py,sha256=b6rlXPyuiLAd-s-pEPX7IejJnmIH1epCOFo_mLJrAck,5029
|
||||
pip/_vendor/requests/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/__version__.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/_internal_utils.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/adapters.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/api.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/auth.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/certs.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/compat.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/cookies.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/exceptions.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/help.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/hooks.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/models.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/packages.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/sessions.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/status_codes.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/structures.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__pycache__/utils.cpython-312.pyc,,
|
||||
pip/_vendor/requests/__version__.py,sha256=nZ3xT2HoQjEOL4OW7CM2tBWtrpfclaxuSz3bQZf_mbI,435
|
||||
pip/_vendor/requests/_internal_utils.py,sha256=9_7fcdYfMFDfyK4hD2OsRgiGiq8kDwdZcGuRqkP5R1g,1502
|
||||
pip/_vendor/requests/adapters.py,sha256=VahmpDjZCd8ERe4FfTci9NHXvtIOF7ds06gX0kWZfpo,26292
|
||||
pip/_vendor/requests/api.py,sha256=_Zb9Oa7tzVIizTKwFrPjDEY9ejtm_OnSRERnADxGsQs,6449
|
||||
pip/_vendor/requests/auth.py,sha256=KHXfnbNH2Fe4rdGJK3raL4O3nxkXyUlLizJJBEguhSc,10170
|
||||
pip/_vendor/requests/certs.py,sha256=eD1G0RoMZ3kA0lydkw7oo0lmcKqvD1hhz6yOlgSKm8w,442
|
||||
pip/_vendor/requests/compat.py,sha256=QfbmdTFiZzjSHMXiMrd4joCRU6RabtQ9zIcPoVaHIus,1822
|
||||
pip/_vendor/requests/cookies.py,sha256=bNi-iqEj4NPZ00-ob-rHvzkvObzN3lEpgw3g6paS3Xw,18590
|
||||
pip/_vendor/requests/exceptions.py,sha256=fz5n2nffa7Q30Ho9AnCuNekOo0S3BDIS7Vk4HQlakWs,4273
|
||||
pip/_vendor/requests/help.py,sha256=lREO92zUuXe0gnkptnlWRtNVqdJ3SeNwSbHgAzqMa0Q,3740
|
||||
pip/_vendor/requests/hooks.py,sha256=9frYhALsLBkHH76G-HYqvAvssSlu1C1b7L68cAs-E5g,734
|
||||
pip/_vendor/requests/models.py,sha256=tvq5Hri4ZuW2oyQYHfoZ5oc688k8DzskE2au5sZWCUE,35530
|
||||
pip/_vendor/requests/packages.py,sha256=_ZQDCJTJ8SP3kVWunSqBsRZNPzj2c1WFVqbdr08pz3U,1057
|
||||
pip/_vendor/requests/sessions.py,sha256=gbmlsNSi96sIig0mrtHzZAZT_fOIWToe-YnW7v5ptKI,30645
|
||||
pip/_vendor/requests/status_codes.py,sha256=iJUAeA25baTdw-6PfD0eF4qhpINDJRJI-yaMqxs4LEI,4322
|
||||
pip/_vendor/requests/structures.py,sha256=-IbmhVz06S-5aPSZuUthZ6-6D9XOjRuTXHOabY041XM,2912
|
||||
pip/_vendor/requests/utils.py,sha256=xpNppxOSoknLCd_nYKRM-80QrhxkZluQfiH5zOUMji8,32978
|
||||
pip/_vendor/resolvelib/LICENSE,sha256=84j9OMrRMRLB3A9mm76A5_hFQe26-3LzAw0sp2QsPJ0,751
|
||||
pip/_vendor/resolvelib/__init__.py,sha256=yoX-d4STvwGGCiQRE5cJC9Cter69SgVgqClxOCvSP7M,541
|
||||
pip/_vendor/resolvelib/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/resolvelib/__pycache__/providers.cpython-312.pyc,,
|
||||
pip/_vendor/resolvelib/__pycache__/reporters.cpython-312.pyc,,
|
||||
pip/_vendor/resolvelib/__pycache__/structs.cpython-312.pyc,,
|
||||
pip/_vendor/resolvelib/providers.py,sha256=pIWJbIdJJ9GFtNbtwTH0Ia43Vj6hYCEJj2DOLue15FM,8914
|
||||
pip/_vendor/resolvelib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_vendor/resolvelib/reporters.py,sha256=pNJf4nFxLpAeKxlBUi2GEj0a2Ij1nikY0UabTKXesT4,2037
|
||||
pip/_vendor/resolvelib/resolvers/__init__.py,sha256=728M3EvmnPbVXS7ExXlv2kMu6b7wEsoPutEfl-uVk_I,640
|
||||
pip/_vendor/resolvelib/resolvers/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/resolvelib/resolvers/__pycache__/abstract.cpython-312.pyc,,
|
||||
pip/_vendor/resolvelib/resolvers/__pycache__/criterion.cpython-312.pyc,,
|
||||
pip/_vendor/resolvelib/resolvers/__pycache__/exceptions.cpython-312.pyc,,
|
||||
pip/_vendor/resolvelib/resolvers/__pycache__/resolution.cpython-312.pyc,,
|
||||
pip/_vendor/resolvelib/resolvers/abstract.py,sha256=CNeQPnpAudY77nmzOkONSmAgRlzIf06X-X9mvRYODms,1543
|
||||
pip/_vendor/resolvelib/resolvers/criterion.py,sha256=lcmZGv5sKHOnFD_RzZwvlGSj19MeA-5rCMpdf2Sgw7Y,1768
|
||||
pip/_vendor/resolvelib/resolvers/exceptions.py,sha256=ln_jaQtgLlRUSFY627yiHG2gD7AgaXzRKaElFVh7fDQ,1768
|
||||
pip/_vendor/resolvelib/resolvers/resolution.py,sha256=3J_zkW-sD3EY-BlNXjyln__njpyH5n0UZJT6uV7CheA,24212
|
||||
pip/_vendor/resolvelib/structs.py,sha256=pu-EJiR2IBITr2SQeNPRa0rXhjlStfmO_GEgAhr3004,6420
|
||||
pip/_vendor/rich/LICENSE,sha256=3u18F6QxgVgZCj6iOcyHmlpQJxzruYrnAl9I--WNyhU,1056
|
||||
pip/_vendor/rich/__init__.py,sha256=dRxjIL-SbFVY0q3IjSMrfgBTHrm1LZDgLOygVBwiYZc,6090
|
||||
pip/_vendor/rich/__main__.py,sha256=e_aVC-tDzarWQW9SuZMuCgBr6ODV_iDNV2Wh2xkxOlw,7896
|
||||
pip/_vendor/rich/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/__main__.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_cell_widths.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_emoji_codes.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_emoji_replace.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_export_format.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_extension.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_fileno.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_inspect.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_log_render.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_loop.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_null_file.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_palettes.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_pick.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_ratio.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_spinners.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_stack.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_timer.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_win32_console.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_windows.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_windows_renderer.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/_wrap.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/abc.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/align.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/ansi.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/bar.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/box.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/cells.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/color.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/color_triplet.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/columns.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/console.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/constrain.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/containers.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/control.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/default_styles.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/diagnose.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/emoji.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/errors.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/file_proxy.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/filesize.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/highlighter.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/json.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/jupyter.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/layout.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/live.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/live_render.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/logging.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/markup.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/measure.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/padding.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/pager.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/palette.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/panel.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/pretty.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/progress.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/progress_bar.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/prompt.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/protocol.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/region.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/repr.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/rule.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/scope.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/screen.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/segment.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/spinner.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/status.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/style.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/styled.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/syntax.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/table.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/terminal_theme.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/text.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/theme.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/themes.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/traceback.cpython-312.pyc,,
|
||||
pip/_vendor/rich/__pycache__/tree.cpython-312.pyc,,
|
||||
pip/_vendor/rich/_cell_widths.py,sha256=fbmeyetEdHjzE_Vx2l1uK7tnPOhMs2X1lJfO3vsKDpA,10209
|
||||
pip/_vendor/rich/_emoji_codes.py,sha256=hu1VL9nbVdppJrVoijVshRlcRRe_v3dju3Mmd2sKZdY,140235
|
||||
pip/_vendor/rich/_emoji_replace.py,sha256=n-kcetsEUx2ZUmhQrfeMNc-teeGhpuSQ5F8VPBsyvDo,1064
|
||||
pip/_vendor/rich/_export_format.py,sha256=RI08pSrm5tBSzPMvnbTqbD9WIalaOoN5d4M1RTmLq1Y,2128
|
||||
pip/_vendor/rich/_extension.py,sha256=Xt47QacCKwYruzjDi-gOBq724JReDj9Cm9xUi5fr-34,265
|
||||
pip/_vendor/rich/_fileno.py,sha256=HWZxP5C2ajMbHryvAQZseflVfQoGzsKOHzKGsLD8ynQ,799
|
||||
pip/_vendor/rich/_inspect.py,sha256=ROT0PLC2GMWialWZkqJIjmYq7INRijQQkoSokWTaAiI,9656
|
||||
pip/_vendor/rich/_log_render.py,sha256=1ByI0PA1ZpxZY3CGJOK54hjlq4X-Bz_boIjIqCd8Kns,3225
|
||||
pip/_vendor/rich/_loop.py,sha256=hV_6CLdoPm0va22Wpw4zKqM0RYsz3TZxXj0PoS-9eDQ,1236
|
||||
pip/_vendor/rich/_null_file.py,sha256=ADGKp1yt-k70FMKV6tnqCqecB-rSJzp-WQsD7LPL-kg,1394
|
||||
pip/_vendor/rich/_palettes.py,sha256=cdev1JQKZ0JvlguV9ipHgznTdnvlIzUFDBb0It2PzjI,7063
|
||||
pip/_vendor/rich/_pick.py,sha256=evDt8QN4lF5CiwrUIXlOJCntitBCOsI3ZLPEIAVRLJU,423
|
||||
pip/_vendor/rich/_ratio.py,sha256=IOtl78sQCYZsmHyxhe45krkb68u9xVz7zFsXVJD-b2Y,5325
|
||||
pip/_vendor/rich/_spinners.py,sha256=U2r1_g_1zSjsjiUdAESc2iAMc3i4ri_S8PYP6kQ5z1I,19919
|
||||
pip/_vendor/rich/_stack.py,sha256=-C8OK7rxn3sIUdVwxZBBpeHhIzX0eI-VM3MemYfaXm0,351
|
||||
pip/_vendor/rich/_timer.py,sha256=zelxbT6oPFZnNrwWPpc1ktUeAT-Vc4fuFcRZLQGLtMI,417
|
||||
pip/_vendor/rich/_win32_console.py,sha256=BSaDRIMwBLITn_m0mTRLPqME5q-quGdSMuYMpYeYJwc,22755
|
||||
pip/_vendor/rich/_windows.py,sha256=aBwaD_S56SbgopIvayVmpk0Y28uwY2C5Bab1wl3Bp-I,1925
|
||||
pip/_vendor/rich/_windows_renderer.py,sha256=t74ZL3xuDCP3nmTp9pH1L5LiI2cakJuQRQleHCJerlk,2783
|
||||
pip/_vendor/rich/_wrap.py,sha256=FlSsom5EX0LVkA3KWy34yHnCfLtqX-ZIepXKh-70rpc,3404
|
||||
pip/_vendor/rich/abc.py,sha256=ON-E-ZqSSheZ88VrKX2M3PXpFbGEUUZPMa_Af0l-4f0,890
|
||||
pip/_vendor/rich/align.py,sha256=dg-7uY0ukMLLlUEsBDRLva22_sQgIJD4BK0dmZHFHug,10324
|
||||
pip/_vendor/rich/ansi.py,sha256=Avs1LHbSdcyOvDOdpELZUoULcBiYewY76eNBp6uFBhs,6921
|
||||
pip/_vendor/rich/bar.py,sha256=ldbVHOzKJOnflVNuv1xS7g6dLX2E3wMnXkdPbpzJTcs,3263
|
||||
pip/_vendor/rich/box.py,sha256=kmavBc_dn73L_g_8vxWSwYJD2uzBXOUFTtJOfpbczcM,10686
|
||||
pip/_vendor/rich/cells.py,sha256=KrQkj5-LghCCpJLSNQIyAZjndc4bnEqOEmi5YuZ9UCY,5130
|
||||
pip/_vendor/rich/color.py,sha256=3HSULVDj7qQkXUdFWv78JOiSZzfy5y1nkcYhna296V0,18211
|
||||
pip/_vendor/rich/color_triplet.py,sha256=3lhQkdJbvWPoLDO-AnYImAWmJvV5dlgYNCVZ97ORaN4,1054
|
||||
pip/_vendor/rich/columns.py,sha256=HUX0KcMm9dsKNi11fTbiM_h2iDtl8ySCaVcxlalEzq8,7131
|
||||
pip/_vendor/rich/console.py,sha256=t9azZpmRMVU5cphVBZSShNsmBxd2-IAWcTTlhor-E1s,100849
|
||||
pip/_vendor/rich/constrain.py,sha256=1VIPuC8AgtKWrcncQrjBdYqA3JVWysu6jZo1rrh7c7Q,1288
|
||||
pip/_vendor/rich/containers.py,sha256=c_56TxcedGYqDepHBMTuZdUIijitAQgnox-Qde0Z1qo,5502
|
||||
pip/_vendor/rich/control.py,sha256=EUTSUFLQbxY6Zmo_sdM-5Ls323vIHTBfN8TPulqeHUY,6487
|
||||
pip/_vendor/rich/default_styles.py,sha256=khQFqqaoDs3bprMqWpHw8nO5UpG2DN6QtuTd6LzZwYc,8257
|
||||
pip/_vendor/rich/diagnose.py,sha256=fJl1TItRn19gGwouqTg-8zPUW3YqQBqGltrfPQs1H9w,1025
|
||||
pip/_vendor/rich/emoji.py,sha256=Wd4bQubZdSy6-PyrRQNuMHtn2VkljK9uPZPVlu2cmx0,2367
|
||||
pip/_vendor/rich/errors.py,sha256=5pP3Kc5d4QJ_c0KFsxrfyhjiPVe7J1zOqSFbFAzcV-Y,642
|
||||
pip/_vendor/rich/file_proxy.py,sha256=Tl9THMDZ-Pk5Wm8sI1gGg_U5DhusmxD-FZ0fUbcU0W0,1683
|
||||
pip/_vendor/rich/filesize.py,sha256=_iz9lIpRgvW7MNSeCZnLg-HwzbP4GETg543WqD8SFs0,2484
|
||||
pip/_vendor/rich/highlighter.py,sha256=G_sn-8DKjM1sEjLG_oc4ovkWmiUpWvj8bXi0yed2LnY,9586
|
||||
pip/_vendor/rich/json.py,sha256=vVEoKdawoJRjAFayPwXkMBPLy7RSTs-f44wSQDR2nJ0,5031
|
||||
pip/_vendor/rich/jupyter.py,sha256=QyoKoE_8IdCbrtiSHp9TsTSNyTHY0FO5whE7jOTd9UE,3252
|
||||
pip/_vendor/rich/layout.py,sha256=ajkSFAtEVv9EFTcFs-w4uZfft7nEXhNzL7ZVdgrT5rI,14004
|
||||
pip/_vendor/rich/live.py,sha256=tF3ukAAJZ_N2ZbGclqZ-iwLoIoZ8f0HHUz79jAyJqj8,15180
|
||||
pip/_vendor/rich/live_render.py,sha256=It_39YdzrBm8o3LL0kaGorPFg-BfZWAcrBjLjFokbx4,3521
|
||||
pip/_vendor/rich/logging.py,sha256=5KaPPSMP9FxcXPBcKM4cGd_zW78PMgf-YbMVnvfSw0o,12468
|
||||
pip/_vendor/rich/markup.py,sha256=3euGKP5s41NCQwaSjTnJxus5iZMHjxpIM0W6fCxra38,8451
|
||||
pip/_vendor/rich/measure.py,sha256=HmrIJX8sWRTHbgh8MxEay_83VkqNW_70s8aKP5ZcYI8,5305
|
||||
pip/_vendor/rich/padding.py,sha256=KVEI3tOwo9sgK1YNSuH__M1_jUWmLZwRVV_KmOtVzyM,4908
|
||||
pip/_vendor/rich/pager.py,sha256=SO_ETBFKbg3n_AgOzXm41Sv36YxXAyI3_R-KOY2_uSc,828
|
||||
pip/_vendor/rich/palette.py,sha256=lInvR1ODDT2f3UZMfL1grq7dY_pDdKHw4bdUgOGaM4Y,3396
|
||||
pip/_vendor/rich/panel.py,sha256=9sQl00hPIqH5G2gALQo4NepFwpP0k9wT-s_gOms5pIc,11157
|
||||
pip/_vendor/rich/pretty.py,sha256=gy3S72u4FRg2ytoo7N1ZDWDIvB4unbzd5iUGdgm-8fc,36391
|
||||
pip/_vendor/rich/progress.py,sha256=CUc2lkU-X59mVdGfjMCBkZeiGPL3uxdONjhNJF2T7wY,60408
|
||||
pip/_vendor/rich/progress_bar.py,sha256=mZTPpJUwcfcdgQCTTz3kyY-fc79ddLwtx6Ghhxfo064,8162
|
||||
pip/_vendor/rich/prompt.py,sha256=l0RhQU-0UVTV9e08xW1BbIj0Jq2IXyChX4lC0lFNzt4,12447
|
||||
pip/_vendor/rich/protocol.py,sha256=5hHHDDNHckdk8iWH5zEbi-zuIVSF5hbU2jIo47R7lTE,1391
|
||||
pip/_vendor/rich/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_vendor/rich/region.py,sha256=rNT9xZrVZTYIXZC0NYn41CJQwYNbR-KecPOxTgQvB8Y,166
|
||||
pip/_vendor/rich/repr.py,sha256=5MZJZmONgC6kud-QW-_m1okXwL2aR6u6y-pUcUCJz28,4431
|
||||
pip/_vendor/rich/rule.py,sha256=0fNaS_aERa3UMRc3T5WMpN_sumtDxfaor2y3of1ftBk,4602
|
||||
pip/_vendor/rich/scope.py,sha256=TMUU8qo17thyqQCPqjDLYpg_UU1k5qVd-WwiJvnJVas,2843
|
||||
pip/_vendor/rich/screen.py,sha256=YoeReESUhx74grqb0mSSb9lghhysWmFHYhsbMVQjXO8,1591
|
||||
pip/_vendor/rich/segment.py,sha256=otnKeKGEV-WRlQVosfJVeFDcDxAKHpvJ_hLzSu5lumM,24743
|
||||
pip/_vendor/rich/spinner.py,sha256=onIhpKlljRHppTZasxO8kXgtYyCHUkpSgKglRJ3o51g,4214
|
||||
pip/_vendor/rich/status.py,sha256=kkPph3YeAZBo-X-4wPp8gTqZyU466NLwZBA4PZTTewo,4424
|
||||
pip/_vendor/rich/style.py,sha256=W9Ccy8Py8lNICtlfcp-ryzMTuQaGxAU3av7-g5fHu0s,26990
|
||||
pip/_vendor/rich/styled.py,sha256=eZNnzGrI4ki_54pgY3Oj0T-x3lxdXTYh4_ryDB24wBU,1258
|
||||
pip/_vendor/rich/syntax.py,sha256=eDKIRwl--eZ0Lwo2da2RRtfutXGavrJO61Cl5OkS59U,36371
|
||||
pip/_vendor/rich/table.py,sha256=ZmT7V7MMCOYKw7TGY9SZLyYDf6JdM-WVf07FdVuVhTI,40049
|
||||
pip/_vendor/rich/terminal_theme.py,sha256=1j5-ufJfnvlAo5Qsi_ACZiXDmwMXzqgmFByObT9-yJY,3370
|
||||
pip/_vendor/rich/text.py,sha256=AO7JPCz6-gaN1thVLXMBntEmDPVYFgFNG1oM61_sanU,47552
|
||||
pip/_vendor/rich/theme.py,sha256=oNyhXhGagtDlbDye3tVu3esWOWk0vNkuxFw-_unlaK0,3771
|
||||
pip/_vendor/rich/themes.py,sha256=0xgTLozfabebYtcJtDdC5QkX5IVUEaviqDUJJh4YVFk,102
|
||||
pip/_vendor/rich/traceback.py,sha256=c0WmB_L04_UfZbLaoH982_U_s7eosxKMUiAVmDPdRYU,35861
|
||||
pip/_vendor/rich/tree.py,sha256=yWnQ6rAvRGJ3qZGqBrxS2SW2TKBTNrP0SdY8QxOFPuw,9451
|
||||
pip/_vendor/tomli/LICENSE,sha256=uAgWsNUwuKzLTCIReDeQmEpuO2GSLCte6S8zcqsnQv4,1072
|
||||
pip/_vendor/tomli/__init__.py,sha256=qs0S40oJfkXIQkncdYZzP8xYf0pUJb180xGS3jQPXtc,314
|
||||
pip/_vendor/tomli/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/tomli/__pycache__/_parser.cpython-312.pyc,,
|
||||
pip/_vendor/tomli/__pycache__/_re.cpython-312.pyc,,
|
||||
pip/_vendor/tomli/__pycache__/_types.cpython-312.pyc,,
|
||||
pip/_vendor/tomli/_parser.py,sha256=3FFi5lACz9ef4mjYKW4Sw48e15hvdgAOIEvFANUcft8,26232
|
||||
pip/_vendor/tomli/_re.py,sha256=n8-Io8ZK1U-F6jzlg7Pabc40hLFJsawE2uNLKH9w7iU,3235
|
||||
pip/_vendor/tomli/_types.py,sha256=-GTG2VUqkpxwMqzmVO4F7ybKddIbAnuAHXfmWQcTi3Q,254
|
||||
pip/_vendor/tomli/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
|
||||
pip/_vendor/tomli_w/LICENSE,sha256=uAgWsNUwuKzLTCIReDeQmEpuO2GSLCte6S8zcqsnQv4,1072
|
||||
pip/_vendor/tomli_w/__init__.py,sha256=0F8yDtXx3Uunhm874KrAcP76srsM98y7WyHQwCulZbo,169
|
||||
pip/_vendor/tomli_w/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/tomli_w/__pycache__/_writer.cpython-312.pyc,,
|
||||
pip/_vendor/tomli_w/_writer.py,sha256=dsifFS2xYf1i76mmRyfz9y125xC7Z_HQ845ZKhJsYXs,6961
|
||||
pip/_vendor/tomli_w/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
|
||||
pip/_vendor/truststore/LICENSE,sha256=M757fo-k_Rmxdg4ajtimaL2rhSyRtpLdQUJLy3Jan8o,1086
|
||||
pip/_vendor/truststore/__init__.py,sha256=Bu7kqkmpunhLsj5xCu8gT_25ktoPXcSnwe8VHk1GmJo,1320
|
||||
pip/_vendor/truststore/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/truststore/__pycache__/_api.cpython-312.pyc,,
|
||||
pip/_vendor/truststore/__pycache__/_macos.cpython-312.pyc,,
|
||||
pip/_vendor/truststore/__pycache__/_openssl.cpython-312.pyc,,
|
||||
pip/_vendor/truststore/__pycache__/_ssl_constants.cpython-312.pyc,,
|
||||
pip/_vendor/truststore/__pycache__/_windows.cpython-312.pyc,,
|
||||
pip/_vendor/truststore/_api.py,sha256=CYJCV5BTfttZYfqY3movdMBE-8az7uhET_LYbKT2Nn4,11413
|
||||
pip/_vendor/truststore/_macos.py,sha256=nZlLkOmszUE0g6ryRwBVGY5COzPyudcsiJtDWarM5LQ,20503
|
||||
pip/_vendor/truststore/_openssl.py,sha256=zB-SQvJydks7tQ0yIwrP6GD3fQNSSaPiq7zw4yF5T40,2412
|
||||
pip/_vendor/truststore/_ssl_constants.py,sha256=NUD4fVKdSD02ri7-db0tnO0VqLP9aHuzmStcW7tAl08,1130
|
||||
pip/_vendor/truststore/_windows.py,sha256=rAHyKYD8M7t-bXfG8VgOVa3TpfhVhbt4rZQlO45YuP8,17993
|
||||
pip/_vendor/truststore/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_vendor/urllib3/LICENSE.txt,sha256=Ew46ZNX91dCWp1JpRjSn2d8oRGnehuVzIQAmgEHj1oY,1093
|
||||
pip/_vendor/urllib3/__init__.py,sha256=JMo1tg1nIV1AeJ2vENC_Txfl0e5h6Gzl9DGVk1rWRbo,6979
|
||||
pip/_vendor/urllib3/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/__pycache__/_base_connection.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/__pycache__/_collections.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/__pycache__/_request_methods.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/__pycache__/_version.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/__pycache__/connection.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/__pycache__/connectionpool.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/__pycache__/exceptions.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/__pycache__/fields.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/__pycache__/filepost.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/__pycache__/poolmanager.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/__pycache__/response.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/_base_connection.py,sha256=T1cwH3RhzsrBh6Bz3AOGVDboRsE7veijqZPXXQTR2Rg,5568
|
||||
pip/_vendor/urllib3/_collections.py,sha256=UvV7UqtGTSKdvw8N_LxWuEikZLm5gB1zFfTZYH9KhAk,17595
|
||||
pip/_vendor/urllib3/_request_methods.py,sha256=gCeF85SO_UU4WoPwYHIoz_tw-eM_EVOkLFp8OFsC7DA,9931
|
||||
pip/_vendor/urllib3/_version.py,sha256=vKE8or0mmqgsFpVb7FYms-nNOVCPPAEifgxVrTaPByw,704
|
||||
pip/_vendor/urllib3/connection.py,sha256=1ZR2gqfFdIzTYIUwF0K5nftg26hLqU5nr1yHTdKb7WA,42800
|
||||
pip/_vendor/urllib3/connectionpool.py,sha256=ZEhudsa8BIubD2M0XoxBBsjxbsXwMgUScH7oQ9i-j1Y,43371
|
||||
pip/_vendor/urllib3/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pip/_vendor/urllib3/contrib/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/contrib/__pycache__/pyopenssl.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/contrib/__pycache__/socks.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/contrib/emscripten/__init__.py,sha256=ZruXaWKVzAEJdqNH3NEh0mrHrw--2VZYb0zX0RonNZA,870
|
||||
pip/_vendor/urllib3/contrib/emscripten/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/contrib/emscripten/__pycache__/connection.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/contrib/emscripten/__pycache__/fetch.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/contrib/emscripten/__pycache__/request.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/contrib/emscripten/__pycache__/response.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/contrib/emscripten/connection.py,sha256=giElsBoUsKVURbZzb8GCrJmqW23Xnvj2aNyQVF42slg,8960
|
||||
pip/_vendor/urllib3/contrib/emscripten/emscripten_fetch_worker.js,sha256=z1k3zZ4_hDKd3-tN7wzz8LHjHC2pxN_uu8B3k9D9A3c,3677
|
||||
pip/_vendor/urllib3/contrib/emscripten/fetch.py,sha256=5xcd--viFxZd2nBy0aK73dtJ9Tsh1yYZU_SUXwnwibk,23520
|
||||
pip/_vendor/urllib3/contrib/emscripten/request.py,sha256=mL28szy1KvE3NJhWor5jNmarp8gwplDU-7gwGZY5g0Q,566
|
||||
pip/_vendor/urllib3/contrib/emscripten/response.py,sha256=7oVPENYZHuzEGRtG40HonpH5tAIYHsGcHPbJt2Z0U-Y,9507
|
||||
pip/_vendor/urllib3/contrib/pyopenssl.py,sha256=nXZKMoHsi4mPP5K3rh0OdIbxNIf8AZ0mFUEe46G2kec,19750
|
||||
pip/_vendor/urllib3/contrib/socks.py,sha256=eB2eWfu8Wz1fn-qvr_qE_dZAceck2Ncv7XQ15DlvVbU,7547
|
||||
pip/_vendor/urllib3/exceptions.py,sha256=eeQ77nJjF97bP6SvCK4gmx6BpQZKU8yjvM-AIDwZdX8,9952
|
||||
pip/_vendor/urllib3/fields.py,sha256=FCf7UULSkf10cuTRUWTQESzxgl1WT8e2aCy3kfyZins,10829
|
||||
pip/_vendor/urllib3/filepost.py,sha256=U8eNZ-mpKKHhrlbHEEiTxxgK16IejhEa7uz42yqA_dI,2388
|
||||
pip/_vendor/urllib3/http2/__init__.py,sha256=xzrASH7R5ANRkPJOot5lGnATOq3KKuyXzI42rcnwmqs,1741
|
||||
pip/_vendor/urllib3/http2/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/http2/__pycache__/connection.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/http2/__pycache__/probe.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/http2/connection.py,sha256=bHMH6fNvatwXPrKqrcn74yA3pUWcqPDppnK1LcKCbP8,12578
|
||||
pip/_vendor/urllib3/http2/probe.py,sha256=nnAkqbhAakOiF75rz7W0udZ38Eeh_uD8fjV74N73FEI,3014
|
||||
pip/_vendor/urllib3/poolmanager.py,sha256=2pkDujt-6CTSerSwXfkxTvcM93E2lsNHHb4J_Ae6NNM,23845
|
||||
pip/_vendor/urllib3/py.typed,sha256=UaCuPFa3H8UAakbt-5G8SPacldTOGvJv18pPjUJ5gDY,93
|
||||
pip/_vendor/urllib3/response.py,sha256=eEj6tX98Zp21lgRC8xAHPdiI5bRdHlkuKUcAjrUyU78,52743
|
||||
pip/_vendor/urllib3/util/__init__.py,sha256=-qeS0QceivazvBEKDNFCAI-6ACcdDOE4TMvo7SLNlAQ,1001
|
||||
pip/_vendor/urllib3/util/__pycache__/__init__.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/util/__pycache__/connection.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/util/__pycache__/proxy.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/util/__pycache__/request.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/util/__pycache__/response.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/util/__pycache__/retry.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/util/__pycache__/ssl_.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/util/__pycache__/ssl_match_hostname.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/util/__pycache__/ssltransport.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/util/__pycache__/timeout.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/util/__pycache__/url.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/util/__pycache__/util.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/util/__pycache__/wait.cpython-312.pyc,,
|
||||
pip/_vendor/urllib3/util/connection.py,sha256=JjO722lzHlzLXPTkr9ZWBdhseXnMVjMSb1DJLVrXSnQ,4444
|
||||
pip/_vendor/urllib3/util/proxy.py,sha256=seP8-Q5B6bB0dMtwPj-YcZZQ30vHuLqRu-tI0JZ2fzs,1148
|
||||
pip/_vendor/urllib3/util/request.py,sha256=p9Ki9eo1tFBO-jqV_7KmmJ60RKqoY2r4ao0SmaHLyOs,8086
|
||||
pip/_vendor/urllib3/util/response.py,sha256=vQE639uoEhj1vpjEdxu5lNIhJCSUZkd7pqllUI0BZOA,3374
|
||||
pip/_vendor/urllib3/util/retry.py,sha256=WOcIHVaxKf-dVb89lUbpvcpeM7rNYF_vsKsCOKw10Z8,19235
|
||||
pip/_vendor/urllib3/util/ssl_.py,sha256=Y9RNkWCIehDxIRvyFnHUjiMlPolm368GYMya2YdDOag,19929
|
||||
pip/_vendor/urllib3/util/ssl_match_hostname.py,sha256=Di7DU7zokoltapT_F0Sj21ffYxwaS_cE5apOtwueeyA,5845
|
||||
pip/_vendor/urllib3/util/ssltransport.py,sha256=Ez4O8pR_vT8dan_FvqBYS6dgDfBXEMfVfrzcdUoWfi4,8847
|
||||
pip/_vendor/urllib3/util/timeout.py,sha256=vsUJRpO0nfKk-y1OKlgFGY1ONJGPgkaZ7B7kruEpVYw,10363
|
||||
pip/_vendor/urllib3/util/url.py,sha256=PEDQMypidude0nAZctLLiFK9epN-LPnSH7KpOLLwqH0,15256
|
||||
pip/_vendor/urllib3/util/util.py,sha256=j3lbZK1jPyiwD34T8IgJzdWEZVT-4E-0vYIJi9UjeNA,1146
|
||||
pip/_vendor/urllib3/util/wait.py,sha256=_ph8IrUR3sqPqi0OopQgJUlH4wzkGeM5CiyA7XGGtmI,4423
|
||||
pip/_vendor/vendor.txt,sha256=52c7zlghmshnINutv0knkh1sIT8jY7epMMHgFZTuowI,316
|
||||
pip/py.typed,sha256=EBVvvPRTn_eIpz5e5QztSCdrMX7Qwd7VP93RSoIlZ2I,286
|
||||
@@ -0,0 +1,4 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: flit 3.12.0
|
||||
Root-Is-Purelib: true
|
||||
Tag: py3-none-any
|
||||
@@ -0,0 +1,4 @@
|
||||
[console_scripts]
|
||||
pip=pip._internal.cli.main:main
|
||||
pip3=pip._internal.cli.main:main
|
||||
|
||||
@@ -0,0 +1,868 @@
|
||||
@Switch01
|
||||
A_Rog
|
||||
Aakanksha Agrawal
|
||||
Aarni Koskela
|
||||
Abhinav Sagar
|
||||
ABHYUDAY PRATAP SINGH
|
||||
abs51295
|
||||
AceGentile
|
||||
Adam Chainz
|
||||
Adam Tse
|
||||
Adam Turner
|
||||
Adam Wentz
|
||||
admin
|
||||
Adolfo Ochagavía
|
||||
Adrien Morison
|
||||
Agus
|
||||
ahayrapetyan
|
||||
Ahilya
|
||||
AinsworthK
|
||||
Akash Srivastava
|
||||
Alan Yee
|
||||
Albert Tugushev
|
||||
Albert-Guan
|
||||
albertg
|
||||
Alberto Sottile
|
||||
Aleks Bunin
|
||||
Ales Erjavec
|
||||
Alessandro Molina
|
||||
Alethea Flowers
|
||||
Alex Gaynor
|
||||
Alex Grönholm
|
||||
Alex Hedges
|
||||
Alex Loosley
|
||||
Alex Morega
|
||||
Alex Stachowiak
|
||||
Alexander Regueiro
|
||||
Alexander Shtyrov
|
||||
Alexandre Conrad
|
||||
Alexey Popravka
|
||||
Aleš Erjavec
|
||||
Alli
|
||||
Aman
|
||||
Ami Fischman
|
||||
Ananya Maiti
|
||||
Anatoly Techtonik
|
||||
Anders Kaseorg
|
||||
Andre Aguiar
|
||||
Andreas Lutro
|
||||
Andrei Geacar
|
||||
Andrew Gaul
|
||||
Andrew Shymanel
|
||||
Andrey Bienkowski
|
||||
Andrey Bulgakov
|
||||
Andrés Delfino
|
||||
Andy Freeland
|
||||
Andy Kluger
|
||||
Ani Hayrapetyan
|
||||
Aniruddha Basak
|
||||
Anish Tambe
|
||||
Anrs Hu
|
||||
Anthony Sottile
|
||||
Antoine Lambert
|
||||
Antoine Musso
|
||||
Anton Ovchinnikov
|
||||
Anton Patrushev
|
||||
Anton Zelenov
|
||||
Antonio Alvarado Hernandez
|
||||
Antony Lee
|
||||
Antti Kaihola
|
||||
Anubhav Patel
|
||||
Anudit Nagar
|
||||
Anuj Godase
|
||||
AQNOUCH Mohammed
|
||||
AraHaan
|
||||
arena
|
||||
arenasys
|
||||
Arindam Choudhury
|
||||
Armin Ronacher
|
||||
Arnon Yaari
|
||||
Artem
|
||||
Arun Babu Neelicattu
|
||||
Ashley Manton
|
||||
Ashwin Ramaswami
|
||||
atse
|
||||
Atsushi Odagiri
|
||||
Avinash Karhana
|
||||
Avner Cohen
|
||||
Awit (Ah-Wit) Ghirmai
|
||||
Baptiste Mispelon
|
||||
Barney Gale
|
||||
barneygale
|
||||
Bartek Ogryczak
|
||||
Bastian Venthur
|
||||
Ben Bodenmiller
|
||||
Ben Darnell
|
||||
Ben Hoyt
|
||||
Ben Mares
|
||||
Ben Rosser
|
||||
Bence Nagy
|
||||
Benjamin Peterson
|
||||
Benjamin VanEvery
|
||||
Benoit Pierre
|
||||
Berker Peksag
|
||||
Bernard
|
||||
Bernard Tyers
|
||||
Bernardo B. Marques
|
||||
Bernhard M. Wiedemann
|
||||
Bertil Hatt
|
||||
Bhavam Vidyarthi
|
||||
Blazej Michalik
|
||||
Bogdan Opanchuk
|
||||
BorisZZZ
|
||||
Brad Erickson
|
||||
Bradley Ayers
|
||||
Bradley Reynolds
|
||||
Branch Vincent
|
||||
Brandon L. Reiss
|
||||
Brandt Bucher
|
||||
Brannon Dorsey
|
||||
Brett Randall
|
||||
Brett Rosen
|
||||
Brian Cristante
|
||||
Brian Rosner
|
||||
briantracy
|
||||
BrownTruck
|
||||
Bruno Oliveira
|
||||
Bruno Renié
|
||||
Bruno S
|
||||
Bstrdsmkr
|
||||
Buck Golemon
|
||||
burrows
|
||||
Bussonnier Matthias
|
||||
bwoodsend
|
||||
c22
|
||||
Caleb Brown
|
||||
Caleb Martinez
|
||||
Calvin Smith
|
||||
Carl Meyer
|
||||
Carlos Liam
|
||||
Carol Willing
|
||||
Carter Thayer
|
||||
Cass
|
||||
Chandrasekhar Atina
|
||||
Charlie Marsh
|
||||
charwick
|
||||
Chih-Hsuan Yen
|
||||
Chris Brinker
|
||||
Chris Hunt
|
||||
Chris Jerdonek
|
||||
Chris Kuehl
|
||||
Chris Markiewicz
|
||||
Chris McDonough
|
||||
Chris Pawley
|
||||
Chris Pryer
|
||||
Chris Wolfe
|
||||
Christian Clauss
|
||||
Christian Heimes
|
||||
Christian Oudard
|
||||
Christoph Reiter
|
||||
Christopher Hunt
|
||||
Christopher Snyder
|
||||
chrysle
|
||||
cjc7373
|
||||
Clark Boylan
|
||||
Claudio Jolowicz
|
||||
Clay McClure
|
||||
Cody
|
||||
Cody Soyland
|
||||
Colin Watson
|
||||
Collin Anderson
|
||||
Connor Osborn
|
||||
Cooper Lees
|
||||
Cooper Ry Lees
|
||||
Cory Benfield
|
||||
Cory Wright
|
||||
Craig Kerstiens
|
||||
Cristian Sorinel
|
||||
Cristina
|
||||
Cristina Muñoz
|
||||
ctg123
|
||||
Curtis Doty
|
||||
cytolentino
|
||||
Daan De Meyer
|
||||
Dale
|
||||
Damian
|
||||
Damian Quiroga
|
||||
Damian Shaw
|
||||
Dan Black
|
||||
Dan Savilonis
|
||||
Dan Sully
|
||||
Dane Hillard
|
||||
daniel
|
||||
Daniel Collins
|
||||
Daniel Hahler
|
||||
Daniel Hollas
|
||||
Daniel Holth
|
||||
Daniel Jost
|
||||
Daniel Katz
|
||||
Daniel Shaulov
|
||||
Daniele Esposti
|
||||
Daniele Nicolodi
|
||||
Daniele Procida
|
||||
Daniil Konovalenko
|
||||
Danny Hermes
|
||||
Danny McClanahan
|
||||
Darren Kavanagh
|
||||
Dav Clark
|
||||
Dave Abrahams
|
||||
Dave Jones
|
||||
David Aguilar
|
||||
David Black
|
||||
David Bordeynik
|
||||
David Caro
|
||||
David D Lowe
|
||||
David Evans
|
||||
David Hewitt
|
||||
David Linke
|
||||
David Poggi
|
||||
David Poznik
|
||||
David Pursehouse
|
||||
David Runge
|
||||
David Tucker
|
||||
David Wales
|
||||
Davidovich
|
||||
ddelange
|
||||
Deepak Sharma
|
||||
Deepyaman Datta
|
||||
Denis Roussel (ACSONE)
|
||||
Denise Yu
|
||||
dependabot[bot]
|
||||
derwolfe
|
||||
Desetude
|
||||
developer
|
||||
Devesh Kumar
|
||||
Devesh Kumar Singh
|
||||
devsagul
|
||||
Diego Caraballo
|
||||
Diego Ramirez
|
||||
DiegoCaraballo
|
||||
Dimitri Merejkowsky
|
||||
Dimitri Papadopoulos
|
||||
Dimitri Papadopoulos Orfanos
|
||||
Dirk Stolle
|
||||
dkjsone
|
||||
Dmitrii Sutiagin
|
||||
Dmitry Gladkov
|
||||
Dmitry Volodin
|
||||
Domen Kožar
|
||||
Dominic Davis-Foster
|
||||
Donald Stufft
|
||||
Dongweiming
|
||||
doron zarhi
|
||||
Dos Moonen
|
||||
Douglas Thor
|
||||
DrFeathers
|
||||
Dustin Ingram
|
||||
Dustin Rodrigues
|
||||
Dwayne Bailey
|
||||
Ed Morley
|
||||
Edgar Ramírez
|
||||
Edgar Ramírez Mondragón
|
||||
Ee Durbin
|
||||
Efflam Lemaillet
|
||||
efflamlemaillet
|
||||
Eitan Adler
|
||||
ekristina
|
||||
elainechan
|
||||
Eli Schwartz
|
||||
Elisha Hollander
|
||||
Ellen Marie Dash
|
||||
Emil Burzo
|
||||
Emil Styrke
|
||||
Emmanuel Arias
|
||||
Endoh Takanao
|
||||
enoch
|
||||
Erdinc Mutlu
|
||||
Eric Cousineau
|
||||
Eric Gillingham
|
||||
Eric Hanchrow
|
||||
Eric Hopper
|
||||
Erik M. Bray
|
||||
Erik Rose
|
||||
Erwin Janssen
|
||||
Eugene Vereshchagin
|
||||
everdimension
|
||||
Federico
|
||||
Felipe Peter
|
||||
Felix Yan
|
||||
fiber-space
|
||||
Filip Kokosiński
|
||||
Filipe Laíns
|
||||
Finn Womack
|
||||
finnagin
|
||||
Flavio Amurrio
|
||||
Florian Briand
|
||||
Florian Rathgeber
|
||||
Francesco
|
||||
Francesco Montesano
|
||||
Fredrik Orderud
|
||||
Fredrik Roubert
|
||||
Frost Ming
|
||||
Gabriel Curio
|
||||
Gabriel de Perthuis
|
||||
Garry Polley
|
||||
gavin
|
||||
gdanielson
|
||||
Gene Wood
|
||||
Geoffrey Sneddon
|
||||
George Margaritis
|
||||
George Song
|
||||
Georgi Valkov
|
||||
Georgy Pchelkin
|
||||
Gertjan van Zwieten
|
||||
ghost
|
||||
Giancarlo Cicellyn Comneno
|
||||
Giftlin Rajaiah
|
||||
gizmoguy1
|
||||
gkdoc
|
||||
Godefroid Chapelle
|
||||
Gopinath M
|
||||
GOTO Hayato
|
||||
gousaiyang
|
||||
gpiks
|
||||
Greg Roodt
|
||||
Greg Ward
|
||||
Guido Diepen
|
||||
Guilherme Espada
|
||||
Guillaume Seguin
|
||||
gutsytechster
|
||||
Guy Rozendorn
|
||||
Guy Tuval
|
||||
gzpan123
|
||||
Hanjun Kim
|
||||
Hari Charan
|
||||
Harsh Vardhan
|
||||
Harsha Sai
|
||||
harupy
|
||||
Harutaka Kawamura
|
||||
Hasan-8326
|
||||
hauntsaninja
|
||||
Henrich Hartzer
|
||||
Henry Schreiner
|
||||
Herbert Pfennig
|
||||
Holly Stotelmyer
|
||||
Honnix
|
||||
Hsiaoming Yang
|
||||
Hugo Lopes Tavares
|
||||
Hugo van Kemenade
|
||||
Hugues Bruant
|
||||
Hynek Schlawack
|
||||
iamsrp-deshaw
|
||||
Ian Bicking
|
||||
Ian Cordasco
|
||||
Ian Lee
|
||||
Ian Stapleton Cordasco
|
||||
Ian Wienand
|
||||
Igor Kuzmitshov
|
||||
Igor Sobreira
|
||||
Ikko Ashimine
|
||||
Ilan Schnell
|
||||
Illia Volochii
|
||||
Ilya Abdolmanafi
|
||||
Ilya Baryshev
|
||||
Inada Naoki
|
||||
Ionel Cristian Mărieș
|
||||
Ionel Maries Cristian
|
||||
Itamar Turner-Trauring
|
||||
iTrooz
|
||||
Ivan Pozdeev
|
||||
J. Nick Koston
|
||||
Jacob Kim
|
||||
Jacob Walls
|
||||
Jaime Sanz
|
||||
Jake Lishman
|
||||
jakirkham
|
||||
Jakub Kuczys
|
||||
Jakub Stasiak
|
||||
Jakub Vysoky
|
||||
Jakub Wilk
|
||||
James
|
||||
James Cleveland
|
||||
James Curtin
|
||||
James Firth
|
||||
James Gerity
|
||||
James Polley
|
||||
Jan Pokorný
|
||||
Jannis Leidel
|
||||
Jarek Potiuk
|
||||
jarondl
|
||||
Jason Curtis
|
||||
Jason R. Coombs
|
||||
JasonMo
|
||||
JasonMo1
|
||||
Jay Graves
|
||||
Jean Abou Samra
|
||||
Jean-Christophe Fillion-Robin
|
||||
Jeff Barber
|
||||
Jeff Dairiki
|
||||
Jeff Widman
|
||||
Jelmer Vernooij
|
||||
jenix21
|
||||
Jeremy Fleischman
|
||||
Jeremy Stanley
|
||||
Jeremy Zafran
|
||||
Jesse Rittner
|
||||
Jiashuo Li
|
||||
Jim Fisher
|
||||
Jim Garrison
|
||||
Jinzhe Zeng
|
||||
Jiun Bae
|
||||
Jivan Amara
|
||||
Joa
|
||||
Joe Bylund
|
||||
Joe Michelini
|
||||
Johannes Altmanninger
|
||||
John Paton
|
||||
John Sirois
|
||||
John T. Wodder II
|
||||
John-Scott Atlakson
|
||||
johnthagen
|
||||
Jon Banafato
|
||||
Jon Dufresne
|
||||
Jon Parise
|
||||
Jonas Nockert
|
||||
Jonathan Herbert
|
||||
Joonatan Partanen
|
||||
Joost Molenaar
|
||||
Jorge Niedbalski
|
||||
Joseph Bylund
|
||||
Joseph Long
|
||||
Josh Bronson
|
||||
Josh Cannon
|
||||
Josh Hansen
|
||||
Josh Schneier
|
||||
Joshua
|
||||
JoshuaPerdue
|
||||
Jost Migenda
|
||||
Juan Luis Cano Rodríguez
|
||||
Juanjo Bazán
|
||||
Judah Rand
|
||||
Julian Berman
|
||||
Julian Gethmann
|
||||
Julien Demoor
|
||||
Julien Stephan
|
||||
July Tikhonov
|
||||
Jussi Kukkonen
|
||||
Justin van Heek
|
||||
jwg4
|
||||
Jyrki Pulliainen
|
||||
Kai Chen
|
||||
Kai Mueller
|
||||
Kamal Bin Mustafa
|
||||
Karolina Surma
|
||||
kasium
|
||||
kaustav haldar
|
||||
Kaz Nishimura
|
||||
keanemind
|
||||
Keith Maxwell
|
||||
Kelsey Hightower
|
||||
Kenneth Belitzky
|
||||
Kenneth Reitz
|
||||
Kevin Burke
|
||||
Kevin Carter
|
||||
Kevin Frommelt
|
||||
Kevin R Patterson
|
||||
Kevin Turcios
|
||||
Kexuan Sun
|
||||
Kit Randel
|
||||
Klaas van Schelven
|
||||
KOLANICH
|
||||
konstin
|
||||
kpinc
|
||||
Krishan Bhasin
|
||||
Krishna Oza
|
||||
Kumar McMillan
|
||||
Kuntal Majumder
|
||||
Kurt McKee
|
||||
Kyle Persohn
|
||||
lakshmanaram
|
||||
Laszlo Kiss-Kollar
|
||||
Laurent Bristiel
|
||||
Laurent LAPORTE
|
||||
Laurie O
|
||||
Laurie Opperman
|
||||
layday
|
||||
Leon Sasson
|
||||
Lev Givon
|
||||
Lincoln de Sousa
|
||||
Lipis
|
||||
lorddavidiii
|
||||
Loren Carvalho
|
||||
Lucas Cimon
|
||||
Ludovic Gasc
|
||||
Luis Medel
|
||||
Lukas Geiger
|
||||
Lukas Juhrich
|
||||
Luke Macken
|
||||
Luo Jiebin
|
||||
luojiebin
|
||||
luz.paz
|
||||
László Kiss Kollár
|
||||
M00nL1ght
|
||||
MajorTanya
|
||||
Malcolm Smith
|
||||
Marc Abramowitz
|
||||
Marc Tamlyn
|
||||
Marcus Smith
|
||||
Mariatta
|
||||
Mark Kohler
|
||||
Mark McLoughlin
|
||||
Mark Williams
|
||||
Markus Hametner
|
||||
Martey Dodoo
|
||||
Martin Fischer
|
||||
Martin Häcker
|
||||
Martin Pavlasek
|
||||
Masaki
|
||||
Masklinn
|
||||
Matej Stuchlik
|
||||
Mateusz Sokół
|
||||
Mathew Jennings
|
||||
Mathieu Bridon
|
||||
Mathieu Kniewallner
|
||||
Matt Bacchi
|
||||
Matt Good
|
||||
Matt Maker
|
||||
Matt Robenolt
|
||||
Matt Wozniski
|
||||
matthew
|
||||
Matthew Einhorn
|
||||
Matthew Feickert
|
||||
Matthew Gilliard
|
||||
Matthew Hughes
|
||||
Matthew Iversen
|
||||
Matthew Treinish
|
||||
Matthew Trumbell
|
||||
Matthew Willson
|
||||
Matthias Bussonnier
|
||||
mattip
|
||||
Maurits van Rees
|
||||
Max W Chase
|
||||
Maxim Kurnikov
|
||||
Maxime Rouyrre
|
||||
mayeut
|
||||
mbaluna
|
||||
Md Sujauddin Sekh
|
||||
mdebi
|
||||
Meet Vasita
|
||||
memoselyk
|
||||
meowmeowcat
|
||||
Michael
|
||||
Michael Aquilina
|
||||
Michael E. Karpeles
|
||||
Michael Klich
|
||||
Michael Mintz
|
||||
Michael Williamson
|
||||
michaelpacer
|
||||
Michał Górny
|
||||
Mickaël Schoentgen
|
||||
Miguel Araujo Perez
|
||||
Mihir Singh
|
||||
Mike
|
||||
Mike Hendricks
|
||||
Min RK
|
||||
MinRK
|
||||
Miro Hrončok
|
||||
Monica Baluna
|
||||
montefra
|
||||
Monty Taylor
|
||||
morotti
|
||||
mrKazzila
|
||||
Muha Ajjan
|
||||
MUTHUSRIHEMADHARSHINI S A
|
||||
Nadav Wexler
|
||||
Nahuel Ambrosini
|
||||
Nate Coraor
|
||||
Nate Prewitt
|
||||
Nathan Houghton
|
||||
Nathaniel J. Smith
|
||||
Nehal J Wani
|
||||
Neil Botelho
|
||||
Nguyễn Gia Phong
|
||||
Nicholas Serra
|
||||
Nick Coghlan
|
||||
Nick Stenning
|
||||
Nick Timkovich
|
||||
Nicolas Bock
|
||||
Nicole Harris
|
||||
Nikhil Benesch
|
||||
Nikhil Ladha
|
||||
Nikita Chepanov
|
||||
Nikolay Korolev
|
||||
Nipunn Koorapati
|
||||
Nitesh Sharma
|
||||
Niyas Sait
|
||||
Noah
|
||||
Noah Gorny
|
||||
Norbert Manthey
|
||||
Nothing-991
|
||||
Nowell Strite
|
||||
NtaleGrey
|
||||
nucccc
|
||||
nvdv
|
||||
OBITORASU
|
||||
Ofek Lev
|
||||
ofrinevo
|
||||
Oleg Burnaev
|
||||
Oliver Freund
|
||||
Oliver Jeeves
|
||||
Oliver Mannion
|
||||
Oliver Tonnhofer
|
||||
Olivier Girardot
|
||||
Olivier Grisel
|
||||
Ollie Rutherfurd
|
||||
OMOTO Kenji
|
||||
Omry Yadan
|
||||
onlinejudge95
|
||||
Oren Held
|
||||
Oscar Benjamin
|
||||
oxygen dioxide
|
||||
Oz N Tiram
|
||||
Pachwenko
|
||||
Paresh Joshi
|
||||
Patrick Dubroy
|
||||
Patrick Jenkins
|
||||
Patrick Lawson
|
||||
patricktokeeffe
|
||||
Patrik Kopkan
|
||||
Paul Ganssle
|
||||
Paul Kehrer
|
||||
Paul Moore
|
||||
Paul Nasrat
|
||||
Paul Oswald
|
||||
Paul van der Linden
|
||||
Paulus Schoutsen
|
||||
Pavel Safronov
|
||||
Pavithra Eswaramoorthy
|
||||
Pawel Jasinski
|
||||
Paweł Szramowski
|
||||
Pekka Klärck
|
||||
Peter Gessler
|
||||
Peter Lisák
|
||||
Peter Shen
|
||||
Peter Waller
|
||||
Petr Viktorin
|
||||
petr-tik
|
||||
Phaneendra Chiruvella
|
||||
Phil Elson
|
||||
Phil Freo
|
||||
Phil Pennock
|
||||
Phil Whelan
|
||||
Philip Jägenstedt
|
||||
Philip Molloy
|
||||
Philippe Ombredanne
|
||||
Pi Delport
|
||||
Pierre-Yves Rofes
|
||||
Pieter Degroote
|
||||
pip
|
||||
Prabakaran Kumaresshan
|
||||
Prabhjyotsing Surjit Singh Sodhi
|
||||
Prabhu Marappan
|
||||
Pradyun Gedam
|
||||
Prashant Sharma
|
||||
Pratik Mallya
|
||||
pre-commit-ci[bot]
|
||||
Preet Thakkar
|
||||
Preston Holmes
|
||||
Przemek Wrzos
|
||||
Pulkit Goyal
|
||||
q0w
|
||||
Qiangning Hong
|
||||
Qiming Xu
|
||||
qraqras
|
||||
Quentin Lee
|
||||
Quentin Pradet
|
||||
R. David Murray
|
||||
Rafael Caricio
|
||||
Ralf Schmitt
|
||||
Ran Benita
|
||||
Randy Döring
|
||||
Razzi Abuissa
|
||||
rdb
|
||||
Reece Dunham
|
||||
Remi Rampin
|
||||
Rene Dudfield
|
||||
Riccardo Magliocchetti
|
||||
Riccardo Schirone
|
||||
Richard Jones
|
||||
Richard Si
|
||||
Ricky Ng-Adam
|
||||
Rishi
|
||||
rmorotti
|
||||
RobberPhex
|
||||
Robert Collins
|
||||
Robert McGibbon
|
||||
Robert Pollak
|
||||
Robert T. McGibbon
|
||||
robin elisha robinson
|
||||
Rodney, Tiara
|
||||
Roey Berman
|
||||
Rohan Jain
|
||||
Roman Bogorodskiy
|
||||
Roman Donchenko
|
||||
Romuald Brunet
|
||||
ronaudinho
|
||||
Ronny Pfannschmidt
|
||||
Rory McCann
|
||||
Ross Brattain
|
||||
Roy Wellington Ⅳ
|
||||
Ruairidh MacLeod
|
||||
Russell Keith-Magee
|
||||
Ryan Shepherd
|
||||
Ryan Wooden
|
||||
ryneeverett
|
||||
Ryuma Asai
|
||||
S. Guliaev
|
||||
Sachi King
|
||||
Salvatore Rinchiera
|
||||
sandeepkiran-js
|
||||
Sander Van Balen
|
||||
Savio Jomton
|
||||
schlamar
|
||||
Scott Kitterman
|
||||
Sean
|
||||
seanj
|
||||
Sebastian Jordan
|
||||
Sebastian Schaetz
|
||||
Segev Finer
|
||||
SeongSoo Cho
|
||||
Sepehr Rasouli
|
||||
sepehrrasooli
|
||||
Sergey Vasilyev
|
||||
Seth Michael Larson
|
||||
Seth Woodworth
|
||||
Shahar Epstein
|
||||
Shantanu
|
||||
shenxianpeng
|
||||
shireenrao
|
||||
Shivansh-007
|
||||
Shixian Sheng
|
||||
Shlomi Fish
|
||||
Shovan Maity
|
||||
Shubham Nagure
|
||||
Simeon Visser
|
||||
Simon Cross
|
||||
Simon Pichugin
|
||||
sinoroc
|
||||
sinscary
|
||||
snook92
|
||||
socketubs
|
||||
Sorin Sbarnea
|
||||
Srinivas Nyayapati
|
||||
Srishti Hegde
|
||||
Stavros Korokithakis
|
||||
Stefan Scherfke
|
||||
Stefano Rivera
|
||||
Stephan Erb
|
||||
Stephane Chazelas
|
||||
Stephen Payne
|
||||
Stephen Rosen
|
||||
stepshal
|
||||
Steve (Gadget) Barnes
|
||||
Steve Barnes
|
||||
Steve Dower
|
||||
Steve Kowalik
|
||||
Steven Myint
|
||||
Steven Silvester
|
||||
stonebig
|
||||
studioj
|
||||
Stéphane Bidoul
|
||||
Stéphane Bidoul (ACSONE)
|
||||
Stéphane Klein
|
||||
Sumana Harihareswara
|
||||
Surbhi Sharma
|
||||
Sviatoslav Sydorenko
|
||||
Sviatoslav Sydorenko (Святослав Сидоренко)
|
||||
Swat009
|
||||
Sylvain
|
||||
Sage Abdullah
|
||||
Takayuki SHIMIZUKAWA
|
||||
Taneli Hukkinen
|
||||
tbeswick
|
||||
Terrance
|
||||
Thiago
|
||||
Thijs Triemstra
|
||||
Thomas Fenzl
|
||||
Thomas Grainger
|
||||
Thomas Guettler
|
||||
Thomas Johansson
|
||||
Thomas Kluyver
|
||||
Thomas Smith
|
||||
Thomas VINCENT
|
||||
Tim D. Smith
|
||||
Tim Gates
|
||||
Tim Harder
|
||||
Tim Heap
|
||||
tim smith
|
||||
tinruufu
|
||||
Tobias Hermann
|
||||
Tom Forbes
|
||||
Tom Freudenheim
|
||||
Tom V
|
||||
Tomas Hrnciar
|
||||
Tomas Orsava
|
||||
Tomer Chachamu
|
||||
Tommi Enenkel | AnB
|
||||
Tomáš Hrnčiar
|
||||
Tony Beswick
|
||||
Tony Narlock
|
||||
Tony Zhaocheng Tan
|
||||
TonyBeswick
|
||||
toonarmycaptain
|
||||
Toshio Kuratomi
|
||||
toxinu
|
||||
Travis Swicegood
|
||||
Tushar Sadhwani
|
||||
Tzu-ping Chung
|
||||
Valentin Haenel
|
||||
Victor Stinner
|
||||
victorvpaulo
|
||||
Vikram - Google
|
||||
Viktor Szépe
|
||||
Ville Skyttä
|
||||
Vinay Sajip
|
||||
Vincent Fazio
|
||||
Vincent Philippon
|
||||
Vinicyus Macedo
|
||||
Vipul Kumar
|
||||
Vitaly Babiy
|
||||
Vladimir Fokow
|
||||
Vladimir Rutsky
|
||||
W. Trevor King
|
||||
Weida Hong
|
||||
Wil Tan
|
||||
Wilfred Hughes
|
||||
William Edwards
|
||||
William ML Leslie
|
||||
William T Olson
|
||||
William Woodruff
|
||||
Wilson Mo
|
||||
wim glenn
|
||||
Winson Luk
|
||||
Wolfgang Maier
|
||||
Wu Zhenyu
|
||||
XAMES3
|
||||
Xavier Fernandez
|
||||
Xianpeng Shen
|
||||
xoviat
|
||||
xtreak
|
||||
YAMAMOTO Takashi
|
||||
Yash
|
||||
Yashraj
|
||||
Yen Chi Hsuan
|
||||
Yeray Diaz Diaz
|
||||
Yoval P
|
||||
Yu Jian
|
||||
Yuan Jing Vincent Yan
|
||||
Yuki Kobayashi
|
||||
Yusuke Hayashi
|
||||
Zachary Ware
|
||||
zackzack38
|
||||
Zearin
|
||||
Zhiping Deng
|
||||
ziebam
|
||||
Zvezdan Petkovic
|
||||
Łukasz Langa
|
||||
Роман Донченко
|
||||
Семён Марьясин
|
||||
@@ -0,0 +1,20 @@
|
||||
Copyright (c) 2008-present The pip developers (see AUTHORS.txt file)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,13 @@
|
||||
Copyright 2012-2021 Eric Larson
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,20 @@
|
||||
This package contains a modified version of ca-bundle.crt:
|
||||
|
||||
ca-bundle.crt -- Bundle of CA Root Certificates
|
||||
|
||||
This is a bundle of X.509 certificates of public Certificate Authorities
|
||||
(CA). These were automatically extracted from Mozilla's root certificates
|
||||
file (certdata.txt). This file can be found in the mozilla source tree:
|
||||
https://hg.mozilla.org/mozilla-central/file/tip/security/nss/lib/ckfw/builtins/certdata.txt
|
||||
It contains the certificates in PEM format and therefore
|
||||
can be directly used with curl / libcurl / php_curl, or with
|
||||
an Apache+mod_ssl webserver for SSL client authentication.
|
||||
Just configure this file as the SSLCACertificateFile.#
|
||||
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
This Source Code Form is subject to the terms of the Mozilla Public License,
|
||||
v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain
|
||||
one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
***** END LICENSE BLOCK *****
|
||||
@(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $
|
||||
@@ -0,0 +1,284 @@
|
||||
A. HISTORY OF THE SOFTWARE
|
||||
==========================
|
||||
|
||||
Python was created in the early 1990s by Guido van Rossum at Stichting
|
||||
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
|
||||
as a successor of a language called ABC. Guido remains Python's
|
||||
principal author, although it includes many contributions from others.
|
||||
|
||||
In 1995, Guido continued his work on Python at the Corporation for
|
||||
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
|
||||
in Reston, Virginia where he released several versions of the
|
||||
software.
|
||||
|
||||
In May 2000, Guido and the Python core development team moved to
|
||||
BeOpen.com to form the BeOpen PythonLabs team. In October of the same
|
||||
year, the PythonLabs team moved to Digital Creations (now Zope
|
||||
Corporation, see http://www.zope.com). In 2001, the Python Software
|
||||
Foundation (PSF, see http://www.python.org/psf/) was formed, a
|
||||
non-profit organization created specifically to own Python-related
|
||||
Intellectual Property. Zope Corporation is a sponsoring member of
|
||||
the PSF.
|
||||
|
||||
All Python releases are Open Source (see http://www.opensource.org for
|
||||
the Open Source Definition). Historically, most, but not all, Python
|
||||
releases have also been GPL-compatible; the table below summarizes
|
||||
the various releases.
|
||||
|
||||
Release Derived Year Owner GPL-
|
||||
from compatible? (1)
|
||||
|
||||
0.9.0 thru 1.2 1991-1995 CWI yes
|
||||
1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
|
||||
1.6 1.5.2 2000 CNRI no
|
||||
2.0 1.6 2000 BeOpen.com no
|
||||
1.6.1 1.6 2001 CNRI yes (2)
|
||||
2.1 2.0+1.6.1 2001 PSF no
|
||||
2.0.1 2.0+1.6.1 2001 PSF yes
|
||||
2.1.1 2.1+2.0.1 2001 PSF yes
|
||||
2.2 2.1.1 2001 PSF yes
|
||||
2.1.2 2.1.1 2002 PSF yes
|
||||
2.1.3 2.1.2 2002 PSF yes
|
||||
2.2.1 2.2 2002 PSF yes
|
||||
2.2.2 2.2.1 2002 PSF yes
|
||||
2.2.3 2.2.2 2003 PSF yes
|
||||
2.3 2.2.2 2002-2003 PSF yes
|
||||
2.3.1 2.3 2002-2003 PSF yes
|
||||
2.3.2 2.3.1 2002-2003 PSF yes
|
||||
2.3.3 2.3.2 2002-2003 PSF yes
|
||||
2.3.4 2.3.3 2004 PSF yes
|
||||
2.3.5 2.3.4 2005 PSF yes
|
||||
2.4 2.3 2004 PSF yes
|
||||
2.4.1 2.4 2005 PSF yes
|
||||
2.4.2 2.4.1 2005 PSF yes
|
||||
2.4.3 2.4.2 2006 PSF yes
|
||||
2.4.4 2.4.3 2006 PSF yes
|
||||
2.5 2.4 2006 PSF yes
|
||||
2.5.1 2.5 2007 PSF yes
|
||||
2.5.2 2.5.1 2008 PSF yes
|
||||
2.5.3 2.5.2 2008 PSF yes
|
||||
2.6 2.5 2008 PSF yes
|
||||
2.6.1 2.6 2008 PSF yes
|
||||
2.6.2 2.6.1 2009 PSF yes
|
||||
2.6.3 2.6.2 2009 PSF yes
|
||||
2.6.4 2.6.3 2009 PSF yes
|
||||
2.6.5 2.6.4 2010 PSF yes
|
||||
3.0 2.6 2008 PSF yes
|
||||
3.0.1 3.0 2009 PSF yes
|
||||
3.1 3.0.1 2009 PSF yes
|
||||
3.1.1 3.1 2009 PSF yes
|
||||
3.1.2 3.1 2010 PSF yes
|
||||
3.2 3.1 2010 PSF yes
|
||||
|
||||
Footnotes:
|
||||
|
||||
(1) GPL-compatible doesn't mean that we're distributing Python under
|
||||
the GPL. All Python licenses, unlike the GPL, let you distribute
|
||||
a modified version without making your changes open source. The
|
||||
GPL-compatible licenses make it possible to combine Python with
|
||||
other software that is released under the GPL; the others don't.
|
||||
|
||||
(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
|
||||
because its license has a choice of law clause. According to
|
||||
CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
|
||||
is "not incompatible" with the GPL.
|
||||
|
||||
Thanks to the many outside volunteers who have worked under Guido's
|
||||
direction to make these releases possible.
|
||||
|
||||
|
||||
B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
|
||||
===============================================================
|
||||
|
||||
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
|
||||
--------------------------------------------
|
||||
|
||||
1. This LICENSE AGREEMENT is between the Python Software Foundation
|
||||
("PSF"), and the Individual or Organization ("Licensee") accessing and
|
||||
otherwise using this software ("Python") in source or binary form and
|
||||
its associated documentation.
|
||||
|
||||
2. Subject to the terms and conditions of this License Agreement, PSF hereby
|
||||
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
|
||||
analyze, test, perform and/or display publicly, prepare derivative works,
|
||||
distribute, and otherwise use Python alone or in any derivative version,
|
||||
provided, however, that PSF's License Agreement and PSF's notice of copyright,
|
||||
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||
Python Software Foundation; All Rights Reserved" are retained in Python alone or
|
||||
in any derivative version prepared by Licensee.
|
||||
|
||||
3. In the event Licensee prepares a derivative work that is based on
|
||||
or incorporates Python or any part thereof, and wants to make
|
||||
the derivative work available to others as provided herein, then
|
||||
Licensee hereby agrees to include in any such work a brief summary of
|
||||
the changes made to Python.
|
||||
|
||||
4. PSF is making Python available to Licensee on an "AS IS"
|
||||
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
|
||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
|
||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||
|
||||
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
||||
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
||||
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
|
||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||
|
||||
6. This License Agreement will automatically terminate upon a material
|
||||
breach of its terms and conditions.
|
||||
|
||||
7. Nothing in this License Agreement shall be deemed to create any
|
||||
relationship of agency, partnership, or joint venture between PSF and
|
||||
Licensee. This License Agreement does not grant permission to use PSF
|
||||
trademarks or trade name in a trademark sense to endorse or promote
|
||||
products or services of Licensee, or any third party.
|
||||
|
||||
8. By copying, installing or otherwise using Python, Licensee
|
||||
agrees to be bound by the terms and conditions of this License
|
||||
Agreement.
|
||||
|
||||
|
||||
BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
|
||||
-------------------------------------------
|
||||
|
||||
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
|
||||
|
||||
1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
|
||||
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
|
||||
Individual or Organization ("Licensee") accessing and otherwise using
|
||||
this software in source or binary form and its associated
|
||||
documentation ("the Software").
|
||||
|
||||
2. Subject to the terms and conditions of this BeOpen Python License
|
||||
Agreement, BeOpen hereby grants Licensee a non-exclusive,
|
||||
royalty-free, world-wide license to reproduce, analyze, test, perform
|
||||
and/or display publicly, prepare derivative works, distribute, and
|
||||
otherwise use the Software alone or in any derivative version,
|
||||
provided, however, that the BeOpen Python License is retained in the
|
||||
Software, alone or in any derivative version prepared by Licensee.
|
||||
|
||||
3. BeOpen is making the Software available to Licensee on an "AS IS"
|
||||
basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
|
||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
|
||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||
|
||||
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
|
||||
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
|
||||
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
|
||||
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||
|
||||
5. This License Agreement will automatically terminate upon a material
|
||||
breach of its terms and conditions.
|
||||
|
||||
6. This License Agreement shall be governed by and interpreted in all
|
||||
respects by the law of the State of California, excluding conflict of
|
||||
law provisions. Nothing in this License Agreement shall be deemed to
|
||||
create any relationship of agency, partnership, or joint venture
|
||||
between BeOpen and Licensee. This License Agreement does not grant
|
||||
permission to use BeOpen trademarks or trade names in a trademark
|
||||
sense to endorse or promote products or services of Licensee, or any
|
||||
third party. As an exception, the "BeOpen Python" logos available at
|
||||
http://www.pythonlabs.com/logos.html may be used according to the
|
||||
permissions granted on that web page.
|
||||
|
||||
7. By copying, installing or otherwise using the software, Licensee
|
||||
agrees to be bound by the terms and conditions of this License
|
||||
Agreement.
|
||||
|
||||
|
||||
CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
|
||||
---------------------------------------
|
||||
|
||||
1. This LICENSE AGREEMENT is between the Corporation for National
|
||||
Research Initiatives, having an office at 1895 Preston White Drive,
|
||||
Reston, VA 20191 ("CNRI"), and the Individual or Organization
|
||||
("Licensee") accessing and otherwise using Python 1.6.1 software in
|
||||
source or binary form and its associated documentation.
|
||||
|
||||
2. Subject to the terms and conditions of this License Agreement, CNRI
|
||||
hereby grants Licensee a nonexclusive, royalty-free, world-wide
|
||||
license to reproduce, analyze, test, perform and/or display publicly,
|
||||
prepare derivative works, distribute, and otherwise use Python 1.6.1
|
||||
alone or in any derivative version, provided, however, that CNRI's
|
||||
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
|
||||
1995-2001 Corporation for National Research Initiatives; All Rights
|
||||
Reserved" are retained in Python 1.6.1 alone or in any derivative
|
||||
version prepared by Licensee. Alternately, in lieu of CNRI's License
|
||||
Agreement, Licensee may substitute the following text (omitting the
|
||||
quotes): "Python 1.6.1 is made available subject to the terms and
|
||||
conditions in CNRI's License Agreement. This Agreement together with
|
||||
Python 1.6.1 may be located on the Internet using the following
|
||||
unique, persistent identifier (known as a handle): 1895.22/1013. This
|
||||
Agreement may also be obtained from a proxy server on the Internet
|
||||
using the following URL: http://hdl.handle.net/1895.22/1013".
|
||||
|
||||
3. In the event Licensee prepares a derivative work that is based on
|
||||
or incorporates Python 1.6.1 or any part thereof, and wants to make
|
||||
the derivative work available to others as provided herein, then
|
||||
Licensee hereby agrees to include in any such work a brief summary of
|
||||
the changes made to Python 1.6.1.
|
||||
|
||||
4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
|
||||
basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
|
||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
|
||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||
|
||||
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
||||
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
||||
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
|
||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||
|
||||
6. This License Agreement will automatically terminate upon a material
|
||||
breach of its terms and conditions.
|
||||
|
||||
7. This License Agreement shall be governed by the federal
|
||||
intellectual property law of the United States, including without
|
||||
limitation the federal copyright law, and, to the extent such
|
||||
U.S. federal law does not apply, by the law of the Commonwealth of
|
||||
Virginia, excluding Virginia's conflict of law provisions.
|
||||
Notwithstanding the foregoing, with regard to derivative works based
|
||||
on Python 1.6.1 that incorporate non-separable material that was
|
||||
previously distributed under the GNU General Public License (GPL), the
|
||||
law of the Commonwealth of Virginia shall govern this License
|
||||
Agreement only as to issues arising under or with respect to
|
||||
Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
|
||||
License Agreement shall be deemed to create any relationship of
|
||||
agency, partnership, or joint venture between CNRI and Licensee. This
|
||||
License Agreement does not grant permission to use CNRI trademarks or
|
||||
trade name in a trademark sense to endorse or promote products or
|
||||
services of Licensee, or any third party.
|
||||
|
||||
8. By clicking on the "ACCEPT" button where indicated, or by copying,
|
||||
installing or otherwise using Python 1.6.1, Licensee agrees to be
|
||||
bound by the terms and conditions of this License Agreement.
|
||||
|
||||
ACCEPT
|
||||
|
||||
|
||||
CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
|
||||
--------------------------------------------------
|
||||
|
||||
Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
|
||||
The Netherlands. All rights reserved.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both that copyright notice and this permission notice appear in
|
||||
supporting documentation, and that the name of Stichting Mathematisch
|
||||
Centrum or CWI not be used in advertising or publicity pertaining to
|
||||
distribution of the software without specific, written prior
|
||||
permission.
|
||||
|
||||
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
|
||||
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
|
||||
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
@@ -0,0 +1,202 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2013-2025, Kim Davies and contributors.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,14 @@
|
||||
Copyright (C) 2008-2011 INADA Naoki <songofacandy@gmail.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
This software is made available under the terms of *either* of the licenses
|
||||
found in LICENSE.APACHE or LICENSE.BSD. Contributions to this software is made
|
||||
under the terms of *both* these licenses.
|
||||
@@ -0,0 +1,177 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -0,0 +1,23 @@
|
||||
Copyright (c) Donald Stufft and individual contributors.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,17 @@
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2010-202x The platformdirs developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,25 @@
|
||||
Copyright (c) 2006-2022 by the respective authors (see AUTHORS file).
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Thomas Kluyver
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,175 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
@@ -0,0 +1,13 @@
|
||||
Copyright (c) 2018, Tzu-ping Chung <uranusjr@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2020 Will McGugan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Taneli Hukkinen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Taneli Hukkinen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2022 Seth Michael Larson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2008-2020 Andrey Petrov and contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
13
test/.venv/lib/python3.12/site-packages/pip/__init__.py
Normal file
13
test/.venv/lib/python3.12/site-packages/pip/__init__.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from __future__ import annotations
|
||||
|
||||
__version__ = "26.1.2"
|
||||
|
||||
|
||||
def main(args: list[str] | None = None) -> int:
|
||||
"""This is an internal API only meant for use by pip's own console scripts.
|
||||
|
||||
For additional details, see https://github.com/pypa/pip/issues/7498.
|
||||
"""
|
||||
from pip._internal.utils.entrypoints import _wrapper
|
||||
|
||||
return _wrapper(args)
|
||||
24
test/.venv/lib/python3.12/site-packages/pip/__main__.py
Normal file
24
test/.venv/lib/python3.12/site-packages/pip/__main__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Remove '' and current working directory from the first entry
|
||||
# of sys.path, if present to avoid using current directory
|
||||
# in pip commands check, freeze, install, list and show,
|
||||
# when invoked as python -m pip <command>
|
||||
if sys.path[0] in ("", os.getcwd()):
|
||||
sys.path.pop(0)
|
||||
|
||||
# If we are running from a wheel, add the wheel to sys.path
|
||||
# This allows the usage python pip-*.whl/pip install pip-*.whl
|
||||
if not __spec__ or __spec__.parent == "":
|
||||
# __file__ is pip-*.whl/pip/__main__.py
|
||||
# first dirname call strips of '/__main__.py', second strips off '/pip'
|
||||
# Resulting path is the name of the wheel itself
|
||||
# Add that to sys.path so we can import pip
|
||||
path = os.path.dirname(os.path.dirname(__file__))
|
||||
sys.path.insert(0, path)
|
||||
|
||||
if __name__ == "__main__":
|
||||
from pip._internal.cli.main import main as _main
|
||||
|
||||
sys.exit(_main())
|
||||
@@ -0,0 +1,50 @@
|
||||
"""Execute exactly this copy of pip, within a different environment.
|
||||
|
||||
This file is named as it is, to ensure that this module can't be imported via
|
||||
an import statement.
|
||||
"""
|
||||
|
||||
# /!\ This version compatibility check section must be Python 2 compatible. /!\
|
||||
|
||||
import sys
|
||||
|
||||
# Copied from pyproject.toml
|
||||
PYTHON_REQUIRES = (3, 10)
|
||||
|
||||
|
||||
def version_str(version): # type: ignore
|
||||
return ".".join(str(v) for v in version)
|
||||
|
||||
|
||||
if sys.version_info[:2] < PYTHON_REQUIRES:
|
||||
raise SystemExit(
|
||||
"This version of pip does not support python {} (requires >={}).".format(
|
||||
version_str(sys.version_info[:2]), version_str(PYTHON_REQUIRES)
|
||||
)
|
||||
)
|
||||
|
||||
# From here on, we can use Python 3 features, but the syntax must remain
|
||||
# Python 2 compatible.
|
||||
|
||||
import runpy # noqa: E402
|
||||
from importlib.machinery import PathFinder # noqa: E402
|
||||
from os.path import dirname # noqa: E402
|
||||
|
||||
PIP_SOURCES_ROOT = dirname(dirname(__file__))
|
||||
|
||||
|
||||
class PipImportRedirectingFinder:
|
||||
@classmethod
|
||||
def find_spec(self, fullname, path=None, target=None): # type: ignore
|
||||
if fullname != "pip":
|
||||
return None
|
||||
|
||||
spec = PathFinder.find_spec(fullname, [PIP_SOURCES_ROOT], target)
|
||||
assert spec, (PIP_SOURCES_ROOT, fullname)
|
||||
return spec
|
||||
|
||||
|
||||
sys.meta_path.insert(0, PipImportRedirectingFinder())
|
||||
|
||||
assert __name__ == "__main__", "Cannot run __pip-runner__.py as a non-main module"
|
||||
runpy.run_module("pip", run_name="__main__", alter_sys=True)
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
18
test/.venv/lib/python3.12/site-packages/pip/_internal/__init__.py
Executable file
18
test/.venv/lib/python3.12/site-packages/pip/_internal/__init__.py
Executable file
@@ -0,0 +1,18 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pip._internal.utils import _log
|
||||
|
||||
# init_logging() must be called before any call to logging.getLogger()
|
||||
# which happens at import of most modules.
|
||||
_log.init_logging()
|
||||
|
||||
|
||||
def main(args: list[str] | None = None) -> int:
|
||||
"""This is preserved for old console scripts that may still be referencing
|
||||
it.
|
||||
|
||||
For additional details, see https://github.com/pypa/pip/issues/7498.
|
||||
"""
|
||||
from pip._internal.utils.entrypoints import _wrapper
|
||||
|
||||
return _wrapper(args)
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,606 @@
|
||||
"""Build Environment used for isolation during sdist building"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import os
|
||||
import pathlib
|
||||
import site
|
||||
import sys
|
||||
import textwrap
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Iterable, Sequence
|
||||
from contextlib import AbstractContextManager as ContextManager
|
||||
from contextlib import nullcontext
|
||||
from io import StringIO
|
||||
from types import TracebackType
|
||||
from typing import TYPE_CHECKING, Protocol, TypedDict
|
||||
|
||||
from pip._vendor.packaging.version import Version
|
||||
|
||||
from pip import __file__ as pip_location
|
||||
from pip._internal.cli.spinners import open_rich_spinner, open_spinner
|
||||
from pip._internal.exceptions import (
|
||||
BuildDependencyInstallError,
|
||||
DiagnosticPipError,
|
||||
InstallWheelBuildError,
|
||||
PipError,
|
||||
)
|
||||
from pip._internal.locations import get_platlib, get_purelib, get_scheme
|
||||
from pip._internal.metadata import get_default_environment, get_environment
|
||||
from pip._internal.utils.deprecation import deprecated
|
||||
from pip._internal.utils.logging import VERBOSE, capture_logging
|
||||
from pip._internal.utils.packaging import get_requirement
|
||||
from pip._internal.utils.subprocess import call_subprocess
|
||||
from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from pip._internal.cache import WheelCache
|
||||
from pip._internal.index.package_finder import PackageFinder
|
||||
from pip._internal.operations.build.build_tracker import BuildTracker
|
||||
from pip._internal.req.req_install import InstallRequirement
|
||||
from pip._internal.resolution.base import BaseResolver
|
||||
|
||||
class ExtraEnviron(TypedDict, total=False):
|
||||
extra_environ: dict[str, str]
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def _dedup(a: str, b: str) -> tuple[str] | tuple[str, str]:
|
||||
return (a, b) if a != b else (a,)
|
||||
|
||||
|
||||
class _Prefix:
|
||||
def __init__(self, path: str) -> None:
|
||||
self.path = path
|
||||
self.setup = False
|
||||
scheme = get_scheme("", prefix=path)
|
||||
self.bin_dir = scheme.scripts
|
||||
self.lib_dirs = _dedup(scheme.purelib, scheme.platlib)
|
||||
|
||||
|
||||
def get_runnable_pip() -> str:
|
||||
"""Get a file to pass to a Python executable, to run the currently-running pip.
|
||||
|
||||
This is used to run a pip subprocess, for installing requirements into the build
|
||||
environment.
|
||||
"""
|
||||
source = pathlib.Path(pip_location).resolve().parent
|
||||
|
||||
if not source.is_dir():
|
||||
# This would happen if someone is using pip from inside a zip file. In that
|
||||
# case, we can use that directly.
|
||||
return str(source)
|
||||
|
||||
return os.fsdecode(source / "__pip-runner__.py")
|
||||
|
||||
|
||||
def _get_system_sitepackages() -> set[str]:
|
||||
"""Get system site packages
|
||||
|
||||
Usually from site.getsitepackages,
|
||||
but fallback on `get_purelib()/get_platlib()` if unavailable
|
||||
(e.g. in a virtualenv created by virtualenv<20)
|
||||
|
||||
Returns normalized set of strings.
|
||||
"""
|
||||
if hasattr(site, "getsitepackages"):
|
||||
system_sites = site.getsitepackages()
|
||||
else:
|
||||
# virtualenv < 20 overwrites site.py without getsitepackages
|
||||
# fallback on get_purelib/get_platlib.
|
||||
# this is known to miss things, but shouldn't in the cases
|
||||
# where getsitepackages() has been removed (inside a virtualenv)
|
||||
system_sites = [get_purelib(), get_platlib()]
|
||||
return {os.path.normcase(path) for path in system_sites}
|
||||
|
||||
|
||||
class BuildEnvironmentInstaller(Protocol):
|
||||
"""
|
||||
Interface for installing build dependencies into an isolated build
|
||||
environment.
|
||||
"""
|
||||
|
||||
def install(
|
||||
self,
|
||||
requirements: Iterable[str],
|
||||
prefix: _Prefix,
|
||||
*,
|
||||
kind: str,
|
||||
for_req: InstallRequirement | None,
|
||||
) -> None: ...
|
||||
|
||||
|
||||
class SubprocessBuildEnvironmentInstaller:
|
||||
"""
|
||||
Install build dependencies by calling pip in a subprocess.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
finder: PackageFinder,
|
||||
build_constraints: list[str] | None = None,
|
||||
build_constraint_feature_enabled: bool = False,
|
||||
) -> None:
|
||||
self.finder = finder
|
||||
self._build_constraints = build_constraints or []
|
||||
self._build_constraint_feature_enabled = build_constraint_feature_enabled
|
||||
|
||||
def _deprecation_constraint_check(self) -> None:
|
||||
"""
|
||||
Check for deprecation warning: PIP_CONSTRAINT affecting build environments.
|
||||
|
||||
This warns when build-constraint feature is NOT enabled and PIP_CONSTRAINT
|
||||
is not empty.
|
||||
"""
|
||||
if self._build_constraint_feature_enabled or self._build_constraints:
|
||||
return
|
||||
|
||||
pip_constraint = os.environ.get("PIP_CONSTRAINT")
|
||||
if not pip_constraint or not pip_constraint.strip():
|
||||
return
|
||||
|
||||
deprecated(
|
||||
reason=(
|
||||
"Setting PIP_CONSTRAINT will not affect "
|
||||
"build constraints in the future,"
|
||||
),
|
||||
replacement=(
|
||||
"to specify build constraints using --build-constraint or "
|
||||
"PIP_BUILD_CONSTRAINT. To disable this warning without "
|
||||
"any build constraints set --use-feature=build-constraint or "
|
||||
'PIP_USE_FEATURE="build-constraint"'
|
||||
),
|
||||
gone_in="26.2",
|
||||
issue=None,
|
||||
)
|
||||
|
||||
def install(
|
||||
self,
|
||||
requirements: Iterable[str],
|
||||
prefix: _Prefix,
|
||||
*,
|
||||
kind: str,
|
||||
for_req: InstallRequirement | None,
|
||||
) -> None:
|
||||
self._deprecation_constraint_check()
|
||||
|
||||
finder = self.finder
|
||||
args: list[str] = [
|
||||
sys.executable,
|
||||
get_runnable_pip(),
|
||||
"install",
|
||||
"--ignore-installed",
|
||||
"--no-user",
|
||||
"--prefix",
|
||||
prefix.path,
|
||||
"--no-warn-script-location",
|
||||
"--disable-pip-version-check",
|
||||
# As the build environment is ephemeral, it's wasteful to
|
||||
# pre-compile everything, especially as not every Python
|
||||
# module will be used/compiled in most cases.
|
||||
"--no-compile",
|
||||
# The prefix specified two lines above, thus
|
||||
# target from config file or env var should be ignored
|
||||
"--target",
|
||||
"",
|
||||
]
|
||||
if logger.getEffectiveLevel() <= logging.DEBUG:
|
||||
args.append("-vv")
|
||||
elif logger.getEffectiveLevel() <= VERBOSE:
|
||||
args.append("-v")
|
||||
for format_control in ("no_binary", "only_binary"):
|
||||
formats = getattr(finder.format_control, format_control)
|
||||
args.extend(
|
||||
(
|
||||
"--" + format_control.replace("_", "-"),
|
||||
",".join(sorted(formats or {":none:"})),
|
||||
)
|
||||
)
|
||||
|
||||
if finder.release_control is not None:
|
||||
# Use ordered args to preserve the user's original command-line order
|
||||
# This is important because later flags can override earlier ones
|
||||
for attr_name, value in finder.release_control.get_ordered_args():
|
||||
args.extend(("--" + attr_name.replace("_", "-"), value))
|
||||
|
||||
index_urls = finder.index_urls
|
||||
if index_urls:
|
||||
args.extend(["-i", index_urls[0]])
|
||||
for extra_index in index_urls[1:]:
|
||||
args.extend(["--extra-index-url", extra_index])
|
||||
else:
|
||||
args.append("--no-index")
|
||||
for link in finder.find_links:
|
||||
args.extend(["--find-links", link])
|
||||
|
||||
if finder.proxy:
|
||||
args.extend(["--proxy", finder.proxy])
|
||||
for host in finder.trusted_hosts:
|
||||
args.extend(["--trusted-host", host])
|
||||
if finder.custom_cert:
|
||||
args.extend(["--cert", finder.custom_cert])
|
||||
if finder.client_cert:
|
||||
args.extend(["--client-cert", finder.client_cert])
|
||||
if finder.prefer_binary:
|
||||
args.append("--prefer-binary")
|
||||
|
||||
# Handle build constraints
|
||||
if self._build_constraint_feature_enabled:
|
||||
args.extend(["--use-feature", "build-constraint"])
|
||||
|
||||
if self._build_constraints:
|
||||
# Build constraints must be passed as both constraints
|
||||
# and build constraints, so that nested builds receive
|
||||
# build constraints
|
||||
for constraint_file in self._build_constraints:
|
||||
args.extend(["--constraint", constraint_file])
|
||||
args.extend(["--build-constraint", constraint_file])
|
||||
|
||||
extra_environ: ExtraEnviron = {}
|
||||
if self._build_constraint_feature_enabled and not self._build_constraints:
|
||||
# If there are no build constraints but the build constraints
|
||||
# feature is enabled then we must ignore regular constraints
|
||||
# in the isolated build environment
|
||||
extra_environ = {"extra_environ": {"_PIP_IN_BUILD_IGNORE_CONSTRAINTS": "1"}}
|
||||
|
||||
if finder.uploaded_prior_to:
|
||||
args.extend(["--uploaded-prior-to", finder.uploaded_prior_to.isoformat()])
|
||||
args.append("--")
|
||||
args.extend(requirements)
|
||||
|
||||
identify_requirement = (
|
||||
f" for {for_req.name}" if for_req and for_req.name else ""
|
||||
)
|
||||
with open_spinner(f"Installing {kind}") as spinner:
|
||||
call_subprocess(
|
||||
args,
|
||||
command_desc=f"installing {kind}{identify_requirement}",
|
||||
spinner=spinner,
|
||||
**extra_environ,
|
||||
)
|
||||
|
||||
|
||||
class InprocessBuildEnvironmentInstaller:
|
||||
"""
|
||||
Build dependency installer that runs in the same pip process.
|
||||
|
||||
This contains a stripped down version of the install command with
|
||||
only the logic necessary for installing build dependencies. The
|
||||
finder, session, build tracker, and wheel cache are reused, but new
|
||||
instances of everything else are created as needed.
|
||||
|
||||
Options are inherited from the parent install command unless
|
||||
they don't make sense for build dependencies (in which case, they
|
||||
are hard-coded, see comments below).
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
finder: PackageFinder,
|
||||
build_tracker: BuildTracker,
|
||||
wheel_cache: WheelCache,
|
||||
build_constraints: Sequence[InstallRequirement] = (),
|
||||
verbosity: int = 0,
|
||||
) -> None:
|
||||
from pip._internal.operations.prepare import RequirementPreparer
|
||||
|
||||
self._finder = finder
|
||||
self._build_constraints = build_constraints
|
||||
self._wheel_cache = wheel_cache
|
||||
self._level = 0
|
||||
|
||||
build_dir = TempDirectory(kind="build-env-install", globally_managed=True)
|
||||
self._preparer = RequirementPreparer(
|
||||
build_isolation_installer=self,
|
||||
# Inherited options or state.
|
||||
finder=finder,
|
||||
session=finder._link_collector.session,
|
||||
build_dir=build_dir.path,
|
||||
build_tracker=build_tracker,
|
||||
verbosity=verbosity,
|
||||
# This is irrelevant as it only applies to editable requirements.
|
||||
src_dir="",
|
||||
# Hard-coded options (that should NOT be inherited).
|
||||
download_dir=None,
|
||||
build_isolation=True,
|
||||
check_build_deps=False,
|
||||
progress_bar="off",
|
||||
# TODO: hash-checking should be extended to build deps, but that is
|
||||
# deferred for later as it'd be a breaking change.
|
||||
require_hashes=False,
|
||||
use_user_site=False,
|
||||
lazy_wheel=False,
|
||||
legacy_resolver=False,
|
||||
)
|
||||
|
||||
def install(
|
||||
self,
|
||||
requirements: Iterable[str],
|
||||
prefix: _Prefix,
|
||||
*,
|
||||
kind: str,
|
||||
for_req: InstallRequirement | None,
|
||||
) -> None:
|
||||
"""Install entrypoint. Manages output capturing and error handling."""
|
||||
capture_logs = not logger.isEnabledFor(VERBOSE) and self._level == 0
|
||||
if capture_logs:
|
||||
# Hide the logs from the installation of build dependencies.
|
||||
# They will be shown only if an error occurs.
|
||||
capture_ctx: ContextManager[StringIO] = capture_logging()
|
||||
spinner: ContextManager[None] = open_rich_spinner(f"Installing {kind}")
|
||||
else:
|
||||
# Otherwise, pass-through all logs (with a header).
|
||||
capture_ctx, spinner = nullcontext(StringIO()), nullcontext()
|
||||
logger.info("Installing %s ...", kind)
|
||||
|
||||
try:
|
||||
self._level += 1
|
||||
with spinner, capture_ctx as stream:
|
||||
self._install_impl(requirements, prefix)
|
||||
|
||||
except DiagnosticPipError as exc:
|
||||
# Format similar to a nested subprocess error, where the
|
||||
# causing error is shown first, followed by the build error.
|
||||
logger.info(textwrap.dedent(stream.getvalue()))
|
||||
logger.error("%s", exc, extra={"rich": True})
|
||||
logger.info("")
|
||||
raise BuildDependencyInstallError(
|
||||
for_req, requirements, cause=exc, log_lines=None
|
||||
)
|
||||
|
||||
except Exception as exc:
|
||||
logs: list[str] | None = textwrap.dedent(stream.getvalue()).splitlines()
|
||||
if not capture_logs:
|
||||
# If logs aren't being captured, then display the error inline
|
||||
# with the rest of the logs.
|
||||
logs = None
|
||||
if isinstance(exc, PipError):
|
||||
logger.error("%s", exc)
|
||||
else:
|
||||
logger.exception("pip crashed unexpectedly")
|
||||
raise BuildDependencyInstallError(
|
||||
for_req, requirements, cause=exc, log_lines=logs
|
||||
)
|
||||
|
||||
finally:
|
||||
self._level -= 1
|
||||
|
||||
def _install_impl(self, requirements: Iterable[str], prefix: _Prefix) -> None:
|
||||
"""Core build dependency install logic."""
|
||||
from pip._internal.commands.install import installed_packages_summary
|
||||
from pip._internal.req import install_given_reqs
|
||||
from pip._internal.req.constructors import install_req_from_line
|
||||
from pip._internal.wheel_builder import build
|
||||
|
||||
ireqs = [install_req_from_line(req, user_supplied=True) for req in requirements]
|
||||
ireqs.extend(self._build_constraints)
|
||||
|
||||
resolver = self._make_resolver()
|
||||
resolved_set = resolver.resolve(ireqs, check_supported_wheels=True)
|
||||
self._preparer.prepare_linked_requirements_more(
|
||||
resolved_set.requirements.values()
|
||||
)
|
||||
|
||||
reqs_to_build = [
|
||||
r for r in resolved_set.requirements_to_install if not r.is_wheel
|
||||
]
|
||||
_, build_failures = build(reqs_to_build, self._wheel_cache, verify=True)
|
||||
if build_failures:
|
||||
raise InstallWheelBuildError(build_failures)
|
||||
|
||||
installed = install_given_reqs(
|
||||
resolver.get_installation_order(resolved_set),
|
||||
prefix=prefix.path,
|
||||
# Hard-coded options (that should NOT be inherited).
|
||||
root=None,
|
||||
home=None,
|
||||
warn_script_location=False,
|
||||
use_user_site=False,
|
||||
# As the build environment is ephemeral, it's wasteful to
|
||||
# pre-compile everything since not all modules will be used.
|
||||
pycompile=False,
|
||||
progress_bar="off",
|
||||
)
|
||||
|
||||
env = get_environment(list(prefix.lib_dirs))
|
||||
if summary := installed_packages_summary(installed, env):
|
||||
logger.info(summary)
|
||||
|
||||
def _make_resolver(self) -> BaseResolver:
|
||||
"""Create a new resolver for one time use."""
|
||||
# Legacy installer never used the legacy resolver so create a
|
||||
# resolvelib resolver directly. Yuck.
|
||||
from pip._internal.req.constructors import install_req_from_req_string
|
||||
from pip._internal.resolution.resolvelib.resolver import Resolver
|
||||
|
||||
return Resolver(
|
||||
make_install_req=install_req_from_req_string,
|
||||
# Inherited state.
|
||||
preparer=self._preparer,
|
||||
finder=self._finder,
|
||||
wheel_cache=self._wheel_cache,
|
||||
# Hard-coded options (that should NOT be inherited).
|
||||
ignore_requires_python=False,
|
||||
use_user_site=False,
|
||||
ignore_dependencies=False,
|
||||
ignore_installed=True,
|
||||
force_reinstall=False,
|
||||
upgrade_strategy="to-satisfy-only",
|
||||
py_version_info=None,
|
||||
)
|
||||
|
||||
|
||||
class BuildEnvironment:
|
||||
"""Creates and manages an isolated environment to install build deps"""
|
||||
|
||||
def __init__(self, installer: BuildEnvironmentInstaller) -> None:
|
||||
self.installer = installer
|
||||
temp_dir = TempDirectory(kind=tempdir_kinds.BUILD_ENV, globally_managed=True)
|
||||
|
||||
self._prefixes = OrderedDict(
|
||||
(name, _Prefix(os.path.join(temp_dir.path, name)))
|
||||
for name in ("normal", "overlay")
|
||||
)
|
||||
|
||||
self._bin_dirs: list[str] = []
|
||||
self._lib_dirs: list[str] = []
|
||||
for prefix in reversed(list(self._prefixes.values())):
|
||||
self._bin_dirs.append(prefix.bin_dir)
|
||||
self._lib_dirs.extend(prefix.lib_dirs)
|
||||
|
||||
# Customize site to:
|
||||
# - ensure .pth files are honored
|
||||
# - prevent access to system site packages
|
||||
system_sites = _get_system_sitepackages()
|
||||
|
||||
self._site_dir = os.path.join(temp_dir.path, "site")
|
||||
if not os.path.exists(self._site_dir):
|
||||
os.mkdir(self._site_dir)
|
||||
with open(
|
||||
os.path.join(self._site_dir, "sitecustomize.py"), "w", encoding="utf-8"
|
||||
) as fp:
|
||||
fp.write(
|
||||
textwrap.dedent(
|
||||
"""
|
||||
import os, site, sys
|
||||
|
||||
# First, drop system-sites related paths.
|
||||
original_sys_path = sys.path[:]
|
||||
known_paths = set()
|
||||
for path in {system_sites!r}:
|
||||
site.addsitedir(path, known_paths=known_paths)
|
||||
system_paths = set(
|
||||
os.path.normcase(path)
|
||||
for path in sys.path[len(original_sys_path):]
|
||||
)
|
||||
original_sys_path = [
|
||||
path for path in original_sys_path
|
||||
if os.path.normcase(path) not in system_paths
|
||||
]
|
||||
sys.path = original_sys_path
|
||||
|
||||
# Second, add lib directories.
|
||||
# ensuring .pth file are processed.
|
||||
for path in {lib_dirs!r}:
|
||||
assert not path in sys.path
|
||||
site.addsitedir(path)
|
||||
"""
|
||||
).format(system_sites=system_sites, lib_dirs=self._lib_dirs)
|
||||
)
|
||||
|
||||
def __enter__(self) -> None:
|
||||
self._save_env = {
|
||||
name: os.environ.get(name, None)
|
||||
for name in ("PATH", "PYTHONNOUSERSITE", "PYTHONPATH")
|
||||
}
|
||||
|
||||
path = self._bin_dirs[:]
|
||||
old_path = self._save_env["PATH"]
|
||||
if old_path:
|
||||
path.extend(old_path.split(os.pathsep))
|
||||
|
||||
pythonpath = [self._site_dir]
|
||||
|
||||
os.environ.update(
|
||||
{
|
||||
"PATH": os.pathsep.join(path),
|
||||
"PYTHONNOUSERSITE": "1",
|
||||
"PYTHONPATH": os.pathsep.join(pythonpath),
|
||||
}
|
||||
)
|
||||
|
||||
def __exit__(
|
||||
self,
|
||||
exc_type: type[BaseException] | None,
|
||||
exc_val: BaseException | None,
|
||||
exc_tb: TracebackType | None,
|
||||
) -> None:
|
||||
for varname, old_value in self._save_env.items():
|
||||
if old_value is None:
|
||||
os.environ.pop(varname, None)
|
||||
else:
|
||||
os.environ[varname] = old_value
|
||||
|
||||
def check_requirements(
|
||||
self, reqs: Iterable[str]
|
||||
) -> tuple[set[tuple[str, str]], set[str]]:
|
||||
"""Return 2 sets:
|
||||
- conflicting requirements: set of (installed, wanted) reqs tuples
|
||||
- missing requirements: set of reqs
|
||||
"""
|
||||
missing = set()
|
||||
conflicting = set()
|
||||
if reqs:
|
||||
env = (
|
||||
get_environment(self._lib_dirs)
|
||||
if hasattr(self, "_lib_dirs")
|
||||
else get_default_environment()
|
||||
)
|
||||
for req_str in reqs:
|
||||
req = get_requirement(req_str)
|
||||
# We're explicitly evaluating with an empty extra value, since build
|
||||
# environments are not provided any mechanism to select specific extras.
|
||||
if req.marker is not None and not req.marker.evaluate({"extra": ""}):
|
||||
continue
|
||||
dist = env.get_distribution(req.name)
|
||||
if not dist:
|
||||
missing.add(req_str)
|
||||
continue
|
||||
if isinstance(dist.version, Version):
|
||||
installed_req_str = f"{req.name}=={dist.version}"
|
||||
else:
|
||||
installed_req_str = f"{req.name}==={dist.version}"
|
||||
if not req.specifier.contains(dist.version, prereleases=True):
|
||||
conflicting.add((installed_req_str, req_str))
|
||||
# FIXME: Consider direct URL?
|
||||
return conflicting, missing
|
||||
|
||||
def install_requirements(
|
||||
self,
|
||||
requirements: Iterable[str],
|
||||
prefix_as_string: str,
|
||||
*,
|
||||
kind: str,
|
||||
for_req: InstallRequirement | None = None,
|
||||
) -> None:
|
||||
prefix = self._prefixes[prefix_as_string]
|
||||
assert not prefix.setup
|
||||
prefix.setup = True
|
||||
if not requirements:
|
||||
return
|
||||
self.installer.install(requirements, prefix, kind=kind, for_req=for_req)
|
||||
|
||||
|
||||
class NoOpBuildEnvironment(BuildEnvironment):
|
||||
"""A no-op drop-in replacement for BuildEnvironment"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
pass
|
||||
|
||||
def __enter__(self) -> None:
|
||||
pass
|
||||
|
||||
def __exit__(
|
||||
self,
|
||||
exc_type: type[BaseException] | None,
|
||||
exc_val: BaseException | None,
|
||||
exc_tb: TracebackType | None,
|
||||
) -> None:
|
||||
pass
|
||||
|
||||
def cleanup(self) -> None:
|
||||
pass
|
||||
|
||||
def install_requirements(
|
||||
self,
|
||||
requirements: Iterable[str],
|
||||
prefix_as_string: str,
|
||||
*,
|
||||
kind: str,
|
||||
for_req: InstallRequirement | None = None,
|
||||
) -> None:
|
||||
raise NotImplementedError()
|
||||
291
test/.venv/lib/python3.12/site-packages/pip/_internal/cache.py
Normal file
291
test/.venv/lib/python3.12/site-packages/pip/_internal/cache.py
Normal file
@@ -0,0 +1,291 @@
|
||||
"""Cache Management"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from pip._vendor.packaging.tags import Tag, interpreter_name, interpreter_version
|
||||
from pip._vendor.packaging.utils import canonicalize_name
|
||||
|
||||
from pip._internal.exceptions import InvalidWheelFilename
|
||||
from pip._internal.models.direct_url import DirectUrl
|
||||
from pip._internal.models.link import Link
|
||||
from pip._internal.models.wheel import Wheel
|
||||
from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds
|
||||
from pip._internal.utils.urls import path_to_url
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
ORIGIN_JSON_NAME = "origin.json"
|
||||
|
||||
|
||||
def _hash_dict(d: dict[str, str]) -> str:
|
||||
"""Return a stable sha224 of a dictionary."""
|
||||
s = json.dumps(d, sort_keys=True, separators=(",", ":"), ensure_ascii=True)
|
||||
return hashlib.sha224(s.encode("ascii")).hexdigest()
|
||||
|
||||
|
||||
class Cache:
|
||||
"""An abstract class - provides cache directories for data from links
|
||||
|
||||
:param cache_dir: The root of the cache.
|
||||
"""
|
||||
|
||||
def __init__(self, cache_dir: str) -> None:
|
||||
super().__init__()
|
||||
assert not cache_dir or os.path.isabs(cache_dir)
|
||||
self.cache_dir = cache_dir or None
|
||||
|
||||
def _get_cache_path_parts(self, link: Link) -> list[str]:
|
||||
"""Get parts of part that must be os.path.joined with cache_dir"""
|
||||
|
||||
# We want to generate an url to use as our cache key, we don't want to
|
||||
# just reuse the URL because it might have other items in the fragment
|
||||
# and we don't care about those.
|
||||
key_parts = {"url": link.url_without_fragment}
|
||||
if link.hash_name is not None and link.hash is not None:
|
||||
key_parts[link.hash_name] = link.hash
|
||||
if link.subdirectory_fragment:
|
||||
key_parts["subdirectory"] = link.subdirectory_fragment
|
||||
|
||||
# Include interpreter name, major and minor version in cache key
|
||||
# to cope with ill-behaved sdists that build a different wheel
|
||||
# depending on the python version their setup.py is being run on,
|
||||
# and don't encode the difference in compatibility tags.
|
||||
# https://github.com/pypa/pip/issues/7296
|
||||
key_parts["interpreter_name"] = interpreter_name()
|
||||
key_parts["interpreter_version"] = interpreter_version()
|
||||
|
||||
# Encode our key url with sha224, we'll use this because it has similar
|
||||
# security properties to sha256, but with a shorter total output (and
|
||||
# thus less secure). However the differences don't make a lot of
|
||||
# difference for our use case here.
|
||||
hashed = _hash_dict(key_parts)
|
||||
|
||||
# We want to nest the directories some to prevent having a ton of top
|
||||
# level directories where we might run out of sub directories on some
|
||||
# FS.
|
||||
parts = [hashed[:2], hashed[2:4], hashed[4:6], hashed[6:]]
|
||||
|
||||
return parts
|
||||
|
||||
def _get_candidates(self, link: Link, canonical_package_name: str) -> list[Any]:
|
||||
can_not_cache = not self.cache_dir or not canonical_package_name or not link
|
||||
if can_not_cache:
|
||||
return []
|
||||
|
||||
path = self.get_path_for_link(link)
|
||||
if os.path.isdir(path):
|
||||
return [(candidate, path) for candidate in os.listdir(path)]
|
||||
return []
|
||||
|
||||
def get_path_for_link(self, link: Link) -> str:
|
||||
"""Return a directory to store cached items in for link."""
|
||||
raise NotImplementedError()
|
||||
|
||||
def get(
|
||||
self,
|
||||
link: Link,
|
||||
package_name: str | None,
|
||||
supported_tags: list[Tag],
|
||||
) -> Link:
|
||||
"""Returns a link to a cached item if it exists, otherwise returns the
|
||||
passed link.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
class SimpleWheelCache(Cache):
|
||||
"""A cache of wheels for future installs."""
|
||||
|
||||
def __init__(self, cache_dir: str) -> None:
|
||||
super().__init__(cache_dir)
|
||||
|
||||
def get_path_for_link(self, link: Link) -> str:
|
||||
"""Return a directory to store cached wheels for link
|
||||
|
||||
Because there are M wheels for any one sdist, we provide a directory
|
||||
to cache them in, and then consult that directory when looking up
|
||||
cache hits.
|
||||
|
||||
We only insert things into the cache if they have plausible version
|
||||
numbers, so that we don't contaminate the cache with things that were
|
||||
not unique. E.g. ./package might have dozens of installs done for it
|
||||
and build a version of 0.0...and if we built and cached a wheel, we'd
|
||||
end up using the same wheel even if the source has been edited.
|
||||
|
||||
:param link: The link of the sdist for which this will cache wheels.
|
||||
"""
|
||||
parts = self._get_cache_path_parts(link)
|
||||
assert self.cache_dir
|
||||
# Store wheels within the root cache_dir
|
||||
return os.path.join(self.cache_dir, "wheels", *parts)
|
||||
|
||||
def get(
|
||||
self,
|
||||
link: Link,
|
||||
package_name: str | None,
|
||||
supported_tags: list[Tag],
|
||||
) -> Link:
|
||||
candidates = []
|
||||
|
||||
if not package_name:
|
||||
return link
|
||||
|
||||
canonical_package_name = canonicalize_name(package_name)
|
||||
for wheel_name, wheel_dir in self._get_candidates(link, canonical_package_name):
|
||||
try:
|
||||
wheel = Wheel(wheel_name)
|
||||
except InvalidWheelFilename:
|
||||
continue
|
||||
if wheel.name != canonical_package_name:
|
||||
logger.debug(
|
||||
"Ignoring cached wheel %s for %s as it "
|
||||
"does not match the expected distribution name %s.",
|
||||
wheel_name,
|
||||
link,
|
||||
package_name,
|
||||
)
|
||||
continue
|
||||
if not wheel.supported(supported_tags):
|
||||
# Built for a different python/arch/etc
|
||||
continue
|
||||
candidates.append(
|
||||
(
|
||||
wheel.support_index_min(supported_tags),
|
||||
wheel_name,
|
||||
wheel_dir,
|
||||
)
|
||||
)
|
||||
|
||||
if not candidates:
|
||||
return link
|
||||
|
||||
_, wheel_name, wheel_dir = min(candidates)
|
||||
return Link(path_to_url(os.path.join(wheel_dir, wheel_name)))
|
||||
|
||||
|
||||
class EphemWheelCache(SimpleWheelCache):
|
||||
"""A SimpleWheelCache that creates it's own temporary cache directory"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
self._temp_dir = TempDirectory(
|
||||
kind=tempdir_kinds.EPHEM_WHEEL_CACHE,
|
||||
globally_managed=True,
|
||||
)
|
||||
|
||||
super().__init__(self._temp_dir.path)
|
||||
|
||||
|
||||
class CacheEntry:
|
||||
def __init__(
|
||||
self,
|
||||
link: Link,
|
||||
persistent: bool,
|
||||
):
|
||||
self.link = link
|
||||
self.persistent = persistent
|
||||
self.origin: DirectUrl | None = None
|
||||
origin_direct_url_path = Path(self.link.file_path).parent / ORIGIN_JSON_NAME
|
||||
if origin_direct_url_path.exists():
|
||||
try:
|
||||
self.origin = DirectUrl.from_json(
|
||||
origin_direct_url_path.read_text(encoding="utf-8")
|
||||
)
|
||||
except Exception as e:
|
||||
logger.warning(
|
||||
"Ignoring invalid cache entry origin file %s for %s (%s)",
|
||||
origin_direct_url_path,
|
||||
link.filename,
|
||||
e,
|
||||
)
|
||||
|
||||
|
||||
class WheelCache(Cache):
|
||||
"""Wraps EphemWheelCache and SimpleWheelCache into a single Cache
|
||||
|
||||
This Cache allows for gracefully degradation, using the ephem wheel cache
|
||||
when a certain link is not found in the simple wheel cache first.
|
||||
"""
|
||||
|
||||
def __init__(self, cache_dir: str) -> None:
|
||||
super().__init__(cache_dir)
|
||||
self._wheel_cache = SimpleWheelCache(cache_dir)
|
||||
self._ephem_cache = EphemWheelCache()
|
||||
|
||||
def get_path_for_link(self, link: Link) -> str:
|
||||
return self._wheel_cache.get_path_for_link(link)
|
||||
|
||||
def get_ephem_path_for_link(self, link: Link) -> str:
|
||||
return self._ephem_cache.get_path_for_link(link)
|
||||
|
||||
def get(
|
||||
self,
|
||||
link: Link,
|
||||
package_name: str | None,
|
||||
supported_tags: list[Tag],
|
||||
) -> Link:
|
||||
cache_entry = self.get_cache_entry(link, package_name, supported_tags)
|
||||
if cache_entry is None:
|
||||
return link
|
||||
return cache_entry.link
|
||||
|
||||
def get_cache_entry(
|
||||
self,
|
||||
link: Link,
|
||||
package_name: str | None,
|
||||
supported_tags: list[Tag],
|
||||
) -> CacheEntry | None:
|
||||
"""Returns a CacheEntry with a link to a cached item if it exists or
|
||||
None. The cache entry indicates if the item was found in the persistent
|
||||
or ephemeral cache.
|
||||
"""
|
||||
retval = self._wheel_cache.get(
|
||||
link=link,
|
||||
package_name=package_name,
|
||||
supported_tags=supported_tags,
|
||||
)
|
||||
if retval is not link:
|
||||
return CacheEntry(retval, persistent=True)
|
||||
|
||||
retval = self._ephem_cache.get(
|
||||
link=link,
|
||||
package_name=package_name,
|
||||
supported_tags=supported_tags,
|
||||
)
|
||||
if retval is not link:
|
||||
return CacheEntry(retval, persistent=False)
|
||||
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def record_download_origin(cache_dir: str, download_info: DirectUrl) -> None:
|
||||
origin_path = Path(cache_dir) / ORIGIN_JSON_NAME
|
||||
if origin_path.exists():
|
||||
try:
|
||||
origin = DirectUrl.from_json(origin_path.read_text(encoding="utf-8"))
|
||||
except Exception as e:
|
||||
logger.warning(
|
||||
"Could not read origin file %s in cache entry (%s). "
|
||||
"Will attempt to overwrite it.",
|
||||
origin_path,
|
||||
e,
|
||||
)
|
||||
else:
|
||||
# TODO: use DirectUrl.equivalent when
|
||||
# https://github.com/pypa/pip/pull/10564 is merged.
|
||||
if origin.url != download_info.url:
|
||||
logger.warning(
|
||||
"Origin URL %s in cache entry %s does not match download URL "
|
||||
"%s. This is likely a pip bug or a cache corruption issue. "
|
||||
"Will overwrite it with the new value.",
|
||||
origin.url,
|
||||
cache_dir,
|
||||
download_info.url,
|
||||
)
|
||||
origin_path.write_text(download_info.to_json(), encoding="utf-8")
|
||||
@@ -0,0 +1,3 @@
|
||||
"""Subpackage containing all of pip's command line interface related code"""
|
||||
|
||||
# This file intentionally does not import submodules
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,184 @@
|
||||
"""Logic that powers autocompletion installed by ``pip completion``."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import optparse
|
||||
import os
|
||||
import sys
|
||||
from collections.abc import Iterable
|
||||
from itertools import chain
|
||||
from typing import Any
|
||||
|
||||
from pip._internal.cli.main_parser import create_main_parser
|
||||
from pip._internal.commands import commands_dict, create_command
|
||||
from pip._internal.metadata import get_default_environment
|
||||
|
||||
|
||||
def autocomplete() -> None:
|
||||
"""Entry Point for completion of main and subcommand options."""
|
||||
# Don't complete if user hasn't sourced bash_completion file.
|
||||
if "PIP_AUTO_COMPLETE" not in os.environ:
|
||||
return
|
||||
# Don't complete if autocompletion environment variables
|
||||
# are not present
|
||||
if not os.environ.get("COMP_WORDS") or not os.environ.get("COMP_CWORD"):
|
||||
return
|
||||
cwords = os.environ["COMP_WORDS"].split()[1:]
|
||||
cword = int(os.environ["COMP_CWORD"])
|
||||
try:
|
||||
current = cwords[cword - 1]
|
||||
except IndexError:
|
||||
current = ""
|
||||
|
||||
parser = create_main_parser()
|
||||
subcommands = list(commands_dict)
|
||||
options = []
|
||||
|
||||
# subcommand
|
||||
subcommand_name: str | None = None
|
||||
for word in cwords:
|
||||
if word in subcommands:
|
||||
subcommand_name = word
|
||||
break
|
||||
# subcommand options
|
||||
if subcommand_name is not None:
|
||||
# special case: 'help' subcommand has no options
|
||||
if subcommand_name == "help":
|
||||
sys.exit(1)
|
||||
# special case: list locally installed dists for show and uninstall
|
||||
should_list_installed = not current.startswith("-") and subcommand_name in [
|
||||
"show",
|
||||
"uninstall",
|
||||
]
|
||||
if should_list_installed:
|
||||
env = get_default_environment()
|
||||
lc = current.lower()
|
||||
installed = [
|
||||
dist.canonical_name
|
||||
for dist in env.iter_installed_distributions(local_only=True)
|
||||
if dist.canonical_name.startswith(lc)
|
||||
and dist.canonical_name not in cwords[1:]
|
||||
]
|
||||
# if there are no dists installed, fall back to option completion
|
||||
if installed:
|
||||
for dist in installed:
|
||||
print(dist)
|
||||
sys.exit(1)
|
||||
|
||||
should_list_installables = (
|
||||
not current.startswith("-") and subcommand_name == "install"
|
||||
)
|
||||
if should_list_installables:
|
||||
for path in auto_complete_paths(current, "path"):
|
||||
print(path)
|
||||
sys.exit(1)
|
||||
|
||||
subcommand = create_command(subcommand_name)
|
||||
|
||||
for opt in subcommand.parser.option_list_all:
|
||||
if opt.help != optparse.SUPPRESS_HELP:
|
||||
options += [
|
||||
(opt_str, opt.nargs) for opt_str in opt._long_opts + opt._short_opts
|
||||
]
|
||||
|
||||
# filter out previously specified options from available options
|
||||
prev_opts = [x.split("=")[0] for x in cwords[1 : cword - 1]]
|
||||
options = [(x, v) for (x, v) in options if x not in prev_opts]
|
||||
# filter options by current input
|
||||
options = [(k, v) for k, v in options if k.startswith(current)]
|
||||
# get completion type given cwords and available subcommand options
|
||||
completion_type = get_path_completion_type(
|
||||
cwords,
|
||||
cword,
|
||||
subcommand.parser.option_list_all,
|
||||
)
|
||||
# get completion files and directories if ``completion_type`` is
|
||||
# ``<file>``, ``<dir>`` or ``<path>``
|
||||
if completion_type:
|
||||
paths = auto_complete_paths(current, completion_type)
|
||||
options = [(path, 0) for path in paths]
|
||||
for option in options:
|
||||
opt_label = option[0]
|
||||
# append '=' to options which require args
|
||||
if option[1] and option[0][:2] == "--":
|
||||
opt_label += "="
|
||||
print(opt_label)
|
||||
|
||||
# Complete sub-commands (unless one is already given).
|
||||
if not any(name in cwords for name in subcommand.handler_map()):
|
||||
for handler_name in subcommand.handler_map():
|
||||
if handler_name.startswith(current):
|
||||
print(handler_name)
|
||||
else:
|
||||
# show main parser options only when necessary
|
||||
|
||||
opts = [i.option_list for i in parser.option_groups]
|
||||
opts.append(parser.option_list)
|
||||
flattened_opts = chain.from_iterable(opts)
|
||||
if current.startswith("-"):
|
||||
for opt in flattened_opts:
|
||||
if opt.help != optparse.SUPPRESS_HELP:
|
||||
subcommands += opt._long_opts + opt._short_opts
|
||||
else:
|
||||
# get completion type given cwords and all available options
|
||||
completion_type = get_path_completion_type(cwords, cword, flattened_opts)
|
||||
if completion_type:
|
||||
subcommands = list(auto_complete_paths(current, completion_type))
|
||||
|
||||
print(" ".join([x for x in subcommands if x.startswith(current)]))
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def get_path_completion_type(
|
||||
cwords: list[str], cword: int, opts: Iterable[Any]
|
||||
) -> str | None:
|
||||
"""Get the type of path completion (``file``, ``dir``, ``path`` or None)
|
||||
|
||||
:param cwords: same as the environmental variable ``COMP_WORDS``
|
||||
:param cword: same as the environmental variable ``COMP_CWORD``
|
||||
:param opts: The available options to check
|
||||
:return: path completion type (``file``, ``dir``, ``path`` or None)
|
||||
"""
|
||||
if cword < 2 or not cwords[cword - 2].startswith("-"):
|
||||
return None
|
||||
for opt in opts:
|
||||
if opt.help == optparse.SUPPRESS_HELP:
|
||||
continue
|
||||
for o in str(opt).split("/"):
|
||||
if cwords[cword - 2].split("=")[0] == o:
|
||||
if not opt.metavar or any(
|
||||
x in ("path", "file", "dir") for x in opt.metavar.split("/")
|
||||
):
|
||||
return opt.metavar
|
||||
return None
|
||||
|
||||
|
||||
def auto_complete_paths(current: str, completion_type: str) -> Iterable[str]:
|
||||
"""If ``completion_type`` is ``file`` or ``path``, list all regular files
|
||||
and directories starting with ``current``; otherwise only list directories
|
||||
starting with ``current``.
|
||||
|
||||
:param current: The word to be completed
|
||||
:param completion_type: path completion type(``file``, ``path`` or ``dir``)
|
||||
:return: A generator of regular files and/or directories
|
||||
"""
|
||||
directory, filename = os.path.split(current)
|
||||
current_path = os.path.abspath(directory)
|
||||
# Don't complete paths if they can't be accessed
|
||||
if not os.access(current_path, os.R_OK):
|
||||
return
|
||||
filename = os.path.normcase(filename)
|
||||
# list all files that start with ``filename``
|
||||
file_list = (
|
||||
x for x in os.listdir(current_path) if os.path.normcase(x).startswith(filename)
|
||||
)
|
||||
for f in file_list:
|
||||
opt = os.path.join(current_path, f)
|
||||
comp_file = os.path.normcase(os.path.join(directory, f))
|
||||
# complete regular files when there is not ``<dir>`` after option
|
||||
# complete directories when there is ``<file>``, ``<path>`` or
|
||||
# ``<dir>``after option
|
||||
if completion_type != "dir" and os.path.isfile(opt):
|
||||
yield comp_file
|
||||
elif os.path.isdir(opt):
|
||||
yield os.path.join(comp_file, "")
|
||||
@@ -0,0 +1,264 @@
|
||||
"""Base Command class, and related routines"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
import logging
|
||||
import logging.config
|
||||
import optparse
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
from collections.abc import Iterator
|
||||
from optparse import Values
|
||||
from typing import Callable
|
||||
|
||||
from pip._vendor.rich import reconfigure
|
||||
from pip._vendor.rich import traceback as rich_traceback
|
||||
|
||||
from pip._internal.cli import cmdoptions
|
||||
from pip._internal.cli.command_context import CommandContextMixIn
|
||||
from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
|
||||
from pip._internal.cli.status_codes import (
|
||||
ERROR,
|
||||
PREVIOUS_BUILD_DIR_ERROR,
|
||||
UNKNOWN_ERROR,
|
||||
VIRTUALENV_NOT_FOUND,
|
||||
)
|
||||
from pip._internal.exceptions import (
|
||||
BadCommand,
|
||||
CommandError,
|
||||
DiagnosticPipError,
|
||||
InstallationError,
|
||||
NetworkConnectionError,
|
||||
PreviousBuildDirError,
|
||||
)
|
||||
from pip._internal.utils.filesystem import check_path_owner
|
||||
from pip._internal.utils.logging import BrokenStdoutLoggingError, setup_logging
|
||||
from pip._internal.utils.misc import get_prog, normalize_path
|
||||
from pip._internal.utils.temp_dir import TempDirectoryTypeRegistry as TempDirRegistry
|
||||
from pip._internal.utils.temp_dir import global_tempdir_manager, tempdir_registry
|
||||
from pip._internal.utils.virtualenv import running_under_virtualenv
|
||||
|
||||
__all__ = ["Command"]
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Command(CommandContextMixIn):
|
||||
usage: str = ""
|
||||
ignore_require_venv: bool = False
|
||||
|
||||
def __init__(self, name: str, summary: str, isolated: bool = False) -> None:
|
||||
super().__init__()
|
||||
|
||||
self.name = name
|
||||
self.summary = summary
|
||||
self.parser = ConfigOptionParser(
|
||||
usage=self.usage,
|
||||
prog=f"{get_prog()} {name}",
|
||||
formatter=UpdatingDefaultsHelpFormatter(),
|
||||
add_help_option=False,
|
||||
name=name,
|
||||
description=self.__doc__,
|
||||
isolated=isolated,
|
||||
)
|
||||
|
||||
self.tempdir_registry: TempDirRegistry | None = None
|
||||
|
||||
# Commands should add options to this option group
|
||||
optgroup_name = f"{self.name.capitalize()} Options"
|
||||
self.cmd_opts = optparse.OptionGroup(self.parser, optgroup_name)
|
||||
|
||||
# Add the general options
|
||||
gen_opts = cmdoptions.make_option_group(
|
||||
cmdoptions.general_group,
|
||||
self.parser,
|
||||
)
|
||||
self.parser.add_option_group(gen_opts)
|
||||
|
||||
self.add_options()
|
||||
|
||||
def add_options(self) -> None:
|
||||
pass
|
||||
|
||||
@contextlib.contextmanager
|
||||
def pip_version_check(self, options: Values, args: list[str]) -> Iterator[None]:
|
||||
"""
|
||||
This is a no-op so that commands by default do not do the pip version
|
||||
check.
|
||||
"""
|
||||
# Make sure we do the pip version check if the index_group options
|
||||
# are present.
|
||||
assert not hasattr(options, "no_index")
|
||||
yield
|
||||
|
||||
def run(self, options: Values, args: list[str]) -> int:
|
||||
raise NotImplementedError
|
||||
|
||||
def _run_wrapper(self, level_number: int, options: Values, args: list[str]) -> int:
|
||||
def _inner_run() -> int:
|
||||
with self.pip_version_check(options, args):
|
||||
return self.run(options, args)
|
||||
|
||||
if options.debug_mode:
|
||||
rich_traceback.install(show_locals=True)
|
||||
return _inner_run()
|
||||
|
||||
try:
|
||||
status = _inner_run()
|
||||
assert isinstance(status, int)
|
||||
return status
|
||||
except DiagnosticPipError as exc:
|
||||
logger.error("%s", exc, extra={"rich": True})
|
||||
logger.debug("Exception information:", exc_info=True)
|
||||
|
||||
return ERROR
|
||||
except PreviousBuildDirError as exc:
|
||||
logger.critical(str(exc))
|
||||
logger.debug("Exception information:", exc_info=True)
|
||||
|
||||
return PREVIOUS_BUILD_DIR_ERROR
|
||||
except (
|
||||
InstallationError,
|
||||
BadCommand,
|
||||
NetworkConnectionError,
|
||||
) as exc:
|
||||
logger.critical(str(exc))
|
||||
logger.debug("Exception information:", exc_info=True)
|
||||
|
||||
return ERROR
|
||||
except CommandError as exc:
|
||||
logger.critical("%s", exc)
|
||||
logger.debug("Exception information:", exc_info=True)
|
||||
|
||||
return ERROR
|
||||
except BrokenStdoutLoggingError:
|
||||
# stdout is broken; write to stderr directly. Use os.write, not
|
||||
# sys.stderr.write, so a full pipe buffer returns EPIPE instead
|
||||
# of deadlocking (Windows anonymous pipes are ~4KB).
|
||||
try:
|
||||
os.write(2, b"ERROR: Pipe to stdout was broken\n")
|
||||
if level_number <= logging.DEBUG:
|
||||
encoding = getattr(sys.stderr, "encoding", None) or "utf-8"
|
||||
os.write(
|
||||
2, traceback.format_exc().encode(encoding, "backslashreplace")
|
||||
)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
return ERROR
|
||||
except KeyboardInterrupt:
|
||||
logger.critical("Operation cancelled by user")
|
||||
logger.debug("Exception information:", exc_info=True)
|
||||
|
||||
return ERROR
|
||||
except BaseException:
|
||||
logger.critical("Exception:", exc_info=True)
|
||||
|
||||
return UNKNOWN_ERROR
|
||||
|
||||
def parse_args(self, args: list[str]) -> tuple[Values, list[str]]:
|
||||
# factored out for testability
|
||||
return self.parser.parse_args(args)
|
||||
|
||||
def main(self, args: list[str]) -> int:
|
||||
try:
|
||||
with self.main_context():
|
||||
return self._main(args)
|
||||
finally:
|
||||
logging.shutdown()
|
||||
|
||||
def _main(self, args: list[str]) -> int:
|
||||
# We must initialize this before the tempdir manager, otherwise the
|
||||
# configuration would not be accessible by the time we clean up the
|
||||
# tempdir manager.
|
||||
self.tempdir_registry = self.enter_context(tempdir_registry())
|
||||
# Intentionally set as early as possible so globally-managed temporary
|
||||
# directories are available to the rest of the code.
|
||||
self.enter_context(global_tempdir_manager())
|
||||
|
||||
options, args = self.parse_args(args)
|
||||
|
||||
# Set verbosity so that it can be used elsewhere.
|
||||
self.verbosity = options.verbose - options.quiet
|
||||
if options.debug_mode:
|
||||
self.verbosity = 2
|
||||
|
||||
if hasattr(options, "progress_bar") and options.progress_bar == "auto":
|
||||
options.progress_bar = "on" if self.verbosity >= 0 else "off"
|
||||
|
||||
reconfigure(no_color=options.no_color)
|
||||
level_number = setup_logging(
|
||||
verbosity=self.verbosity,
|
||||
no_color=options.no_color,
|
||||
user_log_file=options.log,
|
||||
)
|
||||
|
||||
always_enabled_features = set(options.features_enabled) & set(
|
||||
cmdoptions.ALWAYS_ENABLED_FEATURES
|
||||
)
|
||||
if always_enabled_features:
|
||||
logger.warning(
|
||||
"The following features are always enabled: %s. ",
|
||||
", ".join(sorted(always_enabled_features)),
|
||||
)
|
||||
|
||||
# Make sure that the --python argument isn't specified after the
|
||||
# subcommand. We can tell, because if --python was specified,
|
||||
# we should only reach this point if we're running in the created
|
||||
# subprocess, which has the _PIP_RUNNING_IN_SUBPROCESS environment
|
||||
# variable set.
|
||||
if options.python and "_PIP_RUNNING_IN_SUBPROCESS" not in os.environ:
|
||||
logger.critical(
|
||||
"The --python option must be placed before the pip subcommand name"
|
||||
)
|
||||
sys.exit(ERROR)
|
||||
|
||||
# TODO: Try to get these passing down from the command?
|
||||
# without resorting to os.environ to hold these.
|
||||
# This also affects isolated builds and it should.
|
||||
|
||||
if options.no_input:
|
||||
os.environ["PIP_NO_INPUT"] = "1"
|
||||
|
||||
if options.exists_action:
|
||||
os.environ["PIP_EXISTS_ACTION"] = " ".join(options.exists_action)
|
||||
|
||||
if options.require_venv and not self.ignore_require_venv:
|
||||
# If a venv is required check if it can really be found
|
||||
if not running_under_virtualenv():
|
||||
logger.critical("Could not find an activated virtualenv (required).")
|
||||
sys.exit(VIRTUALENV_NOT_FOUND)
|
||||
|
||||
if options.cache_dir:
|
||||
options.cache_dir = normalize_path(options.cache_dir)
|
||||
if not check_path_owner(options.cache_dir):
|
||||
logger.warning(
|
||||
"The directory '%s' or its parent directory is not owned "
|
||||
"or is not writable by the current user. The cache "
|
||||
"has been disabled. Check the permissions and owner of "
|
||||
"that directory. If executing pip with sudo, you should "
|
||||
"use sudo's -H flag.",
|
||||
options.cache_dir,
|
||||
)
|
||||
options.cache_dir = None
|
||||
|
||||
if (
|
||||
"inprocess-build-deps" in options.features_enabled
|
||||
and os.environ.get("PIP_CONSTRAINT", "")
|
||||
and "build-constraint" not in options.features_enabled
|
||||
):
|
||||
logger.warning(
|
||||
"In-process build dependencies are enabled, "
|
||||
"PIP_CONSTRAINT will have no effect for build dependencies"
|
||||
)
|
||||
options.features_enabled.append("build-constraint")
|
||||
|
||||
return self._run_wrapper(level_number, options, args)
|
||||
|
||||
def handler_map(self) -> dict[str, Callable[[Values, list[str]], None]]:
|
||||
"""
|
||||
map of names to handler actions for commands with sub-actions
|
||||
"""
|
||||
return {}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,28 @@
|
||||
from collections.abc import Generator
|
||||
from contextlib import AbstractContextManager, ExitStack, contextmanager
|
||||
from typing import TypeVar
|
||||
|
||||
_T = TypeVar("_T", covariant=True)
|
||||
|
||||
|
||||
class CommandContextMixIn:
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
self._in_main_context = False
|
||||
self._main_context = ExitStack()
|
||||
|
||||
@contextmanager
|
||||
def main_context(self) -> Generator[None, None, None]:
|
||||
assert not self._in_main_context
|
||||
|
||||
self._in_main_context = True
|
||||
try:
|
||||
with self._main_context:
|
||||
yield
|
||||
finally:
|
||||
self._in_main_context = False
|
||||
|
||||
def enter_context(self, context_provider: AbstractContextManager[_T]) -> _T:
|
||||
assert self._in_main_context
|
||||
|
||||
return self._main_context.enter_context(context_provider)
|
||||
@@ -0,0 +1,212 @@
|
||||
"""
|
||||
Contains command classes which may interact with an index / the network.
|
||||
|
||||
Unlike its sister module, req_command, this module still uses lazy imports
|
||||
so commands which don't always hit the network (e.g. list w/o --outdated or
|
||||
--uptodate) don't need waste time importing PipSession and friends.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
import logging
|
||||
import os
|
||||
from collections.abc import Iterator
|
||||
from functools import lru_cache
|
||||
from optparse import Values
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from pip._vendor import certifi
|
||||
|
||||
from pip._internal.cli.base_command import Command
|
||||
from pip._internal.cli.command_context import CommandContextMixIn
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ssl import SSLContext
|
||||
|
||||
from pip._vendor.packaging.utils import NormalizedName
|
||||
|
||||
from pip._internal.network.session import PipSession
|
||||
from pip._internal.self_outdated_check import UpgradePrompt
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@lru_cache
|
||||
def _create_truststore_ssl_context() -> SSLContext | None:
|
||||
try:
|
||||
import ssl
|
||||
except ImportError:
|
||||
logger.warning("Disabling truststore since ssl support is missing")
|
||||
return None
|
||||
|
||||
try:
|
||||
from pip._vendor import truststore
|
||||
except ImportError:
|
||||
logger.warning("Disabling truststore because platform isn't supported")
|
||||
return None
|
||||
|
||||
ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
|
||||
ctx.load_verify_locations(certifi.where())
|
||||
return ctx
|
||||
|
||||
|
||||
class SessionCommandMixin(CommandContextMixIn):
|
||||
"""
|
||||
A class mixin for command classes needing _build_session().
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
self._session: PipSession | None = None
|
||||
|
||||
@classmethod
|
||||
def _get_index_urls(cls, options: Values) -> list[str] | None:
|
||||
"""Return a list of index urls from user-provided options."""
|
||||
index_urls = []
|
||||
if not getattr(options, "no_index", False):
|
||||
url = getattr(options, "index_url", None)
|
||||
if url:
|
||||
index_urls.append(url)
|
||||
urls = getattr(options, "extra_index_urls", None)
|
||||
if urls:
|
||||
index_urls.extend(urls)
|
||||
# Return None rather than an empty list
|
||||
return index_urls or None
|
||||
|
||||
def get_default_session(self, options: Values) -> PipSession:
|
||||
"""Get a default-managed session."""
|
||||
if self._session is None:
|
||||
self._session = self.enter_context(self._build_session(options))
|
||||
# there's no type annotation on requests.Session, so it's
|
||||
# automatically ContextManager[Any] and self._session becomes Any,
|
||||
# then https://github.com/python/mypy/issues/7696 kicks in
|
||||
assert self._session is not None
|
||||
return self._session
|
||||
|
||||
def _build_session(
|
||||
self,
|
||||
options: Values,
|
||||
retries: int | None = None,
|
||||
timeout: int | None = None,
|
||||
) -> PipSession:
|
||||
from pip._internal.network.session import PipSession
|
||||
|
||||
cache_dir = options.cache_dir
|
||||
assert not cache_dir or os.path.isabs(cache_dir)
|
||||
|
||||
if "legacy-certs" not in options.deprecated_features_enabled:
|
||||
ssl_context = _create_truststore_ssl_context()
|
||||
else:
|
||||
ssl_context = None
|
||||
|
||||
session = PipSession(
|
||||
cache=os.path.join(cache_dir, "http-v2") if cache_dir else None,
|
||||
retries=retries if retries is not None else options.retries,
|
||||
resume_retries=options.resume_retries,
|
||||
trusted_hosts=options.trusted_hosts,
|
||||
index_urls=self._get_index_urls(options),
|
||||
ssl_context=ssl_context,
|
||||
)
|
||||
|
||||
# Handle custom ca-bundles from the user
|
||||
if options.cert:
|
||||
session.verify = options.cert
|
||||
|
||||
# Handle SSL client certificate
|
||||
if options.client_cert:
|
||||
session.cert = options.client_cert
|
||||
|
||||
# Handle timeouts
|
||||
if options.timeout or timeout:
|
||||
session.timeout = timeout if timeout is not None else options.timeout
|
||||
|
||||
# Handle configured proxies
|
||||
if options.proxy:
|
||||
session.proxies = {
|
||||
"http": options.proxy,
|
||||
"https": options.proxy,
|
||||
}
|
||||
session.trust_env = False
|
||||
session.pip_proxy = options.proxy
|
||||
|
||||
# Determine if we can prompt the user for authentication or not
|
||||
session.auth.prompting = not options.no_input
|
||||
session.auth.keyring_provider = options.keyring_provider
|
||||
|
||||
return session
|
||||
|
||||
|
||||
def _pip_self_version_check_fetch(
|
||||
session: PipSession, options: Values
|
||||
) -> UpgradePrompt | None:
|
||||
from pip._internal.self_outdated_check import pip_self_version_check_fetch
|
||||
|
||||
return pip_self_version_check_fetch(session, options)
|
||||
|
||||
|
||||
def _pip_self_version_check_emit(upgrade_prompt: UpgradePrompt | None) -> None:
|
||||
from pip._internal.self_outdated_check import pip_self_version_check_emit
|
||||
|
||||
pip_self_version_check_emit(upgrade_prompt)
|
||||
|
||||
|
||||
class IndexGroupCommand(Command, SessionCommandMixin):
|
||||
"""
|
||||
Abstract base class for commands with the index_group options.
|
||||
|
||||
This also corresponds to the commands that permit the pip version check.
|
||||
"""
|
||||
|
||||
def should_exclude_prerelease(
|
||||
self, options: Values, package_name: NormalizedName
|
||||
) -> bool:
|
||||
"""
|
||||
Determine if pre-releases should be excluded for a package.
|
||||
"""
|
||||
# Check per-package release control settings
|
||||
if options.release_control:
|
||||
allow_prereleases = options.release_control.allows_prereleases(package_name)
|
||||
if allow_prereleases is True:
|
||||
return False # Include pre-releases
|
||||
elif allow_prereleases is False:
|
||||
return True # Exclude pre-releases
|
||||
|
||||
# No specific setting: exclude prereleases by default
|
||||
return True
|
||||
|
||||
@contextlib.contextmanager
|
||||
def pip_version_check(self, options: Values, args: list[str]) -> Iterator[None]:
|
||||
"""
|
||||
Do the pip version check if not disabled.
|
||||
|
||||
This overrides the default behavior of not doing the check.
|
||||
"""
|
||||
# Make sure the index_group options are present.
|
||||
assert hasattr(options, "no_index")
|
||||
|
||||
if options.disable_pip_version_check or options.no_index:
|
||||
yield
|
||||
return
|
||||
|
||||
upgrade_prompt: UpgradePrompt | None = None
|
||||
try:
|
||||
session = self._build_session(
|
||||
options,
|
||||
retries=0,
|
||||
timeout=min(5, options.timeout),
|
||||
)
|
||||
with session:
|
||||
upgrade_prompt = _pip_self_version_check_fetch(session, options)
|
||||
except Exception:
|
||||
logger.warning("There was an error checking the latest version of pip.")
|
||||
logger.debug("See below for error", exc_info=True)
|
||||
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
try:
|
||||
_pip_self_version_check_emit(upgrade_prompt)
|
||||
except Exception:
|
||||
logger.warning("There was an error checking the latest version of pip.")
|
||||
logger.debug("See below for error", exc_info=True)
|
||||
@@ -0,0 +1,85 @@
|
||||
"""Primary application entrypoint."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import locale
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# Do not import and use main() directly! Using it directly is actively
|
||||
# discouraged by pip's maintainers. The name, location and behavior of
|
||||
# this function is subject to change, so calling it directly is not
|
||||
# portable across different pip versions.
|
||||
|
||||
# In addition, running pip in-process is unsupported and unsafe. This is
|
||||
# elaborated in detail at
|
||||
# https://pip.pypa.io/en/stable/user_guide/#using-pip-from-your-program.
|
||||
# That document also provides suggestions that should work for nearly
|
||||
# all users that are considering importing and using main() directly.
|
||||
|
||||
# However, we know that certain users will still want to invoke pip
|
||||
# in-process. If you understand and accept the implications of using pip
|
||||
# in an unsupported manner, the best approach is to use runpy to avoid
|
||||
# depending on the exact location of this entry point.
|
||||
|
||||
# The following example shows how to use runpy to invoke pip in that
|
||||
# case:
|
||||
#
|
||||
# sys.argv = ["pip", your, args, here]
|
||||
# runpy.run_module("pip", run_name="__main__")
|
||||
#
|
||||
# Note that this will exit the process after running, unlike a direct
|
||||
# call to main. As it is not safe to do any processing after calling
|
||||
# main, this should not be an issue in practice.
|
||||
|
||||
|
||||
def main(args: list[str] | None = None) -> int:
|
||||
# NOTE: Lazy imports to speed up import of this module,
|
||||
# which is imported from the pip console script. This doesn't
|
||||
# speed up normal pip execution, but might be important in the future
|
||||
# if we use ``multiprocessing`` module,
|
||||
# which imports __main__ for each spawned subprocess.
|
||||
from pip._internal.cli.autocompletion import autocomplete
|
||||
from pip._internal.cli.main_parser import parse_command
|
||||
from pip._internal.commands import create_command
|
||||
from pip._internal.exceptions import PipError
|
||||
from pip._internal.utils import deprecation
|
||||
|
||||
if args is None:
|
||||
args = sys.argv[1:]
|
||||
|
||||
# Suppress the pkg_resources deprecation warning
|
||||
# Note - we use a module of .*pkg_resources to cover
|
||||
# the normal case (pip._vendor.pkg_resources) and the
|
||||
# devendored case (a bare pkg_resources)
|
||||
warnings.filterwarnings(
|
||||
action="ignore", category=DeprecationWarning, module=".*pkg_resources"
|
||||
)
|
||||
|
||||
# Configure our deprecation warnings to be sent through loggers
|
||||
deprecation.install_warning_logger()
|
||||
|
||||
autocomplete()
|
||||
|
||||
try:
|
||||
cmd_name, cmd_args = parse_command(args)
|
||||
except PipError as exc:
|
||||
sys.stderr.write(f"ERROR: {exc}")
|
||||
sys.stderr.write(os.linesep)
|
||||
sys.exit(1)
|
||||
|
||||
# Needed for locale.getpreferredencoding(False) to work
|
||||
# in pip._internal.utils.encoding.auto_decode
|
||||
try:
|
||||
locale.setlocale(locale.LC_ALL, "")
|
||||
except locale.Error as e:
|
||||
# setlocale can apparently crash if locale are uninitialized
|
||||
logger.debug("Ignoring error %s when setting locale", e)
|
||||
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
|
||||
|
||||
return command.main(cmd_args)
|
||||
@@ -0,0 +1,136 @@
|
||||
"""A single place for constructing and exposing the main parser"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from pip._vendor.rich.markup import escape
|
||||
|
||||
from pip._internal.build_env import get_runnable_pip
|
||||
from pip._internal.cli import cmdoptions
|
||||
from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
|
||||
from pip._internal.commands import commands_dict, get_similar_commands
|
||||
from pip._internal.exceptions import CommandError
|
||||
from pip._internal.utils.misc import get_pip_version, get_prog
|
||||
|
||||
__all__ = ["create_main_parser", "parse_command"]
|
||||
|
||||
|
||||
def create_main_parser() -> ConfigOptionParser:
|
||||
"""Creates and returns the main parser for pip's CLI"""
|
||||
|
||||
parser = ConfigOptionParser(
|
||||
usage="\n%prog <command> [options]",
|
||||
add_help_option=False,
|
||||
formatter=UpdatingDefaultsHelpFormatter(),
|
||||
name="global",
|
||||
prog=get_prog(),
|
||||
)
|
||||
parser.disable_interspersed_args()
|
||||
|
||||
parser.version = get_pip_version()
|
||||
|
||||
# add the general options
|
||||
gen_opts = cmdoptions.make_option_group(cmdoptions.general_group, parser)
|
||||
parser.add_option_group(gen_opts)
|
||||
|
||||
# so the help formatter knows
|
||||
parser.main = True # type: ignore
|
||||
|
||||
# create command listing for description
|
||||
description = [""] + [
|
||||
f"[optparse.longargs]{name:27}[/] {escape(command_info.summary)}"
|
||||
for name, command_info in commands_dict.items()
|
||||
]
|
||||
parser.description = "\n".join(description)
|
||||
|
||||
return parser
|
||||
|
||||
|
||||
def identify_python_interpreter(python: str) -> str | None:
|
||||
# If the named file exists, use it.
|
||||
# If it's a directory, assume it's a virtual environment and
|
||||
# look for the environment's Python executable.
|
||||
if os.path.exists(python):
|
||||
if os.path.isdir(python):
|
||||
# bin/python for Unix, Scripts/python.exe for Windows
|
||||
# Try both in case of odd cases like cygwin.
|
||||
for exe in ("bin/python", "Scripts/python.exe"):
|
||||
py = os.path.join(python, exe)
|
||||
if os.path.exists(py):
|
||||
return py
|
||||
else:
|
||||
return python
|
||||
|
||||
# Could not find the interpreter specified
|
||||
return None
|
||||
|
||||
|
||||
def parse_command(args: list[str]) -> tuple[str, list[str]]:
|
||||
parser = create_main_parser()
|
||||
|
||||
# Note: parser calls disable_interspersed_args(), so the result of this
|
||||
# call is to split the initial args into the general options before the
|
||||
# subcommand and everything else.
|
||||
# For example:
|
||||
# args: ['--timeout=5', 'install', '--user', 'INITools']
|
||||
# general_options: ['--timeout==5']
|
||||
# args_else: ['install', '--user', 'INITools']
|
||||
general_options, args_else = parser.parse_args(args)
|
||||
|
||||
# --python
|
||||
if general_options.python and "_PIP_RUNNING_IN_SUBPROCESS" not in os.environ:
|
||||
# Re-invoke pip using the specified Python interpreter
|
||||
interpreter = identify_python_interpreter(general_options.python)
|
||||
if interpreter is None:
|
||||
raise CommandError(
|
||||
f"Could not locate Python interpreter {general_options.python}"
|
||||
)
|
||||
|
||||
pip_cmd = [
|
||||
interpreter,
|
||||
get_runnable_pip(),
|
||||
]
|
||||
pip_cmd.extend(args)
|
||||
|
||||
# Set a flag so the child doesn't re-invoke itself, causing
|
||||
# an infinite loop.
|
||||
os.environ["_PIP_RUNNING_IN_SUBPROCESS"] = "1"
|
||||
returncode = 0
|
||||
try:
|
||||
proc = subprocess.run(pip_cmd)
|
||||
returncode = proc.returncode
|
||||
except (subprocess.SubprocessError, OSError) as exc:
|
||||
raise CommandError(f"Failed to run pip under {interpreter}: {exc}")
|
||||
sys.exit(returncode)
|
||||
|
||||
# --version
|
||||
if general_options.version:
|
||||
sys.stdout.write(parser.version)
|
||||
sys.stdout.write(os.linesep)
|
||||
sys.exit()
|
||||
|
||||
# pip || pip help -> print_help()
|
||||
if not args_else or (args_else[0] == "help" and len(args_else) == 1):
|
||||
parser.print_help()
|
||||
sys.exit()
|
||||
|
||||
# the subcommand name
|
||||
cmd_name = args_else[0]
|
||||
|
||||
if cmd_name not in commands_dict:
|
||||
guess = get_similar_commands(cmd_name)
|
||||
|
||||
msg = [f'unknown command "{cmd_name}"']
|
||||
if guess:
|
||||
msg.append(f'maybe you meant "{guess}"')
|
||||
|
||||
raise CommandError(" - ".join(msg))
|
||||
|
||||
# all the args without the subcommand
|
||||
cmd_args = args[:]
|
||||
cmd_args.remove(cmd_name)
|
||||
|
||||
return cmd_name, cmd_args
|
||||
@@ -0,0 +1,358 @@
|
||||
"""Base option parser setup"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import optparse
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import textwrap
|
||||
from collections.abc import Generator
|
||||
from contextlib import suppress
|
||||
from typing import Any, NoReturn
|
||||
|
||||
from pip._vendor.rich.markup import escape
|
||||
from pip._vendor.rich.theme import Theme
|
||||
|
||||
from pip._internal.cli.status_codes import UNKNOWN_ERROR
|
||||
from pip._internal.configuration import Configuration, ConfigurationError
|
||||
from pip._internal.utils.logging import PipConsole
|
||||
from pip._internal.utils.misc import redact_auth_from_url, strtobool
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class PrettyHelpFormatter(optparse.IndentedHelpFormatter):
|
||||
"""A prettier/less verbose help formatter for optparse."""
|
||||
|
||||
styles = {
|
||||
"optparse.shortargs": "green",
|
||||
"optparse.longargs": "cyan",
|
||||
"optparse.groups": "bold blue",
|
||||
"optparse.metavar": "yellow",
|
||||
}
|
||||
highlights = {
|
||||
r"\s(-{1}[\w]+[\w-]*)": "shortargs", # highlight -letter as short args
|
||||
r"\s(-{2}[\w]+[\w-]*)": "longargs", # highlight --words as long args
|
||||
}
|
||||
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||
# help position must be aligned with __init__.parseopts.description
|
||||
kwargs["max_help_position"] = 30
|
||||
kwargs["indent_increment"] = 1
|
||||
kwargs["width"] = shutil.get_terminal_size()[0] - 2
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def format_option_strings(self, option: optparse.Option) -> str:
|
||||
"""Return a comma-separated list of option strings and metavars."""
|
||||
opts = []
|
||||
|
||||
if option._short_opts:
|
||||
opts.append(f"[optparse.shortargs]{option._short_opts[0]}[/]")
|
||||
if option._long_opts:
|
||||
opts.append(f"[optparse.longargs]{option._long_opts[0]}[/]")
|
||||
if len(opts) > 1:
|
||||
opts.insert(1, ", ")
|
||||
|
||||
if option.takes_value():
|
||||
assert option.dest is not None
|
||||
metavar = option.metavar or option.dest.lower()
|
||||
opts.append(f" [optparse.metavar]<{escape(metavar.lower())}>[/]")
|
||||
|
||||
return "".join(opts)
|
||||
|
||||
def format_option(self, option: optparse.Option) -> str:
|
||||
"""Overridden method with Rich support."""
|
||||
# fmt: off
|
||||
result = []
|
||||
opts = self.option_strings[option]
|
||||
opt_width = self.help_position - self.current_indent - 2
|
||||
# Remove the rich style tags before calculating width during
|
||||
# text wrap calculations. Also store the length removed to adjust
|
||||
# the padding in the else branch.
|
||||
stripped = re.sub(r"(\[[a-z.]+\])|(\[\/\])", "", opts)
|
||||
style_tag_length = len(opts) - len(stripped)
|
||||
if len(stripped) > opt_width:
|
||||
opts = "%*s%s\n" % (self.current_indent, "", opts) # noqa: UP031
|
||||
indent_first = self.help_position
|
||||
else: # start help on same line as opts
|
||||
opts = "%*s%-*s " % (self.current_indent, "", # noqa: UP031
|
||||
opt_width + style_tag_length, opts)
|
||||
indent_first = 0
|
||||
result.append(opts)
|
||||
if option.help:
|
||||
help_text = self.expand_default(option)
|
||||
help_lines = textwrap.wrap(help_text, self.help_width)
|
||||
result.append("%*s%s\n" % (indent_first, "", help_lines[0])) # noqa: UP031
|
||||
result.extend(["%*s%s\n" % (self.help_position, "", line) # noqa: UP031
|
||||
for line in help_lines[1:]])
|
||||
elif opts[-1] != "\n":
|
||||
result.append("\n")
|
||||
return "".join(result)
|
||||
# fmt: on
|
||||
|
||||
def format_heading(self, heading: str) -> str:
|
||||
if heading == "Options":
|
||||
return ""
|
||||
return "[optparse.groups]" + escape(heading) + ":[/]\n"
|
||||
|
||||
def format_usage(self, usage: str) -> str:
|
||||
"""
|
||||
Ensure there is only one newline between usage and the first heading
|
||||
if there is no description.
|
||||
"""
|
||||
contents = self.indent_lines(textwrap.dedent(usage), " ")
|
||||
msg = f"\n[optparse.groups]Usage:[/] {escape(contents)}\n"
|
||||
return msg
|
||||
|
||||
def format_description(self, description: str | None) -> str:
|
||||
# leave full control over description to us
|
||||
if description:
|
||||
if hasattr(self.parser, "main"):
|
||||
label = "[optparse.groups]Commands:[/]"
|
||||
else:
|
||||
label = "[optparse.groups]Description:[/]"
|
||||
|
||||
# some doc strings have initial newlines, some don't
|
||||
description = description.lstrip("\n")
|
||||
# some doc strings have final newlines and spaces, some don't
|
||||
description = description.rstrip()
|
||||
# dedent, then reindent
|
||||
description = self.indent_lines(textwrap.dedent(description), " ")
|
||||
description = f"{label}\n{description}\n"
|
||||
return description
|
||||
else:
|
||||
return ""
|
||||
|
||||
def format_epilog(self, epilog: str | None) -> str:
|
||||
# leave full control over epilog to us
|
||||
if epilog:
|
||||
return escape(epilog)
|
||||
else:
|
||||
return ""
|
||||
|
||||
def expand_default(self, option: optparse.Option) -> str:
|
||||
"""Overridden HelpFormatter.expand_default() which colorizes flags."""
|
||||
help = escape(super().expand_default(option))
|
||||
for regex, style in self.highlights.items():
|
||||
help = re.sub(regex, rf"[optparse.{style}] \1[/]", help)
|
||||
return help
|
||||
|
||||
def indent_lines(self, text: str, indent: str) -> str:
|
||||
new_lines = [indent + line for line in text.split("\n")]
|
||||
return "\n".join(new_lines)
|
||||
|
||||
|
||||
class UpdatingDefaultsHelpFormatter(PrettyHelpFormatter):
|
||||
"""Custom help formatter for use in ConfigOptionParser.
|
||||
|
||||
This is updates the defaults before expanding them, allowing
|
||||
them to show up correctly in the help listing.
|
||||
|
||||
Also redact auth from url type options
|
||||
"""
|
||||
|
||||
def expand_default(self, option: optparse.Option) -> str:
|
||||
default_values = None
|
||||
if self.parser is not None:
|
||||
assert isinstance(self.parser, ConfigOptionParser)
|
||||
self.parser._update_defaults(self.parser.defaults)
|
||||
assert option.dest is not None
|
||||
default_values = self.parser.defaults.get(option.dest)
|
||||
help_text = super().expand_default(option)
|
||||
|
||||
if default_values and option.metavar == "URL":
|
||||
if isinstance(default_values, str):
|
||||
default_values = [default_values]
|
||||
|
||||
# If its not a list, we should abort and just return the help text
|
||||
if not isinstance(default_values, list):
|
||||
default_values = []
|
||||
|
||||
for val in default_values:
|
||||
help_text = help_text.replace(val, redact_auth_from_url(val))
|
||||
|
||||
return help_text
|
||||
|
||||
|
||||
class CustomOptionParser(optparse.OptionParser):
|
||||
def insert_option_group(
|
||||
self, idx: int, *args: Any, **kwargs: Any
|
||||
) -> optparse.OptionGroup:
|
||||
"""Insert an OptionGroup at a given position."""
|
||||
group = self.add_option_group(*args, **kwargs)
|
||||
|
||||
self.option_groups.pop()
|
||||
self.option_groups.insert(idx, group)
|
||||
|
||||
return group
|
||||
|
||||
@property
|
||||
def option_list_all(self) -> list[optparse.Option]:
|
||||
"""Get a list of all options, including those in option groups."""
|
||||
res = self.option_list[:]
|
||||
for i in self.option_groups:
|
||||
res.extend(i.option_list)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
class ConfigOptionParser(CustomOptionParser):
|
||||
"""Custom option parser which updates its defaults by checking the
|
||||
configuration files and environmental variables"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
*args: Any,
|
||||
name: str,
|
||||
isolated: bool = False,
|
||||
**kwargs: Any,
|
||||
) -> None:
|
||||
self.name = name
|
||||
self.config = Configuration(isolated)
|
||||
|
||||
assert self.name
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def check_default(self, option: optparse.Option, key: str, val: Any) -> Any:
|
||||
try:
|
||||
return option.check_value(key, val)
|
||||
except optparse.OptionValueError as exc:
|
||||
print(f"An error occurred during configuration: {exc}")
|
||||
sys.exit(3)
|
||||
|
||||
def _get_ordered_configuration_items(
|
||||
self,
|
||||
) -> Generator[tuple[str, Any], None, None]:
|
||||
# Configuration gives keys in an unordered manner. Order them.
|
||||
override_order = ["global", self.name, ":env:"]
|
||||
|
||||
# Pool the options into different groups
|
||||
# Use a dict because we need to implement the fallthrough logic after PR 12201
|
||||
# was merged which removed the fallthrough logic for options
|
||||
section_items_dict: dict[str, dict[str, Any]] = {
|
||||
name: {} for name in override_order
|
||||
}
|
||||
|
||||
for _, value in self.config.items():
|
||||
for section_key, val in value.items():
|
||||
|
||||
section, key = section_key.split(".", 1)
|
||||
if section in override_order:
|
||||
section_items_dict[section][key] = val
|
||||
|
||||
# Now that we a dict of items per section, convert to list of tuples
|
||||
# Make sure we completely remove empty values again
|
||||
section_items = {
|
||||
name: [(k, v) for k, v in section_items_dict[name].items() if v]
|
||||
for name in override_order
|
||||
}
|
||||
|
||||
# Yield each group in their override order
|
||||
for section in override_order:
|
||||
yield from section_items[section]
|
||||
|
||||
def _update_defaults(self, defaults: dict[str, Any]) -> dict[str, Any]:
|
||||
"""Updates the given defaults with values from the config files and
|
||||
the environ. Does a little special handling for certain types of
|
||||
options (lists)."""
|
||||
|
||||
# Accumulate complex default state.
|
||||
self.values = optparse.Values(self.defaults)
|
||||
late_eval = set()
|
||||
# Then set the options with those values
|
||||
for key, val in self._get_ordered_configuration_items():
|
||||
# '--' because configuration supports only long names
|
||||
option = self.get_option("--" + key)
|
||||
|
||||
# Ignore options not present in this parser. E.g. non-globals put
|
||||
# in [global] by users that want them to apply to all applicable
|
||||
# commands.
|
||||
if option is None:
|
||||
continue
|
||||
|
||||
assert option.dest is not None
|
||||
|
||||
if option.action in ("store_true", "store_false"):
|
||||
try:
|
||||
val = strtobool(val)
|
||||
except ValueError:
|
||||
self.error(
|
||||
f"{val} is not a valid value for {key} option, "
|
||||
"please specify a boolean value like yes/no, "
|
||||
"true/false or 1/0 instead."
|
||||
)
|
||||
elif option.action == "count":
|
||||
with suppress(ValueError):
|
||||
val = strtobool(val)
|
||||
with suppress(ValueError):
|
||||
val = int(val)
|
||||
if not isinstance(val, int) or val < 0:
|
||||
self.error(
|
||||
f"{val} is not a valid value for {key} option, "
|
||||
"please instead specify either a non-negative integer "
|
||||
"or a boolean value like yes/no or false/true "
|
||||
"which is equivalent to 1/0."
|
||||
)
|
||||
elif option.action == "append":
|
||||
val = val.split()
|
||||
val = [self.check_default(option, key, v) for v in val]
|
||||
elif option.action == "callback":
|
||||
assert option.callback is not None
|
||||
late_eval.add(option.dest)
|
||||
opt_str = option.get_opt_string()
|
||||
val = option.convert_value(opt_str, val)
|
||||
# From take_action
|
||||
args = option.callback_args or ()
|
||||
kwargs = option.callback_kwargs or {}
|
||||
option.callback(option, opt_str, val, self, *args, **kwargs)
|
||||
else:
|
||||
val = self.check_default(option, key, val)
|
||||
|
||||
defaults[option.dest] = val
|
||||
|
||||
for key in late_eval:
|
||||
defaults[key] = getattr(self.values, key)
|
||||
self.values = None
|
||||
return defaults
|
||||
|
||||
def get_default_values(self) -> optparse.Values:
|
||||
"""Overriding to make updating the defaults after instantiation of
|
||||
the option parser possible, _update_defaults() does the dirty work."""
|
||||
if not self.process_default_values:
|
||||
# Old, pre-Optik 1.5 behaviour.
|
||||
return optparse.Values(self.defaults)
|
||||
|
||||
# Load the configuration, or error out in case of an error
|
||||
try:
|
||||
self.config.load()
|
||||
except ConfigurationError as err:
|
||||
self.exit(UNKNOWN_ERROR, str(err))
|
||||
|
||||
defaults = self._update_defaults(self.defaults.copy()) # ours
|
||||
for option in self._get_all_options():
|
||||
assert option.dest is not None
|
||||
default = defaults.get(option.dest)
|
||||
if isinstance(default, str):
|
||||
opt_str = option.get_opt_string()
|
||||
defaults[option.dest] = option.check_value(opt_str, default)
|
||||
return optparse.Values(defaults)
|
||||
|
||||
def error(self, msg: str) -> NoReturn:
|
||||
self.print_usage(sys.stderr)
|
||||
self.exit(UNKNOWN_ERROR, f"{msg}\n")
|
||||
|
||||
def print_help(self, file: Any = None) -> None:
|
||||
# This is unfortunate but necessary since arguments may have not been
|
||||
# parsed yet at this point, so detect --no-color manually.
|
||||
no_color = (
|
||||
"--no-color" in sys.argv
|
||||
or bool(strtobool(os.environ.get("PIP_NO_COLOR", "no") or "no"))
|
||||
or "NO_COLOR" in os.environ
|
||||
)
|
||||
console = PipConsole(
|
||||
theme=Theme(PrettyHelpFormatter.styles), no_color=no_color, file=file
|
||||
)
|
||||
console.print(self.format_help().rstrip(), highlight=False)
|
||||
@@ -0,0 +1,153 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import functools
|
||||
import sys
|
||||
from collections.abc import Generator, Iterable, Iterator
|
||||
from typing import TYPE_CHECKING, Callable, Literal, TypeVar
|
||||
|
||||
from pip._vendor.rich.progress import (
|
||||
BarColumn,
|
||||
DownloadColumn,
|
||||
FileSizeColumn,
|
||||
MofNCompleteColumn,
|
||||
Progress,
|
||||
ProgressColumn,
|
||||
SpinnerColumn,
|
||||
TextColumn,
|
||||
TimeElapsedColumn,
|
||||
TimeRemainingColumn,
|
||||
TransferSpeedColumn,
|
||||
)
|
||||
|
||||
from pip._internal.cli.spinners import RateLimiter
|
||||
from pip._internal.utils.logging import get_console, get_indentation
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from pip._internal.req.req_install import InstallRequirement
|
||||
|
||||
T = TypeVar("T")
|
||||
ProgressRenderer = Callable[[Iterable[T]], Iterator[T]]
|
||||
BarType = Literal["on", "off", "raw"]
|
||||
|
||||
|
||||
def _rich_download_progress_bar(
|
||||
iterable: Iterable[bytes],
|
||||
*,
|
||||
bar_type: BarType,
|
||||
size: int | None,
|
||||
initial_progress: int | None = None,
|
||||
) -> Generator[bytes, None, None]:
|
||||
assert bar_type == "on", "This should only be used in the default mode."
|
||||
|
||||
if not size:
|
||||
total = float("inf")
|
||||
columns: tuple[ProgressColumn, ...] = (
|
||||
TextColumn("[progress.description]{task.description}"),
|
||||
SpinnerColumn("line", speed=1.5),
|
||||
FileSizeColumn(),
|
||||
TransferSpeedColumn(),
|
||||
TimeElapsedColumn(),
|
||||
)
|
||||
else:
|
||||
total = size
|
||||
columns = (
|
||||
TextColumn("[progress.description]{task.description}"),
|
||||
BarColumn(),
|
||||
DownloadColumn(),
|
||||
TransferSpeedColumn(),
|
||||
TextColumn("{task.fields[time_description]}"),
|
||||
TimeRemainingColumn(elapsed_when_finished=True),
|
||||
)
|
||||
|
||||
progress = Progress(*columns, refresh_per_second=5)
|
||||
task_id = progress.add_task(
|
||||
" " * (get_indentation() + 2), total=total, time_description="eta"
|
||||
)
|
||||
if initial_progress is not None:
|
||||
progress.update(task_id, advance=initial_progress)
|
||||
with progress:
|
||||
for chunk in iterable:
|
||||
yield chunk
|
||||
progress.update(task_id, advance=len(chunk))
|
||||
progress.update(task_id, time_description="")
|
||||
|
||||
|
||||
def _rich_install_progress_bar(
|
||||
iterable: Iterable[InstallRequirement], *, total: int
|
||||
) -> Iterator[InstallRequirement]:
|
||||
columns = (
|
||||
TextColumn("{task.fields[indent]}"),
|
||||
BarColumn(),
|
||||
MofNCompleteColumn(),
|
||||
TextColumn("{task.description}"),
|
||||
)
|
||||
console = get_console()
|
||||
|
||||
bar = Progress(*columns, refresh_per_second=6, console=console, transient=True)
|
||||
# Hiding the progress bar at initialization forces a refresh cycle to occur
|
||||
# until the bar appears, avoiding very short flashes.
|
||||
task = bar.add_task("", total=total, indent=" " * get_indentation(), visible=False)
|
||||
with bar:
|
||||
for req in iterable:
|
||||
bar.update(task, description=rf"\[{req.name}]", visible=True)
|
||||
yield req
|
||||
bar.advance(task)
|
||||
|
||||
|
||||
def _raw_progress_bar(
|
||||
iterable: Iterable[bytes],
|
||||
*,
|
||||
size: int | None,
|
||||
initial_progress: int | None = None,
|
||||
) -> Generator[bytes, None, None]:
|
||||
def write_progress(current: int, total: int) -> None:
|
||||
sys.stdout.write(f"Progress {current} of {total}\n")
|
||||
sys.stdout.flush()
|
||||
|
||||
current = initial_progress or 0
|
||||
total = size or 0
|
||||
rate_limiter = RateLimiter(0.25)
|
||||
|
||||
write_progress(current, total)
|
||||
for chunk in iterable:
|
||||
current += len(chunk)
|
||||
if rate_limiter.ready() or current == total:
|
||||
write_progress(current, total)
|
||||
rate_limiter.reset()
|
||||
yield chunk
|
||||
|
||||
|
||||
def get_download_progress_renderer(
|
||||
*, bar_type: BarType, size: int | None = None, initial_progress: int | None = None
|
||||
) -> ProgressRenderer[bytes]:
|
||||
"""Get an object that can be used to render the download progress.
|
||||
|
||||
Returns a callable, that takes an iterable to "wrap".
|
||||
"""
|
||||
if bar_type == "on":
|
||||
return functools.partial(
|
||||
_rich_download_progress_bar,
|
||||
bar_type=bar_type,
|
||||
size=size,
|
||||
initial_progress=initial_progress,
|
||||
)
|
||||
elif bar_type == "raw":
|
||||
return functools.partial(
|
||||
_raw_progress_bar,
|
||||
size=size,
|
||||
initial_progress=initial_progress,
|
||||
)
|
||||
else:
|
||||
return iter # no-op, when passed an iterator
|
||||
|
||||
|
||||
def get_install_progress_renderer(
|
||||
*, bar_type: BarType, total: int
|
||||
) -> ProgressRenderer[InstallRequirement]:
|
||||
"""Get an object that can be used to render the install progress.
|
||||
Returns a callable, that takes an iterable to "wrap".
|
||||
"""
|
||||
if bar_type == "on":
|
||||
return functools.partial(_rich_install_progress_bar, total=total)
|
||||
else:
|
||||
return iter
|
||||
@@ -0,0 +1,472 @@
|
||||
"""Contains the RequirementCommand base class.
|
||||
|
||||
This class is in a separate module so the commands that do not always
|
||||
need PackageFinder capability don't unnecessarily import the
|
||||
PackageFinder machinery and all its vendored dependencies, etc.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import os
|
||||
from functools import partial
|
||||
from optparse import Values
|
||||
from typing import Any, Callable, TypeVar
|
||||
|
||||
from pip._internal.build_env import (
|
||||
BuildEnvironmentInstaller,
|
||||
InprocessBuildEnvironmentInstaller,
|
||||
SubprocessBuildEnvironmentInstaller,
|
||||
)
|
||||
from pip._internal.cache import WheelCache
|
||||
from pip._internal.cli import cmdoptions
|
||||
from pip._internal.cli.cmdoptions import make_target_python
|
||||
from pip._internal.cli.index_command import IndexGroupCommand
|
||||
from pip._internal.cli.index_command import SessionCommandMixin as SessionCommandMixin
|
||||
from pip._internal.exceptions import (
|
||||
CommandError,
|
||||
PreviousBuildDirError,
|
||||
UnsupportedPythonVersion,
|
||||
)
|
||||
from pip._internal.index.collector import LinkCollector
|
||||
from pip._internal.index.package_finder import PackageFinder
|
||||
from pip._internal.models.selection_prefs import SelectionPreferences
|
||||
from pip._internal.models.target_python import TargetPython
|
||||
from pip._internal.network.session import PipSession
|
||||
from pip._internal.operations.build.build_tracker import BuildTracker
|
||||
from pip._internal.operations.prepare import RequirementPreparer
|
||||
from pip._internal.req.constructors import (
|
||||
install_req_from_editable,
|
||||
install_req_from_line,
|
||||
install_req_from_parsed_requirement,
|
||||
install_req_from_pylock_package,
|
||||
install_req_from_req_string,
|
||||
)
|
||||
from pip._internal.req.pep723 import PEP723Exception, pep723_metadata
|
||||
from pip._internal.req.req_dependency_group import parse_dependency_groups
|
||||
from pip._internal.req.req_file import parse_requirements
|
||||
from pip._internal.req.req_install import InstallRequirement
|
||||
from pip._internal.resolution.base import BaseResolver
|
||||
from pip._internal.utils.packaging import check_requires_python
|
||||
from pip._internal.utils.pylock import (
|
||||
is_valid_pylock_filename,
|
||||
select_from_pylock_path_or_url,
|
||||
)
|
||||
from pip._internal.utils.temp_dir import (
|
||||
TempDirectory,
|
||||
TempDirectoryTypeRegistry,
|
||||
tempdir_kinds,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def should_ignore_regular_constraints(options: Values) -> bool:
|
||||
"""
|
||||
Check if regular constraints should be ignored because
|
||||
we are in a isolated build process and build constraints
|
||||
feature is enabled but no build constraints were passed.
|
||||
"""
|
||||
|
||||
return os.environ.get("_PIP_IN_BUILD_IGNORE_CONSTRAINTS") == "1"
|
||||
|
||||
|
||||
KEEPABLE_TEMPDIR_TYPES = [
|
||||
tempdir_kinds.BUILD_ENV,
|
||||
tempdir_kinds.EPHEM_WHEEL_CACHE,
|
||||
tempdir_kinds.REQ_BUILD,
|
||||
]
|
||||
|
||||
|
||||
_CommandT = TypeVar("_CommandT", bound="RequirementCommand")
|
||||
|
||||
|
||||
def with_cleanup(
|
||||
func: Callable[[_CommandT, Values, list[str]], int],
|
||||
) -> Callable[[_CommandT, Values, list[str]], int]:
|
||||
"""Decorator for common logic related to managing temporary
|
||||
directories.
|
||||
"""
|
||||
|
||||
def configure_tempdir_registry(registry: TempDirectoryTypeRegistry) -> None:
|
||||
for t in KEEPABLE_TEMPDIR_TYPES:
|
||||
registry.set_delete(t, False)
|
||||
|
||||
def wrapper(self: _CommandT, options: Values, args: list[str]) -> int:
|
||||
assert self.tempdir_registry is not None
|
||||
if options.no_clean:
|
||||
configure_tempdir_registry(self.tempdir_registry)
|
||||
|
||||
try:
|
||||
return func(self, options, args)
|
||||
except PreviousBuildDirError:
|
||||
# This kind of conflict can occur when the user passes an explicit
|
||||
# build directory with a pre-existing folder. In that case we do
|
||||
# not want to accidentally remove it.
|
||||
configure_tempdir_registry(self.tempdir_registry)
|
||||
raise
|
||||
|
||||
return wrapper
|
||||
|
||||
|
||||
def parse_constraint_files(
|
||||
constraint_files: list[str],
|
||||
finder: PackageFinder,
|
||||
options: Values,
|
||||
session: PipSession,
|
||||
) -> list[InstallRequirement]:
|
||||
requirements = []
|
||||
for filename in constraint_files:
|
||||
for parsed_req in parse_requirements(
|
||||
filename,
|
||||
constraint=True,
|
||||
finder=finder,
|
||||
options=options,
|
||||
session=session,
|
||||
):
|
||||
req_to_add = install_req_from_parsed_requirement(
|
||||
parsed_req,
|
||||
isolated=options.isolated_mode,
|
||||
user_supplied=False,
|
||||
)
|
||||
requirements.append(req_to_add)
|
||||
|
||||
return requirements
|
||||
|
||||
|
||||
class RequirementCommand(IndexGroupCommand):
|
||||
def __init__(self, *args: Any, **kw: Any) -> None:
|
||||
super().__init__(*args, **kw)
|
||||
|
||||
self.cmd_opts.add_option(cmdoptions.dependency_groups())
|
||||
self.cmd_opts.add_option(cmdoptions.no_clean())
|
||||
|
||||
@staticmethod
|
||||
def determine_resolver_variant(options: Values) -> str:
|
||||
"""Determines which resolver should be used, based on the given options."""
|
||||
if "legacy-resolver" in options.deprecated_features_enabled:
|
||||
return "legacy"
|
||||
|
||||
return "resolvelib"
|
||||
|
||||
@classmethod
|
||||
def make_requirement_preparer(
|
||||
cls,
|
||||
temp_build_dir: TempDirectory,
|
||||
options: Values,
|
||||
build_tracker: BuildTracker,
|
||||
session: PipSession,
|
||||
finder: PackageFinder,
|
||||
use_user_site: bool,
|
||||
download_dir: str | None = None,
|
||||
verbosity: int = 0,
|
||||
) -> RequirementPreparer:
|
||||
"""
|
||||
Create a RequirementPreparer instance for the given parameters.
|
||||
"""
|
||||
temp_build_dir_path = temp_build_dir.path
|
||||
assert temp_build_dir_path is not None
|
||||
legacy_resolver = False
|
||||
|
||||
resolver_variant = cls.determine_resolver_variant(options)
|
||||
if resolver_variant == "resolvelib":
|
||||
lazy_wheel = "fast-deps" in options.features_enabled
|
||||
if lazy_wheel:
|
||||
logger.warning(
|
||||
"pip is using lazily downloaded wheels using HTTP "
|
||||
"range requests to obtain dependency information. "
|
||||
"This experimental feature is enabled through "
|
||||
"--use-feature=fast-deps and it is not ready for "
|
||||
"production."
|
||||
)
|
||||
else:
|
||||
legacy_resolver = True
|
||||
lazy_wheel = False
|
||||
if "fast-deps" in options.features_enabled:
|
||||
logger.warning(
|
||||
"fast-deps has no effect when used with the legacy resolver."
|
||||
)
|
||||
|
||||
# Handle build constraints
|
||||
build_constraints = getattr(options, "build_constraints", [])
|
||||
build_constraint_feature_enabled = (
|
||||
"build-constraint" in options.features_enabled
|
||||
)
|
||||
|
||||
env_installer: BuildEnvironmentInstaller
|
||||
if "inprocess-build-deps" in options.features_enabled:
|
||||
build_constraint_reqs = parse_constraint_files(
|
||||
build_constraints, finder, options, session
|
||||
)
|
||||
env_installer = InprocessBuildEnvironmentInstaller(
|
||||
finder=finder,
|
||||
build_tracker=build_tracker,
|
||||
build_constraints=build_constraint_reqs,
|
||||
verbosity=verbosity,
|
||||
wheel_cache=WheelCache(options.cache_dir),
|
||||
)
|
||||
else:
|
||||
env_installer = SubprocessBuildEnvironmentInstaller(
|
||||
finder,
|
||||
build_constraints=build_constraints,
|
||||
build_constraint_feature_enabled=build_constraint_feature_enabled,
|
||||
)
|
||||
|
||||
return RequirementPreparer(
|
||||
build_dir=temp_build_dir_path,
|
||||
src_dir=options.src_dir,
|
||||
download_dir=download_dir,
|
||||
build_isolation=options.build_isolation,
|
||||
build_isolation_installer=env_installer,
|
||||
check_build_deps=options.check_build_deps,
|
||||
build_tracker=build_tracker,
|
||||
session=session,
|
||||
progress_bar=options.progress_bar,
|
||||
finder=finder,
|
||||
require_hashes=options.require_hashes,
|
||||
use_user_site=use_user_site,
|
||||
lazy_wheel=lazy_wheel,
|
||||
verbosity=verbosity,
|
||||
legacy_resolver=legacy_resolver,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def make_resolver(
|
||||
cls,
|
||||
preparer: RequirementPreparer,
|
||||
finder: PackageFinder,
|
||||
options: Values,
|
||||
wheel_cache: WheelCache | None = None,
|
||||
use_user_site: bool = False,
|
||||
ignore_installed: bool = True,
|
||||
ignore_requires_python: bool = False,
|
||||
force_reinstall: bool = False,
|
||||
upgrade_strategy: str = "to-satisfy-only",
|
||||
py_version_info: tuple[int, ...] | None = None,
|
||||
) -> BaseResolver:
|
||||
"""
|
||||
Create a Resolver instance for the given parameters.
|
||||
"""
|
||||
make_install_req = partial(
|
||||
install_req_from_req_string,
|
||||
isolated=options.isolated_mode,
|
||||
)
|
||||
resolver_variant = cls.determine_resolver_variant(options)
|
||||
# The long import name and duplicated invocation is needed to convince
|
||||
# Mypy into correctly typechecking. Otherwise it would complain the
|
||||
# "Resolver" class being redefined.
|
||||
if resolver_variant == "resolvelib":
|
||||
import pip._internal.resolution.resolvelib.resolver
|
||||
|
||||
return pip._internal.resolution.resolvelib.resolver.Resolver(
|
||||
preparer=preparer,
|
||||
finder=finder,
|
||||
wheel_cache=wheel_cache,
|
||||
make_install_req=make_install_req,
|
||||
use_user_site=use_user_site,
|
||||
ignore_dependencies=options.ignore_dependencies,
|
||||
ignore_installed=ignore_installed,
|
||||
ignore_requires_python=ignore_requires_python,
|
||||
force_reinstall=force_reinstall,
|
||||
upgrade_strategy=upgrade_strategy,
|
||||
py_version_info=py_version_info,
|
||||
)
|
||||
import pip._internal.resolution.legacy.resolver
|
||||
|
||||
return pip._internal.resolution.legacy.resolver.Resolver(
|
||||
preparer=preparer,
|
||||
finder=finder,
|
||||
wheel_cache=wheel_cache,
|
||||
make_install_req=make_install_req,
|
||||
use_user_site=use_user_site,
|
||||
ignore_dependencies=options.ignore_dependencies,
|
||||
ignore_installed=ignore_installed,
|
||||
ignore_requires_python=ignore_requires_python,
|
||||
force_reinstall=force_reinstall,
|
||||
upgrade_strategy=upgrade_strategy,
|
||||
py_version_info=py_version_info,
|
||||
)
|
||||
|
||||
def get_requirements(
|
||||
self,
|
||||
args: list[str],
|
||||
options: Values,
|
||||
finder: PackageFinder,
|
||||
session: PipSession,
|
||||
) -> list[InstallRequirement]:
|
||||
"""
|
||||
Parse command-line arguments into the corresponding requirements.
|
||||
"""
|
||||
requirements: list[InstallRequirement] = []
|
||||
|
||||
if not should_ignore_regular_constraints(options):
|
||||
constraints = parse_constraint_files(
|
||||
options.constraints, finder, options, session
|
||||
)
|
||||
requirements.extend(constraints)
|
||||
|
||||
for req in args:
|
||||
if not req.strip():
|
||||
continue
|
||||
req_to_add = install_req_from_line(
|
||||
req,
|
||||
comes_from=None,
|
||||
isolated=options.isolated_mode,
|
||||
user_supplied=True,
|
||||
config_settings=getattr(options, "config_settings", None),
|
||||
)
|
||||
requirements.append(req_to_add)
|
||||
|
||||
if options.dependency_groups:
|
||||
for req in parse_dependency_groups(options.dependency_groups):
|
||||
req_to_add = install_req_from_req_string(
|
||||
req,
|
||||
isolated=options.isolated_mode,
|
||||
user_supplied=True,
|
||||
)
|
||||
requirements.append(req_to_add)
|
||||
|
||||
for req in options.editables:
|
||||
req_to_add = install_req_from_editable(
|
||||
req,
|
||||
user_supplied=True,
|
||||
isolated=options.isolated_mode,
|
||||
config_settings=getattr(options, "config_settings", None),
|
||||
)
|
||||
requirements.append(req_to_add)
|
||||
|
||||
# NOTE: options.require_hashes may be set if --require-hashes is True
|
||||
for filename in options.requirements:
|
||||
if is_valid_pylock_filename(filename):
|
||||
logger.warning(
|
||||
"Using pylock.toml as a requirements source "
|
||||
"is an experimental feature. "
|
||||
"It may be removed/changed in a future release "
|
||||
"without prior warning."
|
||||
)
|
||||
for package, package_dist in select_from_pylock_path_or_url(
|
||||
filename, session=session
|
||||
):
|
||||
requirements.append(
|
||||
install_req_from_pylock_package(
|
||||
package,
|
||||
package_dist,
|
||||
filename,
|
||||
options.format_control,
|
||||
user_supplied=True,
|
||||
)
|
||||
)
|
||||
continue
|
||||
for parsed_req in parse_requirements(
|
||||
filename, finder=finder, options=options, session=session
|
||||
):
|
||||
req_to_add = install_req_from_parsed_requirement(
|
||||
parsed_req,
|
||||
isolated=options.isolated_mode,
|
||||
user_supplied=True,
|
||||
config_settings=(
|
||||
parsed_req.options.get("config_settings")
|
||||
if parsed_req.options
|
||||
else None
|
||||
),
|
||||
)
|
||||
requirements.append(req_to_add)
|
||||
|
||||
if options.requirements_from_scripts:
|
||||
if len(options.requirements_from_scripts) > 1:
|
||||
raise CommandError("--requirements-from-script can only be given once")
|
||||
|
||||
script = options.requirements_from_scripts[0]
|
||||
try:
|
||||
script_metadata = pep723_metadata(script)
|
||||
except PEP723Exception as exc:
|
||||
raise CommandError(exc.msg)
|
||||
|
||||
script_requires_python = script_metadata.get("requires-python", "")
|
||||
|
||||
if script_requires_python and not options.ignore_requires_python:
|
||||
target_python = make_target_python(options)
|
||||
|
||||
if not check_requires_python(
|
||||
requires_python=script_requires_python,
|
||||
version_info=target_python.py_version_info,
|
||||
):
|
||||
raise UnsupportedPythonVersion(
|
||||
f"Script {script!r} requires a different Python: "
|
||||
f"{target_python.py_version} not in {script_requires_python!r}"
|
||||
)
|
||||
|
||||
for req in script_metadata.get("dependencies", []):
|
||||
req_to_add = install_req_from_req_string(
|
||||
req,
|
||||
isolated=options.isolated_mode,
|
||||
user_supplied=True,
|
||||
)
|
||||
requirements.append(req_to_add)
|
||||
|
||||
# If any requirement has hash options, enable hash checking.
|
||||
if any(req.has_hash_options for req in requirements):
|
||||
options.require_hashes = True
|
||||
|
||||
if not (
|
||||
args
|
||||
or options.editables
|
||||
or options.requirements
|
||||
or options.dependency_groups
|
||||
or options.requirements_from_scripts
|
||||
):
|
||||
opts = {"name": self.name}
|
||||
if options.find_links:
|
||||
raise CommandError(
|
||||
"You must give at least one requirement to {name} "
|
||||
'(maybe you meant "pip {name} {links}"?)'.format(
|
||||
**dict(opts, links=" ".join(options.find_links))
|
||||
)
|
||||
)
|
||||
else:
|
||||
raise CommandError(
|
||||
"You must give at least one requirement to {name} "
|
||||
'(see "pip help {name}")'.format(**opts)
|
||||
)
|
||||
|
||||
return requirements
|
||||
|
||||
@staticmethod
|
||||
def trace_basic_info(finder: PackageFinder) -> None:
|
||||
"""
|
||||
Trace basic information about the provided objects.
|
||||
"""
|
||||
# Display where finder is looking for packages
|
||||
search_scope = finder.search_scope
|
||||
locations = search_scope.get_formatted_locations()
|
||||
if locations:
|
||||
logger.info(locations)
|
||||
|
||||
def _build_package_finder(
|
||||
self,
|
||||
options: Values,
|
||||
session: PipSession,
|
||||
target_python: TargetPython | None = None,
|
||||
ignore_requires_python: bool = False,
|
||||
) -> PackageFinder:
|
||||
"""
|
||||
Create a package finder appropriate to this requirement command.
|
||||
|
||||
:param ignore_requires_python: Whether to ignore incompatible
|
||||
"Requires-Python" values in links. Defaults to False.
|
||||
"""
|
||||
link_collector = LinkCollector.create(session, options=options)
|
||||
selection_prefs = SelectionPreferences(
|
||||
allow_yanked=True,
|
||||
format_control=options.format_control,
|
||||
release_control=options.release_control,
|
||||
prefer_binary=options.prefer_binary,
|
||||
ignore_requires_python=ignore_requires_python,
|
||||
)
|
||||
|
||||
return PackageFinder.create(
|
||||
link_collector=link_collector,
|
||||
selection_prefs=selection_prefs,
|
||||
target_python=target_python,
|
||||
uploaded_prior_to=options.uploaded_prior_to,
|
||||
)
|
||||
@@ -0,0 +1,235 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
import itertools
|
||||
import logging
|
||||
import sys
|
||||
import time
|
||||
from collections.abc import Generator
|
||||
from typing import IO, Final
|
||||
|
||||
from pip._vendor.rich.console import (
|
||||
Console,
|
||||
ConsoleOptions,
|
||||
RenderableType,
|
||||
RenderResult,
|
||||
)
|
||||
from pip._vendor.rich.live import Live
|
||||
from pip._vendor.rich.measure import Measurement
|
||||
from pip._vendor.rich.text import Text
|
||||
|
||||
from pip._internal.utils.compat import WINDOWS
|
||||
from pip._internal.utils.logging import get_console, get_indentation
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
SPINNER_CHARS: Final = r"-\|/"
|
||||
SPINS_PER_SECOND: Final = 8
|
||||
|
||||
|
||||
class SpinnerInterface:
|
||||
def spin(self) -> None:
|
||||
raise NotImplementedError()
|
||||
|
||||
def finish(self, final_status: str) -> None:
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
class InteractiveSpinner(SpinnerInterface):
|
||||
def __init__(
|
||||
self,
|
||||
message: str,
|
||||
file: IO[str] | None = None,
|
||||
spin_chars: str = SPINNER_CHARS,
|
||||
# Empirically, 8 updates/second looks nice
|
||||
min_update_interval_seconds: float = 1 / SPINS_PER_SECOND,
|
||||
):
|
||||
self._message = message
|
||||
if file is None:
|
||||
file = sys.stdout
|
||||
self._file = file
|
||||
self._rate_limiter = RateLimiter(min_update_interval_seconds)
|
||||
self._finished = False
|
||||
|
||||
self._spin_cycle = itertools.cycle(spin_chars)
|
||||
|
||||
self._file.write(" " * get_indentation() + self._message + " ... ")
|
||||
self._width = 0
|
||||
|
||||
def _write(self, status: str) -> None:
|
||||
assert not self._finished
|
||||
# Erase what we wrote before by backspacing to the beginning, writing
|
||||
# spaces to overwrite the old text, and then backspacing again
|
||||
backup = "\b" * self._width
|
||||
self._file.write(backup + " " * self._width + backup)
|
||||
# Now we have a blank slate to add our status
|
||||
self._file.write(status)
|
||||
self._width = len(status)
|
||||
self._file.flush()
|
||||
self._rate_limiter.reset()
|
||||
|
||||
def spin(self) -> None:
|
||||
if self._finished:
|
||||
return
|
||||
if not self._rate_limiter.ready():
|
||||
return
|
||||
self._write(next(self._spin_cycle))
|
||||
|
||||
def finish(self, final_status: str) -> None:
|
||||
if self._finished:
|
||||
return
|
||||
self._write(final_status)
|
||||
self._file.write("\n")
|
||||
self._file.flush()
|
||||
self._finished = True
|
||||
|
||||
|
||||
# Used for dumb terminals, non-interactive installs (no tty), etc.
|
||||
# We still print updates occasionally (once every 60 seconds by default) to
|
||||
# act as a keep-alive for systems like Travis-CI that take lack-of-output as
|
||||
# an indication that a task has frozen.
|
||||
class NonInteractiveSpinner(SpinnerInterface):
|
||||
def __init__(self, message: str, min_update_interval_seconds: float = 60.0) -> None:
|
||||
self._message = message
|
||||
self._finished = False
|
||||
self._rate_limiter = RateLimiter(min_update_interval_seconds)
|
||||
self._update("started")
|
||||
|
||||
def _update(self, status: str) -> None:
|
||||
assert not self._finished
|
||||
self._rate_limiter.reset()
|
||||
logger.info("%s: %s", self._message, status)
|
||||
|
||||
def spin(self) -> None:
|
||||
if self._finished:
|
||||
return
|
||||
if not self._rate_limiter.ready():
|
||||
return
|
||||
self._update("still running...")
|
||||
|
||||
def finish(self, final_status: str) -> None:
|
||||
if self._finished:
|
||||
return
|
||||
self._update(f"finished with status '{final_status}'")
|
||||
self._finished = True
|
||||
|
||||
|
||||
class RateLimiter:
|
||||
def __init__(self, min_update_interval_seconds: float) -> None:
|
||||
self._min_update_interval_seconds = min_update_interval_seconds
|
||||
self._last_update: float = 0
|
||||
|
||||
def ready(self) -> bool:
|
||||
now = time.time()
|
||||
delta = now - self._last_update
|
||||
return delta >= self._min_update_interval_seconds
|
||||
|
||||
def reset(self) -> None:
|
||||
self._last_update = time.time()
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def open_spinner(message: str) -> Generator[SpinnerInterface, None, None]:
|
||||
# Interactive spinner goes directly to sys.stdout rather than being routed
|
||||
# through the logging system, but it acts like it has level INFO,
|
||||
# i.e. it's only displayed if we're at level INFO or better.
|
||||
# Non-interactive spinner goes through the logging system, so it is always
|
||||
# in sync with logging configuration.
|
||||
if sys.stdout.isatty() and logger.getEffectiveLevel() <= logging.INFO:
|
||||
spinner: SpinnerInterface = InteractiveSpinner(message)
|
||||
else:
|
||||
spinner = NonInteractiveSpinner(message)
|
||||
try:
|
||||
with hidden_cursor(sys.stdout):
|
||||
yield spinner
|
||||
except KeyboardInterrupt:
|
||||
spinner.finish("canceled")
|
||||
raise
|
||||
except Exception:
|
||||
spinner.finish("error")
|
||||
raise
|
||||
else:
|
||||
spinner.finish("done")
|
||||
|
||||
|
||||
class _PipRichSpinner:
|
||||
"""
|
||||
Custom rich spinner that matches the style of the legacy spinners.
|
||||
|
||||
(*) Updates will be handled in a background thread by a rich live panel
|
||||
which will call render() automatically at the appropriate time.
|
||||
"""
|
||||
|
||||
def __init__(self, label: str) -> None:
|
||||
self.label = label
|
||||
self._spin_cycle = itertools.cycle(SPINNER_CHARS)
|
||||
self._spinner_text = ""
|
||||
self._finished = False
|
||||
self._indent = get_indentation() * " "
|
||||
|
||||
def __rich_console__(
|
||||
self, console: Console, options: ConsoleOptions
|
||||
) -> RenderResult:
|
||||
yield self.render()
|
||||
|
||||
def __rich_measure__(
|
||||
self, console: Console, options: ConsoleOptions
|
||||
) -> Measurement:
|
||||
text = self.render()
|
||||
return Measurement.get(console, options, text)
|
||||
|
||||
def render(self) -> RenderableType:
|
||||
if not self._finished:
|
||||
self._spinner_text = next(self._spin_cycle)
|
||||
|
||||
return Text.assemble(self._indent, self.label, " ... ", self._spinner_text)
|
||||
|
||||
def finish(self, status: str) -> None:
|
||||
"""Stop spinning and set a final status message."""
|
||||
self._spinner_text = status
|
||||
self._finished = True
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def open_rich_spinner(label: str, console: Console | None = None) -> Generator[None]:
|
||||
if not logger.isEnabledFor(logging.INFO):
|
||||
# Don't show spinner if --quiet is given.
|
||||
yield
|
||||
return
|
||||
|
||||
console = console or get_console()
|
||||
spinner = _PipRichSpinner(label)
|
||||
with Live(spinner, refresh_per_second=SPINS_PER_SECOND, console=console):
|
||||
try:
|
||||
yield
|
||||
except KeyboardInterrupt:
|
||||
spinner.finish("canceled")
|
||||
raise
|
||||
except Exception:
|
||||
spinner.finish("error")
|
||||
raise
|
||||
else:
|
||||
spinner.finish("done")
|
||||
|
||||
|
||||
HIDE_CURSOR = "\x1b[?25l"
|
||||
SHOW_CURSOR = "\x1b[?25h"
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def hidden_cursor(file: IO[str]) -> Generator[None, None, None]:
|
||||
# The Windows terminal does not support the hide/show cursor ANSI codes,
|
||||
# even via colorama. So don't even try.
|
||||
if WINDOWS:
|
||||
yield
|
||||
# We don't want to clutter the output with control characters if we're
|
||||
# writing to a file, or if the user is running with --quiet.
|
||||
# See https://github.com/pypa/pip/issues/3418
|
||||
elif not file.isatty() or logger.getEffectiveLevel() > logging.INFO:
|
||||
yield
|
||||
else:
|
||||
file.write(HIDE_CURSOR)
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
file.write(SHOW_CURSOR)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user