Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- falcon/lib/python3.10/site-packages/PIL/FontFile.py +134 -0
- falcon/lib/python3.10/site-packages/PIL/ImagePath.py +20 -0
- falcon/lib/python3.10/site-packages/PIL/ImageWin.py +247 -0
- falcon/lib/python3.10/site-packages/PIL/JpegPresets.py +242 -0
- falcon/lib/python3.10/site-packages/PIL/_binary.py +112 -0
- falcon/lib/python3.10/site-packages/nvidia_nvtx_cu11-11.7.91.dist-info/License.txt +1568 -0
- falcon/lib/python3.10/site-packages/protobuf-5.29.3.dist-info/METADATA +17 -0
- falcon/lib/python3.10/site-packages/protobuf-5.29.3.dist-info/RECORD +117 -0
- falcon/lib/python3.10/site-packages/safetensors-0.5.2.dist-info/INSTALLER +1 -0
- falcon/lib/python3.10/site-packages/safetensors-0.5.2.dist-info/METADATA +127 -0
- falcon/lib/python3.10/site-packages/safetensors-0.5.2.dist-info/REQUESTED +0 -0
- falcon/lib/python3.10/site-packages/svgwrite/data/__pycache__/__init__.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/svgwrite/data/__pycache__/colors.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/svgwrite/data/__pycache__/tiny12.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/svgwrite/data/__pycache__/types.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/svgwrite/data/svgparser.py +132 -0
- falcon/lib/python3.10/site-packages/svgwrite/data/tiny12.py +966 -0
- falcon/lib/python3.10/site-packages/uvicorn/__init__.py +5 -0
- falcon/lib/python3.10/site-packages/uvicorn/__pycache__/__init__.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/__pycache__/__main__.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/__pycache__/_subprocess.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/__pycache__/_types.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/__pycache__/config.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/__pycache__/importer.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/__pycache__/logging.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/__pycache__/main.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/__pycache__/server.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/__pycache__/workers.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/config.py +530 -0
- falcon/lib/python3.10/site-packages/uvicorn/importer.py +34 -0
- falcon/lib/python3.10/site-packages/uvicorn/lifespan/__init__.py +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/lifespan/__pycache__/__init__.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/lifespan/__pycache__/off.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/lifespan/__pycache__/on.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/lifespan/off.py +17 -0
- falcon/lib/python3.10/site-packages/uvicorn/lifespan/on.py +137 -0
- falcon/lib/python3.10/site-packages/uvicorn/loops/__pycache__/uvloop.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/loops/uvloop.py +7 -0
- falcon/lib/python3.10/site-packages/uvicorn/middleware/__init__.py +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/middleware/__pycache__/__init__.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/middleware/__pycache__/asgi2.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/middleware/__pycache__/message_logger.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/middleware/__pycache__/proxy_headers.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/middleware/__pycache__/wsgi.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/middleware/asgi2.py +15 -0
- falcon/lib/python3.10/site-packages/uvicorn/middleware/message_logger.py +87 -0
- falcon/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py +142 -0
- falcon/lib/python3.10/site-packages/uvicorn/middleware/wsgi.py +200 -0
- falcon/lib/python3.10/site-packages/uvicorn/protocols/__pycache__/utils.cpython-310.pyc +0 -0
- falcon/lib/python3.10/site-packages/uvicorn/protocols/http/__init__.py +0 -0
falcon/lib/python3.10/site-packages/PIL/FontFile.py
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# The Python Imaging Library
|
| 3 |
+
# $Id$
|
| 4 |
+
#
|
| 5 |
+
# base class for raster font file parsers
|
| 6 |
+
#
|
| 7 |
+
# history:
|
| 8 |
+
# 1997-06-05 fl created
|
| 9 |
+
# 1997-08-19 fl restrict image width
|
| 10 |
+
#
|
| 11 |
+
# Copyright (c) 1997-1998 by Secret Labs AB
|
| 12 |
+
# Copyright (c) 1997-1998 by Fredrik Lundh
|
| 13 |
+
#
|
| 14 |
+
# See the README file for information on usage and redistribution.
|
| 15 |
+
#
|
| 16 |
+
from __future__ import annotations
|
| 17 |
+
|
| 18 |
+
import os
|
| 19 |
+
from typing import BinaryIO
|
| 20 |
+
|
| 21 |
+
from . import Image, _binary
|
| 22 |
+
|
| 23 |
+
WIDTH = 800
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def puti16(
|
| 27 |
+
fp: BinaryIO, values: tuple[int, int, int, int, int, int, int, int, int, int]
|
| 28 |
+
) -> None:
|
| 29 |
+
"""Write network order (big-endian) 16-bit sequence"""
|
| 30 |
+
for v in values:
|
| 31 |
+
if v < 0:
|
| 32 |
+
v += 65536
|
| 33 |
+
fp.write(_binary.o16be(v))
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
class FontFile:
|
| 37 |
+
"""Base class for raster font file handlers."""
|
| 38 |
+
|
| 39 |
+
bitmap: Image.Image | None = None
|
| 40 |
+
|
| 41 |
+
def __init__(self) -> None:
|
| 42 |
+
self.info: dict[bytes, bytes | int] = {}
|
| 43 |
+
self.glyph: list[
|
| 44 |
+
tuple[
|
| 45 |
+
tuple[int, int],
|
| 46 |
+
tuple[int, int, int, int],
|
| 47 |
+
tuple[int, int, int, int],
|
| 48 |
+
Image.Image,
|
| 49 |
+
]
|
| 50 |
+
| None
|
| 51 |
+
] = [None] * 256
|
| 52 |
+
|
| 53 |
+
def __getitem__(self, ix: int) -> (
|
| 54 |
+
tuple[
|
| 55 |
+
tuple[int, int],
|
| 56 |
+
tuple[int, int, int, int],
|
| 57 |
+
tuple[int, int, int, int],
|
| 58 |
+
Image.Image,
|
| 59 |
+
]
|
| 60 |
+
| None
|
| 61 |
+
):
|
| 62 |
+
return self.glyph[ix]
|
| 63 |
+
|
| 64 |
+
def compile(self) -> None:
|
| 65 |
+
"""Create metrics and bitmap"""
|
| 66 |
+
|
| 67 |
+
if self.bitmap:
|
| 68 |
+
return
|
| 69 |
+
|
| 70 |
+
# create bitmap large enough to hold all data
|
| 71 |
+
h = w = maxwidth = 0
|
| 72 |
+
lines = 1
|
| 73 |
+
for glyph in self.glyph:
|
| 74 |
+
if glyph:
|
| 75 |
+
d, dst, src, im = glyph
|
| 76 |
+
h = max(h, src[3] - src[1])
|
| 77 |
+
w = w + (src[2] - src[0])
|
| 78 |
+
if w > WIDTH:
|
| 79 |
+
lines += 1
|
| 80 |
+
w = src[2] - src[0]
|
| 81 |
+
maxwidth = max(maxwidth, w)
|
| 82 |
+
|
| 83 |
+
xsize = maxwidth
|
| 84 |
+
ysize = lines * h
|
| 85 |
+
|
| 86 |
+
if xsize == 0 and ysize == 0:
|
| 87 |
+
return
|
| 88 |
+
|
| 89 |
+
self.ysize = h
|
| 90 |
+
|
| 91 |
+
# paste glyphs into bitmap
|
| 92 |
+
self.bitmap = Image.new("1", (xsize, ysize))
|
| 93 |
+
self.metrics: list[
|
| 94 |
+
tuple[tuple[int, int], tuple[int, int, int, int], tuple[int, int, int, int]]
|
| 95 |
+
| None
|
| 96 |
+
] = [None] * 256
|
| 97 |
+
x = y = 0
|
| 98 |
+
for i in range(256):
|
| 99 |
+
glyph = self[i]
|
| 100 |
+
if glyph:
|
| 101 |
+
d, dst, src, im = glyph
|
| 102 |
+
xx = src[2] - src[0]
|
| 103 |
+
x0, y0 = x, y
|
| 104 |
+
x = x + xx
|
| 105 |
+
if x > WIDTH:
|
| 106 |
+
x, y = 0, y + h
|
| 107 |
+
x0, y0 = x, y
|
| 108 |
+
x = xx
|
| 109 |
+
s = src[0] + x0, src[1] + y0, src[2] + x0, src[3] + y0
|
| 110 |
+
self.bitmap.paste(im.crop(src), s)
|
| 111 |
+
self.metrics[i] = d, dst, s
|
| 112 |
+
|
| 113 |
+
def save(self, filename: str) -> None:
|
| 114 |
+
"""Save font"""
|
| 115 |
+
|
| 116 |
+
self.compile()
|
| 117 |
+
|
| 118 |
+
# font data
|
| 119 |
+
if not self.bitmap:
|
| 120 |
+
msg = "No bitmap created"
|
| 121 |
+
raise ValueError(msg)
|
| 122 |
+
self.bitmap.save(os.path.splitext(filename)[0] + ".pbm", "PNG")
|
| 123 |
+
|
| 124 |
+
# font metrics
|
| 125 |
+
with open(os.path.splitext(filename)[0] + ".pil", "wb") as fp:
|
| 126 |
+
fp.write(b"PILfont\n")
|
| 127 |
+
fp.write(f";;;;;;{self.ysize};\n".encode("ascii")) # HACK!!!
|
| 128 |
+
fp.write(b"DATA\n")
|
| 129 |
+
for id in range(256):
|
| 130 |
+
m = self.metrics[id]
|
| 131 |
+
if not m:
|
| 132 |
+
puti16(fp, (0,) * 10)
|
| 133 |
+
else:
|
| 134 |
+
puti16(fp, m[0] + m[1] + m[2])
|
falcon/lib/python3.10/site-packages/PIL/ImagePath.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# The Python Imaging Library
|
| 3 |
+
# $Id$
|
| 4 |
+
#
|
| 5 |
+
# path interface
|
| 6 |
+
#
|
| 7 |
+
# History:
|
| 8 |
+
# 1996-11-04 fl Created
|
| 9 |
+
# 2002-04-14 fl Added documentation stub class
|
| 10 |
+
#
|
| 11 |
+
# Copyright (c) Secret Labs AB 1997.
|
| 12 |
+
# Copyright (c) Fredrik Lundh 1996.
|
| 13 |
+
#
|
| 14 |
+
# See the README file for information on usage and redistribution.
|
| 15 |
+
#
|
| 16 |
+
from __future__ import annotations
|
| 17 |
+
|
| 18 |
+
from . import Image
|
| 19 |
+
|
| 20 |
+
Path = Image.core.path
|
falcon/lib/python3.10/site-packages/PIL/ImageWin.py
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# The Python Imaging Library.
|
| 3 |
+
# $Id$
|
| 4 |
+
#
|
| 5 |
+
# a Windows DIB display interface
|
| 6 |
+
#
|
| 7 |
+
# History:
|
| 8 |
+
# 1996-05-20 fl Created
|
| 9 |
+
# 1996-09-20 fl Fixed subregion exposure
|
| 10 |
+
# 1997-09-21 fl Added draw primitive (for tzPrint)
|
| 11 |
+
# 2003-05-21 fl Added experimental Window/ImageWindow classes
|
| 12 |
+
# 2003-09-05 fl Added fromstring/tostring methods
|
| 13 |
+
#
|
| 14 |
+
# Copyright (c) Secret Labs AB 1997-2003.
|
| 15 |
+
# Copyright (c) Fredrik Lundh 1996-2003.
|
| 16 |
+
#
|
| 17 |
+
# See the README file for information on usage and redistribution.
|
| 18 |
+
#
|
| 19 |
+
from __future__ import annotations
|
| 20 |
+
|
| 21 |
+
from . import Image
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
class HDC:
|
| 25 |
+
"""
|
| 26 |
+
Wraps an HDC integer. The resulting object can be passed to the
|
| 27 |
+
:py:meth:`~PIL.ImageWin.Dib.draw` and :py:meth:`~PIL.ImageWin.Dib.expose`
|
| 28 |
+
methods.
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
def __init__(self, dc: int) -> None:
|
| 32 |
+
self.dc = dc
|
| 33 |
+
|
| 34 |
+
def __int__(self) -> int:
|
| 35 |
+
return self.dc
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
class HWND:
|
| 39 |
+
"""
|
| 40 |
+
Wraps an HWND integer. The resulting object can be passed to the
|
| 41 |
+
:py:meth:`~PIL.ImageWin.Dib.draw` and :py:meth:`~PIL.ImageWin.Dib.expose`
|
| 42 |
+
methods, instead of a DC.
|
| 43 |
+
"""
|
| 44 |
+
|
| 45 |
+
def __init__(self, wnd: int) -> None:
|
| 46 |
+
self.wnd = wnd
|
| 47 |
+
|
| 48 |
+
def __int__(self) -> int:
|
| 49 |
+
return self.wnd
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
class Dib:
|
| 53 |
+
"""
|
| 54 |
+
A Windows bitmap with the given mode and size. The mode can be one of "1",
|
| 55 |
+
"L", "P", or "RGB".
|
| 56 |
+
|
| 57 |
+
If the display requires a palette, this constructor creates a suitable
|
| 58 |
+
palette and associates it with the image. For an "L" image, 128 graylevels
|
| 59 |
+
are allocated. For an "RGB" image, a 6x6x6 colour cube is used, together
|
| 60 |
+
with 20 graylevels.
|
| 61 |
+
|
| 62 |
+
To make sure that palettes work properly under Windows, you must call the
|
| 63 |
+
``palette`` method upon certain events from Windows.
|
| 64 |
+
|
| 65 |
+
:param image: Either a PIL image, or a mode string. If a mode string is
|
| 66 |
+
used, a size must also be given. The mode can be one of "1",
|
| 67 |
+
"L", "P", or "RGB".
|
| 68 |
+
:param size: If the first argument is a mode string, this
|
| 69 |
+
defines the size of the image.
|
| 70 |
+
"""
|
| 71 |
+
|
| 72 |
+
def __init__(
|
| 73 |
+
self, image: Image.Image | str, size: tuple[int, int] | None = None
|
| 74 |
+
) -> None:
|
| 75 |
+
if isinstance(image, str):
|
| 76 |
+
mode = image
|
| 77 |
+
image = ""
|
| 78 |
+
if size is None:
|
| 79 |
+
msg = "If first argument is mode, size is required"
|
| 80 |
+
raise ValueError(msg)
|
| 81 |
+
else:
|
| 82 |
+
mode = image.mode
|
| 83 |
+
size = image.size
|
| 84 |
+
if mode not in ["1", "L", "P", "RGB"]:
|
| 85 |
+
mode = Image.getmodebase(mode)
|
| 86 |
+
self.image = Image.core.display(mode, size)
|
| 87 |
+
self.mode = mode
|
| 88 |
+
self.size = size
|
| 89 |
+
if image:
|
| 90 |
+
assert not isinstance(image, str)
|
| 91 |
+
self.paste(image)
|
| 92 |
+
|
| 93 |
+
def expose(self, handle: int | HDC | HWND) -> None:
|
| 94 |
+
"""
|
| 95 |
+
Copy the bitmap contents to a device context.
|
| 96 |
+
|
| 97 |
+
:param handle: Device context (HDC), cast to a Python integer, or an
|
| 98 |
+
HDC or HWND instance. In PythonWin, you can use
|
| 99 |
+
``CDC.GetHandleAttrib()`` to get a suitable handle.
|
| 100 |
+
"""
|
| 101 |
+
handle_int = int(handle)
|
| 102 |
+
if isinstance(handle, HWND):
|
| 103 |
+
dc = self.image.getdc(handle_int)
|
| 104 |
+
try:
|
| 105 |
+
self.image.expose(dc)
|
| 106 |
+
finally:
|
| 107 |
+
self.image.releasedc(handle_int, dc)
|
| 108 |
+
else:
|
| 109 |
+
self.image.expose(handle_int)
|
| 110 |
+
|
| 111 |
+
def draw(
|
| 112 |
+
self,
|
| 113 |
+
handle: int | HDC | HWND,
|
| 114 |
+
dst: tuple[int, int, int, int],
|
| 115 |
+
src: tuple[int, int, int, int] | None = None,
|
| 116 |
+
) -> None:
|
| 117 |
+
"""
|
| 118 |
+
Same as expose, but allows you to specify where to draw the image, and
|
| 119 |
+
what part of it to draw.
|
| 120 |
+
|
| 121 |
+
The destination and source areas are given as 4-tuple rectangles. If
|
| 122 |
+
the source is omitted, the entire image is copied. If the source and
|
| 123 |
+
the destination have different sizes, the image is resized as
|
| 124 |
+
necessary.
|
| 125 |
+
"""
|
| 126 |
+
if src is None:
|
| 127 |
+
src = (0, 0) + self.size
|
| 128 |
+
handle_int = int(handle)
|
| 129 |
+
if isinstance(handle, HWND):
|
| 130 |
+
dc = self.image.getdc(handle_int)
|
| 131 |
+
try:
|
| 132 |
+
self.image.draw(dc, dst, src)
|
| 133 |
+
finally:
|
| 134 |
+
self.image.releasedc(handle_int, dc)
|
| 135 |
+
else:
|
| 136 |
+
self.image.draw(handle_int, dst, src)
|
| 137 |
+
|
| 138 |
+
def query_palette(self, handle: int | HDC | HWND) -> int:
|
| 139 |
+
"""
|
| 140 |
+
Installs the palette associated with the image in the given device
|
| 141 |
+
context.
|
| 142 |
+
|
| 143 |
+
This method should be called upon **QUERYNEWPALETTE** and
|
| 144 |
+
**PALETTECHANGED** events from Windows. If this method returns a
|
| 145 |
+
non-zero value, one or more display palette entries were changed, and
|
| 146 |
+
the image should be redrawn.
|
| 147 |
+
|
| 148 |
+
:param handle: Device context (HDC), cast to a Python integer, or an
|
| 149 |
+
HDC or HWND instance.
|
| 150 |
+
:return: The number of entries that were changed (if one or more entries,
|
| 151 |
+
this indicates that the image should be redrawn).
|
| 152 |
+
"""
|
| 153 |
+
handle_int = int(handle)
|
| 154 |
+
if isinstance(handle, HWND):
|
| 155 |
+
handle = self.image.getdc(handle_int)
|
| 156 |
+
try:
|
| 157 |
+
result = self.image.query_palette(handle)
|
| 158 |
+
finally:
|
| 159 |
+
self.image.releasedc(handle, handle)
|
| 160 |
+
else:
|
| 161 |
+
result = self.image.query_palette(handle_int)
|
| 162 |
+
return result
|
| 163 |
+
|
| 164 |
+
def paste(
|
| 165 |
+
self, im: Image.Image, box: tuple[int, int, int, int] | None = None
|
| 166 |
+
) -> None:
|
| 167 |
+
"""
|
| 168 |
+
Paste a PIL image into the bitmap image.
|
| 169 |
+
|
| 170 |
+
:param im: A PIL image. The size must match the target region.
|
| 171 |
+
If the mode does not match, the image is converted to the
|
| 172 |
+
mode of the bitmap image.
|
| 173 |
+
:param box: A 4-tuple defining the left, upper, right, and
|
| 174 |
+
lower pixel coordinate. See :ref:`coordinate-system`. If
|
| 175 |
+
None is given instead of a tuple, all of the image is
|
| 176 |
+
assumed.
|
| 177 |
+
"""
|
| 178 |
+
im.load()
|
| 179 |
+
if self.mode != im.mode:
|
| 180 |
+
im = im.convert(self.mode)
|
| 181 |
+
if box:
|
| 182 |
+
self.image.paste(im.im, box)
|
| 183 |
+
else:
|
| 184 |
+
self.image.paste(im.im)
|
| 185 |
+
|
| 186 |
+
def frombytes(self, buffer: bytes) -> None:
|
| 187 |
+
"""
|
| 188 |
+
Load display memory contents from byte data.
|
| 189 |
+
|
| 190 |
+
:param buffer: A buffer containing display data (usually
|
| 191 |
+
data returned from :py:func:`~PIL.ImageWin.Dib.tobytes`)
|
| 192 |
+
"""
|
| 193 |
+
self.image.frombytes(buffer)
|
| 194 |
+
|
| 195 |
+
def tobytes(self) -> bytes:
|
| 196 |
+
"""
|
| 197 |
+
Copy display memory contents to bytes object.
|
| 198 |
+
|
| 199 |
+
:return: A bytes object containing display data.
|
| 200 |
+
"""
|
| 201 |
+
return self.image.tobytes()
|
| 202 |
+
|
| 203 |
+
|
| 204 |
+
class Window:
|
| 205 |
+
"""Create a Window with the given title size."""
|
| 206 |
+
|
| 207 |
+
def __init__(
|
| 208 |
+
self, title: str = "PIL", width: int | None = None, height: int | None = None
|
| 209 |
+
) -> None:
|
| 210 |
+
self.hwnd = Image.core.createwindow(
|
| 211 |
+
title, self.__dispatcher, width or 0, height or 0
|
| 212 |
+
)
|
| 213 |
+
|
| 214 |
+
def __dispatcher(self, action: str, *args: int) -> None:
|
| 215 |
+
getattr(self, f"ui_handle_{action}")(*args)
|
| 216 |
+
|
| 217 |
+
def ui_handle_clear(self, dc: int, x0: int, y0: int, x1: int, y1: int) -> None:
|
| 218 |
+
pass
|
| 219 |
+
|
| 220 |
+
def ui_handle_damage(self, x0: int, y0: int, x1: int, y1: int) -> None:
|
| 221 |
+
pass
|
| 222 |
+
|
| 223 |
+
def ui_handle_destroy(self) -> None:
|
| 224 |
+
pass
|
| 225 |
+
|
| 226 |
+
def ui_handle_repair(self, dc: int, x0: int, y0: int, x1: int, y1: int) -> None:
|
| 227 |
+
pass
|
| 228 |
+
|
| 229 |
+
def ui_handle_resize(self, width: int, height: int) -> None:
|
| 230 |
+
pass
|
| 231 |
+
|
| 232 |
+
def mainloop(self) -> None:
|
| 233 |
+
Image.core.eventloop()
|
| 234 |
+
|
| 235 |
+
|
| 236 |
+
class ImageWindow(Window):
|
| 237 |
+
"""Create an image window which displays the given image."""
|
| 238 |
+
|
| 239 |
+
def __init__(self, image: Image.Image | Dib, title: str = "PIL") -> None:
|
| 240 |
+
if not isinstance(image, Dib):
|
| 241 |
+
image = Dib(image)
|
| 242 |
+
self.image = image
|
| 243 |
+
width, height = image.size
|
| 244 |
+
super().__init__(title, width=width, height=height)
|
| 245 |
+
|
| 246 |
+
def ui_handle_repair(self, dc: int, x0: int, y0: int, x1: int, y1: int) -> None:
|
| 247 |
+
self.image.draw(dc, (x0, y0, x1, y1))
|
falcon/lib/python3.10/site-packages/PIL/JpegPresets.py
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
JPEG quality settings equivalent to the Photoshop settings.
|
| 3 |
+
Can be used when saving JPEG files.
|
| 4 |
+
|
| 5 |
+
The following presets are available by default:
|
| 6 |
+
``web_low``, ``web_medium``, ``web_high``, ``web_very_high``, ``web_maximum``,
|
| 7 |
+
``low``, ``medium``, ``high``, ``maximum``.
|
| 8 |
+
More presets can be added to the :py:data:`presets` dict if needed.
|
| 9 |
+
|
| 10 |
+
To apply the preset, specify::
|
| 11 |
+
|
| 12 |
+
quality="preset_name"
|
| 13 |
+
|
| 14 |
+
To apply only the quantization table::
|
| 15 |
+
|
| 16 |
+
qtables="preset_name"
|
| 17 |
+
|
| 18 |
+
To apply only the subsampling setting::
|
| 19 |
+
|
| 20 |
+
subsampling="preset_name"
|
| 21 |
+
|
| 22 |
+
Example::
|
| 23 |
+
|
| 24 |
+
im.save("image_name.jpg", quality="web_high")
|
| 25 |
+
|
| 26 |
+
Subsampling
|
| 27 |
+
-----------
|
| 28 |
+
|
| 29 |
+
Subsampling is the practice of encoding images by implementing less resolution
|
| 30 |
+
for chroma information than for luma information.
|
| 31 |
+
(ref.: https://en.wikipedia.org/wiki/Chroma_subsampling)
|
| 32 |
+
|
| 33 |
+
Possible subsampling values are 0, 1 and 2 that correspond to 4:4:4, 4:2:2 and
|
| 34 |
+
4:2:0.
|
| 35 |
+
|
| 36 |
+
You can get the subsampling of a JPEG with the
|
| 37 |
+
:func:`.JpegImagePlugin.get_sampling` function.
|
| 38 |
+
|
| 39 |
+
In JPEG compressed data a JPEG marker is used instead of an EXIF tag.
|
| 40 |
+
(ref.: https://exiv2.org/tags.html)
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
Quantization tables
|
| 44 |
+
-------------------
|
| 45 |
+
|
| 46 |
+
They are values use by the DCT (Discrete cosine transform) to remove
|
| 47 |
+
*unnecessary* information from the image (the lossy part of the compression).
|
| 48 |
+
(ref.: https://en.wikipedia.org/wiki/Quantization_matrix#Quantization_matrices,
|
| 49 |
+
https://en.wikipedia.org/wiki/JPEG#Quantization)
|
| 50 |
+
|
| 51 |
+
You can get the quantization tables of a JPEG with::
|
| 52 |
+
|
| 53 |
+
im.quantization
|
| 54 |
+
|
| 55 |
+
This will return a dict with a number of lists. You can pass this dict
|
| 56 |
+
directly as the qtables argument when saving a JPEG.
|
| 57 |
+
|
| 58 |
+
The quantization table format in presets is a list with sublists. These formats
|
| 59 |
+
are interchangeable.
|
| 60 |
+
|
| 61 |
+
Libjpeg ref.:
|
| 62 |
+
https://web.archive.org/web/20120328125543/http://www.jpegcameras.com/libjpeg/libjpeg-3.html
|
| 63 |
+
|
| 64 |
+
"""
|
| 65 |
+
|
| 66 |
+
from __future__ import annotations
|
| 67 |
+
|
| 68 |
+
# fmt: off
|
| 69 |
+
presets = {
|
| 70 |
+
'web_low': {'subsampling': 2, # "4:2:0"
|
| 71 |
+
'quantization': [
|
| 72 |
+
[20, 16, 25, 39, 50, 46, 62, 68,
|
| 73 |
+
16, 18, 23, 38, 38, 53, 65, 68,
|
| 74 |
+
25, 23, 31, 38, 53, 65, 68, 68,
|
| 75 |
+
39, 38, 38, 53, 65, 68, 68, 68,
|
| 76 |
+
50, 38, 53, 65, 68, 68, 68, 68,
|
| 77 |
+
46, 53, 65, 68, 68, 68, 68, 68,
|
| 78 |
+
62, 65, 68, 68, 68, 68, 68, 68,
|
| 79 |
+
68, 68, 68, 68, 68, 68, 68, 68],
|
| 80 |
+
[21, 25, 32, 38, 54, 68, 68, 68,
|
| 81 |
+
25, 28, 24, 38, 54, 68, 68, 68,
|
| 82 |
+
32, 24, 32, 43, 66, 68, 68, 68,
|
| 83 |
+
38, 38, 43, 53, 68, 68, 68, 68,
|
| 84 |
+
54, 54, 66, 68, 68, 68, 68, 68,
|
| 85 |
+
68, 68, 68, 68, 68, 68, 68, 68,
|
| 86 |
+
68, 68, 68, 68, 68, 68, 68, 68,
|
| 87 |
+
68, 68, 68, 68, 68, 68, 68, 68]
|
| 88 |
+
]},
|
| 89 |
+
'web_medium': {'subsampling': 2, # "4:2:0"
|
| 90 |
+
'quantization': [
|
| 91 |
+
[16, 11, 11, 16, 23, 27, 31, 30,
|
| 92 |
+
11, 12, 12, 15, 20, 23, 23, 30,
|
| 93 |
+
11, 12, 13, 16, 23, 26, 35, 47,
|
| 94 |
+
16, 15, 16, 23, 26, 37, 47, 64,
|
| 95 |
+
23, 20, 23, 26, 39, 51, 64, 64,
|
| 96 |
+
27, 23, 26, 37, 51, 64, 64, 64,
|
| 97 |
+
31, 23, 35, 47, 64, 64, 64, 64,
|
| 98 |
+
30, 30, 47, 64, 64, 64, 64, 64],
|
| 99 |
+
[17, 15, 17, 21, 20, 26, 38, 48,
|
| 100 |
+
15, 19, 18, 17, 20, 26, 35, 43,
|
| 101 |
+
17, 18, 20, 22, 26, 30, 46, 53,
|
| 102 |
+
21, 17, 22, 28, 30, 39, 53, 64,
|
| 103 |
+
20, 20, 26, 30, 39, 48, 64, 64,
|
| 104 |
+
26, 26, 30, 39, 48, 63, 64, 64,
|
| 105 |
+
38, 35, 46, 53, 64, 64, 64, 64,
|
| 106 |
+
48, 43, 53, 64, 64, 64, 64, 64]
|
| 107 |
+
]},
|
| 108 |
+
'web_high': {'subsampling': 0, # "4:4:4"
|
| 109 |
+
'quantization': [
|
| 110 |
+
[6, 4, 4, 6, 9, 11, 12, 16,
|
| 111 |
+
4, 5, 5, 6, 8, 10, 12, 12,
|
| 112 |
+
4, 5, 5, 6, 10, 12, 14, 19,
|
| 113 |
+
6, 6, 6, 11, 12, 15, 19, 28,
|
| 114 |
+
9, 8, 10, 12, 16, 20, 27, 31,
|
| 115 |
+
11, 10, 12, 15, 20, 27, 31, 31,
|
| 116 |
+
12, 12, 14, 19, 27, 31, 31, 31,
|
| 117 |
+
16, 12, 19, 28, 31, 31, 31, 31],
|
| 118 |
+
[7, 7, 13, 24, 26, 31, 31, 31,
|
| 119 |
+
7, 12, 16, 21, 31, 31, 31, 31,
|
| 120 |
+
13, 16, 17, 31, 31, 31, 31, 31,
|
| 121 |
+
24, 21, 31, 31, 31, 31, 31, 31,
|
| 122 |
+
26, 31, 31, 31, 31, 31, 31, 31,
|
| 123 |
+
31, 31, 31, 31, 31, 31, 31, 31,
|
| 124 |
+
31, 31, 31, 31, 31, 31, 31, 31,
|
| 125 |
+
31, 31, 31, 31, 31, 31, 31, 31]
|
| 126 |
+
]},
|
| 127 |
+
'web_very_high': {'subsampling': 0, # "4:4:4"
|
| 128 |
+
'quantization': [
|
| 129 |
+
[2, 2, 2, 2, 3, 4, 5, 6,
|
| 130 |
+
2, 2, 2, 2, 3, 4, 5, 6,
|
| 131 |
+
2, 2, 2, 2, 4, 5, 7, 9,
|
| 132 |
+
2, 2, 2, 4, 5, 7, 9, 12,
|
| 133 |
+
3, 3, 4, 5, 8, 10, 12, 12,
|
| 134 |
+
4, 4, 5, 7, 10, 12, 12, 12,
|
| 135 |
+
5, 5, 7, 9, 12, 12, 12, 12,
|
| 136 |
+
6, 6, 9, 12, 12, 12, 12, 12],
|
| 137 |
+
[3, 3, 5, 9, 13, 15, 15, 15,
|
| 138 |
+
3, 4, 6, 11, 14, 12, 12, 12,
|
| 139 |
+
5, 6, 9, 14, 12, 12, 12, 12,
|
| 140 |
+
9, 11, 14, 12, 12, 12, 12, 12,
|
| 141 |
+
13, 14, 12, 12, 12, 12, 12, 12,
|
| 142 |
+
15, 12, 12, 12, 12, 12, 12, 12,
|
| 143 |
+
15, 12, 12, 12, 12, 12, 12, 12,
|
| 144 |
+
15, 12, 12, 12, 12, 12, 12, 12]
|
| 145 |
+
]},
|
| 146 |
+
'web_maximum': {'subsampling': 0, # "4:4:4"
|
| 147 |
+
'quantization': [
|
| 148 |
+
[1, 1, 1, 1, 1, 1, 1, 1,
|
| 149 |
+
1, 1, 1, 1, 1, 1, 1, 1,
|
| 150 |
+
1, 1, 1, 1, 1, 1, 1, 2,
|
| 151 |
+
1, 1, 1, 1, 1, 1, 2, 2,
|
| 152 |
+
1, 1, 1, 1, 1, 2, 2, 3,
|
| 153 |
+
1, 1, 1, 1, 2, 2, 3, 3,
|
| 154 |
+
1, 1, 1, 2, 2, 3, 3, 3,
|
| 155 |
+
1, 1, 2, 2, 3, 3, 3, 3],
|
| 156 |
+
[1, 1, 1, 2, 2, 3, 3, 3,
|
| 157 |
+
1, 1, 1, 2, 3, 3, 3, 3,
|
| 158 |
+
1, 1, 1, 3, 3, 3, 3, 3,
|
| 159 |
+
2, 2, 3, 3, 3, 3, 3, 3,
|
| 160 |
+
2, 3, 3, 3, 3, 3, 3, 3,
|
| 161 |
+
3, 3, 3, 3, 3, 3, 3, 3,
|
| 162 |
+
3, 3, 3, 3, 3, 3, 3, 3,
|
| 163 |
+
3, 3, 3, 3, 3, 3, 3, 3]
|
| 164 |
+
]},
|
| 165 |
+
'low': {'subsampling': 2, # "4:2:0"
|
| 166 |
+
'quantization': [
|
| 167 |
+
[18, 14, 14, 21, 30, 35, 34, 17,
|
| 168 |
+
14, 16, 16, 19, 26, 23, 12, 12,
|
| 169 |
+
14, 16, 17, 21, 23, 12, 12, 12,
|
| 170 |
+
21, 19, 21, 23, 12, 12, 12, 12,
|
| 171 |
+
30, 26, 23, 12, 12, 12, 12, 12,
|
| 172 |
+
35, 23, 12, 12, 12, 12, 12, 12,
|
| 173 |
+
34, 12, 12, 12, 12, 12, 12, 12,
|
| 174 |
+
17, 12, 12, 12, 12, 12, 12, 12],
|
| 175 |
+
[20, 19, 22, 27, 20, 20, 17, 17,
|
| 176 |
+
19, 25, 23, 14, 14, 12, 12, 12,
|
| 177 |
+
22, 23, 14, 14, 12, 12, 12, 12,
|
| 178 |
+
27, 14, 14, 12, 12, 12, 12, 12,
|
| 179 |
+
20, 14, 12, 12, 12, 12, 12, 12,
|
| 180 |
+
20, 12, 12, 12, 12, 12, 12, 12,
|
| 181 |
+
17, 12, 12, 12, 12, 12, 12, 12,
|
| 182 |
+
17, 12, 12, 12, 12, 12, 12, 12]
|
| 183 |
+
]},
|
| 184 |
+
'medium': {'subsampling': 2, # "4:2:0"
|
| 185 |
+
'quantization': [
|
| 186 |
+
[12, 8, 8, 12, 17, 21, 24, 17,
|
| 187 |
+
8, 9, 9, 11, 15, 19, 12, 12,
|
| 188 |
+
8, 9, 10, 12, 19, 12, 12, 12,
|
| 189 |
+
12, 11, 12, 21, 12, 12, 12, 12,
|
| 190 |
+
17, 15, 19, 12, 12, 12, 12, 12,
|
| 191 |
+
21, 19, 12, 12, 12, 12, 12, 12,
|
| 192 |
+
24, 12, 12, 12, 12, 12, 12, 12,
|
| 193 |
+
17, 12, 12, 12, 12, 12, 12, 12],
|
| 194 |
+
[13, 11, 13, 16, 20, 20, 17, 17,
|
| 195 |
+
11, 14, 14, 14, 14, 12, 12, 12,
|
| 196 |
+
13, 14, 14, 14, 12, 12, 12, 12,
|
| 197 |
+
16, 14, 14, 12, 12, 12, 12, 12,
|
| 198 |
+
20, 14, 12, 12, 12, 12, 12, 12,
|
| 199 |
+
20, 12, 12, 12, 12, 12, 12, 12,
|
| 200 |
+
17, 12, 12, 12, 12, 12, 12, 12,
|
| 201 |
+
17, 12, 12, 12, 12, 12, 12, 12]
|
| 202 |
+
]},
|
| 203 |
+
'high': {'subsampling': 0, # "4:4:4"
|
| 204 |
+
'quantization': [
|
| 205 |
+
[6, 4, 4, 6, 9, 11, 12, 16,
|
| 206 |
+
4, 5, 5, 6, 8, 10, 12, 12,
|
| 207 |
+
4, 5, 5, 6, 10, 12, 12, 12,
|
| 208 |
+
6, 6, 6, 11, 12, 12, 12, 12,
|
| 209 |
+
9, 8, 10, 12, 12, 12, 12, 12,
|
| 210 |
+
11, 10, 12, 12, 12, 12, 12, 12,
|
| 211 |
+
12, 12, 12, 12, 12, 12, 12, 12,
|
| 212 |
+
16, 12, 12, 12, 12, 12, 12, 12],
|
| 213 |
+
[7, 7, 13, 24, 20, 20, 17, 17,
|
| 214 |
+
7, 12, 16, 14, 14, 12, 12, 12,
|
| 215 |
+
13, 16, 14, 14, 12, 12, 12, 12,
|
| 216 |
+
24, 14, 14, 12, 12, 12, 12, 12,
|
| 217 |
+
20, 14, 12, 12, 12, 12, 12, 12,
|
| 218 |
+
20, 12, 12, 12, 12, 12, 12, 12,
|
| 219 |
+
17, 12, 12, 12, 12, 12, 12, 12,
|
| 220 |
+
17, 12, 12, 12, 12, 12, 12, 12]
|
| 221 |
+
]},
|
| 222 |
+
'maximum': {'subsampling': 0, # "4:4:4"
|
| 223 |
+
'quantization': [
|
| 224 |
+
[2, 2, 2, 2, 3, 4, 5, 6,
|
| 225 |
+
2, 2, 2, 2, 3, 4, 5, 6,
|
| 226 |
+
2, 2, 2, 2, 4, 5, 7, 9,
|
| 227 |
+
2, 2, 2, 4, 5, 7, 9, 12,
|
| 228 |
+
3, 3, 4, 5, 8, 10, 12, 12,
|
| 229 |
+
4, 4, 5, 7, 10, 12, 12, 12,
|
| 230 |
+
5, 5, 7, 9, 12, 12, 12, 12,
|
| 231 |
+
6, 6, 9, 12, 12, 12, 12, 12],
|
| 232 |
+
[3, 3, 5, 9, 13, 15, 15, 15,
|
| 233 |
+
3, 4, 6, 10, 14, 12, 12, 12,
|
| 234 |
+
5, 6, 9, 14, 12, 12, 12, 12,
|
| 235 |
+
9, 10, 14, 12, 12, 12, 12, 12,
|
| 236 |
+
13, 14, 12, 12, 12, 12, 12, 12,
|
| 237 |
+
15, 12, 12, 12, 12, 12, 12, 12,
|
| 238 |
+
15, 12, 12, 12, 12, 12, 12, 12,
|
| 239 |
+
15, 12, 12, 12, 12, 12, 12, 12]
|
| 240 |
+
]},
|
| 241 |
+
}
|
| 242 |
+
# fmt: on
|
falcon/lib/python3.10/site-packages/PIL/_binary.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# The Python Imaging Library.
|
| 3 |
+
# $Id$
|
| 4 |
+
#
|
| 5 |
+
# Binary input/output support routines.
|
| 6 |
+
#
|
| 7 |
+
# Copyright (c) 1997-2003 by Secret Labs AB
|
| 8 |
+
# Copyright (c) 1995-2003 by Fredrik Lundh
|
| 9 |
+
# Copyright (c) 2012 by Brian Crowell
|
| 10 |
+
#
|
| 11 |
+
# See the README file for information on usage and redistribution.
|
| 12 |
+
#
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
"""Binary input/output support routines."""
|
| 16 |
+
from __future__ import annotations
|
| 17 |
+
|
| 18 |
+
from struct import pack, unpack_from
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
def i8(c: bytes) -> int:
|
| 22 |
+
return c[0]
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
def o8(i: int) -> bytes:
|
| 26 |
+
return bytes((i & 255,))
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
# Input, le = little endian, be = big endian
|
| 30 |
+
def i16le(c: bytes, o: int = 0) -> int:
|
| 31 |
+
"""
|
| 32 |
+
Converts a 2-bytes (16 bits) string to an unsigned integer.
|
| 33 |
+
|
| 34 |
+
:param c: string containing bytes to convert
|
| 35 |
+
:param o: offset of bytes to convert in string
|
| 36 |
+
"""
|
| 37 |
+
return unpack_from("<H", c, o)[0]
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
def si16le(c: bytes, o: int = 0) -> int:
|
| 41 |
+
"""
|
| 42 |
+
Converts a 2-bytes (16 bits) string to a signed integer.
|
| 43 |
+
|
| 44 |
+
:param c: string containing bytes to convert
|
| 45 |
+
:param o: offset of bytes to convert in string
|
| 46 |
+
"""
|
| 47 |
+
return unpack_from("<h", c, o)[0]
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def si16be(c: bytes, o: int = 0) -> int:
|
| 51 |
+
"""
|
| 52 |
+
Converts a 2-bytes (16 bits) string to a signed integer, big endian.
|
| 53 |
+
|
| 54 |
+
:param c: string containing bytes to convert
|
| 55 |
+
:param o: offset of bytes to convert in string
|
| 56 |
+
"""
|
| 57 |
+
return unpack_from(">h", c, o)[0]
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def i32le(c: bytes, o: int = 0) -> int:
|
| 61 |
+
"""
|
| 62 |
+
Converts a 4-bytes (32 bits) string to an unsigned integer.
|
| 63 |
+
|
| 64 |
+
:param c: string containing bytes to convert
|
| 65 |
+
:param o: offset of bytes to convert in string
|
| 66 |
+
"""
|
| 67 |
+
return unpack_from("<I", c, o)[0]
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
def si32le(c: bytes, o: int = 0) -> int:
|
| 71 |
+
"""
|
| 72 |
+
Converts a 4-bytes (32 bits) string to a signed integer.
|
| 73 |
+
|
| 74 |
+
:param c: string containing bytes to convert
|
| 75 |
+
:param o: offset of bytes to convert in string
|
| 76 |
+
"""
|
| 77 |
+
return unpack_from("<i", c, o)[0]
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
def si32be(c: bytes, o: int = 0) -> int:
|
| 81 |
+
"""
|
| 82 |
+
Converts a 4-bytes (32 bits) string to a signed integer, big endian.
|
| 83 |
+
|
| 84 |
+
:param c: string containing bytes to convert
|
| 85 |
+
:param o: offset of bytes to convert in string
|
| 86 |
+
"""
|
| 87 |
+
return unpack_from(">i", c, o)[0]
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
def i16be(c: bytes, o: int = 0) -> int:
|
| 91 |
+
return unpack_from(">H", c, o)[0]
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def i32be(c: bytes, o: int = 0) -> int:
|
| 95 |
+
return unpack_from(">I", c, o)[0]
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
# Output, le = little endian, be = big endian
|
| 99 |
+
def o16le(i: int) -> bytes:
|
| 100 |
+
return pack("<H", i)
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
def o32le(i: int) -> bytes:
|
| 104 |
+
return pack("<I", i)
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
def o16be(i: int) -> bytes:
|
| 108 |
+
return pack(">H", i)
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
def o32be(i: int) -> bytes:
|
| 112 |
+
return pack(">I", i)
|
falcon/lib/python3.10/site-packages/nvidia_nvtx_cu11-11.7.91.dist-info/License.txt
ADDED
|
@@ -0,0 +1,1568 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
End User License Agreement
|
| 2 |
+
--------------------------
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
Preface
|
| 6 |
+
-------
|
| 7 |
+
|
| 8 |
+
The Software License Agreement in Chapter 1 and the Supplement
|
| 9 |
+
in Chapter 2 contain license terms and conditions that govern
|
| 10 |
+
the use of NVIDIA software. By accepting this agreement, you
|
| 11 |
+
agree to comply with all the terms and conditions applicable
|
| 12 |
+
to the product(s) included herein.
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
NVIDIA Driver
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
Description
|
| 19 |
+
|
| 20 |
+
This package contains the operating system driver and
|
| 21 |
+
fundamental system software components for NVIDIA GPUs.
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
NVIDIA CUDA Toolkit
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
Description
|
| 28 |
+
|
| 29 |
+
The NVIDIA CUDA Toolkit provides command-line and graphical
|
| 30 |
+
tools for building, debugging and optimizing the performance
|
| 31 |
+
of applications accelerated by NVIDIA GPUs, runtime and math
|
| 32 |
+
libraries, and documentation including programming guides,
|
| 33 |
+
user manuals, and API references.
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
Default Install Location of CUDA Toolkit
|
| 37 |
+
|
| 38 |
+
Windows platform:
|
| 39 |
+
|
| 40 |
+
%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v#.#
|
| 41 |
+
|
| 42 |
+
Linux platform:
|
| 43 |
+
|
| 44 |
+
/usr/local/cuda-#.#
|
| 45 |
+
|
| 46 |
+
Mac platform:
|
| 47 |
+
|
| 48 |
+
/Developer/NVIDIA/CUDA-#.#
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
NVIDIA CUDA Samples
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
Description
|
| 55 |
+
|
| 56 |
+
This package includes over 100+ CUDA examples that demonstrate
|
| 57 |
+
various CUDA programming principles, and efficient CUDA
|
| 58 |
+
implementation of algorithms in specific application domains.
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
Default Install Location of CUDA Samples
|
| 62 |
+
|
| 63 |
+
Windows platform:
|
| 64 |
+
|
| 65 |
+
%ProgramData%\NVIDIA Corporation\CUDA Samples\v#.#
|
| 66 |
+
|
| 67 |
+
Linux platform:
|
| 68 |
+
|
| 69 |
+
/usr/local/cuda-#.#/samples
|
| 70 |
+
|
| 71 |
+
and
|
| 72 |
+
|
| 73 |
+
$HOME/NVIDIA_CUDA-#.#_Samples
|
| 74 |
+
|
| 75 |
+
Mac platform:
|
| 76 |
+
|
| 77 |
+
/Developer/NVIDIA/CUDA-#.#/samples
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
NVIDIA Nsight Visual Studio Edition (Windows only)
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
Description
|
| 84 |
+
|
| 85 |
+
NVIDIA Nsight Development Platform, Visual Studio Edition is a
|
| 86 |
+
development environment integrated into Microsoft Visual
|
| 87 |
+
Studio that provides tools for debugging, profiling, analyzing
|
| 88 |
+
and optimizing your GPU computing and graphics applications.
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
Default Install Location of Nsight Visual Studio Edition
|
| 92 |
+
|
| 93 |
+
Windows platform:
|
| 94 |
+
|
| 95 |
+
%ProgramFiles(x86)%\NVIDIA Corporation\Nsight Visual Studio Edition #.#
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
1. License Agreement for NVIDIA Software Development Kits
|
| 99 |
+
---------------------------------------------------------
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
Release Date: July 26, 2018
|
| 103 |
+
---------------------------
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
Important NoticeRead before downloading, installing,
|
| 107 |
+
copying or using the licensed software:
|
| 108 |
+
-------------------------------------------------------
|
| 109 |
+
|
| 110 |
+
This license agreement, including exhibits attached
|
| 111 |
+
("Agreement”) is a legal agreement between you and NVIDIA
|
| 112 |
+
Corporation ("NVIDIA") and governs your use of a NVIDIA
|
| 113 |
+
software development kit (“SDK”).
|
| 114 |
+
|
| 115 |
+
Each SDK has its own set of software and materials, but here
|
| 116 |
+
is a description of the types of items that may be included in
|
| 117 |
+
a SDK: source code, header files, APIs, data sets and assets
|
| 118 |
+
(examples include images, textures, models, scenes, videos,
|
| 119 |
+
native API input/output files), binary software, sample code,
|
| 120 |
+
libraries, utility programs, programming code and
|
| 121 |
+
documentation.
|
| 122 |
+
|
| 123 |
+
This Agreement can be accepted only by an adult of legal age
|
| 124 |
+
of majority in the country in which the SDK is used.
|
| 125 |
+
|
| 126 |
+
If you are entering into this Agreement on behalf of a company
|
| 127 |
+
or other legal entity, you represent that you have the legal
|
| 128 |
+
authority to bind the entity to this Agreement, in which case
|
| 129 |
+
“you” will mean the entity you represent.
|
| 130 |
+
|
| 131 |
+
If you don’t have the required age or authority to accept
|
| 132 |
+
this Agreement, or if you don’t accept all the terms and
|
| 133 |
+
conditions of this Agreement, do not download, install or use
|
| 134 |
+
the SDK.
|
| 135 |
+
|
| 136 |
+
You agree to use the SDK only for purposes that are permitted
|
| 137 |
+
by (a) this Agreement, and (b) any applicable law, regulation
|
| 138 |
+
or generally accepted practices or guidelines in the relevant
|
| 139 |
+
jurisdictions.
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
1.1. License
|
| 143 |
+
|
| 144 |
+
|
| 145 |
+
1.1.1. License Grant
|
| 146 |
+
|
| 147 |
+
Subject to the terms of this Agreement, NVIDIA hereby grants
|
| 148 |
+
you a non-exclusive, non-transferable license, without the
|
| 149 |
+
right to sublicense (except as expressly provided in this
|
| 150 |
+
Agreement) to:
|
| 151 |
+
|
| 152 |
+
1. Install and use the SDK,
|
| 153 |
+
|
| 154 |
+
2. Modify and create derivative works of sample source code
|
| 155 |
+
delivered in the SDK, and
|
| 156 |
+
|
| 157 |
+
3. Distribute those portions of the SDK that are identified
|
| 158 |
+
in this Agreement as distributable, as incorporated in
|
| 159 |
+
object code format into a software application that meets
|
| 160 |
+
the distribution requirements indicated in this Agreement.
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
1.1.2. Distribution Requirements
|
| 164 |
+
|
| 165 |
+
These are the distribution requirements for you to exercise
|
| 166 |
+
the distribution grant:
|
| 167 |
+
|
| 168 |
+
1. Your application must have material additional
|
| 169 |
+
functionality, beyond the included portions of the SDK.
|
| 170 |
+
|
| 171 |
+
2. The distributable portions of the SDK shall only be
|
| 172 |
+
accessed by your application.
|
| 173 |
+
|
| 174 |
+
3. The following notice shall be included in modifications
|
| 175 |
+
and derivative works of sample source code distributed:
|
| 176 |
+
“This software contains source code provided by NVIDIA
|
| 177 |
+
Corporation.”
|
| 178 |
+
|
| 179 |
+
4. Unless a developer tool is identified in this Agreement
|
| 180 |
+
as distributable, it is delivered for your internal use
|
| 181 |
+
only.
|
| 182 |
+
|
| 183 |
+
5. The terms under which you distribute your application
|
| 184 |
+
must be consistent with the terms of this Agreement,
|
| 185 |
+
including (without limitation) terms relating to the
|
| 186 |
+
license grant and license restrictions and protection of
|
| 187 |
+
NVIDIA’s intellectual property rights. Additionally, you
|
| 188 |
+
agree that you will protect the privacy, security and
|
| 189 |
+
legal rights of your application users.
|
| 190 |
+
|
| 191 |
+
6. You agree to notify NVIDIA in writing of any known or
|
| 192 |
+
suspected distribution or use of the SDK not in compliance
|
| 193 |
+
with the requirements of this Agreement, and to enforce
|
| 194 |
+
the terms of your agreements with respect to distributed
|
| 195 |
+
SDK.
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
1.1.3. Authorized Users
|
| 199 |
+
|
| 200 |
+
You may allow employees and contractors of your entity or of
|
| 201 |
+
your subsidiary(ies) to access and use the SDK from your
|
| 202 |
+
secure network to perform work on your behalf.
|
| 203 |
+
|
| 204 |
+
If you are an academic institution you may allow users
|
| 205 |
+
enrolled or employed by the academic institution to access and
|
| 206 |
+
use the SDK from your secure network.
|
| 207 |
+
|
| 208 |
+
You are responsible for the compliance with the terms of this
|
| 209 |
+
Agreement by your authorized users. If you become aware that
|
| 210 |
+
your authorized users didn’t follow the terms of this
|
| 211 |
+
Agreement, you agree to take reasonable steps to resolve the
|
| 212 |
+
non-compliance and prevent new occurrences.
|
| 213 |
+
|
| 214 |
+
|
| 215 |
+
1.1.4. Pre-Release SDK
|
| 216 |
+
|
| 217 |
+
The SDK versions identified as alpha, beta, preview or
|
| 218 |
+
otherwise as pre-release, may not be fully functional, may
|
| 219 |
+
contain errors or design flaws, and may have reduced or
|
| 220 |
+
different security, privacy, accessibility, availability, and
|
| 221 |
+
reliability standards relative to commercial versions of
|
| 222 |
+
NVIDIA software and materials. Use of a pre-release SDK may
|
| 223 |
+
result in unexpected results, loss of data, project delays or
|
| 224 |
+
other unpredictable damage or loss.
|
| 225 |
+
|
| 226 |
+
You may use a pre-release SDK at your own risk, understanding
|
| 227 |
+
that pre-release SDKs are not intended for use in production
|
| 228 |
+
or business-critical systems.
|
| 229 |
+
|
| 230 |
+
NVIDIA may choose not to make available a commercial version
|
| 231 |
+
of any pre-release SDK. NVIDIA may also choose to abandon
|
| 232 |
+
development and terminate the availability of a pre-release
|
| 233 |
+
SDK at any time without liability.
|
| 234 |
+
|
| 235 |
+
|
| 236 |
+
1.1.5. Updates
|
| 237 |
+
|
| 238 |
+
NVIDIA may, at its option, make available patches, workarounds
|
| 239 |
+
or other updates to this SDK. Unless the updates are provided
|
| 240 |
+
with their separate governing terms, they are deemed part of
|
| 241 |
+
the SDK licensed to you as provided in this Agreement. You
|
| 242 |
+
agree that the form and content of the SDK that NVIDIA
|
| 243 |
+
provides may change without prior notice to you. While NVIDIA
|
| 244 |
+
generally maintains compatibility between versions, NVIDIA may
|
| 245 |
+
in some cases make changes that introduce incompatibilities in
|
| 246 |
+
future versions of the SDK.
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
1.1.6. Third Party Licenses
|
| 250 |
+
|
| 251 |
+
The SDK may come bundled with, or otherwise include or be
|
| 252 |
+
distributed with, third party software licensed by a NVIDIA
|
| 253 |
+
supplier and/or open source software provided under an open
|
| 254 |
+
source license. Use of third party software is subject to the
|
| 255 |
+
third-party license terms, or in the absence of third party
|
| 256 |
+
terms, the terms of this Agreement. Copyright to third party
|
| 257 |
+
software is held by the copyright holders indicated in the
|
| 258 |
+
third-party software or license.
|
| 259 |
+
|
| 260 |
+
|
| 261 |
+
1.1.7. Reservation of Rights
|
| 262 |
+
|
| 263 |
+
NVIDIA reserves all rights, title, and interest in and to the
|
| 264 |
+
SDK, not expressly granted to you under this Agreement.
|
| 265 |
+
|
| 266 |
+
|
| 267 |
+
1.2. Limitations
|
| 268 |
+
|
| 269 |
+
The following license limitations apply to your use of the
|
| 270 |
+
SDK:
|
| 271 |
+
|
| 272 |
+
1. You may not reverse engineer, decompile or disassemble,
|
| 273 |
+
or remove copyright or other proprietary notices from any
|
| 274 |
+
portion of the SDK or copies of the SDK.
|
| 275 |
+
|
| 276 |
+
2. Except as expressly provided in this Agreement, you may
|
| 277 |
+
not copy, sell, rent, sublicense, transfer, distribute,
|
| 278 |
+
modify, or create derivative works of any portion of the
|
| 279 |
+
SDK. For clarity, you may not distribute or sublicense the
|
| 280 |
+
SDK as a stand-alone product.
|
| 281 |
+
|
| 282 |
+
3. Unless you have an agreement with NVIDIA for this
|
| 283 |
+
purpose, you may not indicate that an application created
|
| 284 |
+
with the SDK is sponsored or endorsed by NVIDIA.
|
| 285 |
+
|
| 286 |
+
4. You may not bypass, disable, or circumvent any
|
| 287 |
+
encryption, security, digital rights management or
|
| 288 |
+
authentication mechanism in the SDK.
|
| 289 |
+
|
| 290 |
+
5. You may not use the SDK in any manner that would cause it
|
| 291 |
+
to become subject to an open source software license. As
|
| 292 |
+
examples, licenses that require as a condition of use,
|
| 293 |
+
modification, and/or distribution that the SDK be:
|
| 294 |
+
|
| 295 |
+
a. Disclosed or distributed in source code form;
|
| 296 |
+
|
| 297 |
+
b. Licensed for the purpose of making derivative works;
|
| 298 |
+
or
|
| 299 |
+
|
| 300 |
+
c. Redistributable at no charge.
|
| 301 |
+
|
| 302 |
+
6. Unless you have an agreement with NVIDIA for this
|
| 303 |
+
purpose, you may not use the SDK with any system or
|
| 304 |
+
application where the use or failure of the system or
|
| 305 |
+
application can reasonably be expected to threaten or
|
| 306 |
+
result in personal injury, death, or catastrophic loss.
|
| 307 |
+
Examples include use in avionics, navigation, military,
|
| 308 |
+
medical, life support or other life critical applications.
|
| 309 |
+
NVIDIA does not design, test or manufacture the SDK for
|
| 310 |
+
these critical uses and NVIDIA shall not be liable to you
|
| 311 |
+
or any third party, in whole or in part, for any claims or
|
| 312 |
+
damages arising from such uses.
|
| 313 |
+
|
| 314 |
+
7. You agree to defend, indemnify and hold harmless NVIDIA
|
| 315 |
+
and its affiliates, and their respective employees,
|
| 316 |
+
contractors, agents, officers and directors, from and
|
| 317 |
+
against any and all claims, damages, obligations, losses,
|
| 318 |
+
liabilities, costs or debt, fines, restitutions and
|
| 319 |
+
expenses (including but not limited to attorney’s fees
|
| 320 |
+
and costs incident to establishing the right of
|
| 321 |
+
indemnification) arising out of or related to your use of
|
| 322 |
+
the SDK outside of the scope of this Agreement, or not in
|
| 323 |
+
compliance with its terms.
|
| 324 |
+
|
| 325 |
+
|
| 326 |
+
1.3. Ownership
|
| 327 |
+
|
| 328 |
+
1. NVIDIA or its licensors hold all rights, title and
|
| 329 |
+
interest in and to the SDK and its modifications and
|
| 330 |
+
derivative works, including their respective intellectual
|
| 331 |
+
property rights, subject to your rights described in this
|
| 332 |
+
section. This SDK may include software and materials from
|
| 333 |
+
NVIDIA’s licensors, and these licensors are intended
|
| 334 |
+
third party beneficiaries that may enforce this Agreement
|
| 335 |
+
with respect to their intellectual property rights.
|
| 336 |
+
|
| 337 |
+
2. You hold all rights, title and interest in and to your
|
| 338 |
+
applications and your derivative works of the sample
|
| 339 |
+
source code delivered in the SDK, including their
|
| 340 |
+
respective intellectual property rights, subject to
|
| 341 |
+
NVIDIA’s rights described in this section.
|
| 342 |
+
|
| 343 |
+
3. You may, but don’t have to, provide to NVIDIA
|
| 344 |
+
suggestions, feature requests or other feedback regarding
|
| 345 |
+
the SDK, including possible enhancements or modifications
|
| 346 |
+
to the SDK. For any feedback that you voluntarily provide,
|
| 347 |
+
you hereby grant NVIDIA and its affiliates a perpetual,
|
| 348 |
+
non-exclusive, worldwide, irrevocable license to use,
|
| 349 |
+
reproduce, modify, license, sublicense (through multiple
|
| 350 |
+
tiers of sublicensees), and distribute (through multiple
|
| 351 |
+
tiers of distributors) it without the payment of any
|
| 352 |
+
royalties or fees to you. NVIDIA will use feedback at its
|
| 353 |
+
choice. NVIDIA is constantly looking for ways to improve
|
| 354 |
+
its products, so you may send feedback to NVIDIA through
|
| 355 |
+
the developer portal at https://developer.nvidia.com.
|
| 356 |
+
|
| 357 |
+
|
| 358 |
+
1.4. No Warranties
|
| 359 |
+
|
| 360 |
+
THE SDK IS PROVIDED BY NVIDIA “AS IS” AND “WITH ALL
|
| 361 |
+
FAULTS.” TO THE MAXIMUM EXTENT PERMITTED BY LAW, NVIDIA AND
|
| 362 |
+
ITS AFFILIATES EXPRESSLY DISCLAIM ALL WARRANTIES OF ANY KIND
|
| 363 |
+
OR NATURE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING,
|
| 364 |
+
BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS
|
| 365 |
+
FOR A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT, OR THE
|
| 366 |
+
ABSENCE OF ANY DEFECTS THEREIN, WHETHER LATENT OR PATENT. NO
|
| 367 |
+
WARRANTY IS MADE ON THE BASIS OF TRADE USAGE, COURSE OF
|
| 368 |
+
DEALING OR COURSE OF TRADE.
|
| 369 |
+
|
| 370 |
+
|
| 371 |
+
1.5. Limitation of Liability
|
| 372 |
+
|
| 373 |
+
TO THE MAXIMUM EXTENT PERMITTED BY LAW, NVIDIA AND ITS
|
| 374 |
+
AFFILIATES SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
|
| 375 |
+
PUNITIVE OR CONSEQUENTIAL DAMAGES, OR ANY LOST PROFITS, LOSS
|
| 376 |
+
OF USE, LOSS OF DATA OR LOSS OF GOODWILL, OR THE COSTS OF
|
| 377 |
+
PROCURING SUBSTITUTE PRODUCTS, ARISING OUT OF OR IN CONNECTION
|
| 378 |
+
WITH THIS AGREEMENT OR THE USE OR PERFORMANCE OF THE SDK,
|
| 379 |
+
WHETHER SUCH LIABILITY ARISES FROM ANY CLAIM BASED UPON BREACH
|
| 380 |
+
OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE),
|
| 381 |
+
PRODUCT LIABILITY OR ANY OTHER CAUSE OF ACTION OR THEORY OF
|
| 382 |
+
LIABILITY. IN NO EVENT WILL NVIDIA’S AND ITS AFFILIATES
|
| 383 |
+
TOTAL CUMULATIVE LIABILITY UNDER OR ARISING OUT OF THIS
|
| 384 |
+
AGREEMENT EXCEED US$10.00. THE NATURE OF THE LIABILITY OR THE
|
| 385 |
+
NUMBER OF CLAIMS OR SUITS SHALL NOT ENLARGE OR EXTEND THIS
|
| 386 |
+
LIMIT.
|
| 387 |
+
|
| 388 |
+
These exclusions and limitations of liability shall apply
|
| 389 |
+
regardless if NVIDIA or its affiliates have been advised of
|
| 390 |
+
the possibility of such damages, and regardless of whether a
|
| 391 |
+
remedy fails its essential purpose. These exclusions and
|
| 392 |
+
limitations of liability form an essential basis of the
|
| 393 |
+
bargain between the parties, and, absent any of these
|
| 394 |
+
exclusions or limitations of liability, the provisions of this
|
| 395 |
+
Agreement, including, without limitation, the economic terms,
|
| 396 |
+
would be substantially different.
|
| 397 |
+
|
| 398 |
+
|
| 399 |
+
1.6. Termination
|
| 400 |
+
|
| 401 |
+
1. This Agreement will continue to apply until terminated by
|
| 402 |
+
either you or NVIDIA as described below.
|
| 403 |
+
|
| 404 |
+
2. If you want to terminate this Agreement, you may do so by
|
| 405 |
+
stopping to use the SDK.
|
| 406 |
+
|
| 407 |
+
3. NVIDIA may, at any time, terminate this Agreement if:
|
| 408 |
+
|
| 409 |
+
a. (i) you fail to comply with any term of this
|
| 410 |
+
Agreement and the non-compliance is not fixed within
|
| 411 |
+
thirty (30) days following notice from NVIDIA (or
|
| 412 |
+
immediately if you violate NVIDIA’s intellectual
|
| 413 |
+
property rights);
|
| 414 |
+
|
| 415 |
+
b. (ii) you commence or participate in any legal
|
| 416 |
+
proceeding against NVIDIA with respect to the SDK; or
|
| 417 |
+
|
| 418 |
+
c. (iii) NVIDIA decides to no longer provide the SDK in
|
| 419 |
+
a country or, in NVIDIA’s sole discretion, the
|
| 420 |
+
continued use of it is no longer commercially viable.
|
| 421 |
+
|
| 422 |
+
4. Upon any termination of this Agreement, you agree to
|
| 423 |
+
promptly discontinue use of the SDK and destroy all copies
|
| 424 |
+
in your possession or control. Your prior distributions in
|
| 425 |
+
accordance with this Agreement are not affected by the
|
| 426 |
+
termination of this Agreement. Upon written request, you
|
| 427 |
+
will certify in writing that you have complied with your
|
| 428 |
+
commitments under this section. Upon any termination of
|
| 429 |
+
this Agreement all provisions survive except for the
|
| 430 |
+
license grant provisions.
|
| 431 |
+
|
| 432 |
+
|
| 433 |
+
1.7. General
|
| 434 |
+
|
| 435 |
+
If you wish to assign this Agreement or your rights and
|
| 436 |
+
obligations, including by merger, consolidation, dissolution
|
| 437 |
+
or operation of law, contact NVIDIA to ask for permission. Any
|
| 438 |
+
attempted assignment not approved by NVIDIA in writing shall
|
| 439 |
+
be void and of no effect. NVIDIA may assign, delegate or
|
| 440 |
+
transfer this Agreement and its rights and obligations, and if
|
| 441 |
+
to a non-affiliate you will be notified.
|
| 442 |
+
|
| 443 |
+
You agree to cooperate with NVIDIA and provide reasonably
|
| 444 |
+
requested information to verify your compliance with this
|
| 445 |
+
Agreement.
|
| 446 |
+
|
| 447 |
+
This Agreement will be governed in all respects by the laws of
|
| 448 |
+
the United States and of the State of Delaware as those laws
|
| 449 |
+
are applied to contracts entered into and performed entirely
|
| 450 |
+
within Delaware by Delaware residents, without regard to the
|
| 451 |
+
conflicts of laws principles. The United Nations Convention on
|
| 452 |
+
Contracts for the International Sale of Goods is specifically
|
| 453 |
+
disclaimed. You agree to all terms of this Agreement in the
|
| 454 |
+
English language.
|
| 455 |
+
|
| 456 |
+
The state or federal courts residing in Santa Clara County,
|
| 457 |
+
California shall have exclusive jurisdiction over any dispute
|
| 458 |
+
or claim arising out of this Agreement. Notwithstanding this,
|
| 459 |
+
you agree that NVIDIA shall still be allowed to apply for
|
| 460 |
+
injunctive remedies or an equivalent type of urgent legal
|
| 461 |
+
relief in any jurisdiction.
|
| 462 |
+
|
| 463 |
+
If any court of competent jurisdiction determines that any
|
| 464 |
+
provision of this Agreement is illegal, invalid or
|
| 465 |
+
unenforceable, such provision will be construed as limited to
|
| 466 |
+
the extent necessary to be consistent with and fully
|
| 467 |
+
enforceable under the law and the remaining provisions will
|
| 468 |
+
remain in full force and effect. Unless otherwise specified,
|
| 469 |
+
remedies are cumulative.
|
| 470 |
+
|
| 471 |
+
Each party acknowledges and agrees that the other is an
|
| 472 |
+
independent contractor in the performance of this Agreement.
|
| 473 |
+
|
| 474 |
+
The SDK has been developed entirely at private expense and is
|
| 475 |
+
“commercial items” consisting of “commercial computer
|
| 476 |
+
software” and “commercial computer software
|
| 477 |
+
documentation” provided with RESTRICTED RIGHTS. Use,
|
| 478 |
+
duplication or disclosure by the U.S. Government or a U.S.
|
| 479 |
+
Government subcontractor is subject to the restrictions in
|
| 480 |
+
this Agreement pursuant to DFARS 227.7202-3(a) or as set forth
|
| 481 |
+
in subparagraphs (c)(1) and (2) of the Commercial Computer
|
| 482 |
+
Software - Restricted Rights clause at FAR 52.227-19, as
|
| 483 |
+
applicable. Contractor/manufacturer is NVIDIA, 2788 San Tomas
|
| 484 |
+
Expressway, Santa Clara, CA 95051.
|
| 485 |
+
|
| 486 |
+
The SDK is subject to United States export laws and
|
| 487 |
+
regulations. You agree that you will not ship, transfer or
|
| 488 |
+
export the SDK into any country, or use the SDK in any manner,
|
| 489 |
+
prohibited by the United States Bureau of Industry and
|
| 490 |
+
Security or economic sanctions regulations administered by the
|
| 491 |
+
U.S. Department of Treasury’s Office of Foreign Assets
|
| 492 |
+
Control (OFAC), or any applicable export laws, restrictions or
|
| 493 |
+
regulations. These laws include restrictions on destinations,
|
| 494 |
+
end users and end use. By accepting this Agreement, you
|
| 495 |
+
confirm that you are not a resident or citizen of any country
|
| 496 |
+
currently embargoed by the U.S. and that you are not otherwise
|
| 497 |
+
prohibited from receiving the SDK.
|
| 498 |
+
|
| 499 |
+
Any notice delivered by NVIDIA to you under this Agreement
|
| 500 |
+
will be delivered via mail, email or fax. You agree that any
|
| 501 |
+
notices that NVIDIA sends you electronically will satisfy any
|
| 502 |
+
legal communication requirements. Please direct your legal
|
| 503 |
+
notices or other correspondence to NVIDIA Corporation, 2788
|
| 504 |
+
San Tomas Expressway, Santa Clara, California 95051, United
|
| 505 |
+
States of America, Attention: Legal Department.
|
| 506 |
+
|
| 507 |
+
This Agreement and any exhibits incorporated into this
|
| 508 |
+
Agreement constitute the entire agreement of the parties with
|
| 509 |
+
respect to the subject matter of this Agreement and supersede
|
| 510 |
+
all prior negotiations or documentation exchanged between the
|
| 511 |
+
parties relating to this SDK license. Any additional and/or
|
| 512 |
+
conflicting terms on documents issued by you are null, void,
|
| 513 |
+
and invalid. Any amendment or waiver under this Agreement
|
| 514 |
+
shall be in writing and signed by representatives of both
|
| 515 |
+
parties.
|
| 516 |
+
|
| 517 |
+
|
| 518 |
+
2. CUDA Toolkit Supplement to Software License Agreement for
|
| 519 |
+
NVIDIA Software Development Kits
|
| 520 |
+
------------------------------------------------------------
|
| 521 |
+
|
| 522 |
+
|
| 523 |
+
Release date: August 16, 2018
|
| 524 |
+
-----------------------------
|
| 525 |
+
|
| 526 |
+
The terms in this supplement govern your use of the NVIDIA
|
| 527 |
+
CUDA Toolkit SDK under the terms of your license agreement
|
| 528 |
+
(“Agreement”) as modified by this supplement. Capitalized
|
| 529 |
+
terms used but not defined below have the meaning assigned to
|
| 530 |
+
them in the Agreement.
|
| 531 |
+
|
| 532 |
+
This supplement is an exhibit to the Agreement and is
|
| 533 |
+
incorporated as an integral part of the Agreement. In the
|
| 534 |
+
event of conflict between the terms in this supplement and the
|
| 535 |
+
terms in the Agreement, the terms in this supplement govern.
|
| 536 |
+
|
| 537 |
+
|
| 538 |
+
2.1. License Scope
|
| 539 |
+
|
| 540 |
+
The SDK is licensed for you to develop applications only for
|
| 541 |
+
use in systems with NVIDIA GPUs.
|
| 542 |
+
|
| 543 |
+
|
| 544 |
+
2.2. Distribution
|
| 545 |
+
|
| 546 |
+
The portions of the SDK that are distributable under the
|
| 547 |
+
Agreement are listed in Attachment A.
|
| 548 |
+
|
| 549 |
+
|
| 550 |
+
2.3. Operating Systems
|
| 551 |
+
|
| 552 |
+
Those portions of the SDK designed exclusively for use on the
|
| 553 |
+
Linux or FreeBSD operating systems, or other operating systems
|
| 554 |
+
derived from the source code to these operating systems, may
|
| 555 |
+
be copied and redistributed for use in accordance with this
|
| 556 |
+
Agreement, provided that the object code files are not
|
| 557 |
+
modified in any way (except for unzipping of compressed
|
| 558 |
+
files).
|
| 559 |
+
|
| 560 |
+
|
| 561 |
+
2.4. Audio and Video Encoders and Decoders
|
| 562 |
+
|
| 563 |
+
You acknowledge and agree that it is your sole responsibility
|
| 564 |
+
to obtain any additional third-party licenses required to
|
| 565 |
+
make, have made, use, have used, sell, import, and offer for
|
| 566 |
+
sale your products or services that include or incorporate any
|
| 567 |
+
third-party software and content relating to audio and/or
|
| 568 |
+
video encoders and decoders from, including but not limited
|
| 569 |
+
to, Microsoft, Thomson, Fraunhofer IIS, Sisvel S.p.A.,
|
| 570 |
+
MPEG-LA, and Coding Technologies. NVIDIA does not grant to you
|
| 571 |
+
under this Agreement any necessary patent or other rights with
|
| 572 |
+
respect to any audio and/or video encoders and decoders.
|
| 573 |
+
|
| 574 |
+
|
| 575 |
+
2.5. Licensing
|
| 576 |
+
|
| 577 |
+
If the distribution terms in this Agreement are not suitable
|
| 578 |
+
for your organization, or for any questions regarding this
|
| 579 |
+
Agreement, please contact NVIDIA at
|
| 580 |
+
nvidia-compute-license-questions@nvidia.com.
|
| 581 |
+
|
| 582 |
+
|
| 583 |
+
2.6. Attachment A
|
| 584 |
+
|
| 585 |
+
The following portions of the SDK are distributable under the
|
| 586 |
+
Agreement:
|
| 587 |
+
|
| 588 |
+
Component
|
| 589 |
+
|
| 590 |
+
CUDA Runtime
|
| 591 |
+
|
| 592 |
+
Windows
|
| 593 |
+
|
| 594 |
+
cudart.dll, cudart_static.lib, cudadevrt.lib
|
| 595 |
+
|
| 596 |
+
Mac OSX
|
| 597 |
+
|
| 598 |
+
libcudart.dylib, libcudart_static.a, libcudadevrt.a
|
| 599 |
+
|
| 600 |
+
Linux
|
| 601 |
+
|
| 602 |
+
libcudart.so, libcudart_static.a, libcudadevrt.a
|
| 603 |
+
|
| 604 |
+
Android
|
| 605 |
+
|
| 606 |
+
libcudart.so, libcudart_static.a, libcudadevrt.a
|
| 607 |
+
|
| 608 |
+
Component
|
| 609 |
+
|
| 610 |
+
CUDA FFT Library
|
| 611 |
+
|
| 612 |
+
Windows
|
| 613 |
+
|
| 614 |
+
cufft.dll, cufftw.dll, cufft.lib, cufftw.lib
|
| 615 |
+
|
| 616 |
+
Mac OSX
|
| 617 |
+
|
| 618 |
+
libcufft.dylib, libcufft_static.a, libcufftw.dylib,
|
| 619 |
+
libcufftw_static.a
|
| 620 |
+
|
| 621 |
+
Linux
|
| 622 |
+
|
| 623 |
+
libcufft.so, libcufft_static.a, libcufftw.so,
|
| 624 |
+
libcufftw_static.a
|
| 625 |
+
|
| 626 |
+
Android
|
| 627 |
+
|
| 628 |
+
libcufft.so, libcufft_static.a, libcufftw.so,
|
| 629 |
+
libcufftw_static.a
|
| 630 |
+
|
| 631 |
+
Component
|
| 632 |
+
|
| 633 |
+
CUDA BLAS Library
|
| 634 |
+
|
| 635 |
+
Windows
|
| 636 |
+
|
| 637 |
+
cublas.dll, cublasLt.dll
|
| 638 |
+
|
| 639 |
+
Mac OSX
|
| 640 |
+
|
| 641 |
+
libcublas.dylib, libcublasLt.dylib, libcublas_static.a,
|
| 642 |
+
libcublasLt_static.a
|
| 643 |
+
|
| 644 |
+
Linux
|
| 645 |
+
|
| 646 |
+
libcublas.so, libcublasLt.so, libcublas_static.a,
|
| 647 |
+
libcublasLt_static.a
|
| 648 |
+
|
| 649 |
+
Android
|
| 650 |
+
|
| 651 |
+
libcublas.so, libcublasLt.so, libcublas_static.a,
|
| 652 |
+
libcublasLt_static.a
|
| 653 |
+
|
| 654 |
+
Component
|
| 655 |
+
|
| 656 |
+
NVIDIA "Drop-in" BLAS Library
|
| 657 |
+
|
| 658 |
+
Windows
|
| 659 |
+
|
| 660 |
+
nvblas.dll
|
| 661 |
+
|
| 662 |
+
Mac OSX
|
| 663 |
+
|
| 664 |
+
libnvblas.dylib
|
| 665 |
+
|
| 666 |
+
Linux
|
| 667 |
+
|
| 668 |
+
libnvblas.so
|
| 669 |
+
|
| 670 |
+
Component
|
| 671 |
+
|
| 672 |
+
CUDA Sparse Matrix Library
|
| 673 |
+
|
| 674 |
+
Windows
|
| 675 |
+
|
| 676 |
+
cusparse.dll, cusparse.lib
|
| 677 |
+
|
| 678 |
+
Mac OSX
|
| 679 |
+
|
| 680 |
+
libcusparse.dylib, libcusparse_static.a
|
| 681 |
+
|
| 682 |
+
Linux
|
| 683 |
+
|
| 684 |
+
libcusparse.so, libcusparse_static.a
|
| 685 |
+
|
| 686 |
+
Android
|
| 687 |
+
|
| 688 |
+
libcusparse.so, libcusparse_static.a
|
| 689 |
+
|
| 690 |
+
Component
|
| 691 |
+
|
| 692 |
+
CUDA Linear Solver Library
|
| 693 |
+
|
| 694 |
+
Windows
|
| 695 |
+
|
| 696 |
+
cusolver.dll, cusolver.lib
|
| 697 |
+
|
| 698 |
+
Mac OSX
|
| 699 |
+
|
| 700 |
+
libcusolver.dylib, libcusolver_static.a
|
| 701 |
+
|
| 702 |
+
Linux
|
| 703 |
+
|
| 704 |
+
libcusolver.so, libcusolver_static.a
|
| 705 |
+
|
| 706 |
+
Android
|
| 707 |
+
|
| 708 |
+
libcusolver.so, libcusolver_static.a
|
| 709 |
+
|
| 710 |
+
Component
|
| 711 |
+
|
| 712 |
+
CUDA Random Number Generation Library
|
| 713 |
+
|
| 714 |
+
Windows
|
| 715 |
+
|
| 716 |
+
curand.dll, curand.lib
|
| 717 |
+
|
| 718 |
+
Mac OSX
|
| 719 |
+
|
| 720 |
+
libcurand.dylib, libcurand_static.a
|
| 721 |
+
|
| 722 |
+
Linux
|
| 723 |
+
|
| 724 |
+
libcurand.so, libcurand_static.a
|
| 725 |
+
|
| 726 |
+
Android
|
| 727 |
+
|
| 728 |
+
libcurand.so, libcurand_static.a
|
| 729 |
+
|
| 730 |
+
Component
|
| 731 |
+
|
| 732 |
+
CUDA Accelerated Graph Library
|
| 733 |
+
|
| 734 |
+
Component
|
| 735 |
+
|
| 736 |
+
NVIDIA Performance Primitives Library
|
| 737 |
+
|
| 738 |
+
Windows
|
| 739 |
+
|
| 740 |
+
nppc.dll, nppc.lib, nppial.dll, nppial.lib, nppicc.dll,
|
| 741 |
+
nppicc.lib, nppicom.dll, nppicom.lib, nppidei.dll,
|
| 742 |
+
nppidei.lib, nppif.dll, nppif.lib, nppig.dll, nppig.lib,
|
| 743 |
+
nppim.dll, nppim.lib, nppist.dll, nppist.lib, nppisu.dll,
|
| 744 |
+
nppisu.lib, nppitc.dll, nppitc.lib, npps.dll, npps.lib
|
| 745 |
+
|
| 746 |
+
Mac OSX
|
| 747 |
+
|
| 748 |
+
libnppc.dylib, libnppc_static.a, libnppial.dylib,
|
| 749 |
+
libnppial_static.a, libnppicc.dylib, libnppicc_static.a,
|
| 750 |
+
libnppicom.dylib, libnppicom_static.a, libnppidei.dylib,
|
| 751 |
+
libnppidei_static.a, libnppif.dylib, libnppif_static.a,
|
| 752 |
+
libnppig.dylib, libnppig_static.a, libnppim.dylib,
|
| 753 |
+
libnppisu_static.a, libnppitc.dylib, libnppitc_static.a,
|
| 754 |
+
libnpps.dylib, libnpps_static.a
|
| 755 |
+
|
| 756 |
+
Linux
|
| 757 |
+
|
| 758 |
+
libnppc.so, libnppc_static.a, libnppial.so,
|
| 759 |
+
libnppial_static.a, libnppicc.so, libnppicc_static.a,
|
| 760 |
+
libnppicom.so, libnppicom_static.a, libnppidei.so,
|
| 761 |
+
libnppidei_static.a, libnppif.so, libnppif_static.a
|
| 762 |
+
libnppig.so, libnppig_static.a, libnppim.so,
|
| 763 |
+
libnppim_static.a, libnppist.so, libnppist_static.a,
|
| 764 |
+
libnppisu.so, libnppisu_static.a, libnppitc.so
|
| 765 |
+
libnppitc_static.a, libnpps.so, libnpps_static.a
|
| 766 |
+
|
| 767 |
+
Android
|
| 768 |
+
|
| 769 |
+
libnppc.so, libnppc_static.a, libnppial.so,
|
| 770 |
+
libnppial_static.a, libnppicc.so, libnppicc_static.a,
|
| 771 |
+
libnppicom.so, libnppicom_static.a, libnppidei.so,
|
| 772 |
+
libnppidei_static.a, libnppif.so, libnppif_static.a
|
| 773 |
+
libnppig.so, libnppig_static.a, libnppim.so,
|
| 774 |
+
libnppim_static.a, libnppist.so, libnppist_static.a,
|
| 775 |
+
libnppisu.so, libnppisu_static.a, libnppitc.so
|
| 776 |
+
libnppitc_static.a, libnpps.so, libnpps_static.a
|
| 777 |
+
|
| 778 |
+
Component
|
| 779 |
+
|
| 780 |
+
NVIDIA JPEG Library
|
| 781 |
+
|
| 782 |
+
Linux
|
| 783 |
+
|
| 784 |
+
libnvjpeg.so, libnvjpeg_static.a
|
| 785 |
+
|
| 786 |
+
Component
|
| 787 |
+
|
| 788 |
+
Internal common library required for statically linking to
|
| 789 |
+
cuBLAS, cuSPARSE, cuFFT, cuRAND, nvJPEG and NPP
|
| 790 |
+
|
| 791 |
+
Mac OSX
|
| 792 |
+
|
| 793 |
+
libculibos.a
|
| 794 |
+
|
| 795 |
+
Linux
|
| 796 |
+
|
| 797 |
+
libculibos.a
|
| 798 |
+
|
| 799 |
+
Component
|
| 800 |
+
|
| 801 |
+
NVIDIA Runtime Compilation Library and Header
|
| 802 |
+
|
| 803 |
+
All
|
| 804 |
+
|
| 805 |
+
nvrtc.h
|
| 806 |
+
|
| 807 |
+
Windows
|
| 808 |
+
|
| 809 |
+
nvrtc.dll, nvrtc-builtins.dll
|
| 810 |
+
|
| 811 |
+
Mac OSX
|
| 812 |
+
|
| 813 |
+
libnvrtc.dylib, libnvrtc-builtins.dylib
|
| 814 |
+
|
| 815 |
+
Linux
|
| 816 |
+
|
| 817 |
+
libnvrtc.so, libnvrtc-builtins.so
|
| 818 |
+
|
| 819 |
+
Component
|
| 820 |
+
|
| 821 |
+
NVIDIA Optimizing Compiler Library
|
| 822 |
+
|
| 823 |
+
Windows
|
| 824 |
+
|
| 825 |
+
nvvm.dll
|
| 826 |
+
|
| 827 |
+
Mac OSX
|
| 828 |
+
|
| 829 |
+
libnvvm.dylib
|
| 830 |
+
|
| 831 |
+
Linux
|
| 832 |
+
|
| 833 |
+
libnvvm.so
|
| 834 |
+
|
| 835 |
+
Component
|
| 836 |
+
|
| 837 |
+
NVIDIA Common Device Math Functions Library
|
| 838 |
+
|
| 839 |
+
Windows
|
| 840 |
+
|
| 841 |
+
libdevice.10.bc
|
| 842 |
+
|
| 843 |
+
Mac OSX
|
| 844 |
+
|
| 845 |
+
libdevice.10.bc
|
| 846 |
+
|
| 847 |
+
Linux
|
| 848 |
+
|
| 849 |
+
libdevice.10.bc
|
| 850 |
+
|
| 851 |
+
Component
|
| 852 |
+
|
| 853 |
+
CUDA Occupancy Calculation Header Library
|
| 854 |
+
|
| 855 |
+
All
|
| 856 |
+
|
| 857 |
+
cuda_occupancy.h
|
| 858 |
+
|
| 859 |
+
Component
|
| 860 |
+
|
| 861 |
+
CUDA Half Precision Headers
|
| 862 |
+
|
| 863 |
+
All
|
| 864 |
+
|
| 865 |
+
cuda_fp16.h, cuda_fp16.hpp
|
| 866 |
+
|
| 867 |
+
Component
|
| 868 |
+
|
| 869 |
+
CUDA Profiling Tools Interface (CUPTI) Library
|
| 870 |
+
|
| 871 |
+
Windows
|
| 872 |
+
|
| 873 |
+
cupti.dll
|
| 874 |
+
|
| 875 |
+
Mac OSX
|
| 876 |
+
|
| 877 |
+
libcupti.dylib
|
| 878 |
+
|
| 879 |
+
Linux
|
| 880 |
+
|
| 881 |
+
libcupti.so
|
| 882 |
+
|
| 883 |
+
Component
|
| 884 |
+
|
| 885 |
+
NVIDIA Tools Extension Library
|
| 886 |
+
|
| 887 |
+
Windows
|
| 888 |
+
|
| 889 |
+
nvToolsExt.dll, nvToolsExt.lib
|
| 890 |
+
|
| 891 |
+
Mac OSX
|
| 892 |
+
|
| 893 |
+
libnvToolsExt.dylib
|
| 894 |
+
|
| 895 |
+
Linux
|
| 896 |
+
|
| 897 |
+
libnvToolsExt.so
|
| 898 |
+
|
| 899 |
+
Component
|
| 900 |
+
|
| 901 |
+
NVIDIA CUDA Driver Libraries
|
| 902 |
+
|
| 903 |
+
Linux
|
| 904 |
+
|
| 905 |
+
libcuda.so, libnvidia-fatbinaryloader.so,
|
| 906 |
+
libnvidia-ptxjitcompiler.so
|
| 907 |
+
|
| 908 |
+
The NVIDIA CUDA Driver Libraries are only distributable in
|
| 909 |
+
applications that meet this criteria:
|
| 910 |
+
|
| 911 |
+
1. The application was developed starting from a NVIDIA CUDA
|
| 912 |
+
container obtained from Docker Hub or the NVIDIA GPU
|
| 913 |
+
Cloud, and
|
| 914 |
+
|
| 915 |
+
2. The resulting application is packaged as a Docker
|
| 916 |
+
container and distributed to users on Docker Hub or the
|
| 917 |
+
NVIDIA GPU Cloud only.
|
| 918 |
+
|
| 919 |
+
|
| 920 |
+
2.7. Attachment B
|
| 921 |
+
|
| 922 |
+
|
| 923 |
+
Additional Licensing Obligations
|
| 924 |
+
|
| 925 |
+
The following third party components included in the SOFTWARE
|
| 926 |
+
are licensed to Licensee pursuant to the following terms and
|
| 927 |
+
conditions:
|
| 928 |
+
|
| 929 |
+
1. Licensee's use of the GDB third party component is
|
| 930 |
+
subject to the terms and conditions of GNU GPL v3:
|
| 931 |
+
|
| 932 |
+
This product includes copyrighted third-party software licensed
|
| 933 |
+
under the terms of the GNU General Public License v3 ("GPL v3").
|
| 934 |
+
All third-party software packages are copyright by their respective
|
| 935 |
+
authors. GPL v3 terms and conditions are hereby incorporated into
|
| 936 |
+
the Agreement by this reference: http://www.gnu.org/licenses/gpl.txt
|
| 937 |
+
|
| 938 |
+
Consistent with these licensing requirements, the software
|
| 939 |
+
listed below is provided under the terms of the specified
|
| 940 |
+
open source software licenses. To obtain source code for
|
| 941 |
+
software provided under licenses that require
|
| 942 |
+
redistribution of source code, including the GNU General
|
| 943 |
+
Public License (GPL) and GNU Lesser General Public License
|
| 944 |
+
(LGPL), contact oss-requests@nvidia.com. This offer is
|
| 945 |
+
valid for a period of three (3) years from the date of the
|
| 946 |
+
distribution of this product by NVIDIA CORPORATION.
|
| 947 |
+
|
| 948 |
+
Component License
|
| 949 |
+
CUDA-GDB GPL v3
|
| 950 |
+
|
| 951 |
+
2. Licensee represents and warrants that any and all third
|
| 952 |
+
party licensing and/or royalty payment obligations in
|
| 953 |
+
connection with Licensee's use of the H.264 video codecs
|
| 954 |
+
are solely the responsibility of Licensee.
|
| 955 |
+
|
| 956 |
+
3. Licensee's use of the Thrust library is subject to the
|
| 957 |
+
terms and conditions of the Apache License Version 2.0.
|
| 958 |
+
All third-party software packages are copyright by their
|
| 959 |
+
respective authors. Apache License Version 2.0 terms and
|
| 960 |
+
conditions are hereby incorporated into the Agreement by
|
| 961 |
+
this reference.
|
| 962 |
+
http://www.apache.org/licenses/LICENSE-2.0.html
|
| 963 |
+
|
| 964 |
+
In addition, Licensee acknowledges the following notice:
|
| 965 |
+
Thrust includes source code from the Boost Iterator,
|
| 966 |
+
Tuple, System, and Random Number libraries.
|
| 967 |
+
|
| 968 |
+
Boost Software License - Version 1.0 - August 17th, 2003
|
| 969 |
+
. . . .
|
| 970 |
+
|
| 971 |
+
Permission is hereby granted, free of charge, to any person or
|
| 972 |
+
organization obtaining a copy of the software and accompanying
|
| 973 |
+
documentation covered by this license (the "Software") to use,
|
| 974 |
+
reproduce, display, distribute, execute, and transmit the Software,
|
| 975 |
+
and to prepare derivative works of the Software, and to permit
|
| 976 |
+
third-parties to whom the Software is furnished to do so, all
|
| 977 |
+
subject to the following:
|
| 978 |
+
|
| 979 |
+
The copyright notices in the Software and this entire statement,
|
| 980 |
+
including the above license grant, this restriction and the following
|
| 981 |
+
disclaimer, must be included in all copies of the Software, in whole
|
| 982 |
+
or in part, and all derivative works of the Software, unless such
|
| 983 |
+
copies or derivative works are solely in the form of machine-executable
|
| 984 |
+
object code generated by a source language processor.
|
| 985 |
+
|
| 986 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 987 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 988 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
|
| 989 |
+
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
|
| 990 |
+
ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR
|
| 991 |
+
OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING
|
| 992 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
| 993 |
+
OTHER DEALINGS IN THE SOFTWARE.
|
| 994 |
+
|
| 995 |
+
4. Licensee's use of the LLVM third party component is
|
| 996 |
+
subject to the following terms and conditions:
|
| 997 |
+
|
| 998 |
+
======================================================
|
| 999 |
+
LLVM Release License
|
| 1000 |
+
======================================================
|
| 1001 |
+
University of Illinois/NCSA
|
| 1002 |
+
Open Source License
|
| 1003 |
+
|
| 1004 |
+
Copyright (c) 2003-2010 University of Illinois at Urbana-Champaign.
|
| 1005 |
+
All rights reserved.
|
| 1006 |
+
|
| 1007 |
+
Developed by:
|
| 1008 |
+
|
| 1009 |
+
LLVM Team
|
| 1010 |
+
|
| 1011 |
+
University of Illinois at Urbana-Champaign
|
| 1012 |
+
|
| 1013 |
+
http://llvm.org
|
| 1014 |
+
|
| 1015 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 1016 |
+
of this software and associated documentation files (the "Software"), to
|
| 1017 |
+
deal with the Software without restriction, including without limitation the
|
| 1018 |
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
| 1019 |
+
sell copies of the Software, and to permit persons to whom the Software is
|
| 1020 |
+
furnished to do so, subject to the following conditions:
|
| 1021 |
+
|
| 1022 |
+
* Redistributions of source code must retain the above copyright notice,
|
| 1023 |
+
this list of conditions and the following disclaimers.
|
| 1024 |
+
|
| 1025 |
+
* Redistributions in binary form must reproduce the above copyright
|
| 1026 |
+
notice, this list of conditions and the following disclaimers in the
|
| 1027 |
+
documentation and/or other materials provided with the distribution.
|
| 1028 |
+
|
| 1029 |
+
* Neither the names of the LLVM Team, University of Illinois at Urbana-
|
| 1030 |
+
Champaign, nor the names of its contributors may be used to endorse or
|
| 1031 |
+
promote products derived from this Software without specific prior
|
| 1032 |
+
written permission.
|
| 1033 |
+
|
| 1034 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 1035 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 1036 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
| 1037 |
+
THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
| 1038 |
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
| 1039 |
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
| 1040 |
+
DEALINGS WITH THE SOFTWARE.
|
| 1041 |
+
|
| 1042 |
+
5. Licensee's use (e.g. nvprof) of the PCRE third party
|
| 1043 |
+
component is subject to the following terms and
|
| 1044 |
+
conditions:
|
| 1045 |
+
|
| 1046 |
+
------------
|
| 1047 |
+
PCRE LICENCE
|
| 1048 |
+
------------
|
| 1049 |
+
PCRE is a library of functions to support regular expressions whose syntax
|
| 1050 |
+
and semantics are as close as possible to those of the Perl 5 language.
|
| 1051 |
+
Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
|
| 1052 |
+
specified below. The documentation for PCRE, supplied in the "doc"
|
| 1053 |
+
directory, is distributed under the same terms as the software itself. The
|
| 1054 |
+
basic library functions are written in C and are freestanding. Also
|
| 1055 |
+
included in the distribution is a set of C++ wrapper functions, and a just-
|
| 1056 |
+
in-time compiler that can be used to optimize pattern matching. These are
|
| 1057 |
+
both optional features that can be omitted when the library is built.
|
| 1058 |
+
|
| 1059 |
+
THE BASIC LIBRARY FUNCTIONS
|
| 1060 |
+
---------------------------
|
| 1061 |
+
Written by: Philip Hazel
|
| 1062 |
+
Email local part: ph10
|
| 1063 |
+
Email domain: cam.ac.uk
|
| 1064 |
+
University of Cambridge Computing Service,
|
| 1065 |
+
Cambridge, England.
|
| 1066 |
+
Copyright (c) 1997-2012 University of Cambridge
|
| 1067 |
+
All rights reserved.
|
| 1068 |
+
|
| 1069 |
+
PCRE JUST-IN-TIME COMPILATION SUPPORT
|
| 1070 |
+
-------------------------------------
|
| 1071 |
+
Written by: Zoltan Herczeg
|
| 1072 |
+
Email local part: hzmester
|
| 1073 |
+
Emain domain: freemail.hu
|
| 1074 |
+
Copyright(c) 2010-2012 Zoltan Herczeg
|
| 1075 |
+
All rights reserved.
|
| 1076 |
+
|
| 1077 |
+
STACK-LESS JUST-IN-TIME COMPILER
|
| 1078 |
+
--------------------------------
|
| 1079 |
+
Written by: Zoltan Herczeg
|
| 1080 |
+
Email local part: hzmester
|
| 1081 |
+
Emain domain: freemail.hu
|
| 1082 |
+
Copyright(c) 2009-2012 Zoltan Herczeg
|
| 1083 |
+
All rights reserved.
|
| 1084 |
+
|
| 1085 |
+
THE C++ WRAPPER FUNCTIONS
|
| 1086 |
+
-------------------------
|
| 1087 |
+
Contributed by: Google Inc.
|
| 1088 |
+
Copyright (c) 2007-2012, Google Inc.
|
| 1089 |
+
All rights reserved.
|
| 1090 |
+
|
| 1091 |
+
THE "BSD" LICENCE
|
| 1092 |
+
-----------------
|
| 1093 |
+
Redistribution and use in source and binary forms, with or without
|
| 1094 |
+
modification, are permitted provided that the following conditions are met:
|
| 1095 |
+
|
| 1096 |
+
* Redistributions of source code must retain the above copyright notice,
|
| 1097 |
+
this list of conditions and the following disclaimer.
|
| 1098 |
+
|
| 1099 |
+
* Redistributions in binary form must reproduce the above copyright
|
| 1100 |
+
notice, this list of conditions and the following disclaimer in the
|
| 1101 |
+
documentation and/or other materials provided with the distribution.
|
| 1102 |
+
|
| 1103 |
+
* Neither the name of the University of Cambridge nor the name of Google
|
| 1104 |
+
Inc. nor the names of their contributors may be used to endorse or
|
| 1105 |
+
promote products derived from this software without specific prior
|
| 1106 |
+
written permission.
|
| 1107 |
+
|
| 1108 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 1109 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 1110 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
| 1111 |
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
| 1112 |
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
| 1113 |
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
| 1114 |
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
| 1115 |
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
| 1116 |
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
| 1117 |
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
| 1118 |
+
POSSIBILITY OF SUCH DAMAGE.
|
| 1119 |
+
|
| 1120 |
+
6. Some of the cuBLAS library routines were written by or
|
| 1121 |
+
derived from code written by Vasily Volkov and are subject
|
| 1122 |
+
to the Modified Berkeley Software Distribution License as
|
| 1123 |
+
follows:
|
| 1124 |
+
|
| 1125 |
+
Copyright (c) 2007-2009, Regents of the University of California
|
| 1126 |
+
|
| 1127 |
+
All rights reserved.
|
| 1128 |
+
|
| 1129 |
+
Redistribution and use in source and binary forms, with or without
|
| 1130 |
+
modification, are permitted provided that the following conditions are
|
| 1131 |
+
met:
|
| 1132 |
+
* Redistributions of source code must retain the above copyright
|
| 1133 |
+
notice, this list of conditions and the following disclaimer.
|
| 1134 |
+
* Redistributions in binary form must reproduce the above
|
| 1135 |
+
copyright notice, this list of conditions and the following
|
| 1136 |
+
disclaimer in the documentation and/or other materials provided
|
| 1137 |
+
with the distribution.
|
| 1138 |
+
* Neither the name of the University of California, Berkeley nor
|
| 1139 |
+
the names of its contributors may be used to endorse or promote
|
| 1140 |
+
products derived from this software without specific prior
|
| 1141 |
+
written permission.
|
| 1142 |
+
|
| 1143 |
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
|
| 1144 |
+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
| 1145 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 1146 |
+
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
| 1147 |
+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| 1148 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 1149 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
| 1150 |
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
| 1151 |
+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
| 1152 |
+
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
| 1153 |
+
POSSIBILITY OF SUCH DAMAGE.
|
| 1154 |
+
|
| 1155 |
+
7. Some of the cuBLAS library routines were written by or
|
| 1156 |
+
derived from code written by Davide Barbieri and are
|
| 1157 |
+
subject to the Modified Berkeley Software Distribution
|
| 1158 |
+
License as follows:
|
| 1159 |
+
|
| 1160 |
+
Copyright (c) 2008-2009 Davide Barbieri @ University of Rome Tor Vergata.
|
| 1161 |
+
|
| 1162 |
+
All rights reserved.
|
| 1163 |
+
|
| 1164 |
+
Redistribution and use in source and binary forms, with or without
|
| 1165 |
+
modification, are permitted provided that the following conditions are
|
| 1166 |
+
met:
|
| 1167 |
+
* Redistributions of source code must retain the above copyright
|
| 1168 |
+
notice, this list of conditions and the following disclaimer.
|
| 1169 |
+
* Redistributions in binary form must reproduce the above
|
| 1170 |
+
copyright notice, this list of conditions and the following
|
| 1171 |
+
disclaimer in the documentation and/or other materials provided
|
| 1172 |
+
with the distribution.
|
| 1173 |
+
* The name of the author may not be used to endorse or promote
|
| 1174 |
+
products derived from this software without specific prior
|
| 1175 |
+
written permission.
|
| 1176 |
+
|
| 1177 |
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
|
| 1178 |
+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
| 1179 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 1180 |
+
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
| 1181 |
+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| 1182 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 1183 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
| 1184 |
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
| 1185 |
+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
| 1186 |
+
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
| 1187 |
+
POSSIBILITY OF SUCH DAMAGE.
|
| 1188 |
+
|
| 1189 |
+
8. Some of the cuBLAS library routines were derived from
|
| 1190 |
+
code developed by the University of Tennessee and are
|
| 1191 |
+
subject to the Modified Berkeley Software Distribution
|
| 1192 |
+
License as follows:
|
| 1193 |
+
|
| 1194 |
+
Copyright (c) 2010 The University of Tennessee.
|
| 1195 |
+
|
| 1196 |
+
All rights reserved.
|
| 1197 |
+
|
| 1198 |
+
Redistribution and use in source and binary forms, with or without
|
| 1199 |
+
modification, are permitted provided that the following conditions are
|
| 1200 |
+
met:
|
| 1201 |
+
* Redistributions of source code must retain the above copyright
|
| 1202 |
+
notice, this list of conditions and the following disclaimer.
|
| 1203 |
+
* Redistributions in binary form must reproduce the above
|
| 1204 |
+
copyright notice, this list of conditions and the following
|
| 1205 |
+
disclaimer listed in this license in the documentation and/or
|
| 1206 |
+
other materials provided with the distribution.
|
| 1207 |
+
* Neither the name of the copyright holders nor the names of its
|
| 1208 |
+
contributors may be used to endorse or promote products derived
|
| 1209 |
+
from this software without specific prior written permission.
|
| 1210 |
+
|
| 1211 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1212 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1213 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1214 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 1215 |
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 1216 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 1217 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 1218 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 1219 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 1220 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 1221 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 1222 |
+
|
| 1223 |
+
9. Some of the cuBLAS library routines were written by or
|
| 1224 |
+
derived from code written by Jonathan Hogg and are subject
|
| 1225 |
+
to the Modified Berkeley Software Distribution License as
|
| 1226 |
+
follows:
|
| 1227 |
+
|
| 1228 |
+
Copyright (c) 2012, The Science and Technology Facilities Council (STFC).
|
| 1229 |
+
|
| 1230 |
+
All rights reserved.
|
| 1231 |
+
|
| 1232 |
+
Redistribution and use in source and binary forms, with or without
|
| 1233 |
+
modification, are permitted provided that the following conditions are
|
| 1234 |
+
met:
|
| 1235 |
+
* Redistributions of source code must retain the above copyright
|
| 1236 |
+
notice, this list of conditions and the following disclaimer.
|
| 1237 |
+
* Redistributions in binary form must reproduce the above
|
| 1238 |
+
copyright notice, this list of conditions and the following
|
| 1239 |
+
disclaimer in the documentation and/or other materials provided
|
| 1240 |
+
with the distribution.
|
| 1241 |
+
* Neither the name of the STFC nor the names of its contributors
|
| 1242 |
+
may be used to endorse or promote products derived from this
|
| 1243 |
+
software without specific prior written permission.
|
| 1244 |
+
|
| 1245 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1246 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1247 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1248 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE STFC BE
|
| 1249 |
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
| 1250 |
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
| 1251 |
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
| 1252 |
+
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
| 1253 |
+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
| 1254 |
+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
| 1255 |
+
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 1256 |
+
|
| 1257 |
+
10. Some of the cuBLAS library routines were written by or
|
| 1258 |
+
derived from code written by Ahmad M. Abdelfattah, David
|
| 1259 |
+
Keyes, and Hatem Ltaief, and are subject to the Apache
|
| 1260 |
+
License, Version 2.0, as follows:
|
| 1261 |
+
|
| 1262 |
+
-- (C) Copyright 2013 King Abdullah University of Science and Technology
|
| 1263 |
+
Authors:
|
| 1264 |
+
Ahmad Abdelfattah (ahmad.ahmad@kaust.edu.sa)
|
| 1265 |
+
David Keyes (david.keyes@kaust.edu.sa)
|
| 1266 |
+
Hatem Ltaief (hatem.ltaief@kaust.edu.sa)
|
| 1267 |
+
|
| 1268 |
+
Redistribution and use in source and binary forms, with or without
|
| 1269 |
+
modification, are permitted provided that the following conditions
|
| 1270 |
+
are met:
|
| 1271 |
+
|
| 1272 |
+
* Redistributions of source code must retain the above copyright
|
| 1273 |
+
notice, this list of conditions and the following disclaimer.
|
| 1274 |
+
* Redistributions in binary form must reproduce the above copyright
|
| 1275 |
+
notice, this list of conditions and the following disclaimer in the
|
| 1276 |
+
documentation and/or other materials provided with the distribution.
|
| 1277 |
+
* Neither the name of the King Abdullah University of Science and
|
| 1278 |
+
Technology nor the names of its contributors may be used to endorse
|
| 1279 |
+
or promote products derived from this software without specific prior
|
| 1280 |
+
written permission.
|
| 1281 |
+
|
| 1282 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1283 |
+
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1284 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1285 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 1286 |
+
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 1287 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 1288 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 1289 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 1290 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 1291 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 1292 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
| 1293 |
+
|
| 1294 |
+
11. Some of the cuSPARSE library routines were written by or
|
| 1295 |
+
derived from code written by Li-Wen Chang and are subject
|
| 1296 |
+
to the NCSA Open Source License as follows:
|
| 1297 |
+
|
| 1298 |
+
Copyright (c) 2012, University of Illinois.
|
| 1299 |
+
|
| 1300 |
+
All rights reserved.
|
| 1301 |
+
|
| 1302 |
+
Developed by: IMPACT Group, University of Illinois, http://impact.crhc.illinois.edu
|
| 1303 |
+
|
| 1304 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
| 1305 |
+
a copy of this software and associated documentation files (the
|
| 1306 |
+
"Software"), to deal with the Software without restriction, including
|
| 1307 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
| 1308 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
| 1309 |
+
permit persons to whom the Software is furnished to do so, subject to
|
| 1310 |
+
the following conditions:
|
| 1311 |
+
* Redistributions of source code must retain the above copyright
|
| 1312 |
+
notice, this list of conditions and the following disclaimer.
|
| 1313 |
+
* Redistributions in binary form must reproduce the above
|
| 1314 |
+
copyright notice, this list of conditions and the following
|
| 1315 |
+
disclaimers in the documentation and/or other materials provided
|
| 1316 |
+
with the distribution.
|
| 1317 |
+
* Neither the names of IMPACT Group, University of Illinois, nor
|
| 1318 |
+
the names of its contributors may be used to endorse or promote
|
| 1319 |
+
products derived from this Software without specific prior
|
| 1320 |
+
written permission.
|
| 1321 |
+
|
| 1322 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 1323 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 1324 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
| 1325 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT
|
| 1326 |
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
| 1327 |
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
| 1328 |
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
|
| 1329 |
+
SOFTWARE.
|
| 1330 |
+
|
| 1331 |
+
12. Some of the cuRAND library routines were written by or
|
| 1332 |
+
derived from code written by Mutsuo Saito and Makoto
|
| 1333 |
+
Matsumoto and are subject to the following license:
|
| 1334 |
+
|
| 1335 |
+
Copyright (c) 2009, 2010 Mutsuo Saito, Makoto Matsumoto and Hiroshima
|
| 1336 |
+
University. All rights reserved.
|
| 1337 |
+
|
| 1338 |
+
Copyright (c) 2011 Mutsuo Saito, Makoto Matsumoto, Hiroshima
|
| 1339 |
+
University and University of Tokyo. All rights reserved.
|
| 1340 |
+
|
| 1341 |
+
Redistribution and use in source and binary forms, with or without
|
| 1342 |
+
modification, are permitted provided that the following conditions are
|
| 1343 |
+
met:
|
| 1344 |
+
* Redistributions of source code must retain the above copyright
|
| 1345 |
+
notice, this list of conditions and the following disclaimer.
|
| 1346 |
+
* Redistributions in binary form must reproduce the above
|
| 1347 |
+
copyright notice, this list of conditions and the following
|
| 1348 |
+
disclaimer in the documentation and/or other materials provided
|
| 1349 |
+
with the distribution.
|
| 1350 |
+
* Neither the name of the Hiroshima University nor the names of
|
| 1351 |
+
its contributors may be used to endorse or promote products
|
| 1352 |
+
derived from this software without specific prior written
|
| 1353 |
+
permission.
|
| 1354 |
+
|
| 1355 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1356 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1357 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1358 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 1359 |
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 1360 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 1361 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 1362 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 1363 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 1364 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 1365 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 1366 |
+
|
| 1367 |
+
13. Some of the cuRAND library routines were derived from
|
| 1368 |
+
code developed by D. E. Shaw Research and are subject to
|
| 1369 |
+
the following license:
|
| 1370 |
+
|
| 1371 |
+
Copyright 2010-2011, D. E. Shaw Research.
|
| 1372 |
+
|
| 1373 |
+
All rights reserved.
|
| 1374 |
+
|
| 1375 |
+
Redistribution and use in source and binary forms, with or without
|
| 1376 |
+
modification, are permitted provided that the following conditions are
|
| 1377 |
+
met:
|
| 1378 |
+
* Redistributions of source code must retain the above copyright
|
| 1379 |
+
notice, this list of conditions, and the following disclaimer.
|
| 1380 |
+
* Redistributions in binary form must reproduce the above
|
| 1381 |
+
copyright notice, this list of conditions, and the following
|
| 1382 |
+
disclaimer in the documentation and/or other materials provided
|
| 1383 |
+
with the distribution.
|
| 1384 |
+
* Neither the name of D. E. Shaw Research nor the names of its
|
| 1385 |
+
contributors may be used to endorse or promote products derived
|
| 1386 |
+
from this software without specific prior written permission.
|
| 1387 |
+
|
| 1388 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1389 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1390 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1391 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 1392 |
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 1393 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 1394 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 1395 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 1396 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 1397 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 1398 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 1399 |
+
|
| 1400 |
+
14. Some of the Math library routines were written by or
|
| 1401 |
+
derived from code developed by Norbert Juffa and are
|
| 1402 |
+
subject to the following license:
|
| 1403 |
+
|
| 1404 |
+
Copyright (c) 2015-2017, Norbert Juffa
|
| 1405 |
+
All rights reserved.
|
| 1406 |
+
|
| 1407 |
+
Redistribution and use in source and binary forms, with or without
|
| 1408 |
+
modification, are permitted provided that the following conditions
|
| 1409 |
+
are met:
|
| 1410 |
+
|
| 1411 |
+
1. Redistributions of source code must retain the above copyright
|
| 1412 |
+
notice, this list of conditions and the following disclaimer.
|
| 1413 |
+
|
| 1414 |
+
2. Redistributions in binary form must reproduce the above copyright
|
| 1415 |
+
notice, this list of conditions and the following disclaimer in the
|
| 1416 |
+
documentation and/or other materials provided with the distribution.
|
| 1417 |
+
|
| 1418 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1419 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1420 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1421 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 1422 |
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 1423 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 1424 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 1425 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 1426 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 1427 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 1428 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 1429 |
+
|
| 1430 |
+
15. Licensee's use of the lz4 third party component is
|
| 1431 |
+
subject to the following terms and conditions:
|
| 1432 |
+
|
| 1433 |
+
Copyright (C) 2011-2013, Yann Collet.
|
| 1434 |
+
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
|
| 1435 |
+
|
| 1436 |
+
Redistribution and use in source and binary forms, with or without
|
| 1437 |
+
modification, are permitted provided that the following conditions are
|
| 1438 |
+
met:
|
| 1439 |
+
|
| 1440 |
+
* Redistributions of source code must retain the above copyright
|
| 1441 |
+
notice, this list of conditions and the following disclaimer.
|
| 1442 |
+
* Redistributions in binary form must reproduce the above
|
| 1443 |
+
copyright notice, this list of conditions and the following disclaimer
|
| 1444 |
+
in the documentation and/or other materials provided with the
|
| 1445 |
+
distribution.
|
| 1446 |
+
|
| 1447 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1448 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1449 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1450 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 1451 |
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 1452 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 1453 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 1454 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 1455 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 1456 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 1457 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 1458 |
+
|
| 1459 |
+
16. The NPP library uses code from the Boost Math Toolkit,
|
| 1460 |
+
and is subject to the following license:
|
| 1461 |
+
|
| 1462 |
+
Boost Software License - Version 1.0 - August 17th, 2003
|
| 1463 |
+
. . . .
|
| 1464 |
+
|
| 1465 |
+
Permission is hereby granted, free of charge, to any person or
|
| 1466 |
+
organization obtaining a copy of the software and accompanying
|
| 1467 |
+
documentation covered by this license (the "Software") to use,
|
| 1468 |
+
reproduce, display, distribute, execute, and transmit the Software,
|
| 1469 |
+
and to prepare derivative works of the Software, and to permit
|
| 1470 |
+
third-parties to whom the Software is furnished to do so, all
|
| 1471 |
+
subject to the following:
|
| 1472 |
+
|
| 1473 |
+
The copyright notices in the Software and this entire statement,
|
| 1474 |
+
including the above license grant, this restriction and the following
|
| 1475 |
+
disclaimer, must be included in all copies of the Software, in whole
|
| 1476 |
+
or in part, and all derivative works of the Software, unless such
|
| 1477 |
+
copies or derivative works are solely in the form of machine-executable
|
| 1478 |
+
object code generated by a source language processor.
|
| 1479 |
+
|
| 1480 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 1481 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 1482 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
|
| 1483 |
+
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
|
| 1484 |
+
ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR
|
| 1485 |
+
OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING
|
| 1486 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
| 1487 |
+
OTHER DEALINGS IN THE SOFTWARE.
|
| 1488 |
+
|
| 1489 |
+
17. Portions of the Nsight Eclipse Edition is subject to the
|
| 1490 |
+
following license:
|
| 1491 |
+
|
| 1492 |
+
The Eclipse Foundation makes available all content in this plug-in
|
| 1493 |
+
("Content"). Unless otherwise indicated below, the Content is provided
|
| 1494 |
+
to you under the terms and conditions of the Eclipse Public License
|
| 1495 |
+
Version 1.0 ("EPL"). A copy of the EPL is available at http://
|
| 1496 |
+
www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program"
|
| 1497 |
+
will mean the Content.
|
| 1498 |
+
|
| 1499 |
+
If you did not receive this Content directly from the Eclipse
|
| 1500 |
+
Foundation, the Content is being redistributed by another party
|
| 1501 |
+
("Redistributor") and different terms and conditions may apply to your
|
| 1502 |
+
use of any object code in the Content. Check the Redistributor's
|
| 1503 |
+
license that was provided with the Content. If no such license exists,
|
| 1504 |
+
contact the Redistributor. Unless otherwise indicated below, the terms
|
| 1505 |
+
and conditions of the EPL still apply to any source code in the
|
| 1506 |
+
Content and such source code may be obtained at http://www.eclipse.org.
|
| 1507 |
+
|
| 1508 |
+
18. Some of the cuBLAS library routines uses code from
|
| 1509 |
+
OpenAI, which is subject to the following license:
|
| 1510 |
+
|
| 1511 |
+
License URL
|
| 1512 |
+
https://github.com/openai/openai-gemm/blob/master/LICENSE
|
| 1513 |
+
|
| 1514 |
+
License Text
|
| 1515 |
+
The MIT License
|
| 1516 |
+
|
| 1517 |
+
Copyright (c) 2016 OpenAI (http://openai.com), 2016 Google Inc.
|
| 1518 |
+
|
| 1519 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 1520 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 1521 |
+
in the Software without restriction, including without limitation the rights
|
| 1522 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 1523 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 1524 |
+
furnished to do so, subject to the following conditions:
|
| 1525 |
+
|
| 1526 |
+
The above copyright notice and this permission notice shall be included in
|
| 1527 |
+
all copies or substantial portions of the Software.
|
| 1528 |
+
|
| 1529 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 1530 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 1531 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 1532 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 1533 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 1534 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 1535 |
+
THE SOFTWARE.
|
| 1536 |
+
|
| 1537 |
+
19. Licensee's use of the Visual Studio Setup Configuration
|
| 1538 |
+
Samples is subject to the following license:
|
| 1539 |
+
|
| 1540 |
+
The MIT License (MIT)
|
| 1541 |
+
Copyright (C) Microsoft Corporation. All rights reserved.
|
| 1542 |
+
|
| 1543 |
+
Permission is hereby granted, free of charge, to any person
|
| 1544 |
+
obtaining a copy of this software and associated documentation
|
| 1545 |
+
files (the "Software"), to deal in the Software without restriction,
|
| 1546 |
+
including without limitation the rights to use, copy, modify, merge,
|
| 1547 |
+
publish, distribute, sublicense, and/or sell copies of the Software,
|
| 1548 |
+
and to permit persons to whom the Software is furnished to do so,
|
| 1549 |
+
subject to the following conditions:
|
| 1550 |
+
|
| 1551 |
+
The above copyright notice and this permission notice shall be included
|
| 1552 |
+
in all copies or substantial portions of the Software.
|
| 1553 |
+
|
| 1554 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
| 1555 |
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 1556 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 1557 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 1558 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 1559 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 1560 |
+
|
| 1561 |
+
20. Licensee's use of linmath.h header for CPU functions for
|
| 1562 |
+
GL vector/matrix operations from lunarG is subject to the
|
| 1563 |
+
Apache License Version 2.0.
|
| 1564 |
+
|
| 1565 |
+
21. The DX12-CUDA sample uses the d3dx12.h header, which is
|
| 1566 |
+
subject to the MIT license .
|
| 1567 |
+
|
| 1568 |
+
-----------------
|
falcon/lib/python3.10/site-packages/protobuf-5.29.3.dist-info/METADATA
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.1
|
| 2 |
+
Name: protobuf
|
| 3 |
+
Author: protobuf@googlegroups.com
|
| 4 |
+
Author-email: protobuf@googlegroups.com
|
| 5 |
+
Home-page: https://developers.google.com/protocol-buffers/
|
| 6 |
+
License: 3-Clause BSD License
|
| 7 |
+
Classifier: Programming Language :: Python
|
| 8 |
+
Classifier: Programming Language :: Python :: 3
|
| 9 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 10 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 11 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 12 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 13 |
+
Classifier: Programming Language :: Python :: 3.12
|
| 14 |
+
Requires-Python: >=3.8
|
| 15 |
+
Version: 5.29.3
|
| 16 |
+
|
| 17 |
+
UNKNOWN
|
falcon/lib/python3.10/site-packages/protobuf-5.29.3.dist-info/RECORD
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
google/_upb/_message.abi3.so,sha256=NNXmkM6cyUNtdgk5dC1t8aCvsljfioOf5_9IxJgJXzA,390920
|
| 2 |
+
google/protobuf/__init__.py,sha256=wZgAgq5MnVvml5NxeeSKxt51dUSWZ_IjRM8nL9INJuo,346
|
| 3 |
+
google/protobuf/__pycache__/__init__.cpython-310.pyc,,
|
| 4 |
+
google/protobuf/__pycache__/any.cpython-310.pyc,,
|
| 5 |
+
google/protobuf/__pycache__/any_pb2.cpython-310.pyc,,
|
| 6 |
+
google/protobuf/__pycache__/api_pb2.cpython-310.pyc,,
|
| 7 |
+
google/protobuf/__pycache__/descriptor.cpython-310.pyc,,
|
| 8 |
+
google/protobuf/__pycache__/descriptor_database.cpython-310.pyc,,
|
| 9 |
+
google/protobuf/__pycache__/descriptor_pb2.cpython-310.pyc,,
|
| 10 |
+
google/protobuf/__pycache__/descriptor_pool.cpython-310.pyc,,
|
| 11 |
+
google/protobuf/__pycache__/duration.cpython-310.pyc,,
|
| 12 |
+
google/protobuf/__pycache__/duration_pb2.cpython-310.pyc,,
|
| 13 |
+
google/protobuf/__pycache__/empty_pb2.cpython-310.pyc,,
|
| 14 |
+
google/protobuf/__pycache__/field_mask_pb2.cpython-310.pyc,,
|
| 15 |
+
google/protobuf/__pycache__/json_format.cpython-310.pyc,,
|
| 16 |
+
google/protobuf/__pycache__/message.cpython-310.pyc,,
|
| 17 |
+
google/protobuf/__pycache__/message_factory.cpython-310.pyc,,
|
| 18 |
+
google/protobuf/__pycache__/proto.cpython-310.pyc,,
|
| 19 |
+
google/protobuf/__pycache__/proto_builder.cpython-310.pyc,,
|
| 20 |
+
google/protobuf/__pycache__/proto_json.cpython-310.pyc,,
|
| 21 |
+
google/protobuf/__pycache__/reflection.cpython-310.pyc,,
|
| 22 |
+
google/protobuf/__pycache__/runtime_version.cpython-310.pyc,,
|
| 23 |
+
google/protobuf/__pycache__/service.cpython-310.pyc,,
|
| 24 |
+
google/protobuf/__pycache__/service_reflection.cpython-310.pyc,,
|
| 25 |
+
google/protobuf/__pycache__/source_context_pb2.cpython-310.pyc,,
|
| 26 |
+
google/protobuf/__pycache__/struct_pb2.cpython-310.pyc,,
|
| 27 |
+
google/protobuf/__pycache__/symbol_database.cpython-310.pyc,,
|
| 28 |
+
google/protobuf/__pycache__/text_encoding.cpython-310.pyc,,
|
| 29 |
+
google/protobuf/__pycache__/text_format.cpython-310.pyc,,
|
| 30 |
+
google/protobuf/__pycache__/timestamp.cpython-310.pyc,,
|
| 31 |
+
google/protobuf/__pycache__/timestamp_pb2.cpython-310.pyc,,
|
| 32 |
+
google/protobuf/__pycache__/type_pb2.cpython-310.pyc,,
|
| 33 |
+
google/protobuf/__pycache__/unknown_fields.cpython-310.pyc,,
|
| 34 |
+
google/protobuf/__pycache__/wrappers_pb2.cpython-310.pyc,,
|
| 35 |
+
google/protobuf/any.py,sha256=AZuOL26Bo8AFFUjHLhh_OQP2ceUJEgOUTqImjxXAJkc,975
|
| 36 |
+
google/protobuf/any_pb2.py,sha256=eSAjMGiijdoGdEkiEUmoe77n7ct83FOZAfwQeQjpljk,1725
|
| 37 |
+
google/protobuf/api_pb2.py,sha256=5yaBnA8cGv3VH8mpA5_Q2rNA5zuUopchFbSsnYpynG8,3145
|
| 38 |
+
google/protobuf/compiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 39 |
+
google/protobuf/compiler/__pycache__/__init__.cpython-310.pyc,,
|
| 40 |
+
google/protobuf/compiler/__pycache__/plugin_pb2.cpython-310.pyc,,
|
| 41 |
+
google/protobuf/compiler/plugin_pb2.py,sha256=OBvH22GKF5JEB75u2Fx0fgzAOA_vC8qZnZEiulQSQYk,3797
|
| 42 |
+
google/protobuf/descriptor.py,sha256=xM9LaJQJbyt0fxMdJwZdSzCS8tZK4LvHw5Yd2F9KgKU,52253
|
| 43 |
+
google/protobuf/descriptor_database.py,sha256=GDiSu-vBZBZ-L1YHQXSTsbsJMRNY-20icb6pj3ER8E8,5444
|
| 44 |
+
google/protobuf/descriptor_pb2.py,sha256=KWQIQRHJnQH3UBs0jBeGETFDA7OZQpvzDEDI6V5YC6o,343365
|
| 45 |
+
google/protobuf/descriptor_pool.py,sha256=DA5XTv-jmRCJ1O4b_Yswg93KzmFpzaWOPofRGzhXeBY,48430
|
| 46 |
+
google/protobuf/duration.py,sha256=vQTwVyiiyGm3Wy3LW8ohA3tkGkrUKoTn_p4SdEBU8bM,2672
|
| 47 |
+
google/protobuf/duration_pb2.py,sha256=kCK_boGkvLEO3cVyK_Eu6p9RefZhFXShL0_a7BHy9nU,1805
|
| 48 |
+
google/protobuf/empty_pb2.py,sha256=qpOzDZ6xQIcUjSiHfL4HbVeinWkrjW2s9Lqs1XR3yWs,1669
|
| 49 |
+
google/protobuf/field_mask_pb2.py,sha256=owPBO3dezwk8-8FKzGqJZcZMvuaeVcTrpbU6gvyXnfA,1765
|
| 50 |
+
google/protobuf/internal/__init__.py,sha256=8d_k1ksNWIuqPDEEEtOjgC3Xx8kAXD2-04R7mxJlSbs,272
|
| 51 |
+
google/protobuf/internal/__pycache__/__init__.cpython-310.pyc,,
|
| 52 |
+
google/protobuf/internal/__pycache__/_parameterized.cpython-310.pyc,,
|
| 53 |
+
google/protobuf/internal/__pycache__/api_implementation.cpython-310.pyc,,
|
| 54 |
+
google/protobuf/internal/__pycache__/builder.cpython-310.pyc,,
|
| 55 |
+
google/protobuf/internal/__pycache__/containers.cpython-310.pyc,,
|
| 56 |
+
google/protobuf/internal/__pycache__/decoder.cpython-310.pyc,,
|
| 57 |
+
google/protobuf/internal/__pycache__/encoder.cpython-310.pyc,,
|
| 58 |
+
google/protobuf/internal/__pycache__/enum_type_wrapper.cpython-310.pyc,,
|
| 59 |
+
google/protobuf/internal/__pycache__/extension_dict.cpython-310.pyc,,
|
| 60 |
+
google/protobuf/internal/__pycache__/field_mask.cpython-310.pyc,,
|
| 61 |
+
google/protobuf/internal/__pycache__/message_listener.cpython-310.pyc,,
|
| 62 |
+
google/protobuf/internal/__pycache__/python_edition_defaults.cpython-310.pyc,,
|
| 63 |
+
google/protobuf/internal/__pycache__/python_message.cpython-310.pyc,,
|
| 64 |
+
google/protobuf/internal/__pycache__/testing_refleaks.cpython-310.pyc,,
|
| 65 |
+
google/protobuf/internal/__pycache__/type_checkers.cpython-310.pyc,,
|
| 66 |
+
google/protobuf/internal/__pycache__/well_known_types.cpython-310.pyc,,
|
| 67 |
+
google/protobuf/internal/__pycache__/wire_format.cpython-310.pyc,,
|
| 68 |
+
google/protobuf/internal/_parameterized.py,sha256=_LLIH2kmUrI1hZfUlIF8OBcBbbQXgRnm39uB9TpzaHU,14073
|
| 69 |
+
google/protobuf/internal/api_implementation.py,sha256=Qnq9L9thCvgdxlhnGsaNrSCVXmMq_wCZ7-ooRNLVtzs,4787
|
| 70 |
+
google/protobuf/internal/builder.py,sha256=2veSGrr1WphCBOGE3wNXKbVPBkY1-LlSCsKOQH2Nudk,4015
|
| 71 |
+
google/protobuf/internal/containers.py,sha256=CQ0R54YddBf2uWnDqMUnaevr79BdBb1fYM33qsnYSxY,21722
|
| 72 |
+
google/protobuf/internal/decoder.py,sha256=7nDfjyHd67pwky4hNyO_gZKm0IggiAkHF2IfUlO_gMY,36727
|
| 73 |
+
google/protobuf/internal/encoder.py,sha256=Vujp3bU10dLBasUnRaGZKD-ZTLq7zEGA8wKh7mVLR-g,27297
|
| 74 |
+
google/protobuf/internal/enum_type_wrapper.py,sha256=PNhK87a_NP1JIfFHuYFibpE4hHdHYawXwqZxMEtvsvo,3747
|
| 75 |
+
google/protobuf/internal/extension_dict.py,sha256=7bT-5iqa_qw4wkk3QNtCPzGlfPU2h9FDyc5TjF2wiTo,7225
|
| 76 |
+
google/protobuf/internal/field_mask.py,sha256=Ek2eDU8mY1Shj-V2wRmOggXummBv_brbL3XOEVFR6c0,10416
|
| 77 |
+
google/protobuf/internal/message_listener.py,sha256=uh8viU_MvWdDe4Kl14CromKVFAzBMPlMzFZ4vew_UJc,2008
|
| 78 |
+
google/protobuf/internal/python_edition_defaults.py,sha256=72ruAhyM3WEiE8I29ZJZIRp_dOLJoZuBDedecOAW7aQ,434
|
| 79 |
+
google/protobuf/internal/python_message.py,sha256=GkE2xJ3KuVKA3jZonHTgaxOijVzPSQdHMZQTfH10Xzk,58179
|
| 80 |
+
google/protobuf/internal/testing_refleaks.py,sha256=Pp-e8isZv-IwZDOzPaLo9WujUXj_XghNrbV-rHswvL4,4080
|
| 81 |
+
google/protobuf/internal/type_checkers.py,sha256=1W7k9lfyeWML2Hl461xGsKCFJiN63uKBT6vyIKKz9go,15471
|
| 82 |
+
google/protobuf/internal/well_known_types.py,sha256=dv8F2oJXfU2hlBaVbfJ3bWs97bEm1FfKzWHr1-nazSM,22705
|
| 83 |
+
google/protobuf/internal/wire_format.py,sha256=EbAXZdb23iCObCZxNgaMx8-VRF2UjgyPrBCTtV10Rx8,7087
|
| 84 |
+
google/protobuf/json_format.py,sha256=d-27JdC0vA_-A1V3yTuRqR70e4xuXUHy3nbJWs-oLc8,37260
|
| 85 |
+
google/protobuf/message.py,sha256=usc6ma5tUR66le_XDFC6ce7VRX3VvQlrRFCvjshxI-k,14042
|
| 86 |
+
google/protobuf/message_factory.py,sha256=hsMGMC6BJ3ik5vjGGeIG57WLInAf1Vt8G1528XKBprc,8262
|
| 87 |
+
google/protobuf/proto.py,sha256=R-vAuadXJgPhWCeU9nHOQPmAlCvAgnkHIny7DzkkyXo,3500
|
| 88 |
+
google/protobuf/proto_builder.py,sha256=pGU2L_pPEYkylZkrvHMCUH2PFWvc9wI-awwT7F5i740,4203
|
| 89 |
+
google/protobuf/proto_json.py,sha256=fUy0Vb4m_831-oabn7JbzmyipcoJpQWtBdgTMoj8Yp4,3094
|
| 90 |
+
google/protobuf/pyext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 91 |
+
google/protobuf/pyext/__pycache__/__init__.cpython-310.pyc,,
|
| 92 |
+
google/protobuf/pyext/__pycache__/cpp_message.cpython-310.pyc,,
|
| 93 |
+
google/protobuf/pyext/cpp_message.py,sha256=8uSrWX9kD3HPRhntvTPc4bgnfQ2BzX9FPC73CgifXAw,1715
|
| 94 |
+
google/protobuf/reflection.py,sha256=aC4b3fcWr0rYi9DAk29dX3-WW0QxrRUOErzUOywxjsg,2893
|
| 95 |
+
google/protobuf/runtime_version.py,sha256=os6UnDv8YebklH-fqngHvYqWAF0E3BqPAtnrh2R_3Bg,3911
|
| 96 |
+
google/protobuf/service.py,sha256=BkCM4Acflz04MNVtFsPeMVUo_6DDERIq7Dl7g30VGO0,8059
|
| 97 |
+
google/protobuf/service_reflection.py,sha256=WHElGnPgywDtn3X8xKVNsZZOCgJOTzgpAyTd-rmCKGU,10058
|
| 98 |
+
google/protobuf/source_context_pb2.py,sha256=WLSy70L9NfXwMRPstcj75LnYa1xBsGAXubHabsGesFE,1791
|
| 99 |
+
google/protobuf/struct_pb2.py,sha256=_RzUY-mvwPfwsXVZUU2u5-jHs4ot__hpbUnPesqWXdY,3061
|
| 100 |
+
google/protobuf/symbol_database.py,sha256=ruKrtrkuxmFe7uzbJGMgOD7D6Qs2g6jFIRC3aS9NNvU,6709
|
| 101 |
+
google/protobuf/testdata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 102 |
+
google/protobuf/testdata/__pycache__/__init__.cpython-310.pyc,,
|
| 103 |
+
google/protobuf/text_encoding.py,sha256=Ao1Q6OP8i4p8VDtvpe8uW1BjX7aQZvkJggvhFYYrB7w,3621
|
| 104 |
+
google/protobuf/text_format.py,sha256=L-gxTX1L6OEHoVNuFJI2Qtp5QQvsYkJkedCNMtsm55M,63477
|
| 105 |
+
google/protobuf/timestamp.py,sha256=s23LWq6hDiFIeAtVUn8LwfEc5aRM7WAwTz_hCaOVndk,3133
|
| 106 |
+
google/protobuf/timestamp_pb2.py,sha256=92nyQXQuN6ywiT5sOTCpgQOO3waqSlpDoXHLJgbDEZc,1815
|
| 107 |
+
google/protobuf/type_pb2.py,sha256=wxOXDCwWgvTkDN9MfSW-UxPEQY3ifkResYKV8EICa9M,5438
|
| 108 |
+
google/protobuf/unknown_fields.py,sha256=RVMDxyiZcObbb40dMK-xXCAvc5pkyLNSL1y2qzPAUbA,3127
|
| 109 |
+
google/protobuf/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 110 |
+
google/protobuf/util/__pycache__/__init__.cpython-310.pyc,,
|
| 111 |
+
google/protobuf/wrappers_pb2.py,sha256=76GFOCQ5ofdBr0kfF7TzQpSW0XFPN43EyBBxkimuq9o,3037
|
| 112 |
+
protobuf-5.29.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 113 |
+
protobuf-5.29.3.dist-info/LICENSE,sha256=bl4RcySv2UTc9n82zzKYQ7wakiKajNm7Vz16gxMP6n0,1732
|
| 114 |
+
protobuf-5.29.3.dist-info/METADATA,sha256=_Y4y0cn5OJcwvuHFocWr7hlzEt3Ql8mOUpZbPhvyXqs,592
|
| 115 |
+
protobuf-5.29.3.dist-info/RECORD,,
|
| 116 |
+
protobuf-5.29.3.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 117 |
+
protobuf-5.29.3.dist-info/WHEEL,sha256=vS6ODHxi8MEFPlH7P2fb6m0CdIf-1Dsx19UF_kqQxLY,110
|
falcon/lib/python3.10/site-packages/safetensors-0.5.2.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
falcon/lib/python3.10/site-packages/safetensors-0.5.2.dist-info/METADATA
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.4
|
| 2 |
+
Name: safetensors
|
| 3 |
+
Version: 0.5.2
|
| 4 |
+
Classifier: Development Status :: 5 - Production/Stable
|
| 5 |
+
Classifier: Intended Audience :: Developers
|
| 6 |
+
Classifier: Intended Audience :: Education
|
| 7 |
+
Classifier: Intended Audience :: Science/Research
|
| 8 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
| 9 |
+
Classifier: Operating System :: OS Independent
|
| 10 |
+
Classifier: Programming Language :: Python :: 3
|
| 11 |
+
Classifier: Programming Language :: Python :: 3.7
|
| 12 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 13 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 14 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 15 |
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
| 16 |
+
Classifier: Typing :: Typed
|
| 17 |
+
Requires-Dist: numpy >=1.21.6 ; extra == 'numpy'
|
| 18 |
+
Requires-Dist: safetensors[numpy] ; extra == 'torch'
|
| 19 |
+
Requires-Dist: torch >=1.10 ; extra == 'torch'
|
| 20 |
+
Requires-Dist: safetensors[numpy] ; extra == 'tensorflow'
|
| 21 |
+
Requires-Dist: tensorflow >=2.11.0 ; extra == 'tensorflow'
|
| 22 |
+
Requires-Dist: safetensors[numpy] ; extra == 'pinned-tf'
|
| 23 |
+
Requires-Dist: tensorflow ==2.18.0 ; extra == 'pinned-tf'
|
| 24 |
+
Requires-Dist: safetensors[numpy] ; extra == 'jax'
|
| 25 |
+
Requires-Dist: flax >=0.6.3 ; extra == 'jax'
|
| 26 |
+
Requires-Dist: jax >=0.3.25 ; extra == 'jax'
|
| 27 |
+
Requires-Dist: jaxlib >=0.3.25 ; extra == 'jax'
|
| 28 |
+
Requires-Dist: mlx >=0.0.9 ; extra == 'mlx'
|
| 29 |
+
Requires-Dist: safetensors[numpy] ; extra == 'paddlepaddle'
|
| 30 |
+
Requires-Dist: paddlepaddle >=2.4.1 ; extra == 'paddlepaddle'
|
| 31 |
+
Requires-Dist: black ==22.3 ; extra == 'quality'
|
| 32 |
+
Requires-Dist: click ==8.0.4 ; extra == 'quality'
|
| 33 |
+
Requires-Dist: isort >=5.5.4 ; extra == 'quality'
|
| 34 |
+
Requires-Dist: flake8 >=3.8.3 ; extra == 'quality'
|
| 35 |
+
Requires-Dist: safetensors[numpy] ; extra == 'testing'
|
| 36 |
+
Requires-Dist: h5py >=3.7.0 ; extra == 'testing'
|
| 37 |
+
Requires-Dist: huggingface-hub >=0.12.1 ; extra == 'testing'
|
| 38 |
+
Requires-Dist: setuptools-rust >=1.5.2 ; extra == 'testing'
|
| 39 |
+
Requires-Dist: pytest >=7.2.0 ; extra == 'testing'
|
| 40 |
+
Requires-Dist: pytest-benchmark >=4.0.0 ; extra == 'testing'
|
| 41 |
+
Requires-Dist: hypothesis >=6.70.2 ; extra == 'testing'
|
| 42 |
+
Requires-Dist: safetensors[torch] ; extra == 'all'
|
| 43 |
+
Requires-Dist: safetensors[numpy] ; extra == 'all'
|
| 44 |
+
Requires-Dist: safetensors[pinned-tf] ; extra == 'all'
|
| 45 |
+
Requires-Dist: safetensors[jax] ; extra == 'all'
|
| 46 |
+
Requires-Dist: safetensors[paddlepaddle] ; extra == 'all'
|
| 47 |
+
Requires-Dist: safetensors[quality] ; extra == 'all'
|
| 48 |
+
Requires-Dist: safetensors[testing] ; extra == 'all'
|
| 49 |
+
Requires-Dist: safetensors[all] ; extra == 'dev'
|
| 50 |
+
Provides-Extra: numpy
|
| 51 |
+
Provides-Extra: torch
|
| 52 |
+
Provides-Extra: tensorflow
|
| 53 |
+
Provides-Extra: pinned-tf
|
| 54 |
+
Provides-Extra: jax
|
| 55 |
+
Provides-Extra: mlx
|
| 56 |
+
Provides-Extra: paddlepaddle
|
| 57 |
+
Provides-Extra: quality
|
| 58 |
+
Provides-Extra: testing
|
| 59 |
+
Provides-Extra: all
|
| 60 |
+
Provides-Extra: dev
|
| 61 |
+
Author-email: Nicolas Patry <patry.nicolas@protonmail.com>
|
| 62 |
+
Requires-Python: >=3.7
|
| 63 |
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
| 64 |
+
Project-URL: Homepage, https://github.com/huggingface/safetensors
|
| 65 |
+
Project-URL: Source, https://github.com/huggingface/safetensors
|
| 66 |
+
|
| 67 |
+
## Installation
|
| 68 |
+
|
| 69 |
+
```
|
| 70 |
+
pip install safetensors
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
## Usage
|
| 75 |
+
|
| 76 |
+
### Numpy
|
| 77 |
+
|
| 78 |
+
```python
|
| 79 |
+
from safetensors.numpy import save_file, load_file
|
| 80 |
+
import numpy as np
|
| 81 |
+
|
| 82 |
+
tensors = {
|
| 83 |
+
"a": np.zeros((2, 2)),
|
| 84 |
+
"b": np.zeros((2, 3), dtype=np.uint8)
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
save_file(tensors, "./model.safetensors")
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
# Now loading
|
| 91 |
+
loaded = load_file("./model.safetensors")
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
### Torch
|
| 95 |
+
|
| 96 |
+
```python
|
| 97 |
+
from safetensors.torch import save_file, load_file
|
| 98 |
+
import torch
|
| 99 |
+
|
| 100 |
+
tensors = {
|
| 101 |
+
"a": torch.zeros((2, 2)),
|
| 102 |
+
"b": torch.zeros((2, 3), dtype=torch.uint8)
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
save_file(tensors, "./model.safetensors")
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
# Now loading
|
| 109 |
+
loaded = load_file("./model.safetensors")
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
### Developing
|
| 113 |
+
|
| 114 |
+
```
|
| 115 |
+
# inside ./safetensors/bindings/python
|
| 116 |
+
pip install .[dev]
|
| 117 |
+
```
|
| 118 |
+
Should be enough to install this library locally.
|
| 119 |
+
|
| 120 |
+
### Testing
|
| 121 |
+
|
| 122 |
+
```
|
| 123 |
+
# inside ./safetensors/bindings/python
|
| 124 |
+
pip install .[dev]
|
| 125 |
+
pytest -sv tests/
|
| 126 |
+
```
|
| 127 |
+
|
falcon/lib/python3.10/site-packages/safetensors-0.5.2.dist-info/REQUESTED
ADDED
|
File without changes
|
falcon/lib/python3.10/site-packages/svgwrite/data/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (165 Bytes). View file
|
|
|
falcon/lib/python3.10/site-packages/svgwrite/data/__pycache__/colors.cpython-310.pyc
ADDED
|
Binary file (1.8 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/svgwrite/data/__pycache__/tiny12.cpython-310.pyc
ADDED
|
Binary file (25.2 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/svgwrite/data/__pycache__/types.cpython-310.pyc
ADDED
|
Binary file (2.59 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/svgwrite/data/svgparser.py
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python
|
| 2 |
+
# coding:utf-8
|
| 3 |
+
# Authors: mozman <me@mozman.at>, Florian Festi
|
| 4 |
+
# Purpose: svgparser using re module
|
| 5 |
+
# Created: 16.10.2010
|
| 6 |
+
# Copyright (c) 2010, Manfred Moitzi & 2020, Florian Festi
|
| 7 |
+
# License: MIT License
|
| 8 |
+
|
| 9 |
+
__all__ = ["is_valid_transferlist", "is_valid_pathdata", "is_valid_animation_timing"]
|
| 10 |
+
|
| 11 |
+
import re
|
| 12 |
+
|
| 13 |
+
event_names = [
|
| 14 |
+
"focusin", "focusout", "activate", "click", "mousedown", "mouseup", "mouseover",
|
| 15 |
+
"mousemove", "mouseout", "DOMSubtreeModified", "DOMNodeInserted", "DOMNodeRemoved",
|
| 16 |
+
"DOMNodeRemovedFromDocument", "DOMNodeInsertedtoDocument", "DOMAttrModified",
|
| 17 |
+
"DOMCharacterDataModified", "SVGLoad", "SVGUnload", "SVGAbort", "SVGError",
|
| 18 |
+
"SVGResize", "SVGScroll", "SVGZoom", "beginEvent", "endEvent", "repeatEvent",
|
| 19 |
+
]
|
| 20 |
+
|
| 21 |
+
c = r"\s*[, ]\s*"
|
| 22 |
+
s = r"\s*[; ]\s*"
|
| 23 |
+
integer_constant = r"\d+"
|
| 24 |
+
exponent = r"([eE][+-]?\d+)"
|
| 25 |
+
nonnegative_number = fr"(\d+\.?\d*|\.\d+){exponent}?"
|
| 26 |
+
number = r"[+-]?" + nonnegative_number
|
| 27 |
+
flag = r"[01]"
|
| 28 |
+
|
| 29 |
+
comma_delimited_coordinates = fr"\s*{number}({c}{number})*\s*"
|
| 30 |
+
two_comma_delimited_numbers = fr"\s*{number}({c}{number}\s*)" "{1}"
|
| 31 |
+
four_comma_delimited_numbers = fr"\s*{number}\s*({c}{number}\s*)" "{3}"
|
| 32 |
+
six_comma_delimited_numbers = fr"\s*{number}\s*({c}{number}\s*)" "{5}"
|
| 33 |
+
comma_delimited_coordinate_pairs = fr"{two_comma_delimited_numbers}({c}{two_comma_delimited_numbers})*"
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
def is_valid(regex):
|
| 37 |
+
reg = re.compile(regex)
|
| 38 |
+
|
| 39 |
+
def f(term):
|
| 40 |
+
return bool(reg.fullmatch(term))
|
| 41 |
+
|
| 42 |
+
return f
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
def build_transferlist_parser():
|
| 46 |
+
matrix = fr"matrix\s*\(\s*{six_comma_delimited_numbers}\s*\)"
|
| 47 |
+
translate = fr"translate\s*\(\s*{number}({c}{number})?\s*\)"
|
| 48 |
+
scale = fr"scale\s*\(\s*{number}({c}{number})?\s*\)"
|
| 49 |
+
rotate = fr"rotate\s*\(\s*{number}({c}{number}{c}{number})?\s*\)"
|
| 50 |
+
skewX = fr"skewX\s*\(\s*{number}\s*\)"
|
| 51 |
+
skewY = fr"skewY\s*\(\s*{number}\s*\)"
|
| 52 |
+
|
| 53 |
+
tl_re = "|".join((fr"(\s*{cmd}\s*)" for cmd in (
|
| 54 |
+
matrix, translate, scale, rotate, skewX, skewY)))
|
| 55 |
+
return fr"({tl_re})({c}({tl_re}))*"
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
is_valid_transferlist = is_valid(build_transferlist_parser())
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
def build_pathdata_parser():
|
| 62 |
+
moveto = fr"[mM]\s*{comma_delimited_coordinate_pairs}"
|
| 63 |
+
lineto = fr"[lL]\s*{comma_delimited_coordinate_pairs}"
|
| 64 |
+
horizontal_lineto = fr"[hH]\s*{comma_delimited_coordinates}"
|
| 65 |
+
vertical_lineto = fr"[vV]\s*{comma_delimited_coordinates}"
|
| 66 |
+
curveto = fr"[cC]\s*({six_comma_delimited_numbers})({c}{six_comma_delimited_numbers})*"
|
| 67 |
+
smooth_curveto = fr"[sS]{four_comma_delimited_numbers}({c}{four_comma_delimited_numbers})*"
|
| 68 |
+
quadratic_bezier_curveto = fr"[qQ]{four_comma_delimited_numbers}({c}{four_comma_delimited_numbers})*"
|
| 69 |
+
smooth_quadratic_bezier_curveto = fr"[tT]\s*{comma_delimited_coordinate_pairs}"
|
| 70 |
+
|
| 71 |
+
elliptical_arc_argument = fr"{c}".join((
|
| 72 |
+
fr"{nonnegative_number}",
|
| 73 |
+
fr"{nonnegative_number}",
|
| 74 |
+
fr"{number}",
|
| 75 |
+
fr"{flag}",
|
| 76 |
+
fr"{flag}",
|
| 77 |
+
fr"{number}",
|
| 78 |
+
fr"{number}",))
|
| 79 |
+
elliptical_arc_argument = r"\s*" + elliptical_arc_argument + r"\s*"
|
| 80 |
+
elliptical_arc = fr"[aA]({elliptical_arc_argument})({c}{elliptical_arc_argument})*"
|
| 81 |
+
|
| 82 |
+
drawto_command = "|".join((fr"(\s*{cmd}\s*)" for cmd in (
|
| 83 |
+
moveto, lineto, horizontal_lineto, vertical_lineto, "[zZ]",
|
| 84 |
+
curveto, smooth_curveto, quadratic_bezier_curveto,
|
| 85 |
+
smooth_quadratic_bezier_curveto, elliptical_arc)))
|
| 86 |
+
|
| 87 |
+
return f"{moveto}({drawto_command})*"
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
is_valid_pathdata = is_valid(build_pathdata_parser())
|
| 91 |
+
|
| 92 |
+
digit2 = r"\d{2}"
|
| 93 |
+
digit4 = r"\d{4}"
|
| 94 |
+
seconds = fr"\d+(\.\d+)?"
|
| 95 |
+
seconds2 = fr"{digit2}(\.\d+)?"
|
| 96 |
+
metric = "(h|min|s|ms)"
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
def clock_val_re():
|
| 100 |
+
timecount_val = fr"{seconds}\s*({metric})?"
|
| 101 |
+
clock_val = fr"{digit2}:({digit2}:)?{seconds2}"
|
| 102 |
+
return fr"({timecount_val}|{clock_val})"
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def wall_clock_val_re():
|
| 106 |
+
hhmmss = fr"{digit2}:{digit2}(:{seconds2})?"
|
| 107 |
+
walltime = fr"{hhmmss}(Z|[+-]?{digit2}:{digit2})?"
|
| 108 |
+
date = fr"{digit4}-{digit2}-{digit2}"
|
| 109 |
+
datetime = fr"{date}(T{walltime})?"
|
| 110 |
+
return "(" + "|".join((walltime, datetime)) + ")"
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
def build_animation_timing_parser():
|
| 114 |
+
clock_val = clock_val_re()
|
| 115 |
+
wallclock_val = wall_clock_val_re()
|
| 116 |
+
|
| 117 |
+
event_ref = "(" + "|".join(event_names) + ")"
|
| 118 |
+
id_value = "#?[-_a-zA-Z0-9]+"
|
| 119 |
+
|
| 120 |
+
wallclock_sync_value = fr"wallclock\(\s*{wallclock_val}\s*\)"
|
| 121 |
+
accesskey_value = fr"accessKey\(\s*[a-zA-Z]\s*\)\s*([+-]?{clock_val})?"
|
| 122 |
+
repeat_value = fr"({id_value}\.)?repeat\s*\(\s*\d+\s*\)\s*([+-?]{clock_val})?"
|
| 123 |
+
event_value = fr"({id_value}\.)?{event_ref}([+-]?{clock_val})?"
|
| 124 |
+
offset_value = fr"[-+]?{clock_val}"
|
| 125 |
+
syncbase_value = fr"{id_value}\.(begin|end)({offset_value})?"
|
| 126 |
+
begin_value = "(" + "|".join((f"({reg})" for reg in (
|
| 127 |
+
offset_value, syncbase_value, event_value, repeat_value,
|
| 128 |
+
accesskey_value, wallclock_sync_value, "indefinite"))) + ")"
|
| 129 |
+
return fr"{begin_value}({s}{begin_value})*"
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
is_valid_animation_timing = is_valid(build_animation_timing_parser())
|
falcon/lib/python3.10/site-packages/svgwrite/data/tiny12.py
ADDED
|
@@ -0,0 +1,966 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
# Created: 15.10.2010
|
| 6 |
+
# Copyright (C) 2010, Manfred Moitzi
|
| 7 |
+
# License: MIT License
|
| 8 |
+
|
| 9 |
+
from svgwrite.data.types import SVGAttribute, SVGMultiAttribute
|
| 10 |
+
from svgwrite.data.types import SVGElement
|
| 11 |
+
from svgwrite.data.typechecker import Tiny12TypeChecker as TypeChecker
|
| 12 |
+
|
| 13 |
+
empty_list = []
|
| 14 |
+
|
| 15 |
+
attributes = {
|
| 16 |
+
'about': SVGAttribute('about', anim=True,
|
| 17 |
+
types=frozenset(['string']),
|
| 18 |
+
const=empty_list),
|
| 19 |
+
'accent-height': SVGAttribute('accent-height', anim=False,
|
| 20 |
+
types=frozenset(['number']),
|
| 21 |
+
const=empty_list),
|
| 22 |
+
'accumulate': SVGAttribute('accumulate', anim=False,
|
| 23 |
+
types=empty_list,
|
| 24 |
+
const=frozenset(['none', 'sum'])),
|
| 25 |
+
'additive': SVGAttribute('additive', anim=False,
|
| 26 |
+
types=empty_list,
|
| 27 |
+
const=frozenset(['replace', 'sum'])),
|
| 28 |
+
'alphabetic': SVGAttribute('alphabetic', anim=False,
|
| 29 |
+
types=frozenset(['number']),
|
| 30 |
+
const=empty_list),
|
| 31 |
+
'arabic-form': SVGAttribute('arabic-form', anim=False,
|
| 32 |
+
types=empty_list,
|
| 33 |
+
const=frozenset(['terminal', 'initial', 'isolated', 'medial'])),
|
| 34 |
+
'ascent': SVGAttribute('ascent', anim=False,
|
| 35 |
+
types=frozenset(['number']),
|
| 36 |
+
const=empty_list),
|
| 37 |
+
'attributeName': SVGAttribute('attributeName', anim=False,
|
| 38 |
+
types=frozenset(['name']),
|
| 39 |
+
const=empty_list),
|
| 40 |
+
'attributeType': SVGAttribute('attributeType', anim=False,
|
| 41 |
+
types=empty_list,
|
| 42 |
+
const=frozenset(['XML', 'CSS', 'auto'])),
|
| 43 |
+
'audio-level': SVGAttribute('audio-level', anim=True,
|
| 44 |
+
types=frozenset(['number']),
|
| 45 |
+
const=frozenset(['inherit'])),
|
| 46 |
+
'bandwidth': SVGAttribute('bandwidth', anim=False,
|
| 47 |
+
types=frozenset(['number']),
|
| 48 |
+
const=frozenset(['auto'])),
|
| 49 |
+
'baseProfile': SVGAttribute('baseProfile', anim=False,
|
| 50 |
+
types=empty_list,
|
| 51 |
+
const=frozenset(['none', 'tiny', 'basic', 'full'])),
|
| 52 |
+
'bbox': SVGAttribute('bbox', anim=False,
|
| 53 |
+
types=frozenset(['string']),
|
| 54 |
+
const=empty_list),
|
| 55 |
+
'begin': SVGAttribute('begin', anim=False,
|
| 56 |
+
types=frozenset(['timing-value-list']),
|
| 57 |
+
const=frozenset(['indefinite'])),
|
| 58 |
+
'buffered-rendering': SVGAttribute('buffered-rendering', anim=True,
|
| 59 |
+
types=empty_list,
|
| 60 |
+
const=frozenset(['auto', 'dynamic', 'static', 'inherit'])),
|
| 61 |
+
'by': SVGAttribute('by', anim=False,
|
| 62 |
+
types=frozenset(['string']),
|
| 63 |
+
const=empty_list),
|
| 64 |
+
'calcMode': SVGAttribute('calcMode', anim=False,
|
| 65 |
+
types=empty_list,
|
| 66 |
+
const=frozenset(['discrete', 'linear', 'paced', 'spline'])),
|
| 67 |
+
'cap-height': SVGAttribute('cap-height', anim=False,
|
| 68 |
+
types=frozenset(['number']),
|
| 69 |
+
const=empty_list),
|
| 70 |
+
'class': SVGAttribute('class', anim=True,
|
| 71 |
+
types=frozenset(['list-of-name']),
|
| 72 |
+
const=empty_list),
|
| 73 |
+
'color': SVGAttribute('color', anim=True,
|
| 74 |
+
types=frozenset(['color']),
|
| 75 |
+
const=frozenset(['inherit'])),
|
| 76 |
+
'color-rendering': SVGAttribute('color-rendering', anim=True,
|
| 77 |
+
types=empty_list,
|
| 78 |
+
const=frozenset(['auto', 'optimizeSpeed', 'optimizeQuality', 'inherit'])),
|
| 79 |
+
'content': SVGAttribute('content', anim=True,
|
| 80 |
+
types=frozenset(['string']),
|
| 81 |
+
const=empty_list),
|
| 82 |
+
'contentScriptType': SVGAttribute('contentScriptType', anim=False,
|
| 83 |
+
types=frozenset(['content-type']),
|
| 84 |
+
const=empty_list),
|
| 85 |
+
'cx': SVGAttribute('cx', anim=True,
|
| 86 |
+
types=frozenset(['coordinate']),
|
| 87 |
+
const=empty_list),
|
| 88 |
+
'cy': SVGAttribute('cy', anim=True,
|
| 89 |
+
types=frozenset(['coordinate']),
|
| 90 |
+
const=empty_list),
|
| 91 |
+
'd': SVGAttribute('d', anim=True,
|
| 92 |
+
types=frozenset(['path-data']),
|
| 93 |
+
const=empty_list),
|
| 94 |
+
'datatype': SVGAttribute('datatype', anim=True,
|
| 95 |
+
types=frozenset(['string']),
|
| 96 |
+
const=empty_list),
|
| 97 |
+
'defaultAction': SVGAttribute('defaultAction', anim=False,
|
| 98 |
+
types=empty_list,
|
| 99 |
+
const=frozenset(['perform', 'cancel'])),
|
| 100 |
+
'descent': SVGAttribute('descent', anim=False,
|
| 101 |
+
types=frozenset(['number']),
|
| 102 |
+
const=empty_list),
|
| 103 |
+
'direction': SVGAttribute('direction', anim=False,
|
| 104 |
+
types=empty_list,
|
| 105 |
+
const=frozenset(['ltr', 'rtl', 'inherit'])),
|
| 106 |
+
'display': SVGAttribute('display', anim=True,
|
| 107 |
+
types=empty_list,
|
| 108 |
+
const=frozenset(['inline', 'block', 'list-item', 'run-in', 'compact',
|
| 109 |
+
'marker', 'table', 'inline-table', 'table-row-group',
|
| 110 |
+
'table-header-group', 'table-footer-group', 'table-row',
|
| 111 |
+
'table-column-group', 'table-column', 'table-cell',
|
| 112 |
+
'table-caption', 'none', 'inherit'])),
|
| 113 |
+
'display-align': SVGAttribute('display-align', anim=True,
|
| 114 |
+
types=empty_list,
|
| 115 |
+
const=frozenset(['auto', 'before', 'center', 'after', 'inherit'])),
|
| 116 |
+
'dur': SVGAttribute('dur', anim=False,
|
| 117 |
+
types=frozenset(['time']),
|
| 118 |
+
const=frozenset(['media', 'indefinite'])),
|
| 119 |
+
'editable': SVGAttribute('editable', anim=True,
|
| 120 |
+
types=empty_list,
|
| 121 |
+
const=frozenset(['none', 'simple'])),
|
| 122 |
+
'end': SVGAttribute('end', anim=False,
|
| 123 |
+
types=frozenset(['timing-value-list']),
|
| 124 |
+
const=frozenset(['indefinite'])),
|
| 125 |
+
'ev:event': SVGAttribute('ev:event', anim=False,
|
| 126 |
+
types=frozenset(['XML-Name']),
|
| 127 |
+
const=empty_list),
|
| 128 |
+
'event': SVGAttribute('event', anim=False,
|
| 129 |
+
types=frozenset(['XML-Name']),
|
| 130 |
+
const=empty_list),
|
| 131 |
+
'externalResourcesRequired': SVGAttribute('externalResourcesRequired', anim=False,
|
| 132 |
+
types=frozenset(['boolean']),
|
| 133 |
+
const=empty_list),
|
| 134 |
+
'fill': SVGMultiAttribute({
|
| 135 |
+
'*': SVGAttribute(
|
| 136 |
+
'fill', anim=True,
|
| 137 |
+
types=frozenset(['paint']),
|
| 138 |
+
const=frozenset(['inherit'])),
|
| 139 |
+
'set animateMotion animate animateColor animateTransform': SVGAttribute(
|
| 140 |
+
'fill', anim=False,
|
| 141 |
+
types=empty_list,
|
| 142 |
+
const=frozenset(['freeze', 'remove']))
|
| 143 |
+
}),
|
| 144 |
+
'fill-opacity': SVGAttribute('fill-opacity', anim=True,
|
| 145 |
+
types=frozenset(['number']),
|
| 146 |
+
const=frozenset(['inherit'])),
|
| 147 |
+
'fill-rule': SVGAttribute('fill-rule', anim=True,
|
| 148 |
+
types=empty_list,
|
| 149 |
+
const=frozenset(['nonzero', 'evenodd', 'inherit'])),
|
| 150 |
+
'focusHighlight': SVGAttribute('focusHighlight', anim=True,
|
| 151 |
+
types=empty_list,
|
| 152 |
+
const=frozenset(['auto', 'none'])),
|
| 153 |
+
'focusable': SVGAttribute('focusable', anim=True,
|
| 154 |
+
types=frozenset(['boolean']),
|
| 155 |
+
const=frozenset(['auto'])),
|
| 156 |
+
'font-family': SVGAttribute('font-family', anim=True,
|
| 157 |
+
types=frozenset(['string']),
|
| 158 |
+
const=frozenset(['inherit'])),
|
| 159 |
+
'font-size': SVGAttribute('font-size', anim=True,
|
| 160 |
+
types=frozenset(['length']),
|
| 161 |
+
const=frozenset(['inherit'])),
|
| 162 |
+
'font-stretch': SVGAttribute('font-stretch', anim=False,
|
| 163 |
+
types=empty_list,
|
| 164 |
+
const=frozenset(['condensed', 'normal', 'ultra-condensed', 'expanded',
|
| 165 |
+
'narrower', 'inherit', 'semi-condensed', 'extra-condensed',
|
| 166 |
+
'ultra-expanded', 'wider', 'semi-expanded', 'extra-expanded'])),
|
| 167 |
+
'font-style': SVGAttribute('font-style', anim=True,
|
| 168 |
+
types=empty_list,
|
| 169 |
+
const=frozenset(['normal', 'italic', 'oblique', 'inherit'])),
|
| 170 |
+
'font-variant': SVGAttribute('font-variant', anim=True,
|
| 171 |
+
types=empty_list,
|
| 172 |
+
const=frozenset(['normal', 'small-caps', 'inherit'])),
|
| 173 |
+
'font-weight': SVGAttribute('font-weight', anim=True,
|
| 174 |
+
types=empty_list,
|
| 175 |
+
const=frozenset(['normal', 'bold', 'bolder', 'lighter', '100', '200',
|
| 176 |
+
'300', '400', '500', '600', '700', '800', '900',
|
| 177 |
+
'inherit'])),
|
| 178 |
+
'from': SVGAttribute('from', anim=False,
|
| 179 |
+
types=frozenset(['string']),
|
| 180 |
+
const=empty_list),
|
| 181 |
+
'g1': SVGAttribute('g1', anim=False,
|
| 182 |
+
types=frozenset(['list-of-name']),
|
| 183 |
+
const=empty_list),
|
| 184 |
+
'g2': SVGAttribute('g2', anim=False,
|
| 185 |
+
types=frozenset(['list-of-name']),
|
| 186 |
+
const=empty_list),
|
| 187 |
+
'glyph-name': SVGAttribute('glyph-name', anim=False,
|
| 188 |
+
types=frozenset(['list-of-name']),
|
| 189 |
+
const=empty_list),
|
| 190 |
+
'gradientUnits': SVGAttribute('gradientUnits', anim=True,
|
| 191 |
+
types=empty_list,
|
| 192 |
+
const=frozenset(['userSpaceOnUse', 'objectBoundingBox'])),
|
| 193 |
+
'handler': SVGAttribute('handler', anim=False,
|
| 194 |
+
types=frozenset(['IRI']),
|
| 195 |
+
const=empty_list),
|
| 196 |
+
'hanging': SVGAttribute('hanging', anim=False,
|
| 197 |
+
types=frozenset(['number']),
|
| 198 |
+
const=empty_list),
|
| 199 |
+
'height': SVGMultiAttribute({
|
| 200 |
+
'*': SVGAttribute(
|
| 201 |
+
'height', anim=True,
|
| 202 |
+
types=frozenset(['length']),
|
| 203 |
+
const=empty_list),
|
| 204 |
+
'textArea': SVGAttribute(
|
| 205 |
+
'height', anim=True,
|
| 206 |
+
types=frozenset(['length']),
|
| 207 |
+
const=frozenset(['auto'])),
|
| 208 |
+
}),
|
| 209 |
+
'horiz-adv-x': SVGAttribute('horiz-adv-x', anim=False,
|
| 210 |
+
types=frozenset(['number']),
|
| 211 |
+
const=empty_list),
|
| 212 |
+
'horiz-origin-x': SVGAttribute('horiz-origin-x', anim=False,
|
| 213 |
+
types=frozenset(['number']),
|
| 214 |
+
const=empty_list),
|
| 215 |
+
'id': SVGAttribute('id', anim=False,
|
| 216 |
+
types=frozenset(['name']),
|
| 217 |
+
const=empty_list),
|
| 218 |
+
'ideographic': SVGAttribute('ideographic', anim=False,
|
| 219 |
+
types=frozenset(['number']),
|
| 220 |
+
const=empty_list),
|
| 221 |
+
'image-rendering': SVGAttribute('image-rendering', anim=True,
|
| 222 |
+
types=empty_list,
|
| 223 |
+
const=frozenset(['auto', 'optimizeSpeed', 'optimizeQuality', 'inherit'])),
|
| 224 |
+
'initialVisibility': SVGAttribute('initialVisibility', anim=False,
|
| 225 |
+
types=empty_list,
|
| 226 |
+
const=frozenset(['whenStarted', 'always'])),
|
| 227 |
+
'k': SVGAttribute('k', anim=False,
|
| 228 |
+
types=frozenset(['number']),
|
| 229 |
+
const=empty_list),
|
| 230 |
+
'keyPoints': SVGAttribute('keyPoints', anim=False,
|
| 231 |
+
types=frozenset(['semicolon-list']),
|
| 232 |
+
const=empty_list),
|
| 233 |
+
'keySplines': SVGAttribute('keySplines', anim=False,
|
| 234 |
+
types=frozenset(['semicolon-list']),
|
| 235 |
+
const=empty_list),
|
| 236 |
+
'keyTimes': SVGAttribute('keyTimes', anim=False,
|
| 237 |
+
types=frozenset(['semicolon-list']),
|
| 238 |
+
const=empty_list),
|
| 239 |
+
'lang': SVGAttribute('lang', anim=False,
|
| 240 |
+
types=frozenset(['list-of-name']),
|
| 241 |
+
const=empty_list),
|
| 242 |
+
'line-increment': SVGAttribute('line-increment', anim=True,
|
| 243 |
+
types=frozenset(['number']),
|
| 244 |
+
const=frozenset(['auto', 'inherit'])),
|
| 245 |
+
'mathematical': SVGAttribute('mathematical', anim=False,
|
| 246 |
+
types=frozenset(['number']),
|
| 247 |
+
const=empty_list),
|
| 248 |
+
'max': SVGAttribute('max', anim=False,
|
| 249 |
+
types=frozenset(['time']),
|
| 250 |
+
const=frozenset(['media'])),
|
| 251 |
+
'mediaCharacterEncoding': SVGAttribute('mediaCharacterEncoding', anim=False,
|
| 252 |
+
types=frozenset(['string']),
|
| 253 |
+
const=empty_list),
|
| 254 |
+
'mediaContentEncodings': SVGAttribute('mediaContentEncodings', anim=False,
|
| 255 |
+
types=frozenset(['string']),
|
| 256 |
+
const=empty_list),
|
| 257 |
+
'mediaSize': SVGAttribute('mediaSize', anim=False,
|
| 258 |
+
types=frozenset(['number']),
|
| 259 |
+
const=empty_list),
|
| 260 |
+
'mediaTime': SVGAttribute('mediaTime', anim=False,
|
| 261 |
+
types=frozenset(['time']),
|
| 262 |
+
const=empty_list),
|
| 263 |
+
'min': SVGAttribute('min', anim=False,
|
| 264 |
+
types=frozenset(['time']),
|
| 265 |
+
const=frozenset(['media'])),
|
| 266 |
+
'nav-down': SVGAttribute('nav-down', anim=True,
|
| 267 |
+
types=frozenset(['focus']),
|
| 268 |
+
const=empty_list),
|
| 269 |
+
'nav-down-left': SVGAttribute('nav-down-left', anim=True,
|
| 270 |
+
types=frozenset(['focus']),
|
| 271 |
+
const=empty_list),
|
| 272 |
+
'nav-down-right': SVGAttribute('nav-down-right', anim=True,
|
| 273 |
+
types=frozenset(['focus']),
|
| 274 |
+
const=empty_list),
|
| 275 |
+
'nav-left': SVGAttribute('nav-left', anim=True,
|
| 276 |
+
types=frozenset(['focus']),
|
| 277 |
+
const=empty_list),
|
| 278 |
+
'nav-next': SVGAttribute('nav-next', anim=True,
|
| 279 |
+
types=frozenset(['focus']),
|
| 280 |
+
const=empty_list),
|
| 281 |
+
'nav-prev': SVGAttribute('nav-prev', anim=True,
|
| 282 |
+
types=frozenset(['focus']),
|
| 283 |
+
const=empty_list),
|
| 284 |
+
'nav-right': SVGAttribute('nav-right', anim=True,
|
| 285 |
+
types=frozenset(['focus']),
|
| 286 |
+
const=empty_list),
|
| 287 |
+
'nav-up': SVGAttribute('nav-up', anim=True,
|
| 288 |
+
types=frozenset(['focus']),
|
| 289 |
+
const=empty_list),
|
| 290 |
+
'nav-up-left': SVGAttribute('nav-up-left', anim=True,
|
| 291 |
+
types=frozenset(['focus']),
|
| 292 |
+
const=empty_list),
|
| 293 |
+
'nav-up-right': SVGAttribute('nav-up-right', anim=True,
|
| 294 |
+
types=frozenset(['focus']),
|
| 295 |
+
const=empty_list),
|
| 296 |
+
'observer': SVGAttribute('observer', anim=False,
|
| 297 |
+
types=frozenset(['IDREF']),
|
| 298 |
+
const=empty_list),
|
| 299 |
+
'offset': SVGAttribute('offset', anim=True,
|
| 300 |
+
types=frozenset(['number']),
|
| 301 |
+
const=empty_list),
|
| 302 |
+
'opacity': SVGAttribute('opacity', anim=True,
|
| 303 |
+
types=frozenset(['number']),
|
| 304 |
+
const=frozenset(['inherit'])),
|
| 305 |
+
'origin': SVGAttribute('origin', anim=False,
|
| 306 |
+
types=empty_list,
|
| 307 |
+
const=frozenset(['default'])),
|
| 308 |
+
'overlay': SVGAttribute('overlay', anim=False,
|
| 309 |
+
types=empty_list,
|
| 310 |
+
const=frozenset(['none', 'top'])),
|
| 311 |
+
'overline-position': SVGAttribute('overline-position', anim=False,
|
| 312 |
+
types=frozenset(['number']),
|
| 313 |
+
const=empty_list),
|
| 314 |
+
'overline-thickness': SVGAttribute('overline-thickness', anim=False,
|
| 315 |
+
types=frozenset(['number']),
|
| 316 |
+
const=empty_list),
|
| 317 |
+
'panose-1': SVGAttribute('panose-1', anim=False,
|
| 318 |
+
types=frozenset(['list-of-integer']),
|
| 319 |
+
const=empty_list),
|
| 320 |
+
'path': SVGAttribute('path', anim=False,
|
| 321 |
+
types=frozenset(['path-data']),
|
| 322 |
+
const=empty_list),
|
| 323 |
+
'pathLength': SVGAttribute('pathLength', anim=True,
|
| 324 |
+
types=frozenset(['number']),
|
| 325 |
+
const=empty_list),
|
| 326 |
+
'phase': SVGAttribute('phase', anim=False,
|
| 327 |
+
types=empty_list,
|
| 328 |
+
const=frozenset(['default', 'capture'])),
|
| 329 |
+
'playbackOrder': SVGAttribute('playbackOrder', anim=False,
|
| 330 |
+
types=empty_list,
|
| 331 |
+
const=frozenset(['all', 'forwardOnly'])),
|
| 332 |
+
'pointer-events': SVGAttribute('pointer-events', anim=True,
|
| 333 |
+
types=empty_list,
|
| 334 |
+
const=frozenset(['visiblePainted', 'visibleFill', 'visibleStroke', 'visible',
|
| 335 |
+
'painted', 'fill', 'stroke', 'all', 'none', 'inherit'])),
|
| 336 |
+
'points': SVGAttribute('points', anim=True,
|
| 337 |
+
types=frozenset(['list-of-number']),
|
| 338 |
+
const=empty_list),
|
| 339 |
+
'preserveAspectRatio': SVGAttribute('preserveAspectRatio', anim=True,
|
| 340 |
+
types=frozenset(['string']),
|
| 341 |
+
const=empty_list),
|
| 342 |
+
'propagate': SVGAttribute('propagate', anim=False,
|
| 343 |
+
types=empty_list,
|
| 344 |
+
const=frozenset(['continue', 'stop'])),
|
| 345 |
+
'property': SVGAttribute('property', anim=True,
|
| 346 |
+
types=frozenset(['string']),
|
| 347 |
+
const=empty_list),
|
| 348 |
+
'r': SVGAttribute('r', anim=True,
|
| 349 |
+
types=frozenset(['length']),
|
| 350 |
+
const=empty_list),
|
| 351 |
+
'rel': SVGAttribute('rel', anim=True,
|
| 352 |
+
types=frozenset(['string']),
|
| 353 |
+
const=empty_list),
|
| 354 |
+
'repeatCount': SVGAttribute('repeatCount', anim=False,
|
| 355 |
+
types=frozenset(['number']),
|
| 356 |
+
const=frozenset(['indefinite'])),
|
| 357 |
+
'repeatDur': SVGAttribute('repeatDur', anim=False,
|
| 358 |
+
types=frozenset(['time']),
|
| 359 |
+
const=frozenset(['indefinite'])),
|
| 360 |
+
'requiredExtensions': SVGAttribute('requiredExtensions', anim=False,
|
| 361 |
+
types=frozenset(['list-of-IRI']),
|
| 362 |
+
const=empty_list),
|
| 363 |
+
'requiredFeatures': SVGAttribute('requiredFeatures', anim=False,
|
| 364 |
+
types=frozenset(['list-of-IRI']),
|
| 365 |
+
const=empty_list),
|
| 366 |
+
'requiredFonts': SVGAttribute('requiredFonts', anim=False,
|
| 367 |
+
types=frozenset(['string']),
|
| 368 |
+
const=empty_list),
|
| 369 |
+
'requiredFormats': SVGAttribute('requiredFormats', anim=False,
|
| 370 |
+
types=frozenset(['anything']),
|
| 371 |
+
const=empty_list),
|
| 372 |
+
'resource': SVGAttribute('resource', anim=True,
|
| 373 |
+
types=frozenset(['string']),
|
| 374 |
+
const=empty_list),
|
| 375 |
+
'restart': SVGAttribute('restart', anim=False,
|
| 376 |
+
types=empty_list,
|
| 377 |
+
const=frozenset(['always', 'never', 'whenNotActive'])),
|
| 378 |
+
'rev': SVGAttribute('rev', anim=True,
|
| 379 |
+
types=frozenset(['string']),
|
| 380 |
+
const=empty_list),
|
| 381 |
+
'role': SVGAttribute('role', anim=True,
|
| 382 |
+
types=frozenset(['string']),
|
| 383 |
+
const=empty_list),
|
| 384 |
+
'rotate': SVGAttribute('rotate', anim=True,
|
| 385 |
+
types=frozenset(['list-of-number']),
|
| 386 |
+
const=empty_list),
|
| 387 |
+
'rx': SVGAttribute('rx', anim=True,
|
| 388 |
+
types=frozenset(['length']),
|
| 389 |
+
const=empty_list),
|
| 390 |
+
'ry': SVGAttribute('ry', anim=True,
|
| 391 |
+
types=frozenset(['length']),
|
| 392 |
+
const=empty_list),
|
| 393 |
+
'shape-rendering': SVGAttribute('shape-rendering', anim=True,
|
| 394 |
+
types=empty_list,
|
| 395 |
+
const=frozenset(['auto', 'optimizeSpeed', 'crispEdges', 'geometricPrecision', 'inherit'])),
|
| 396 |
+
'slope': SVGAttribute('slope', anim=False,
|
| 397 |
+
types=frozenset(['number']),
|
| 398 |
+
const=empty_list),
|
| 399 |
+
'snapshotTime': SVGAttribute('snapshotTime', anim=False,
|
| 400 |
+
types=frozenset(['time']),
|
| 401 |
+
const=frozenset(['none'])),
|
| 402 |
+
'solid-color': SVGAttribute('solid-color', anim=True,
|
| 403 |
+
types=frozenset(['color']),
|
| 404 |
+
const=frozenset(['currentColor', 'inherit'])),
|
| 405 |
+
'solid-opacity': SVGAttribute('solid-opacity', anim=True,
|
| 406 |
+
types=frozenset(['number']),
|
| 407 |
+
const=frozenset(['inherit'])),
|
| 408 |
+
'stemh': SVGAttribute('stemh', anim=False,
|
| 409 |
+
types=frozenset(['number']),
|
| 410 |
+
const=empty_list),
|
| 411 |
+
'stemv': SVGAttribute('stemv', anim=False,
|
| 412 |
+
types=frozenset(['number']),
|
| 413 |
+
const=empty_list),
|
| 414 |
+
'stop-color': SVGAttribute('stop-color', anim=True,
|
| 415 |
+
types=frozenset(['color']),
|
| 416 |
+
const=frozenset(['inherit'])),
|
| 417 |
+
'stop-opacity': SVGAttribute('stop-opacity', anim=True,
|
| 418 |
+
types=frozenset(['number']),
|
| 419 |
+
const=frozenset(['inherit'])),
|
| 420 |
+
'strikethrough-position': SVGAttribute('strikethrough-position', anim=False,
|
| 421 |
+
types=frozenset(['number']),
|
| 422 |
+
const=empty_list),
|
| 423 |
+
'strikethrough-thickness': SVGAttribute('strikethrough-thickness', anim=False,
|
| 424 |
+
types=frozenset(['number']),
|
| 425 |
+
const=empty_list),
|
| 426 |
+
'stroke': SVGAttribute('stroke', anim=True,
|
| 427 |
+
types=frozenset(['paint']),
|
| 428 |
+
const=frozenset(['inherit'])),
|
| 429 |
+
'stroke-dasharray': SVGAttribute('stroke-dasharray', anim=True,
|
| 430 |
+
types=frozenset(['list-of-length']),
|
| 431 |
+
const=frozenset(['none', 'inherit'])),
|
| 432 |
+
'stroke-dashoffset': SVGAttribute('stroke-dashoffset', anim=True,
|
| 433 |
+
types=frozenset(['length']),
|
| 434 |
+
const=frozenset(['inherit'])),
|
| 435 |
+
'stroke-linecap': SVGAttribute('stroke-linecap', anim=True,
|
| 436 |
+
types=empty_list,
|
| 437 |
+
const=frozenset(['butt', 'round', 'square', 'inherit'])),
|
| 438 |
+
'stroke-linejoin': SVGAttribute('stroke-linejoin', anim=True,
|
| 439 |
+
types=empty_list,
|
| 440 |
+
const=frozenset(['miter', 'round', 'bevel', 'inherit'])),
|
| 441 |
+
'stroke-miterlimit': SVGAttribute('stroke-miterlimit', anim=True,
|
| 442 |
+
types=frozenset(['number']),
|
| 443 |
+
const=frozenset(['inherit'])),
|
| 444 |
+
'stroke-opacity': SVGAttribute('stroke-opacity', anim=True,
|
| 445 |
+
types=frozenset(['number']),
|
| 446 |
+
const=frozenset(['inherit'])),
|
| 447 |
+
'stroke-width': SVGAttribute('stroke-width', anim=True,
|
| 448 |
+
types=frozenset(['length']),
|
| 449 |
+
const=frozenset(['inherit'])),
|
| 450 |
+
'syncBehavior': SVGAttribute('syncBehavior', anim=False,
|
| 451 |
+
types=empty_list,
|
| 452 |
+
const=frozenset(['canSlip', 'locked', 'independent', 'default'])),
|
| 453 |
+
'syncBehaviorDefault': SVGAttribute('syncBehaviorDefault', anim=False,
|
| 454 |
+
types=empty_list,
|
| 455 |
+
const=frozenset(['canSlip', 'locked', 'independent', 'inherit'])),
|
| 456 |
+
'syncMaster': SVGAttribute('syncMaster', anim=False,
|
| 457 |
+
types=frozenset(['boolean']),
|
| 458 |
+
const=empty_list),
|
| 459 |
+
'syncTolerance': SVGAttribute('syncTolerance', anim=False,
|
| 460 |
+
types=frozenset(['time']),
|
| 461 |
+
const=frozenset(['default'])),
|
| 462 |
+
'syncToleranceDefault': SVGAttribute('syncToleranceDefault', anim=False,
|
| 463 |
+
types=frozenset(['time']),
|
| 464 |
+
const=frozenset(['inherit'])),
|
| 465 |
+
'systemLanguage': SVGAttribute('systemLanguage', anim=False,
|
| 466 |
+
types=frozenset(['string']),
|
| 467 |
+
const=empty_list),
|
| 468 |
+
'target': SVGMultiAttribute({
|
| 469 |
+
'* a': SVGAttribute(
|
| 470 |
+
'target', anim=True,
|
| 471 |
+
types=frozenset(['XML-Name']),
|
| 472 |
+
const=frozenset(['_replace', '_self', '_parent', '_top', '_blank'])),
|
| 473 |
+
'listener': SVGAttribute(
|
| 474 |
+
'target', anim=False,
|
| 475 |
+
types=frozenset(['XML-Name']),
|
| 476 |
+
const=empty_list),
|
| 477 |
+
}),
|
| 478 |
+
'text-align': SVGAttribute('text-align', anim=True,
|
| 479 |
+
types=empty_list,
|
| 480 |
+
const=frozenset(['start', 'center', 'end', 'inherit'])),
|
| 481 |
+
'text-anchor': SVGAttribute('text-anchor', anim=True,
|
| 482 |
+
types=empty_list,
|
| 483 |
+
const=frozenset(['start', 'middle', 'end', 'inherit'])),
|
| 484 |
+
'text-rendering': SVGAttribute('text-rendering', anim=True,
|
| 485 |
+
types=empty_list,
|
| 486 |
+
const=frozenset(['auto', 'optimizeSpeed', 'optimizeLegibility', 'geometricPrecision', 'inherit'])),
|
| 487 |
+
'timelineBegin': SVGAttribute('timelineBegin', anim=False,
|
| 488 |
+
types=empty_list,
|
| 489 |
+
const=frozenset(['onLoad', 'onStart'])),
|
| 490 |
+
'to': SVGAttribute('to', anim=False,
|
| 491 |
+
types=frozenset(['string']),
|
| 492 |
+
const=empty_list),
|
| 493 |
+
'transform': SVGAttribute('transform', anim=True,
|
| 494 |
+
types=frozenset(['transform-list']),
|
| 495 |
+
const=frozenset(['none'])),
|
| 496 |
+
'transformBehavior': SVGAttribute('transformBehavior', anim=False,
|
| 497 |
+
types=empty_list,
|
| 498 |
+
const=frozenset(['geometric', 'pinned', 'pinned90', 'pinned180', 'pinned270'])),
|
| 499 |
+
'type': SVGMultiAttribute({
|
| 500 |
+
'* audio image video': SVGAttribute(
|
| 501 |
+
'type', anim=True,
|
| 502 |
+
types=frozenset(['content-type']),
|
| 503 |
+
const=empty_list),
|
| 504 |
+
'handler script': SVGAttribute(
|
| 505 |
+
'type', anim=False,
|
| 506 |
+
types=frozenset(['content-type']),
|
| 507 |
+
const=empty_list),
|
| 508 |
+
'animateTransform': SVGAttribute(
|
| 509 |
+
'type', anim=False,
|
| 510 |
+
types=empty_list,
|
| 511 |
+
const=frozenset(['translate', 'scale', 'rotate', 'skewX', 'skewY'])),
|
| 512 |
+
}),
|
| 513 |
+
'typeof': SVGAttribute('typeof', anim=True,
|
| 514 |
+
types=frozenset(['string']),
|
| 515 |
+
const=empty_list),
|
| 516 |
+
'u1': SVGAttribute('u1', anim=False,
|
| 517 |
+
types=frozenset(['string']),
|
| 518 |
+
const=empty_list),
|
| 519 |
+
'u2': SVGAttribute('u2', anim=False,
|
| 520 |
+
types=frozenset(['string']),
|
| 521 |
+
const=empty_list),
|
| 522 |
+
'underline-position': SVGAttribute('underline-position', anim=False,
|
| 523 |
+
types=frozenset(['number']),
|
| 524 |
+
const=empty_list),
|
| 525 |
+
'underline-thickness': SVGAttribute('underline-thickness', anim=False,
|
| 526 |
+
types=frozenset(['number']),
|
| 527 |
+
const=empty_list),
|
| 528 |
+
'unicode': SVGAttribute('unicode', anim=False,
|
| 529 |
+
types=frozenset(['string']),
|
| 530 |
+
const=empty_list),
|
| 531 |
+
'unicode-bidi': SVGAttribute('unicode-bidi', anim=False,
|
| 532 |
+
types=empty_list,
|
| 533 |
+
const=frozenset(['normal', 'embed', 'bidi-override', 'inherit'])),
|
| 534 |
+
'unicode-range': SVGAttribute('unicode-range', anim=False,
|
| 535 |
+
types=frozenset(['string']),
|
| 536 |
+
const=empty_list),
|
| 537 |
+
'units-per-em': SVGAttribute('units-per-em', anim=False,
|
| 538 |
+
types=frozenset(['number']),
|
| 539 |
+
const=empty_list),
|
| 540 |
+
'values': SVGAttribute('values', anim=False,
|
| 541 |
+
types=frozenset(['list-of-number']),
|
| 542 |
+
const=empty_list),
|
| 543 |
+
'vector-effect': SVGAttribute('vector-effect', anim=True,
|
| 544 |
+
types=empty_list,
|
| 545 |
+
const=frozenset(['none', 'non-scaling-stroke', 'inherit'])),
|
| 546 |
+
'version': SVGAttribute('version', anim=False,
|
| 547 |
+
types=empty_list,
|
| 548 |
+
const=frozenset(['1.1', '1.2'])),
|
| 549 |
+
'viewBox': SVGAttribute('viewBox', anim=True,
|
| 550 |
+
types=frozenset(['four-numbers']),
|
| 551 |
+
const=empty_list),
|
| 552 |
+
'viewport-fill': SVGAttribute('viewport-fill', anim=True,
|
| 553 |
+
types=frozenset(['color']),
|
| 554 |
+
const=frozenset(['none', 'inherit'])),
|
| 555 |
+
'viewport-fill-opacity': SVGAttribute('viewport-fill-opacity', anim=True,
|
| 556 |
+
types=frozenset(['number']),
|
| 557 |
+
const=frozenset(['inherit'])),
|
| 558 |
+
'visibility': SVGAttribute('visibility', anim=True,
|
| 559 |
+
types=empty_list,
|
| 560 |
+
const=frozenset(['visible', 'hidden', 'inherit'])),
|
| 561 |
+
'width': SVGMultiAttribute({
|
| 562 |
+
'*': SVGAttribute(
|
| 563 |
+
'width', anim=True,
|
| 564 |
+
types=frozenset(['length']),
|
| 565 |
+
const=empty_list),
|
| 566 |
+
'textArea': SVGAttribute(
|
| 567 |
+
'width', anim=True,
|
| 568 |
+
types=frozenset(['length']),
|
| 569 |
+
const=frozenset(['auto'])),
|
| 570 |
+
}),
|
| 571 |
+
'widths': SVGAttribute('widths', anim=False,
|
| 572 |
+
types=frozenset(['string']),
|
| 573 |
+
const=empty_list),
|
| 574 |
+
'x': SVGMultiAttribute({
|
| 575 |
+
'*': SVGAttribute(
|
| 576 |
+
'x', anim=True,
|
| 577 |
+
types=frozenset(['coordinate']),
|
| 578 |
+
const=empty_list),
|
| 579 |
+
'text': SVGAttribute(
|
| 580 |
+
'x', anim=True,
|
| 581 |
+
types=frozenset(['list-of-coordinate']),
|
| 582 |
+
const=empty_list),
|
| 583 |
+
}),
|
| 584 |
+
'x-height': SVGAttribute('x-height', anim=False,
|
| 585 |
+
types=frozenset(['number']),
|
| 586 |
+
const=empty_list),
|
| 587 |
+
'x1': SVGAttribute('x1', anim=True,
|
| 588 |
+
types=frozenset(['coordinate']),
|
| 589 |
+
const=empty_list),
|
| 590 |
+
'x2': SVGAttribute('x2', anim=True,
|
| 591 |
+
types=frozenset(['coordinate']),
|
| 592 |
+
const=empty_list),
|
| 593 |
+
'xlink:actuate': SVGMultiAttribute({
|
| 594 |
+
'*': SVGAttribute(
|
| 595 |
+
'xlink:actuate', anim=False,
|
| 596 |
+
types=empty_list,
|
| 597 |
+
const=frozenset(['onLoad'])),
|
| 598 |
+
'a': SVGAttribute(
|
| 599 |
+
'xlink:actuate', anim=False,
|
| 600 |
+
types=empty_list,
|
| 601 |
+
const=frozenset(['onRequest'])),
|
| 602 |
+
}),
|
| 603 |
+
'xlink:arcrole': SVGAttribute('xlink:arcrole', anim=False,
|
| 604 |
+
types=frozenset(['IRI']),
|
| 605 |
+
const=empty_list),
|
| 606 |
+
'xlink:href': SVGAttribute('xlink:href', anim=True,
|
| 607 |
+
types=frozenset(['IRI']),
|
| 608 |
+
const=empty_list),
|
| 609 |
+
'xlink:role': SVGAttribute('xlink:role', anim=False,
|
| 610 |
+
types=frozenset(['IRI']),
|
| 611 |
+
const=empty_list),
|
| 612 |
+
'xlink:show': SVGMultiAttribute({
|
| 613 |
+
'*': SVGAttribute(
|
| 614 |
+
'xlink:show', anim=False,
|
| 615 |
+
types=empty_list,
|
| 616 |
+
const=frozenset(['other'])),
|
| 617 |
+
'animation audio foreignObject image use video': SVGAttribute(
|
| 618 |
+
'xlink:show', anim=False,
|
| 619 |
+
types=empty_list,
|
| 620 |
+
const=frozenset(['embed'])),
|
| 621 |
+
'a': SVGAttribute(
|
| 622 |
+
'xlink:show', anim=False,
|
| 623 |
+
types=empty_list,
|
| 624 |
+
const=frozenset(['new', 'replace'])),
|
| 625 |
+
}),
|
| 626 |
+
'xlink:title': SVGAttribute('xlink:title', anim=False,
|
| 627 |
+
types=frozenset(['string']),
|
| 628 |
+
const=empty_list),
|
| 629 |
+
'xlink:type': SVGAttribute('xlink:type', anim=True,
|
| 630 |
+
types=empty_list,
|
| 631 |
+
const=frozenset(['simple'])),
|
| 632 |
+
'xmlns': SVGAttribute('xmlns', anim=False,
|
| 633 |
+
types=frozenset(['IRI']),
|
| 634 |
+
const=empty_list),
|
| 635 |
+
'xmlns:xlink': SVGAttribute('xmlns:xlink', anim=False,
|
| 636 |
+
types=frozenset(['IRI']),
|
| 637 |
+
const=empty_list),
|
| 638 |
+
'xmlns:ev': SVGAttribute('xmlns:ev', anim=False,
|
| 639 |
+
types=frozenset(['IRI']),
|
| 640 |
+
const=empty_list),
|
| 641 |
+
'xml:base': SVGAttribute('xml:base', anim=False,
|
| 642 |
+
types=frozenset(['IRI']),
|
| 643 |
+
const=empty_list),
|
| 644 |
+
'xml:id': SVGAttribute('xml:id', anim=False,
|
| 645 |
+
types=frozenset(['name']),
|
| 646 |
+
const=empty_list),
|
| 647 |
+
'xml:lang': SVGAttribute('xml:lang', anim=False,
|
| 648 |
+
types=frozenset(['name']),
|
| 649 |
+
const=empty_list),
|
| 650 |
+
'xml:space': SVGMultiAttribute({
|
| 651 |
+
'*': SVGAttribute(
|
| 652 |
+
'xml:space', anim=False,
|
| 653 |
+
types=empty_list,
|
| 654 |
+
const=frozenset(['preserve', 'default'])),
|
| 655 |
+
'handler script': SVGAttribute(
|
| 656 |
+
'xml:space', anim=False,
|
| 657 |
+
types=empty_list,
|
| 658 |
+
const=frozenset(['preserve'])),
|
| 659 |
+
}),
|
| 660 |
+
'y': SVGMultiAttribute({
|
| 661 |
+
'*': SVGAttribute(
|
| 662 |
+
'y', anim=True,
|
| 663 |
+
types=frozenset(['coordinate']),
|
| 664 |
+
const=empty_list),
|
| 665 |
+
'text': SVGAttribute(
|
| 666 |
+
'y', anim=True,
|
| 667 |
+
types=frozenset(['list-of-coordinate']),
|
| 668 |
+
const=empty_list),
|
| 669 |
+
}),
|
| 670 |
+
'y1': SVGAttribute('y1', anim=True,
|
| 671 |
+
types=frozenset(['coordinate']),
|
| 672 |
+
const=empty_list),
|
| 673 |
+
'y2': SVGAttribute('y2', anim=True,
|
| 674 |
+
types=frozenset(['coordinate']),
|
| 675 |
+
const=empty_list),
|
| 676 |
+
'zoomAndPan': SVGAttribute('zoomAndPan', anim=False,
|
| 677 |
+
types=empty_list,
|
| 678 |
+
const=frozenset(['disable', 'magnify'])),
|
| 679 |
+
}
|
| 680 |
+
|
| 681 |
+
attribute_names = ['slope', 'keySplines', 'rx', 'accumulate', 'bandwidth',
|
| 682 |
+
'attributeType', 'unicode', 'nav-right', 'arabic-form',
|
| 683 |
+
'y2', 'horiz-origin-x', 'underline-position', 'zoomAndPan',
|
| 684 |
+
'cap-height', 'defaultAction', 'to', 'syncBehavior',
|
| 685 |
+
'alphabetic', 'g2', 'g1', 'panose-1', 'strikethrough-thickness',
|
| 686 |
+
'attributeName', 'bbox', 'nav-up-left', 'nav-left',
|
| 687 |
+
'restart', 'target', 'xlink:actuate', 'rotate', 'resource',
|
| 688 |
+
'd', 'syncToleranceDefault', 'initialVisibility',
|
| 689 |
+
'transformBehavior', 'nav-up-right', 'keyTimes',
|
| 690 |
+
'x', 'requiredFormats', 'nav-next', 'glyph-name',
|
| 691 |
+
'xml:lang', 'mathematical', 'observer', 'repeatDur',
|
| 692 |
+
'hanging', 'y1', 'xml:base', 'ascent', 'event',
|
| 693 |
+
'strikethrough-position', 'overlay', 'rev', 'ry',
|
| 694 |
+
'overline-thickness', 'content', 'version', 'rel',
|
| 695 |
+
'focusable', 'requiredFonts', 'nav-down-right', 'xml:id',
|
| 696 |
+
'offset', 'additive', 'underline-thickness', 'font-family',
|
| 697 |
+
'by', 'mediaTime', 'timelineBegin', 'about', 'horiz-adv-x',
|
| 698 |
+
'widths', 'k', 'requiredFeatures', 'preserveAspectRatio',
|
| 699 |
+
'contentScriptType', 'origin', 'xml:space', 'xlink:href',
|
| 700 |
+
'height', 'baseProfile', 'cy', 'cx', 'path', 'xlink:role',
|
| 701 |
+
'from', 'u1', 'transform', 'units-per-em', 'u2', 'width',
|
| 702 |
+
'handler', 'font-variant', 'x-height', 'dur', 'xlink:arcrole',
|
| 703 |
+
'type', 'focusHighlight', 'mediaCharacterEncoding',
|
| 704 |
+
'xlink:title', 'editable', 'stemv', 'systemLanguage',
|
| 705 |
+
'x2', 'x1', 'ideographic', 'xlink:show', 'overline-position',
|
| 706 |
+
'syncTolerance', 'gradientUnits', 'r', 'values', 'typeof',
|
| 707 |
+
'mediaContentEncodings', 'property', 'requiredExtensions',
|
| 708 |
+
'repeatCount', 'ev:event', 'nav-down', 'mediaSize', 'pathLength',
|
| 709 |
+
'syncMaster', 'font-style', 'fill', 'end', 'descent',
|
| 710 |
+
'calcMode', 'min', 'stemh', 'id', 'unicode-range',
|
| 711 |
+
'nav-up', 'font-stretch', 'role', 'font-weight', 'begin',
|
| 712 |
+
'xlink:type', 'syncBehaviorDefault', 'max', 'snapshotTime',
|
| 713 |
+
'playbackOrder', 'keyPoints', 'nav-prev', 'propagate',
|
| 714 |
+
'phase', 'externalResourcesRequired', 'nav-down-left',
|
| 715 |
+
'class', 'lang', 'datatype', 'viewBox', 'points',
|
| 716 |
+
'accent-height', 'y']
|
| 717 |
+
property_names = ['stroke-linejoin', 'font-size', 'text-rendering', 'color-rendering',
|
| 718 |
+
'fill-opacity', 'color', 'shape-rendering', 'solid-color', 'stroke',
|
| 719 |
+
'stroke-linecap', 'vector-effect', 'stroke-width', 'font-style',
|
| 720 |
+
'fill', 'solid-opacity', 'fill-rule', 'viewport-fill-opacity',
|
| 721 |
+
'display-align', 'buffered-rendering', 'stroke-miterlimit',
|
| 722 |
+
'font-variant', 'stop-opacity', 'font-weight', 'opacity', 'direction',
|
| 723 |
+
'audio-level', 'visibility', 'unicode-bidi', 'line-increment',
|
| 724 |
+
'image-rendering', 'font-family', 'viewport-fill', 'text-align',
|
| 725 |
+
'stroke-opacity', 'stroke-dashoffset', 'text-anchor', 'stop-color',
|
| 726 |
+
'pointer-events', 'stroke-dasharray', 'display']
|
| 727 |
+
media_group_names = ['audio-level', 'buffered-rendering', 'display', 'image-rendering',
|
| 728 |
+
'pointer-events', 'shape-rendering', 'text-rendering',
|
| 729 |
+
'viewport-fill', 'viewport-fill-opacity', 'visibility']
|
| 730 |
+
|
| 731 |
+
elements = {
|
| 732 |
+
'a': SVGElement('a',
|
| 733 |
+
attributes=['about', 'class', 'content', 'datatype', 'externalResourcesRequired', 'focusHighlight', 'focusable', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'target', 'transform', 'typeof', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 734 |
+
properties=property_names,
|
| 735 |
+
children=['likeparent', 'defs', 'text', 'g', 'textArea', 'svg']),
|
| 736 |
+
|
| 737 |
+
'animate': SVGElement('animate',
|
| 738 |
+
attributes=['about', 'accumulate', 'additive', 'attributeName', 'attributeType', 'begin', 'by', 'calcMode', 'class', 'content', 'datatype', 'dur', 'end', 'fill', 'from', 'id', 'keySplines', 'keyTimes', 'max', 'min', 'property', 'rel', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'restart', 'rev', 'role', 'systemLanguage', 'to', 'typeof', 'values', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 739 |
+
properties=empty_list,
|
| 740 |
+
children=['desc', 'handler', 'metadata', 'switch', 'title']),
|
| 741 |
+
|
| 742 |
+
'animateColor': SVGElement('animateColor',
|
| 743 |
+
attributes=['about', 'accumulate', 'additive', 'attributeName', 'attributeType', 'begin', 'by', 'calcMode', 'class', 'content', 'datatype', 'dur', 'end', 'fill', 'from', 'id', 'keySplines', 'keyTimes', 'max', 'min', 'property', 'rel', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'restart', 'rev', 'role', 'systemLanguage', 'to', 'typeof', 'values', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 744 |
+
properties=empty_list,
|
| 745 |
+
children=['desc', 'handler', 'metadata', 'switch', 'title']),
|
| 746 |
+
|
| 747 |
+
'animateMotion': SVGElement('animateMotion',
|
| 748 |
+
attributes=['about', 'accumulate', 'additive', 'begin', 'by', 'calcMode', 'class', 'content', 'datatype', 'dur', 'end', 'fill', 'from', 'id', 'keyPoints', 'keySplines', 'keyTimes', 'max', 'min', 'origin', 'path', 'property', 'rel', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'restart', 'rev', 'role', 'rotate', 'systemLanguage', 'to', 'typeof', 'values', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 749 |
+
properties=empty_list,
|
| 750 |
+
children=['desc', 'handler', 'metadata', 'mpath', 'switch', 'title']),
|
| 751 |
+
|
| 752 |
+
'animateTransform': SVGElement('animateTransform',
|
| 753 |
+
attributes=['about', 'accumulate', 'additive', 'attributeName', 'attributeType', 'begin', 'by', 'calcMode', 'class', 'content', 'datatype', 'dur', 'end', 'fill', 'from', 'id', 'keySplines', 'keyTimes', 'max', 'min', 'property', 'rel', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'restart', 'rev', 'role', 'systemLanguage', 'to', 'type', 'typeof', 'values', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 754 |
+
properties=empty_list,
|
| 755 |
+
children=['desc', 'handler', 'metadata', 'switch', 'title']),
|
| 756 |
+
|
| 757 |
+
'animation': SVGElement('animation',
|
| 758 |
+
attributes=['about', 'begin', 'class', 'content', 'datatype', 'dur', 'end', 'externalResourcesRequired', 'fill', 'focusHighlight', 'focusable', 'height', 'id', 'initialVisibility', 'max', 'min', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'preserveAspectRatio', 'property', 'rel', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'restart', 'rev', 'role', 'syncBehavior', 'syncMaster', 'syncTolerance', 'systemLanguage', 'transform', 'typeof', 'width', 'x', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space', 'y'],
|
| 759 |
+
properties=media_group_names,
|
| 760 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title']),
|
| 761 |
+
|
| 762 |
+
'audio': SVGElement('audio',
|
| 763 |
+
attributes=['about', 'begin', 'class', 'content', 'datatype', 'dur', 'end', 'externalResourcesRequired', 'fill', 'id', 'max', 'min', 'property', 'rel', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'restart', 'rev', 'role', 'syncBehavior', 'syncMaster', 'syncTolerance', 'systemLanguage', 'type', 'typeof', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 764 |
+
properties=media_group_names,
|
| 765 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title']),
|
| 766 |
+
|
| 767 |
+
'circle': SVGElement('circle',
|
| 768 |
+
attributes=['about', 'class', 'content', 'cx', 'cy', 'datatype', 'focusHighlight', 'focusable', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'property', 'r', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'transform', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 769 |
+
properties=property_names,
|
| 770 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title']),
|
| 771 |
+
|
| 772 |
+
'defs': SVGElement('defs',
|
| 773 |
+
attributes=['about', 'class', 'content', 'datatype', 'id', 'property', 'rel', 'resource', 'rev', 'role', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 774 |
+
properties=property_names,
|
| 775 |
+
children=['a', 'animate', 'animateColor', 'animateMotion', 'animateTransform', 'animation', 'audio', 'circle', 'defs', 'desc', 'discard', 'ellipse', 'font', 'font-face', 'foreignObject', 'g', 'handler', 'image', 'line', 'linearGradient', 'listener', 'metadata', 'path', 'polygon', 'polyline', 'prefetch', 'radialGradient', 'rect', 'script', 'set', 'solidColor', 'switch', 'text', 'textArea', 'title', 'use', 'video']),
|
| 776 |
+
|
| 777 |
+
'desc': SVGElement('desc',
|
| 778 |
+
attributes=['about', 'class', 'content', 'datatype', 'id', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 779 |
+
properties=media_group_names,
|
| 780 |
+
children=empty_list),
|
| 781 |
+
|
| 782 |
+
'discard': SVGElement('discard',
|
| 783 |
+
attributes=['about', 'begin', 'class', 'content', 'datatype', 'id', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'typeof', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 784 |
+
properties=empty_list,
|
| 785 |
+
children=['desc', 'handler', 'metadata', 'switch', 'title']),
|
| 786 |
+
|
| 787 |
+
'ellipse': SVGElement('ellipse',
|
| 788 |
+
attributes=['about', 'class', 'content', 'cx', 'cy', 'datatype', 'focusHighlight', 'focusable', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'rx', 'ry', 'systemLanguage', 'transform', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 789 |
+
properties=property_names,
|
| 790 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title']),
|
| 791 |
+
|
| 792 |
+
'font': SVGElement('font',
|
| 793 |
+
attributes=['about', 'class', 'content', 'datatype', 'externalResourcesRequired', 'horiz-adv-x', 'horiz-origin-x', 'id', 'property', 'rel', 'resource', 'rev', 'role', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 794 |
+
properties=empty_list,
|
| 795 |
+
children=['desc', 'font-face', 'glyph', 'hkern', 'metadata', 'missing-glyph', 'switch', 'title']),
|
| 796 |
+
|
| 797 |
+
'font-face': SVGElement('font-face',
|
| 798 |
+
attributes=['about', 'accent-height', 'alphabetic', 'ascent', 'bbox', 'cap-height', 'class', 'content', 'datatype', 'descent', 'externalResourcesRequired', 'font-family', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'hanging', 'id', 'ideographic', 'mathematical', 'overline-position', 'overline-thickness', 'panose-1', 'property', 'rel', 'resource', 'rev', 'role', 'slope', 'stemh', 'stemv', 'strikethrough-position', 'strikethrough-thickness', 'typeof', 'underline-position', 'underline-thickness', 'unicode-range', 'units-per-em', 'widths', 'x-height', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 799 |
+
properties=empty_list,
|
| 800 |
+
children=['desc', 'font-face-src', 'metadata', 'switch', 'title']),
|
| 801 |
+
|
| 802 |
+
'font-face-src': SVGElement('font-face-src',
|
| 803 |
+
attributes=['about', 'class', 'content', 'datatype', 'id', 'property', 'rel', 'resource', 'rev', 'role', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 804 |
+
properties=empty_list,
|
| 805 |
+
children=['desc', 'font-face-uri', 'metadata', 'switch', 'title']),
|
| 806 |
+
|
| 807 |
+
'font-face-uri': SVGElement('font-face-uri',
|
| 808 |
+
attributes=['about', 'class', 'content', 'datatype', 'externalResourcesRequired', 'id', 'property', 'rel', 'resource', 'rev', 'role', 'typeof', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 809 |
+
properties=empty_list,
|
| 810 |
+
children=['desc', 'metadata', 'switch', 'title']),
|
| 811 |
+
|
| 812 |
+
'foreignObject': SVGElement('foreignObject',
|
| 813 |
+
attributes=['about', 'class', 'content', 'datatype', 'externalResourcesRequired', 'focusHighlight', 'focusable', 'height', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'transform', 'typeof', 'width', 'x', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space', 'y'],
|
| 814 |
+
properties=property_names,
|
| 815 |
+
children=['desc', 'metadata', 'svg', 'switch', 'title']),
|
| 816 |
+
|
| 817 |
+
'g': SVGElement('g',
|
| 818 |
+
attributes=['about', 'class', 'content', 'datatype', 'externalResourcesRequired', 'focusHighlight', 'focusable', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'transform', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 819 |
+
properties=property_names,
|
| 820 |
+
children=['a', 'animate', 'animateColor', 'animateMotion', 'animateTransform', 'animation', 'audio', 'circle', 'defs', 'desc', 'discard', 'ellipse', 'font', 'font-face', 'foreignObject', 'g', 'handler', 'image', 'line', 'linearGradient', 'listener', 'metadata', 'path', 'polygon', 'polyline', 'prefetch', 'radialGradient', 'rect', 'script', 'set', 'solidColor', 'switch', 'text', 'textArea', 'title', 'use', 'video']),
|
| 821 |
+
|
| 822 |
+
'glyph': SVGElement('glyph',
|
| 823 |
+
attributes=['about', 'arabic-form', 'class', 'content', 'd', 'datatype', 'glyph-name', 'horiz-adv-x', 'id', 'lang', 'property', 'rel', 'resource', 'rev', 'role', 'typeof', 'unicode', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 824 |
+
properties=empty_list,
|
| 825 |
+
children=['desc', 'metadata', 'switch', 'title']),
|
| 826 |
+
|
| 827 |
+
'handler': SVGElement('handler',
|
| 828 |
+
attributes=['about', 'class', 'content', 'datatype', 'ev:event', 'externalResourcesRequired', 'id', 'property', 'rel', 'resource', 'rev', 'role', 'type', 'typeof', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 829 |
+
properties=empty_list,
|
| 830 |
+
children=['desc', 'metadata', 'switch', 'title']),
|
| 831 |
+
|
| 832 |
+
'hkern': SVGElement('hkern',
|
| 833 |
+
attributes=['about', 'class', 'content', 'datatype', 'g1', 'g2', 'id', 'k', 'property', 'rel', 'resource', 'rev', 'role', 'typeof', 'u1', 'u2', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 834 |
+
properties=empty_list,
|
| 835 |
+
children=['desc', 'metadata', 'switch', 'title']),
|
| 836 |
+
|
| 837 |
+
'image': SVGElement('image',
|
| 838 |
+
attributes=['about', 'class', 'content', 'datatype', 'externalResourcesRequired', 'focusHighlight', 'focusable', 'height', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'opacity', 'preserveAspectRatio', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'transform', 'type', 'typeof', 'width', 'x', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space', 'y'],
|
| 839 |
+
properties=media_group_names,
|
| 840 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title']),
|
| 841 |
+
|
| 842 |
+
'line': SVGElement('line',
|
| 843 |
+
attributes=['about', 'class', 'content', 'datatype', 'focusHighlight', 'focusable', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'transform', 'typeof', 'x1', 'x2', 'xml:base', 'xml:id', 'xml:lang', 'xml:space', 'y1', 'y2'],
|
| 844 |
+
properties=property_names,
|
| 845 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title']),
|
| 846 |
+
|
| 847 |
+
'linearGradient': SVGElement('linearGradient',
|
| 848 |
+
attributes=['about', 'class', 'content', 'datatype', 'gradientUnits', 'id', 'property', 'rel', 'resource', 'rev', 'role', 'typeof', 'x1', 'x2', 'xml:base', 'xml:id', 'xml:lang', 'xml:space', 'y1', 'y2'],
|
| 849 |
+
properties=property_names,
|
| 850 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'metadata', 'set', 'stop', 'switch', 'title']),
|
| 851 |
+
|
| 852 |
+
'listener': SVGElement('listener',
|
| 853 |
+
attributes=['about', 'class', 'content', 'datatype', 'defaultAction', 'event', 'handler', 'id', 'observer', 'phase', 'propagate', 'property', 'rel', 'resource', 'rev', 'role', 'target', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 854 |
+
properties=empty_list,
|
| 855 |
+
children=empty_list),
|
| 856 |
+
|
| 857 |
+
'metadata': SVGElement('metadata',
|
| 858 |
+
attributes=['about', 'class', 'content', 'datatype', 'id', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 859 |
+
properties=media_group_names,
|
| 860 |
+
children=empty_list),
|
| 861 |
+
|
| 862 |
+
'missing-glyph': SVGElement('missing-glyph',
|
| 863 |
+
attributes=['about', 'class', 'content', 'd', 'datatype', 'horiz-adv-x', 'id', 'property', 'rel', 'resource', 'rev', 'role', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 864 |
+
properties=empty_list,
|
| 865 |
+
children=['desc', 'metadata', 'switch', 'title']),
|
| 866 |
+
|
| 867 |
+
'mpath': SVGElement('mpath',
|
| 868 |
+
attributes=['about', 'class', 'content', 'datatype', 'id', 'property', 'rel', 'resource', 'rev', 'role', 'typeof', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 869 |
+
properties=empty_list,
|
| 870 |
+
children=['desc', 'metadata', 'switch', 'title']),
|
| 871 |
+
|
| 872 |
+
'path': SVGElement('path',
|
| 873 |
+
attributes=['about', 'class', 'content', 'd', 'datatype', 'focusHighlight', 'focusable', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'pathLength', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'transform', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 874 |
+
properties=property_names,
|
| 875 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title']),
|
| 876 |
+
|
| 877 |
+
'polygon': SVGElement('polygon',
|
| 878 |
+
attributes=['about', 'class', 'content', 'datatype', 'focusHighlight', 'focusable', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'points', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'transform', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 879 |
+
properties=property_names,
|
| 880 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title']),
|
| 881 |
+
|
| 882 |
+
'polyline': SVGElement('polyline',
|
| 883 |
+
attributes=['about', 'class', 'content', 'datatype', 'focusHighlight', 'focusable', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'points', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'transform', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 884 |
+
properties=property_names,
|
| 885 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title']),
|
| 886 |
+
|
| 887 |
+
'prefetch': SVGElement('prefetch',
|
| 888 |
+
attributes=['about', 'bandwidth', 'class', 'content', 'datatype', 'id', 'mediaCharacterEncoding', 'mediaContentEncodings', 'mediaSize', 'mediaTime', 'property', 'rel', 'resource', 'rev', 'role', 'typeof', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 889 |
+
properties=empty_list,
|
| 890 |
+
children=['desc', 'metadata', 'switch', 'title']),
|
| 891 |
+
|
| 892 |
+
'radialGradient': SVGElement('radialGradient',
|
| 893 |
+
attributes=['about', 'class', 'content', 'cx', 'cy', 'datatype', 'gradientUnits', 'id', 'property', 'r', 'rel', 'resource', 'rev', 'role', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 894 |
+
properties=property_names,
|
| 895 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'metadata', 'set', 'stop', 'switch', 'title']),
|
| 896 |
+
|
| 897 |
+
'rect': SVGElement('rect',
|
| 898 |
+
attributes=['about', 'class', 'content', 'datatype', 'focusHighlight', 'focusable', 'height', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'rx', 'ry', 'systemLanguage', 'transform', 'typeof', 'width', 'x', 'xml:base', 'xml:id', 'xml:lang', 'xml:space', 'y'],
|
| 899 |
+
properties=property_names,
|
| 900 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title']),
|
| 901 |
+
|
| 902 |
+
'script': SVGElement('script',
|
| 903 |
+
attributes=['about', 'class', 'content', 'datatype', 'externalResourcesRequired', 'id', 'property', 'rel', 'resource', 'rev', 'role', 'type', 'typeof', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 904 |
+
properties=empty_list,
|
| 905 |
+
children=['desc', 'metadata', 'switch', 'title']),
|
| 906 |
+
|
| 907 |
+
'set': SVGElement('set',
|
| 908 |
+
attributes=['about', 'attributeName', 'attributeType', 'begin', 'class', 'content', 'datatype', 'dur', 'end', 'fill', 'id', 'max', 'min', 'property', 'rel', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'restart', 'rev', 'role', 'systemLanguage', 'to', 'typeof', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 909 |
+
properties=empty_list,
|
| 910 |
+
children=['desc', 'handler', 'metadata', 'switch', 'title']),
|
| 911 |
+
|
| 912 |
+
'solidColor': SVGElement('solidColor',
|
| 913 |
+
attributes=['about', 'class', 'content', 'datatype', 'id', 'property', 'rel', 'resource', 'rev', 'role', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 914 |
+
properties=property_names,
|
| 915 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title']),
|
| 916 |
+
|
| 917 |
+
'stop': SVGElement('stop',
|
| 918 |
+
attributes=['about', 'class', 'content', 'datatype', 'id', 'offset', 'property', 'rel', 'resource', 'rev', 'role', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 919 |
+
properties=property_names,
|
| 920 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'metadata', 'set', 'switch', 'title']),
|
| 921 |
+
|
| 922 |
+
'svg': SVGElement('svg',
|
| 923 |
+
attributes=['about', 'baseProfile', 'class', 'content', 'contentScriptType', 'datatype', 'externalResourcesRequired', 'focusHighlight', 'focusable', 'height', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'playbackOrder', 'preserveAspectRatio', 'property', 'rel', 'resource', 'rev', 'role', 'snapshotTime', 'syncBehaviorDefault', 'syncToleranceDefault', 'timelineBegin', 'transform', 'typeof', 'version', 'viewBox', 'width', 'xml:base', 'xml:id', 'xml:lang', 'xml:space', 'xmlns', 'xmlns:xlink', 'xmlns:ev', 'zoomAndPan'],
|
| 924 |
+
properties=property_names,
|
| 925 |
+
children=['a', 'animate', 'animateColor', 'animateMotion', 'animateTransform', 'animation', 'audio', 'circle', 'defs', 'desc', 'discard', 'ellipse', 'font', 'font-face', 'foreignObject', 'g', 'handler', 'image', 'line', 'linearGradient', 'listener', 'metadata', 'path', 'polygon', 'polyline', 'prefetch', 'radialGradient', 'rect', 'script', 'set', 'solidColor', 'switch', 'text', 'textArea', 'title', 'use', 'video']),
|
| 926 |
+
|
| 927 |
+
'switch': SVGElement('switch',
|
| 928 |
+
attributes=['about', 'class', 'content', 'datatype', 'externalResourcesRequired', 'focusHighlight', 'focusable', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'transform', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 929 |
+
properties=property_names,
|
| 930 |
+
children=['likeparent', 'set', 'textArea', 'text', 'image', 'missing-glyph', 'font-face', 'video', 'path', 'animate', 'font', 'ellipse', 'glyph', 'use', 'font-face-src', 'polygon', 'script', 'handler', 'circle', 'radialGradient', 'prefetch', 'defs', 'mpath', 'stop', 'animateMotion', 'animateColor', 'discard', 'solidColor', 'hkern', 'line', 'animation', 'rect', 'g', 'svg', 'animateTransform', 'linearGradient', 'font-face-uri', 'foreignObject', 'polyline', 'audio']),
|
| 931 |
+
|
| 932 |
+
'tbreak': SVGElement('tbreak',
|
| 933 |
+
attributes=['about', 'class', 'content', 'datatype', 'id', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 934 |
+
properties=empty_list,
|
| 935 |
+
children=empty_list),
|
| 936 |
+
|
| 937 |
+
'text': SVGElement('text',
|
| 938 |
+
attributes=['about', 'class', 'content', 'datatype', 'editable', 'focusHighlight', 'focusable', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'rotate', 'systemLanguage', 'transform', 'typeof', 'x', 'xml:base', 'xml:id', 'xml:lang', 'xml:space', 'y'],
|
| 939 |
+
properties=property_names,
|
| 940 |
+
children=['a', 'animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title', 'tspan']),
|
| 941 |
+
|
| 942 |
+
'textArea': SVGElement('textArea',
|
| 943 |
+
attributes=['about', 'class', 'content', 'datatype', 'editable', 'focusHighlight', 'focusable', 'height', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'transform', 'typeof', 'width', 'x', 'xml:base', 'xml:id', 'xml:lang', 'xml:space', 'y'],
|
| 944 |
+
properties=property_names,
|
| 945 |
+
children=['a', 'animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'tbreak', 'title', 'tspan']),
|
| 946 |
+
|
| 947 |
+
'title': SVGElement('title',
|
| 948 |
+
attributes=['about', 'class', 'content', 'datatype', 'id', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 949 |
+
properties=media_group_names,
|
| 950 |
+
children=empty_list),
|
| 951 |
+
|
| 952 |
+
'tspan': SVGElement('tspan',
|
| 953 |
+
attributes=['about', 'class', 'content', 'datatype', 'focusHighlight', 'focusable', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'typeof', 'xml:base', 'xml:id', 'xml:lang', 'xml:space'],
|
| 954 |
+
properties=property_names,
|
| 955 |
+
children=['likeparent', 'text', 'textArea']),
|
| 956 |
+
|
| 957 |
+
'use': SVGElement('use',
|
| 958 |
+
attributes=['about', 'class', 'content', 'datatype', 'externalResourcesRequired', 'focusHighlight', 'focusable', 'id', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'property', 'rel', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'rev', 'role', 'systemLanguage', 'transform', 'typeof', 'x', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space', 'y'],
|
| 959 |
+
properties=property_names,
|
| 960 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title']),
|
| 961 |
+
|
| 962 |
+
'video': SVGElement('video',
|
| 963 |
+
attributes=['about', 'begin', 'class', 'content', 'datatype', 'dur', 'end', 'externalResourcesRequired', 'fill', 'focusHighlight', 'focusable', 'height', 'id', 'initialVisibility', 'max', 'min', 'nav-down', 'nav-down-left', 'nav-down-right', 'nav-left', 'nav-next', 'nav-prev', 'nav-right', 'nav-up', 'nav-up-left', 'nav-up-right', 'overlay', 'preserveAspectRatio', 'property', 'rel', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'requiredFonts', 'requiredFormats', 'resource', 'restart', 'rev', 'role', 'syncBehavior', 'syncMaster', 'syncTolerance', 'systemLanguage', 'transform', 'transformBehavior', 'type', 'typeof', 'width', 'x', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:id', 'xml:lang', 'xml:space', 'y'],
|
| 964 |
+
properties=media_group_names,
|
| 965 |
+
children=['animate', 'animateColor', 'animateMotion', 'animateTransform', 'desc', 'discard', 'handler', 'metadata', 'set', 'switch', 'title']),
|
| 966 |
+
}
|
falcon/lib/python3.10/site-packages/uvicorn/__init__.py
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from uvicorn.config import Config
|
| 2 |
+
from uvicorn.main import Server, main, run
|
| 3 |
+
|
| 4 |
+
__version__ = "0.34.0"
|
| 5 |
+
__all__ = ["main", "run", "Config", "Server"]
|
falcon/lib/python3.10/site-packages/uvicorn/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (344 Bytes). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/__pycache__/__main__.cpython-310.pyc
ADDED
|
Binary file (230 Bytes). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/__pycache__/_subprocess.cpython-310.pyc
ADDED
|
Binary file (2.39 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/__pycache__/_types.cpython-310.pyc
ADDED
|
Binary file (9.09 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/__pycache__/config.cpython-310.pyc
ADDED
|
Binary file (14.5 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/__pycache__/importer.cpython-310.pyc
ADDED
|
Binary file (1.19 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/__pycache__/logging.cpython-310.pyc
ADDED
|
Binary file (5.11 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/__pycache__/main.cpython-310.pyc
ADDED
|
Binary file (13.4 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/__pycache__/server.cpython-310.pyc
ADDED
|
Binary file (8.95 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/__pycache__/workers.cpython-310.pyc
ADDED
|
Binary file (3.94 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/config.py
ADDED
|
@@ -0,0 +1,530 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import asyncio
|
| 4 |
+
import inspect
|
| 5 |
+
import json
|
| 6 |
+
import logging
|
| 7 |
+
import logging.config
|
| 8 |
+
import os
|
| 9 |
+
import socket
|
| 10 |
+
import ssl
|
| 11 |
+
import sys
|
| 12 |
+
from collections.abc import Awaitable
|
| 13 |
+
from configparser import RawConfigParser
|
| 14 |
+
from pathlib import Path
|
| 15 |
+
from typing import IO, Any, Callable, Literal
|
| 16 |
+
|
| 17 |
+
import click
|
| 18 |
+
|
| 19 |
+
from uvicorn._types import ASGIApplication
|
| 20 |
+
from uvicorn.importer import ImportFromStringError, import_from_string
|
| 21 |
+
from uvicorn.logging import TRACE_LOG_LEVEL
|
| 22 |
+
from uvicorn.middleware.asgi2 import ASGI2Middleware
|
| 23 |
+
from uvicorn.middleware.message_logger import MessageLoggerMiddleware
|
| 24 |
+
from uvicorn.middleware.proxy_headers import ProxyHeadersMiddleware
|
| 25 |
+
from uvicorn.middleware.wsgi import WSGIMiddleware
|
| 26 |
+
|
| 27 |
+
HTTPProtocolType = Literal["auto", "h11", "httptools"]
|
| 28 |
+
WSProtocolType = Literal["auto", "none", "websockets", "wsproto"]
|
| 29 |
+
LifespanType = Literal["auto", "on", "off"]
|
| 30 |
+
LoopSetupType = Literal["none", "auto", "asyncio", "uvloop"]
|
| 31 |
+
InterfaceType = Literal["auto", "asgi3", "asgi2", "wsgi"]
|
| 32 |
+
|
| 33 |
+
LOG_LEVELS: dict[str, int] = {
|
| 34 |
+
"critical": logging.CRITICAL,
|
| 35 |
+
"error": logging.ERROR,
|
| 36 |
+
"warning": logging.WARNING,
|
| 37 |
+
"info": logging.INFO,
|
| 38 |
+
"debug": logging.DEBUG,
|
| 39 |
+
"trace": TRACE_LOG_LEVEL,
|
| 40 |
+
}
|
| 41 |
+
HTTP_PROTOCOLS: dict[HTTPProtocolType, str] = {
|
| 42 |
+
"auto": "uvicorn.protocols.http.auto:AutoHTTPProtocol",
|
| 43 |
+
"h11": "uvicorn.protocols.http.h11_impl:H11Protocol",
|
| 44 |
+
"httptools": "uvicorn.protocols.http.httptools_impl:HttpToolsProtocol",
|
| 45 |
+
}
|
| 46 |
+
WS_PROTOCOLS: dict[WSProtocolType, str | None] = {
|
| 47 |
+
"auto": "uvicorn.protocols.websockets.auto:AutoWebSocketsProtocol",
|
| 48 |
+
"none": None,
|
| 49 |
+
"websockets": "uvicorn.protocols.websockets.websockets_impl:WebSocketProtocol",
|
| 50 |
+
"wsproto": "uvicorn.protocols.websockets.wsproto_impl:WSProtocol",
|
| 51 |
+
}
|
| 52 |
+
LIFESPAN: dict[LifespanType, str] = {
|
| 53 |
+
"auto": "uvicorn.lifespan.on:LifespanOn",
|
| 54 |
+
"on": "uvicorn.lifespan.on:LifespanOn",
|
| 55 |
+
"off": "uvicorn.lifespan.off:LifespanOff",
|
| 56 |
+
}
|
| 57 |
+
LOOP_SETUPS: dict[LoopSetupType, str | None] = {
|
| 58 |
+
"none": None,
|
| 59 |
+
"auto": "uvicorn.loops.auto:auto_loop_setup",
|
| 60 |
+
"asyncio": "uvicorn.loops.asyncio:asyncio_setup",
|
| 61 |
+
"uvloop": "uvicorn.loops.uvloop:uvloop_setup",
|
| 62 |
+
}
|
| 63 |
+
INTERFACES: list[InterfaceType] = ["auto", "asgi3", "asgi2", "wsgi"]
|
| 64 |
+
|
| 65 |
+
SSL_PROTOCOL_VERSION: int = ssl.PROTOCOL_TLS_SERVER
|
| 66 |
+
|
| 67 |
+
LOGGING_CONFIG: dict[str, Any] = {
|
| 68 |
+
"version": 1,
|
| 69 |
+
"disable_existing_loggers": False,
|
| 70 |
+
"formatters": {
|
| 71 |
+
"default": {
|
| 72 |
+
"()": "uvicorn.logging.DefaultFormatter",
|
| 73 |
+
"fmt": "%(levelprefix)s %(message)s",
|
| 74 |
+
"use_colors": None,
|
| 75 |
+
},
|
| 76 |
+
"access": {
|
| 77 |
+
"()": "uvicorn.logging.AccessFormatter",
|
| 78 |
+
"fmt": '%(levelprefix)s %(client_addr)s - "%(request_line)s" %(status_code)s', # noqa: E501
|
| 79 |
+
},
|
| 80 |
+
},
|
| 81 |
+
"handlers": {
|
| 82 |
+
"default": {
|
| 83 |
+
"formatter": "default",
|
| 84 |
+
"class": "logging.StreamHandler",
|
| 85 |
+
"stream": "ext://sys.stderr",
|
| 86 |
+
},
|
| 87 |
+
"access": {
|
| 88 |
+
"formatter": "access",
|
| 89 |
+
"class": "logging.StreamHandler",
|
| 90 |
+
"stream": "ext://sys.stdout",
|
| 91 |
+
},
|
| 92 |
+
},
|
| 93 |
+
"loggers": {
|
| 94 |
+
"uvicorn": {"handlers": ["default"], "level": "INFO", "propagate": False},
|
| 95 |
+
"uvicorn.error": {"level": "INFO"},
|
| 96 |
+
"uvicorn.access": {"handlers": ["access"], "level": "INFO", "propagate": False},
|
| 97 |
+
},
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
logger = logging.getLogger("uvicorn.error")
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
def create_ssl_context(
|
| 104 |
+
certfile: str | os.PathLike[str],
|
| 105 |
+
keyfile: str | os.PathLike[str] | None,
|
| 106 |
+
password: str | None,
|
| 107 |
+
ssl_version: int,
|
| 108 |
+
cert_reqs: int,
|
| 109 |
+
ca_certs: str | os.PathLike[str] | None,
|
| 110 |
+
ciphers: str | None,
|
| 111 |
+
) -> ssl.SSLContext:
|
| 112 |
+
ctx = ssl.SSLContext(ssl_version)
|
| 113 |
+
get_password = (lambda: password) if password else None
|
| 114 |
+
ctx.load_cert_chain(certfile, keyfile, get_password)
|
| 115 |
+
ctx.verify_mode = ssl.VerifyMode(cert_reqs)
|
| 116 |
+
if ca_certs:
|
| 117 |
+
ctx.load_verify_locations(ca_certs)
|
| 118 |
+
if ciphers:
|
| 119 |
+
ctx.set_ciphers(ciphers)
|
| 120 |
+
return ctx
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
def is_dir(path: Path) -> bool:
|
| 124 |
+
try:
|
| 125 |
+
if not path.is_absolute():
|
| 126 |
+
path = path.resolve()
|
| 127 |
+
return path.is_dir()
|
| 128 |
+
except OSError: # pragma: full coverage
|
| 129 |
+
return False
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
def resolve_reload_patterns(patterns_list: list[str], directories_list: list[str]) -> tuple[list[str], list[Path]]:
|
| 133 |
+
directories: list[Path] = list(set(map(Path, directories_list.copy())))
|
| 134 |
+
patterns: list[str] = patterns_list.copy()
|
| 135 |
+
|
| 136 |
+
current_working_directory = Path.cwd()
|
| 137 |
+
for pattern in patterns_list:
|
| 138 |
+
# Special case for the .* pattern, otherwise this would only match
|
| 139 |
+
# hidden directories which is probably undesired
|
| 140 |
+
if pattern == ".*":
|
| 141 |
+
continue # pragma: py-darwin
|
| 142 |
+
patterns.append(pattern)
|
| 143 |
+
if is_dir(Path(pattern)):
|
| 144 |
+
directories.append(Path(pattern))
|
| 145 |
+
else:
|
| 146 |
+
for match in current_working_directory.glob(pattern):
|
| 147 |
+
if is_dir(match):
|
| 148 |
+
directories.append(match)
|
| 149 |
+
|
| 150 |
+
directories = list(set(directories))
|
| 151 |
+
directories = list(map(Path, directories))
|
| 152 |
+
directories = list(map(lambda x: x.resolve(), directories))
|
| 153 |
+
directories = list({reload_path for reload_path in directories if is_dir(reload_path)})
|
| 154 |
+
|
| 155 |
+
children = []
|
| 156 |
+
for j in range(len(directories)):
|
| 157 |
+
for k in range(j + 1, len(directories)): # pragma: full coverage
|
| 158 |
+
if directories[j] in directories[k].parents:
|
| 159 |
+
children.append(directories[k])
|
| 160 |
+
elif directories[k] in directories[j].parents:
|
| 161 |
+
children.append(directories[j])
|
| 162 |
+
|
| 163 |
+
directories = list(set(directories).difference(set(children)))
|
| 164 |
+
|
| 165 |
+
return list(set(patterns)), directories
|
| 166 |
+
|
| 167 |
+
|
| 168 |
+
def _normalize_dirs(dirs: list[str] | str | None) -> list[str]:
|
| 169 |
+
if dirs is None:
|
| 170 |
+
return []
|
| 171 |
+
if isinstance(dirs, str):
|
| 172 |
+
return [dirs]
|
| 173 |
+
return list(set(dirs))
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
class Config:
|
| 177 |
+
def __init__(
|
| 178 |
+
self,
|
| 179 |
+
app: ASGIApplication | Callable[..., Any] | str,
|
| 180 |
+
host: str = "127.0.0.1",
|
| 181 |
+
port: int = 8000,
|
| 182 |
+
uds: str | None = None,
|
| 183 |
+
fd: int | None = None,
|
| 184 |
+
loop: LoopSetupType = "auto",
|
| 185 |
+
http: type[asyncio.Protocol] | HTTPProtocolType = "auto",
|
| 186 |
+
ws: type[asyncio.Protocol] | WSProtocolType = "auto",
|
| 187 |
+
ws_max_size: int = 16 * 1024 * 1024,
|
| 188 |
+
ws_max_queue: int = 32,
|
| 189 |
+
ws_ping_interval: float | None = 20.0,
|
| 190 |
+
ws_ping_timeout: float | None = 20.0,
|
| 191 |
+
ws_per_message_deflate: bool = True,
|
| 192 |
+
lifespan: LifespanType = "auto",
|
| 193 |
+
env_file: str | os.PathLike[str] | None = None,
|
| 194 |
+
log_config: dict[str, Any] | str | RawConfigParser | IO[Any] | None = LOGGING_CONFIG,
|
| 195 |
+
log_level: str | int | None = None,
|
| 196 |
+
access_log: bool = True,
|
| 197 |
+
use_colors: bool | None = None,
|
| 198 |
+
interface: InterfaceType = "auto",
|
| 199 |
+
reload: bool = False,
|
| 200 |
+
reload_dirs: list[str] | str | None = None,
|
| 201 |
+
reload_delay: float = 0.25,
|
| 202 |
+
reload_includes: list[str] | str | None = None,
|
| 203 |
+
reload_excludes: list[str] | str | None = None,
|
| 204 |
+
workers: int | None = None,
|
| 205 |
+
proxy_headers: bool = True,
|
| 206 |
+
server_header: bool = True,
|
| 207 |
+
date_header: bool = True,
|
| 208 |
+
forwarded_allow_ips: list[str] | str | None = None,
|
| 209 |
+
root_path: str = "",
|
| 210 |
+
limit_concurrency: int | None = None,
|
| 211 |
+
limit_max_requests: int | None = None,
|
| 212 |
+
backlog: int = 2048,
|
| 213 |
+
timeout_keep_alive: int = 5,
|
| 214 |
+
timeout_notify: int = 30,
|
| 215 |
+
timeout_graceful_shutdown: int | None = None,
|
| 216 |
+
callback_notify: Callable[..., Awaitable[None]] | None = None,
|
| 217 |
+
ssl_keyfile: str | os.PathLike[str] | None = None,
|
| 218 |
+
ssl_certfile: str | os.PathLike[str] | None = None,
|
| 219 |
+
ssl_keyfile_password: str | None = None,
|
| 220 |
+
ssl_version: int = SSL_PROTOCOL_VERSION,
|
| 221 |
+
ssl_cert_reqs: int = ssl.CERT_NONE,
|
| 222 |
+
ssl_ca_certs: str | None = None,
|
| 223 |
+
ssl_ciphers: str = "TLSv1",
|
| 224 |
+
headers: list[tuple[str, str]] | None = None,
|
| 225 |
+
factory: bool = False,
|
| 226 |
+
h11_max_incomplete_event_size: int | None = None,
|
| 227 |
+
):
|
| 228 |
+
self.app = app
|
| 229 |
+
self.host = host
|
| 230 |
+
self.port = port
|
| 231 |
+
self.uds = uds
|
| 232 |
+
self.fd = fd
|
| 233 |
+
self.loop = loop
|
| 234 |
+
self.http = http
|
| 235 |
+
self.ws = ws
|
| 236 |
+
self.ws_max_size = ws_max_size
|
| 237 |
+
self.ws_max_queue = ws_max_queue
|
| 238 |
+
self.ws_ping_interval = ws_ping_interval
|
| 239 |
+
self.ws_ping_timeout = ws_ping_timeout
|
| 240 |
+
self.ws_per_message_deflate = ws_per_message_deflate
|
| 241 |
+
self.lifespan = lifespan
|
| 242 |
+
self.log_config = log_config
|
| 243 |
+
self.log_level = log_level
|
| 244 |
+
self.access_log = access_log
|
| 245 |
+
self.use_colors = use_colors
|
| 246 |
+
self.interface = interface
|
| 247 |
+
self.reload = reload
|
| 248 |
+
self.reload_delay = reload_delay
|
| 249 |
+
self.workers = workers or 1
|
| 250 |
+
self.proxy_headers = proxy_headers
|
| 251 |
+
self.server_header = server_header
|
| 252 |
+
self.date_header = date_header
|
| 253 |
+
self.root_path = root_path
|
| 254 |
+
self.limit_concurrency = limit_concurrency
|
| 255 |
+
self.limit_max_requests = limit_max_requests
|
| 256 |
+
self.backlog = backlog
|
| 257 |
+
self.timeout_keep_alive = timeout_keep_alive
|
| 258 |
+
self.timeout_notify = timeout_notify
|
| 259 |
+
self.timeout_graceful_shutdown = timeout_graceful_shutdown
|
| 260 |
+
self.callback_notify = callback_notify
|
| 261 |
+
self.ssl_keyfile = ssl_keyfile
|
| 262 |
+
self.ssl_certfile = ssl_certfile
|
| 263 |
+
self.ssl_keyfile_password = ssl_keyfile_password
|
| 264 |
+
self.ssl_version = ssl_version
|
| 265 |
+
self.ssl_cert_reqs = ssl_cert_reqs
|
| 266 |
+
self.ssl_ca_certs = ssl_ca_certs
|
| 267 |
+
self.ssl_ciphers = ssl_ciphers
|
| 268 |
+
self.headers: list[tuple[str, str]] = headers or []
|
| 269 |
+
self.encoded_headers: list[tuple[bytes, bytes]] = []
|
| 270 |
+
self.factory = factory
|
| 271 |
+
self.h11_max_incomplete_event_size = h11_max_incomplete_event_size
|
| 272 |
+
|
| 273 |
+
self.loaded = False
|
| 274 |
+
self.configure_logging()
|
| 275 |
+
|
| 276 |
+
self.reload_dirs: list[Path] = []
|
| 277 |
+
self.reload_dirs_excludes: list[Path] = []
|
| 278 |
+
self.reload_includes: list[str] = []
|
| 279 |
+
self.reload_excludes: list[str] = []
|
| 280 |
+
|
| 281 |
+
if (reload_dirs or reload_includes or reload_excludes) and not self.should_reload:
|
| 282 |
+
logger.warning(
|
| 283 |
+
"Current configuration will not reload as not all conditions are met, " "please refer to documentation."
|
| 284 |
+
)
|
| 285 |
+
|
| 286 |
+
if self.should_reload:
|
| 287 |
+
reload_dirs = _normalize_dirs(reload_dirs)
|
| 288 |
+
reload_includes = _normalize_dirs(reload_includes)
|
| 289 |
+
reload_excludes = _normalize_dirs(reload_excludes)
|
| 290 |
+
|
| 291 |
+
self.reload_includes, self.reload_dirs = resolve_reload_patterns(reload_includes, reload_dirs)
|
| 292 |
+
|
| 293 |
+
self.reload_excludes, self.reload_dirs_excludes = resolve_reload_patterns(reload_excludes, [])
|
| 294 |
+
|
| 295 |
+
reload_dirs_tmp = self.reload_dirs.copy()
|
| 296 |
+
|
| 297 |
+
for directory in self.reload_dirs_excludes:
|
| 298 |
+
for reload_directory in reload_dirs_tmp:
|
| 299 |
+
if directory == reload_directory or directory in reload_directory.parents:
|
| 300 |
+
try:
|
| 301 |
+
self.reload_dirs.remove(reload_directory)
|
| 302 |
+
except ValueError: # pragma: full coverage
|
| 303 |
+
pass
|
| 304 |
+
|
| 305 |
+
for pattern in self.reload_excludes:
|
| 306 |
+
if pattern in self.reload_includes:
|
| 307 |
+
self.reload_includes.remove(pattern) # pragma: full coverage
|
| 308 |
+
|
| 309 |
+
if not self.reload_dirs:
|
| 310 |
+
if reload_dirs:
|
| 311 |
+
logger.warning(
|
| 312 |
+
"Provided reload directories %s did not contain valid "
|
| 313 |
+
+ "directories, watching current working directory.",
|
| 314 |
+
reload_dirs,
|
| 315 |
+
)
|
| 316 |
+
self.reload_dirs = [Path(os.getcwd())]
|
| 317 |
+
|
| 318 |
+
logger.info(
|
| 319 |
+
"Will watch for changes in these directories: %s",
|
| 320 |
+
sorted(list(map(str, self.reload_dirs))),
|
| 321 |
+
)
|
| 322 |
+
|
| 323 |
+
if env_file is not None:
|
| 324 |
+
from dotenv import load_dotenv
|
| 325 |
+
|
| 326 |
+
logger.info("Loading environment from '%s'", env_file)
|
| 327 |
+
load_dotenv(dotenv_path=env_file)
|
| 328 |
+
|
| 329 |
+
if workers is None and "WEB_CONCURRENCY" in os.environ:
|
| 330 |
+
self.workers = int(os.environ["WEB_CONCURRENCY"])
|
| 331 |
+
|
| 332 |
+
self.forwarded_allow_ips: list[str] | str
|
| 333 |
+
if forwarded_allow_ips is None:
|
| 334 |
+
self.forwarded_allow_ips = os.environ.get("FORWARDED_ALLOW_IPS", "127.0.0.1")
|
| 335 |
+
else:
|
| 336 |
+
self.forwarded_allow_ips = forwarded_allow_ips # pragma: full coverage
|
| 337 |
+
|
| 338 |
+
if self.reload and self.workers > 1:
|
| 339 |
+
logger.warning('"workers" flag is ignored when reloading is enabled.')
|
| 340 |
+
|
| 341 |
+
@property
|
| 342 |
+
def asgi_version(self) -> Literal["2.0", "3.0"]:
|
| 343 |
+
mapping: dict[str, Literal["2.0", "3.0"]] = {
|
| 344 |
+
"asgi2": "2.0",
|
| 345 |
+
"asgi3": "3.0",
|
| 346 |
+
"wsgi": "3.0",
|
| 347 |
+
}
|
| 348 |
+
return mapping[self.interface]
|
| 349 |
+
|
| 350 |
+
@property
|
| 351 |
+
def is_ssl(self) -> bool:
|
| 352 |
+
return bool(self.ssl_keyfile or self.ssl_certfile)
|
| 353 |
+
|
| 354 |
+
@property
|
| 355 |
+
def use_subprocess(self) -> bool:
|
| 356 |
+
return bool(self.reload or self.workers > 1)
|
| 357 |
+
|
| 358 |
+
def configure_logging(self) -> None:
|
| 359 |
+
logging.addLevelName(TRACE_LOG_LEVEL, "TRACE")
|
| 360 |
+
|
| 361 |
+
if self.log_config is not None:
|
| 362 |
+
if isinstance(self.log_config, dict):
|
| 363 |
+
if self.use_colors in (True, False):
|
| 364 |
+
self.log_config["formatters"]["default"]["use_colors"] = self.use_colors
|
| 365 |
+
self.log_config["formatters"]["access"]["use_colors"] = self.use_colors
|
| 366 |
+
logging.config.dictConfig(self.log_config)
|
| 367 |
+
elif isinstance(self.log_config, str) and self.log_config.endswith(".json"):
|
| 368 |
+
with open(self.log_config) as file:
|
| 369 |
+
loaded_config = json.load(file)
|
| 370 |
+
logging.config.dictConfig(loaded_config)
|
| 371 |
+
elif isinstance(self.log_config, str) and self.log_config.endswith((".yaml", ".yml")):
|
| 372 |
+
# Install the PyYAML package or the uvicorn[standard] optional
|
| 373 |
+
# dependencies to enable this functionality.
|
| 374 |
+
import yaml
|
| 375 |
+
|
| 376 |
+
with open(self.log_config) as file:
|
| 377 |
+
loaded_config = yaml.safe_load(file)
|
| 378 |
+
logging.config.dictConfig(loaded_config)
|
| 379 |
+
else:
|
| 380 |
+
# See the note about fileConfig() here:
|
| 381 |
+
# https://docs.python.org/3/library/logging.config.html#configuration-file-format
|
| 382 |
+
logging.config.fileConfig(self.log_config, disable_existing_loggers=False)
|
| 383 |
+
|
| 384 |
+
if self.log_level is not None:
|
| 385 |
+
if isinstance(self.log_level, str):
|
| 386 |
+
log_level = LOG_LEVELS[self.log_level]
|
| 387 |
+
else:
|
| 388 |
+
log_level = self.log_level
|
| 389 |
+
logging.getLogger("uvicorn.error").setLevel(log_level)
|
| 390 |
+
logging.getLogger("uvicorn.access").setLevel(log_level)
|
| 391 |
+
logging.getLogger("uvicorn.asgi").setLevel(log_level)
|
| 392 |
+
if self.access_log is False:
|
| 393 |
+
logging.getLogger("uvicorn.access").handlers = []
|
| 394 |
+
logging.getLogger("uvicorn.access").propagate = False
|
| 395 |
+
|
| 396 |
+
def load(self) -> None:
|
| 397 |
+
assert not self.loaded
|
| 398 |
+
|
| 399 |
+
if self.is_ssl:
|
| 400 |
+
assert self.ssl_certfile
|
| 401 |
+
self.ssl: ssl.SSLContext | None = create_ssl_context(
|
| 402 |
+
keyfile=self.ssl_keyfile,
|
| 403 |
+
certfile=self.ssl_certfile,
|
| 404 |
+
password=self.ssl_keyfile_password,
|
| 405 |
+
ssl_version=self.ssl_version,
|
| 406 |
+
cert_reqs=self.ssl_cert_reqs,
|
| 407 |
+
ca_certs=self.ssl_ca_certs,
|
| 408 |
+
ciphers=self.ssl_ciphers,
|
| 409 |
+
)
|
| 410 |
+
else:
|
| 411 |
+
self.ssl = None
|
| 412 |
+
|
| 413 |
+
encoded_headers = [(key.lower().encode("latin1"), value.encode("latin1")) for key, value in self.headers]
|
| 414 |
+
self.encoded_headers = (
|
| 415 |
+
[(b"server", b"uvicorn")] + encoded_headers
|
| 416 |
+
if b"server" not in dict(encoded_headers) and self.server_header
|
| 417 |
+
else encoded_headers
|
| 418 |
+
)
|
| 419 |
+
|
| 420 |
+
if isinstance(self.http, str):
|
| 421 |
+
http_protocol_class = import_from_string(HTTP_PROTOCOLS[self.http])
|
| 422 |
+
self.http_protocol_class: type[asyncio.Protocol] = http_protocol_class
|
| 423 |
+
else:
|
| 424 |
+
self.http_protocol_class = self.http
|
| 425 |
+
|
| 426 |
+
if isinstance(self.ws, str):
|
| 427 |
+
ws_protocol_class = import_from_string(WS_PROTOCOLS[self.ws])
|
| 428 |
+
self.ws_protocol_class: type[asyncio.Protocol] | None = ws_protocol_class
|
| 429 |
+
else:
|
| 430 |
+
self.ws_protocol_class = self.ws
|
| 431 |
+
|
| 432 |
+
self.lifespan_class = import_from_string(LIFESPAN[self.lifespan])
|
| 433 |
+
|
| 434 |
+
try:
|
| 435 |
+
self.loaded_app = import_from_string(self.app)
|
| 436 |
+
except ImportFromStringError as exc:
|
| 437 |
+
logger.error("Error loading ASGI app. %s" % exc)
|
| 438 |
+
sys.exit(1)
|
| 439 |
+
|
| 440 |
+
try:
|
| 441 |
+
self.loaded_app = self.loaded_app()
|
| 442 |
+
except TypeError as exc:
|
| 443 |
+
if self.factory:
|
| 444 |
+
logger.error("Error loading ASGI app factory: %s", exc)
|
| 445 |
+
sys.exit(1)
|
| 446 |
+
else:
|
| 447 |
+
if not self.factory:
|
| 448 |
+
logger.warning(
|
| 449 |
+
"ASGI app factory detected. Using it, " "but please consider setting the --factory flag explicitly."
|
| 450 |
+
)
|
| 451 |
+
|
| 452 |
+
if self.interface == "auto":
|
| 453 |
+
if inspect.isclass(self.loaded_app):
|
| 454 |
+
use_asgi_3 = hasattr(self.loaded_app, "__await__")
|
| 455 |
+
elif inspect.isfunction(self.loaded_app):
|
| 456 |
+
use_asgi_3 = asyncio.iscoroutinefunction(self.loaded_app)
|
| 457 |
+
else:
|
| 458 |
+
call = getattr(self.loaded_app, "__call__", None)
|
| 459 |
+
use_asgi_3 = asyncio.iscoroutinefunction(call)
|
| 460 |
+
self.interface = "asgi3" if use_asgi_3 else "asgi2"
|
| 461 |
+
|
| 462 |
+
if self.interface == "wsgi":
|
| 463 |
+
self.loaded_app = WSGIMiddleware(self.loaded_app)
|
| 464 |
+
self.ws_protocol_class = None
|
| 465 |
+
elif self.interface == "asgi2":
|
| 466 |
+
self.loaded_app = ASGI2Middleware(self.loaded_app)
|
| 467 |
+
|
| 468 |
+
if logger.getEffectiveLevel() <= TRACE_LOG_LEVEL:
|
| 469 |
+
self.loaded_app = MessageLoggerMiddleware(self.loaded_app)
|
| 470 |
+
if self.proxy_headers:
|
| 471 |
+
self.loaded_app = ProxyHeadersMiddleware(self.loaded_app, trusted_hosts=self.forwarded_allow_ips)
|
| 472 |
+
|
| 473 |
+
self.loaded = True
|
| 474 |
+
|
| 475 |
+
def setup_event_loop(self) -> None:
|
| 476 |
+
loop_setup: Callable | None = import_from_string(LOOP_SETUPS[self.loop])
|
| 477 |
+
if loop_setup is not None:
|
| 478 |
+
loop_setup(use_subprocess=self.use_subprocess)
|
| 479 |
+
|
| 480 |
+
def bind_socket(self) -> socket.socket:
|
| 481 |
+
logger_args: list[str | int]
|
| 482 |
+
if self.uds: # pragma: py-win32
|
| 483 |
+
path = self.uds
|
| 484 |
+
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
| 485 |
+
try:
|
| 486 |
+
sock.bind(path)
|
| 487 |
+
uds_perms = 0o666
|
| 488 |
+
os.chmod(self.uds, uds_perms)
|
| 489 |
+
except OSError as exc: # pragma: full coverage
|
| 490 |
+
logger.error(exc)
|
| 491 |
+
sys.exit(1)
|
| 492 |
+
|
| 493 |
+
message = "Uvicorn running on unix socket %s (Press CTRL+C to quit)"
|
| 494 |
+
sock_name_format = "%s"
|
| 495 |
+
color_message = "Uvicorn running on " + click.style(sock_name_format, bold=True) + " (Press CTRL+C to quit)"
|
| 496 |
+
logger_args = [self.uds]
|
| 497 |
+
elif self.fd: # pragma: py-win32
|
| 498 |
+
sock = socket.fromfd(self.fd, socket.AF_UNIX, socket.SOCK_STREAM)
|
| 499 |
+
message = "Uvicorn running on socket %s (Press CTRL+C to quit)"
|
| 500 |
+
fd_name_format = "%s"
|
| 501 |
+
color_message = "Uvicorn running on " + click.style(fd_name_format, bold=True) + " (Press CTRL+C to quit)"
|
| 502 |
+
logger_args = [sock.getsockname()]
|
| 503 |
+
else:
|
| 504 |
+
family = socket.AF_INET
|
| 505 |
+
addr_format = "%s://%s:%d"
|
| 506 |
+
|
| 507 |
+
if self.host and ":" in self.host: # pragma: full coverage
|
| 508 |
+
# It's an IPv6 address.
|
| 509 |
+
family = socket.AF_INET6
|
| 510 |
+
addr_format = "%s://[%s]:%d"
|
| 511 |
+
|
| 512 |
+
sock = socket.socket(family=family)
|
| 513 |
+
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
| 514 |
+
try:
|
| 515 |
+
sock.bind((self.host, self.port))
|
| 516 |
+
except OSError as exc: # pragma: full coverage
|
| 517 |
+
logger.error(exc)
|
| 518 |
+
sys.exit(1)
|
| 519 |
+
|
| 520 |
+
message = f"Uvicorn running on {addr_format} (Press CTRL+C to quit)"
|
| 521 |
+
color_message = "Uvicorn running on " + click.style(addr_format, bold=True) + " (Press CTRL+C to quit)"
|
| 522 |
+
protocol_name = "https" if self.is_ssl else "http"
|
| 523 |
+
logger_args = [protocol_name, self.host, sock.getsockname()[1]]
|
| 524 |
+
logger.info(message, *logger_args, extra={"color_message": color_message})
|
| 525 |
+
sock.set_inheritable(True)
|
| 526 |
+
return sock
|
| 527 |
+
|
| 528 |
+
@property
|
| 529 |
+
def should_reload(self) -> bool:
|
| 530 |
+
return isinstance(self.app, str) and self.reload
|
falcon/lib/python3.10/site-packages/uvicorn/importer.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import importlib
|
| 2 |
+
from typing import Any
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
class ImportFromStringError(Exception):
|
| 6 |
+
pass
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def import_from_string(import_str: Any) -> Any:
|
| 10 |
+
if not isinstance(import_str, str):
|
| 11 |
+
return import_str
|
| 12 |
+
|
| 13 |
+
module_str, _, attrs_str = import_str.partition(":")
|
| 14 |
+
if not module_str or not attrs_str:
|
| 15 |
+
message = 'Import string "{import_str}" must be in format "<module>:<attribute>".'
|
| 16 |
+
raise ImportFromStringError(message.format(import_str=import_str))
|
| 17 |
+
|
| 18 |
+
try:
|
| 19 |
+
module = importlib.import_module(module_str)
|
| 20 |
+
except ModuleNotFoundError as exc:
|
| 21 |
+
if exc.name != module_str:
|
| 22 |
+
raise exc from None
|
| 23 |
+
message = 'Could not import module "{module_str}".'
|
| 24 |
+
raise ImportFromStringError(message.format(module_str=module_str))
|
| 25 |
+
|
| 26 |
+
instance = module
|
| 27 |
+
try:
|
| 28 |
+
for attr_str in attrs_str.split("."):
|
| 29 |
+
instance = getattr(instance, attr_str)
|
| 30 |
+
except AttributeError:
|
| 31 |
+
message = 'Attribute "{attrs_str}" not found in module "{module_str}".'
|
| 32 |
+
raise ImportFromStringError(message.format(attrs_str=attrs_str, module_str=module_str))
|
| 33 |
+
|
| 34 |
+
return instance
|
falcon/lib/python3.10/site-packages/uvicorn/lifespan/__init__.py
ADDED
|
File without changes
|
falcon/lib/python3.10/site-packages/uvicorn/lifespan/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (168 Bytes). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/lifespan/__pycache__/off.cpython-310.pyc
ADDED
|
Binary file (906 Bytes). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/lifespan/__pycache__/on.cpython-310.pyc
ADDED
|
Binary file (4.1 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/lifespan/off.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
from typing import Any
|
| 4 |
+
|
| 5 |
+
from uvicorn import Config
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class LifespanOff:
|
| 9 |
+
def __init__(self, config: Config) -> None:
|
| 10 |
+
self.should_exit = False
|
| 11 |
+
self.state: dict[str, Any] = {}
|
| 12 |
+
|
| 13 |
+
async def startup(self) -> None:
|
| 14 |
+
pass
|
| 15 |
+
|
| 16 |
+
async def shutdown(self) -> None:
|
| 17 |
+
pass
|
falcon/lib/python3.10/site-packages/uvicorn/lifespan/on.py
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import asyncio
|
| 4 |
+
import logging
|
| 5 |
+
from asyncio import Queue
|
| 6 |
+
from typing import Any, Union
|
| 7 |
+
|
| 8 |
+
from uvicorn import Config
|
| 9 |
+
from uvicorn._types import (
|
| 10 |
+
LifespanScope,
|
| 11 |
+
LifespanShutdownCompleteEvent,
|
| 12 |
+
LifespanShutdownEvent,
|
| 13 |
+
LifespanShutdownFailedEvent,
|
| 14 |
+
LifespanStartupCompleteEvent,
|
| 15 |
+
LifespanStartupEvent,
|
| 16 |
+
LifespanStartupFailedEvent,
|
| 17 |
+
)
|
| 18 |
+
|
| 19 |
+
LifespanReceiveMessage = Union[LifespanStartupEvent, LifespanShutdownEvent]
|
| 20 |
+
LifespanSendMessage = Union[
|
| 21 |
+
LifespanStartupFailedEvent,
|
| 22 |
+
LifespanShutdownFailedEvent,
|
| 23 |
+
LifespanStartupCompleteEvent,
|
| 24 |
+
LifespanShutdownCompleteEvent,
|
| 25 |
+
]
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
STATE_TRANSITION_ERROR = "Got invalid state transition on lifespan protocol."
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
class LifespanOn:
|
| 32 |
+
def __init__(self, config: Config) -> None:
|
| 33 |
+
if not config.loaded:
|
| 34 |
+
config.load()
|
| 35 |
+
|
| 36 |
+
self.config = config
|
| 37 |
+
self.logger = logging.getLogger("uvicorn.error")
|
| 38 |
+
self.startup_event = asyncio.Event()
|
| 39 |
+
self.shutdown_event = asyncio.Event()
|
| 40 |
+
self.receive_queue: Queue[LifespanReceiveMessage] = asyncio.Queue()
|
| 41 |
+
self.error_occured = False
|
| 42 |
+
self.startup_failed = False
|
| 43 |
+
self.shutdown_failed = False
|
| 44 |
+
self.should_exit = False
|
| 45 |
+
self.state: dict[str, Any] = {}
|
| 46 |
+
|
| 47 |
+
async def startup(self) -> None:
|
| 48 |
+
self.logger.info("Waiting for application startup.")
|
| 49 |
+
|
| 50 |
+
loop = asyncio.get_event_loop()
|
| 51 |
+
main_lifespan_task = loop.create_task(self.main()) # noqa: F841
|
| 52 |
+
# Keep a hard reference to prevent garbage collection
|
| 53 |
+
# See https://github.com/encode/uvicorn/pull/972
|
| 54 |
+
startup_event: LifespanStartupEvent = {"type": "lifespan.startup"}
|
| 55 |
+
await self.receive_queue.put(startup_event)
|
| 56 |
+
await self.startup_event.wait()
|
| 57 |
+
|
| 58 |
+
if self.startup_failed or (self.error_occured and self.config.lifespan == "on"):
|
| 59 |
+
self.logger.error("Application startup failed. Exiting.")
|
| 60 |
+
self.should_exit = True
|
| 61 |
+
else:
|
| 62 |
+
self.logger.info("Application startup complete.")
|
| 63 |
+
|
| 64 |
+
async def shutdown(self) -> None:
|
| 65 |
+
if self.error_occured:
|
| 66 |
+
return
|
| 67 |
+
self.logger.info("Waiting for application shutdown.")
|
| 68 |
+
shutdown_event: LifespanShutdownEvent = {"type": "lifespan.shutdown"}
|
| 69 |
+
await self.receive_queue.put(shutdown_event)
|
| 70 |
+
await self.shutdown_event.wait()
|
| 71 |
+
|
| 72 |
+
if self.shutdown_failed or (self.error_occured and self.config.lifespan == "on"):
|
| 73 |
+
self.logger.error("Application shutdown failed. Exiting.")
|
| 74 |
+
self.should_exit = True
|
| 75 |
+
else:
|
| 76 |
+
self.logger.info("Application shutdown complete.")
|
| 77 |
+
|
| 78 |
+
async def main(self) -> None:
|
| 79 |
+
try:
|
| 80 |
+
app = self.config.loaded_app
|
| 81 |
+
scope: LifespanScope = {
|
| 82 |
+
"type": "lifespan",
|
| 83 |
+
"asgi": {"version": self.config.asgi_version, "spec_version": "2.0"},
|
| 84 |
+
"state": self.state,
|
| 85 |
+
}
|
| 86 |
+
await app(scope, self.receive, self.send)
|
| 87 |
+
except BaseException as exc:
|
| 88 |
+
self.asgi = None
|
| 89 |
+
self.error_occured = True
|
| 90 |
+
if self.startup_failed or self.shutdown_failed:
|
| 91 |
+
return
|
| 92 |
+
if self.config.lifespan == "auto":
|
| 93 |
+
msg = "ASGI 'lifespan' protocol appears unsupported."
|
| 94 |
+
self.logger.info(msg)
|
| 95 |
+
else:
|
| 96 |
+
msg = "Exception in 'lifespan' protocol\n"
|
| 97 |
+
self.logger.error(msg, exc_info=exc)
|
| 98 |
+
finally:
|
| 99 |
+
self.startup_event.set()
|
| 100 |
+
self.shutdown_event.set()
|
| 101 |
+
|
| 102 |
+
async def send(self, message: LifespanSendMessage) -> None:
|
| 103 |
+
assert message["type"] in (
|
| 104 |
+
"lifespan.startup.complete",
|
| 105 |
+
"lifespan.startup.failed",
|
| 106 |
+
"lifespan.shutdown.complete",
|
| 107 |
+
"lifespan.shutdown.failed",
|
| 108 |
+
)
|
| 109 |
+
|
| 110 |
+
if message["type"] == "lifespan.startup.complete":
|
| 111 |
+
assert not self.startup_event.is_set(), STATE_TRANSITION_ERROR
|
| 112 |
+
assert not self.shutdown_event.is_set(), STATE_TRANSITION_ERROR
|
| 113 |
+
self.startup_event.set()
|
| 114 |
+
|
| 115 |
+
elif message["type"] == "lifespan.startup.failed":
|
| 116 |
+
assert not self.startup_event.is_set(), STATE_TRANSITION_ERROR
|
| 117 |
+
assert not self.shutdown_event.is_set(), STATE_TRANSITION_ERROR
|
| 118 |
+
self.startup_event.set()
|
| 119 |
+
self.startup_failed = True
|
| 120 |
+
if message.get("message"):
|
| 121 |
+
self.logger.error(message["message"])
|
| 122 |
+
|
| 123 |
+
elif message["type"] == "lifespan.shutdown.complete":
|
| 124 |
+
assert self.startup_event.is_set(), STATE_TRANSITION_ERROR
|
| 125 |
+
assert not self.shutdown_event.is_set(), STATE_TRANSITION_ERROR
|
| 126 |
+
self.shutdown_event.set()
|
| 127 |
+
|
| 128 |
+
elif message["type"] == "lifespan.shutdown.failed":
|
| 129 |
+
assert self.startup_event.is_set(), STATE_TRANSITION_ERROR
|
| 130 |
+
assert not self.shutdown_event.is_set(), STATE_TRANSITION_ERROR
|
| 131 |
+
self.shutdown_event.set()
|
| 132 |
+
self.shutdown_failed = True
|
| 133 |
+
if message.get("message"):
|
| 134 |
+
self.logger.error(message["message"])
|
| 135 |
+
|
| 136 |
+
async def receive(self) -> LifespanReceiveMessage:
|
| 137 |
+
return await self.receive_queue.get()
|
falcon/lib/python3.10/site-packages/uvicorn/loops/__pycache__/uvloop.cpython-310.pyc
ADDED
|
Binary file (416 Bytes). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/loops/uvloop.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import asyncio
|
| 2 |
+
|
| 3 |
+
import uvloop
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def uvloop_setup(use_subprocess: bool = False) -> None:
|
| 7 |
+
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
falcon/lib/python3.10/site-packages/uvicorn/middleware/__init__.py
ADDED
|
File without changes
|
falcon/lib/python3.10/site-packages/uvicorn/middleware/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (170 Bytes). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/middleware/__pycache__/asgi2.cpython-310.pyc
ADDED
|
Binary file (891 Bytes). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/middleware/__pycache__/message_logger.cpython-310.pyc
ADDED
|
Binary file (3 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/middleware/__pycache__/proxy_headers.cpython-310.pyc
ADDED
|
Binary file (4.21 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/middleware/__pycache__/wsgi.cpython-310.pyc
ADDED
|
Binary file (6 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/middleware/asgi2.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from uvicorn._types import (
|
| 2 |
+
ASGI2Application,
|
| 3 |
+
ASGIReceiveCallable,
|
| 4 |
+
ASGISendCallable,
|
| 5 |
+
Scope,
|
| 6 |
+
)
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
class ASGI2Middleware:
|
| 10 |
+
def __init__(self, app: "ASGI2Application"):
|
| 11 |
+
self.app = app
|
| 12 |
+
|
| 13 |
+
async def __call__(self, scope: "Scope", receive: "ASGIReceiveCallable", send: "ASGISendCallable") -> None:
|
| 14 |
+
instance = self.app(scope)
|
| 15 |
+
await instance(receive, send)
|
falcon/lib/python3.10/site-packages/uvicorn/middleware/message_logger.py
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import logging
|
| 2 |
+
from typing import Any
|
| 3 |
+
|
| 4 |
+
from uvicorn._types import (
|
| 5 |
+
ASGI3Application,
|
| 6 |
+
ASGIReceiveCallable,
|
| 7 |
+
ASGIReceiveEvent,
|
| 8 |
+
ASGISendCallable,
|
| 9 |
+
ASGISendEvent,
|
| 10 |
+
WWWScope,
|
| 11 |
+
)
|
| 12 |
+
from uvicorn.logging import TRACE_LOG_LEVEL
|
| 13 |
+
|
| 14 |
+
PLACEHOLDER_FORMAT = {
|
| 15 |
+
"body": "<{length} bytes>",
|
| 16 |
+
"bytes": "<{length} bytes>",
|
| 17 |
+
"text": "<{length} chars>",
|
| 18 |
+
"headers": "<...>",
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
def message_with_placeholders(message: Any) -> Any:
|
| 23 |
+
"""
|
| 24 |
+
Return an ASGI message, with any body-type content omitted and replaced
|
| 25 |
+
with a placeholder.
|
| 26 |
+
"""
|
| 27 |
+
new_message = message.copy()
|
| 28 |
+
for attr in PLACEHOLDER_FORMAT.keys():
|
| 29 |
+
if message.get(attr) is not None:
|
| 30 |
+
content = message[attr]
|
| 31 |
+
placeholder = PLACEHOLDER_FORMAT[attr].format(length=len(content))
|
| 32 |
+
new_message[attr] = placeholder
|
| 33 |
+
return new_message
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
class MessageLoggerMiddleware:
|
| 37 |
+
def __init__(self, app: "ASGI3Application"):
|
| 38 |
+
self.task_counter = 0
|
| 39 |
+
self.app = app
|
| 40 |
+
self.logger = logging.getLogger("uvicorn.asgi")
|
| 41 |
+
|
| 42 |
+
def trace(message: Any, *args: Any, **kwargs: Any) -> None:
|
| 43 |
+
self.logger.log(TRACE_LOG_LEVEL, message, *args, **kwargs)
|
| 44 |
+
|
| 45 |
+
self.logger.trace = trace # type: ignore
|
| 46 |
+
|
| 47 |
+
async def __call__(
|
| 48 |
+
self,
|
| 49 |
+
scope: "WWWScope",
|
| 50 |
+
receive: "ASGIReceiveCallable",
|
| 51 |
+
send: "ASGISendCallable",
|
| 52 |
+
) -> None:
|
| 53 |
+
self.task_counter += 1
|
| 54 |
+
|
| 55 |
+
task_counter = self.task_counter
|
| 56 |
+
client = scope.get("client")
|
| 57 |
+
prefix = "%s:%d - ASGI" % (client[0], client[1]) if client else "ASGI"
|
| 58 |
+
|
| 59 |
+
async def inner_receive() -> "ASGIReceiveEvent":
|
| 60 |
+
message = await receive()
|
| 61 |
+
logged_message = message_with_placeholders(message)
|
| 62 |
+
log_text = "%s [%d] Receive %s"
|
| 63 |
+
self.logger.trace( # type: ignore
|
| 64 |
+
log_text, prefix, task_counter, logged_message
|
| 65 |
+
)
|
| 66 |
+
return message
|
| 67 |
+
|
| 68 |
+
async def inner_send(message: "ASGISendEvent") -> None:
|
| 69 |
+
logged_message = message_with_placeholders(message)
|
| 70 |
+
log_text = "%s [%d] Send %s"
|
| 71 |
+
self.logger.trace( # type: ignore
|
| 72 |
+
log_text, prefix, task_counter, logged_message
|
| 73 |
+
)
|
| 74 |
+
await send(message)
|
| 75 |
+
|
| 76 |
+
logged_scope = message_with_placeholders(scope)
|
| 77 |
+
log_text = "%s [%d] Started scope=%s"
|
| 78 |
+
self.logger.trace(log_text, prefix, task_counter, logged_scope) # type: ignore
|
| 79 |
+
try:
|
| 80 |
+
await self.app(scope, inner_receive, inner_send)
|
| 81 |
+
except BaseException as exc:
|
| 82 |
+
log_text = "%s [%d] Raised exception"
|
| 83 |
+
self.logger.trace(log_text, prefix, task_counter) # type: ignore
|
| 84 |
+
raise exc from None
|
| 85 |
+
else:
|
| 86 |
+
log_text = "%s [%d] Completed"
|
| 87 |
+
self.logger.trace(log_text, prefix, task_counter) # type: ignore
|
falcon/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import ipaddress
|
| 4 |
+
|
| 5 |
+
from uvicorn._types import ASGI3Application, ASGIReceiveCallable, ASGISendCallable, Scope
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class ProxyHeadersMiddleware:
|
| 9 |
+
"""Middleware for handling known proxy headers
|
| 10 |
+
|
| 11 |
+
This middleware can be used when a known proxy is fronting the application,
|
| 12 |
+
and is trusted to be properly setting the `X-Forwarded-Proto` and
|
| 13 |
+
`X-Forwarded-For` headers with the connecting client information.
|
| 14 |
+
|
| 15 |
+
Modifies the `client` and `scheme` information so that they reference
|
| 16 |
+
the connecting client, rather that the connecting proxy.
|
| 17 |
+
|
| 18 |
+
References:
|
| 19 |
+
- <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#Proxies>
|
| 20 |
+
- <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For>
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
+
def __init__(self, app: ASGI3Application, trusted_hosts: list[str] | str = "127.0.0.1") -> None:
|
| 24 |
+
self.app = app
|
| 25 |
+
self.trusted_hosts = _TrustedHosts(trusted_hosts)
|
| 26 |
+
|
| 27 |
+
async def __call__(self, scope: Scope, receive: ASGIReceiveCallable, send: ASGISendCallable) -> None:
|
| 28 |
+
if scope["type"] == "lifespan":
|
| 29 |
+
return await self.app(scope, receive, send)
|
| 30 |
+
|
| 31 |
+
client_addr = scope.get("client")
|
| 32 |
+
client_host = client_addr[0] if client_addr else None
|
| 33 |
+
|
| 34 |
+
if client_host in self.trusted_hosts:
|
| 35 |
+
headers = dict(scope["headers"])
|
| 36 |
+
|
| 37 |
+
if b"x-forwarded-proto" in headers:
|
| 38 |
+
x_forwarded_proto = headers[b"x-forwarded-proto"].decode("latin1").strip()
|
| 39 |
+
|
| 40 |
+
if x_forwarded_proto in {"http", "https", "ws", "wss"}:
|
| 41 |
+
if scope["type"] == "websocket":
|
| 42 |
+
scope["scheme"] = x_forwarded_proto.replace("http", "ws")
|
| 43 |
+
else:
|
| 44 |
+
scope["scheme"] = x_forwarded_proto
|
| 45 |
+
|
| 46 |
+
if b"x-forwarded-for" in headers:
|
| 47 |
+
x_forwarded_for = headers[b"x-forwarded-for"].decode("latin1")
|
| 48 |
+
host = self.trusted_hosts.get_trusted_client_host(x_forwarded_for)
|
| 49 |
+
|
| 50 |
+
if host:
|
| 51 |
+
# If the x-forwarded-for header is empty then host is an empty string.
|
| 52 |
+
# Only set the client if we actually got something usable.
|
| 53 |
+
# See: https://github.com/encode/uvicorn/issues/1068
|
| 54 |
+
|
| 55 |
+
# We've lost the connecting client's port information by now,
|
| 56 |
+
# so only include the host.
|
| 57 |
+
port = 0
|
| 58 |
+
scope["client"] = (host, port)
|
| 59 |
+
|
| 60 |
+
return await self.app(scope, receive, send)
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
def _parse_raw_hosts(value: str) -> list[str]:
|
| 64 |
+
return [item.strip() for item in value.split(",")]
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
class _TrustedHosts:
|
| 68 |
+
"""Container for trusted hosts and networks"""
|
| 69 |
+
|
| 70 |
+
def __init__(self, trusted_hosts: list[str] | str) -> None:
|
| 71 |
+
self.always_trust: bool = trusted_hosts in ("*", ["*"])
|
| 72 |
+
|
| 73 |
+
self.trusted_literals: set[str] = set()
|
| 74 |
+
self.trusted_hosts: set[ipaddress.IPv4Address | ipaddress.IPv6Address] = set()
|
| 75 |
+
self.trusted_networks: set[ipaddress.IPv4Network | ipaddress.IPv6Network] = set()
|
| 76 |
+
|
| 77 |
+
# Notes:
|
| 78 |
+
# - We separate hosts from literals as there are many ways to write
|
| 79 |
+
# an IPv6 Address so we need to compare by object.
|
| 80 |
+
# - We don't convert IP Address to single host networks (e.g. /32 / 128) as
|
| 81 |
+
# it more efficient to do an address lookup in a set than check for
|
| 82 |
+
# membership in each network.
|
| 83 |
+
# - We still allow literals as it might be possible that we receive a
|
| 84 |
+
# something that isn't an IP Address e.g. a unix socket.
|
| 85 |
+
|
| 86 |
+
if not self.always_trust:
|
| 87 |
+
if isinstance(trusted_hosts, str):
|
| 88 |
+
trusted_hosts = _parse_raw_hosts(trusted_hosts)
|
| 89 |
+
|
| 90 |
+
for host in trusted_hosts:
|
| 91 |
+
# Note: because we always convert invalid IP types to literals it
|
| 92 |
+
# is not possible for the user to know they provided a malformed IP
|
| 93 |
+
# type - this may lead to unexpected / difficult to debug behaviour.
|
| 94 |
+
|
| 95 |
+
if "/" in host:
|
| 96 |
+
# Looks like a network
|
| 97 |
+
try:
|
| 98 |
+
self.trusted_networks.add(ipaddress.ip_network(host))
|
| 99 |
+
except ValueError:
|
| 100 |
+
# Was not a valid IP Network
|
| 101 |
+
self.trusted_literals.add(host)
|
| 102 |
+
else:
|
| 103 |
+
try:
|
| 104 |
+
self.trusted_hosts.add(ipaddress.ip_address(host))
|
| 105 |
+
except ValueError:
|
| 106 |
+
# Was not a valid IP Address
|
| 107 |
+
self.trusted_literals.add(host)
|
| 108 |
+
|
| 109 |
+
def __contains__(self, host: str | None) -> bool:
|
| 110 |
+
if self.always_trust:
|
| 111 |
+
return True
|
| 112 |
+
|
| 113 |
+
if not host:
|
| 114 |
+
return False
|
| 115 |
+
|
| 116 |
+
try:
|
| 117 |
+
ip = ipaddress.ip_address(host)
|
| 118 |
+
if ip in self.trusted_hosts:
|
| 119 |
+
return True
|
| 120 |
+
return any(ip in net for net in self.trusted_networks)
|
| 121 |
+
|
| 122 |
+
except ValueError:
|
| 123 |
+
return host in self.trusted_literals
|
| 124 |
+
|
| 125 |
+
def get_trusted_client_host(self, x_forwarded_for: str) -> str:
|
| 126 |
+
"""Extract the client host from x_forwarded_for header
|
| 127 |
+
|
| 128 |
+
In general this is the first "untrusted" host in the forwarded for list.
|
| 129 |
+
"""
|
| 130 |
+
x_forwarded_for_hosts = _parse_raw_hosts(x_forwarded_for)
|
| 131 |
+
|
| 132 |
+
if self.always_trust:
|
| 133 |
+
return x_forwarded_for_hosts[0]
|
| 134 |
+
|
| 135 |
+
# Note: each proxy appends to the header list so check it in reverse order
|
| 136 |
+
for host in reversed(x_forwarded_for_hosts):
|
| 137 |
+
if host not in self:
|
| 138 |
+
return host
|
| 139 |
+
|
| 140 |
+
# All hosts are trusted meaning that the client was also a trusted proxy
|
| 141 |
+
# See https://github.com/encode/uvicorn/issues/1068#issuecomment-855371576
|
| 142 |
+
return x_forwarded_for_hosts[0]
|
falcon/lib/python3.10/site-packages/uvicorn/middleware/wsgi.py
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import asyncio
|
| 4 |
+
import concurrent.futures
|
| 5 |
+
import io
|
| 6 |
+
import sys
|
| 7 |
+
import warnings
|
| 8 |
+
from collections import deque
|
| 9 |
+
from collections.abc import Iterable
|
| 10 |
+
|
| 11 |
+
from uvicorn._types import (
|
| 12 |
+
ASGIReceiveCallable,
|
| 13 |
+
ASGIReceiveEvent,
|
| 14 |
+
ASGISendCallable,
|
| 15 |
+
ASGISendEvent,
|
| 16 |
+
Environ,
|
| 17 |
+
ExcInfo,
|
| 18 |
+
HTTPRequestEvent,
|
| 19 |
+
HTTPResponseBodyEvent,
|
| 20 |
+
HTTPResponseStartEvent,
|
| 21 |
+
HTTPScope,
|
| 22 |
+
StartResponse,
|
| 23 |
+
WSGIApp,
|
| 24 |
+
)
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
def build_environ(scope: HTTPScope, message: ASGIReceiveEvent, body: io.BytesIO) -> Environ:
|
| 28 |
+
"""
|
| 29 |
+
Builds a scope and request message into a WSGI environ object.
|
| 30 |
+
"""
|
| 31 |
+
script_name = scope.get("root_path", "").encode("utf8").decode("latin1")
|
| 32 |
+
path_info = scope["path"].encode("utf8").decode("latin1")
|
| 33 |
+
if path_info.startswith(script_name):
|
| 34 |
+
path_info = path_info[len(script_name) :]
|
| 35 |
+
environ = {
|
| 36 |
+
"REQUEST_METHOD": scope["method"],
|
| 37 |
+
"SCRIPT_NAME": script_name,
|
| 38 |
+
"PATH_INFO": path_info,
|
| 39 |
+
"QUERY_STRING": scope["query_string"].decode("ascii"),
|
| 40 |
+
"SERVER_PROTOCOL": "HTTP/%s" % scope["http_version"],
|
| 41 |
+
"wsgi.version": (1, 0),
|
| 42 |
+
"wsgi.url_scheme": scope.get("scheme", "http"),
|
| 43 |
+
"wsgi.input": body,
|
| 44 |
+
"wsgi.errors": sys.stdout,
|
| 45 |
+
"wsgi.multithread": True,
|
| 46 |
+
"wsgi.multiprocess": True,
|
| 47 |
+
"wsgi.run_once": False,
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
# Get server name and port - required in WSGI, not in ASGI
|
| 51 |
+
server = scope.get("server")
|
| 52 |
+
if server is None:
|
| 53 |
+
server = ("localhost", 80)
|
| 54 |
+
environ["SERVER_NAME"] = server[0]
|
| 55 |
+
environ["SERVER_PORT"] = server[1]
|
| 56 |
+
|
| 57 |
+
# Get client IP address
|
| 58 |
+
client = scope.get("client")
|
| 59 |
+
if client is not None:
|
| 60 |
+
environ["REMOTE_ADDR"] = client[0]
|
| 61 |
+
|
| 62 |
+
# Go through headers and make them into environ entries
|
| 63 |
+
for name, value in scope.get("headers", []):
|
| 64 |
+
name_str: str = name.decode("latin1")
|
| 65 |
+
if name_str == "content-length":
|
| 66 |
+
corrected_name = "CONTENT_LENGTH"
|
| 67 |
+
elif name_str == "content-type":
|
| 68 |
+
corrected_name = "CONTENT_TYPE"
|
| 69 |
+
else:
|
| 70 |
+
corrected_name = "HTTP_%s" % name_str.upper().replace("-", "_")
|
| 71 |
+
# HTTPbis say only ASCII chars are allowed in headers, but we latin1
|
| 72 |
+
# just in case
|
| 73 |
+
value_str: str = value.decode("latin1")
|
| 74 |
+
if corrected_name in environ:
|
| 75 |
+
corrected_name_environ = environ[corrected_name]
|
| 76 |
+
assert isinstance(corrected_name_environ, str)
|
| 77 |
+
value_str = corrected_name_environ + "," + value_str
|
| 78 |
+
environ[corrected_name] = value_str
|
| 79 |
+
return environ
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
class _WSGIMiddleware:
|
| 83 |
+
def __init__(self, app: WSGIApp, workers: int = 10):
|
| 84 |
+
warnings.warn(
|
| 85 |
+
"Uvicorn's native WSGI implementation is deprecated, you "
|
| 86 |
+
"should switch to a2wsgi (`pip install a2wsgi`).",
|
| 87 |
+
DeprecationWarning,
|
| 88 |
+
)
|
| 89 |
+
self.app = app
|
| 90 |
+
self.executor = concurrent.futures.ThreadPoolExecutor(max_workers=workers)
|
| 91 |
+
|
| 92 |
+
async def __call__(
|
| 93 |
+
self,
|
| 94 |
+
scope: HTTPScope,
|
| 95 |
+
receive: ASGIReceiveCallable,
|
| 96 |
+
send: ASGISendCallable,
|
| 97 |
+
) -> None:
|
| 98 |
+
assert scope["type"] == "http"
|
| 99 |
+
instance = WSGIResponder(self.app, self.executor, scope)
|
| 100 |
+
await instance(receive, send)
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
class WSGIResponder:
|
| 104 |
+
def __init__(
|
| 105 |
+
self,
|
| 106 |
+
app: WSGIApp,
|
| 107 |
+
executor: concurrent.futures.ThreadPoolExecutor,
|
| 108 |
+
scope: HTTPScope,
|
| 109 |
+
):
|
| 110 |
+
self.app = app
|
| 111 |
+
self.executor = executor
|
| 112 |
+
self.scope = scope
|
| 113 |
+
self.status = None
|
| 114 |
+
self.response_headers = None
|
| 115 |
+
self.send_event = asyncio.Event()
|
| 116 |
+
self.send_queue: deque[ASGISendEvent | None] = deque()
|
| 117 |
+
self.loop: asyncio.AbstractEventLoop = asyncio.get_event_loop()
|
| 118 |
+
self.response_started = False
|
| 119 |
+
self.exc_info: ExcInfo | None = None
|
| 120 |
+
|
| 121 |
+
async def __call__(self, receive: ASGIReceiveCallable, send: ASGISendCallable) -> None:
|
| 122 |
+
message: HTTPRequestEvent = await receive() # type: ignore[assignment]
|
| 123 |
+
body = io.BytesIO(message.get("body", b""))
|
| 124 |
+
more_body = message.get("more_body", False)
|
| 125 |
+
if more_body:
|
| 126 |
+
body.seek(0, io.SEEK_END)
|
| 127 |
+
while more_body:
|
| 128 |
+
body_message: HTTPRequestEvent = (
|
| 129 |
+
await receive() # type: ignore[assignment]
|
| 130 |
+
)
|
| 131 |
+
body.write(body_message.get("body", b""))
|
| 132 |
+
more_body = body_message.get("more_body", False)
|
| 133 |
+
body.seek(0)
|
| 134 |
+
environ = build_environ(self.scope, message, body)
|
| 135 |
+
self.loop = asyncio.get_event_loop()
|
| 136 |
+
wsgi = self.loop.run_in_executor(self.executor, self.wsgi, environ, self.start_response)
|
| 137 |
+
sender = self.loop.create_task(self.sender(send))
|
| 138 |
+
try:
|
| 139 |
+
await asyncio.wait_for(wsgi, None)
|
| 140 |
+
finally:
|
| 141 |
+
self.send_queue.append(None)
|
| 142 |
+
self.send_event.set()
|
| 143 |
+
await asyncio.wait_for(sender, None)
|
| 144 |
+
if self.exc_info is not None:
|
| 145 |
+
raise self.exc_info[0].with_traceback(self.exc_info[1], self.exc_info[2])
|
| 146 |
+
|
| 147 |
+
async def sender(self, send: ASGISendCallable) -> None:
|
| 148 |
+
while True:
|
| 149 |
+
if self.send_queue:
|
| 150 |
+
message = self.send_queue.popleft()
|
| 151 |
+
if message is None:
|
| 152 |
+
return
|
| 153 |
+
await send(message)
|
| 154 |
+
else:
|
| 155 |
+
await self.send_event.wait()
|
| 156 |
+
self.send_event.clear()
|
| 157 |
+
|
| 158 |
+
def start_response(
|
| 159 |
+
self,
|
| 160 |
+
status: str,
|
| 161 |
+
response_headers: Iterable[tuple[str, str]],
|
| 162 |
+
exc_info: ExcInfo | None = None,
|
| 163 |
+
) -> None:
|
| 164 |
+
self.exc_info = exc_info
|
| 165 |
+
if not self.response_started:
|
| 166 |
+
self.response_started = True
|
| 167 |
+
status_code_str, _ = status.split(" ", 1)
|
| 168 |
+
status_code = int(status_code_str)
|
| 169 |
+
headers = [(name.encode("ascii"), value.encode("ascii")) for name, value in response_headers]
|
| 170 |
+
http_response_start_event: HTTPResponseStartEvent = {
|
| 171 |
+
"type": "http.response.start",
|
| 172 |
+
"status": status_code,
|
| 173 |
+
"headers": headers,
|
| 174 |
+
}
|
| 175 |
+
self.send_queue.append(http_response_start_event)
|
| 176 |
+
self.loop.call_soon_threadsafe(self.send_event.set)
|
| 177 |
+
|
| 178 |
+
def wsgi(self, environ: Environ, start_response: StartResponse) -> None:
|
| 179 |
+
for chunk in self.app(environ, start_response): # type: ignore
|
| 180 |
+
response_body: HTTPResponseBodyEvent = {
|
| 181 |
+
"type": "http.response.body",
|
| 182 |
+
"body": chunk,
|
| 183 |
+
"more_body": True,
|
| 184 |
+
}
|
| 185 |
+
self.send_queue.append(response_body)
|
| 186 |
+
self.loop.call_soon_threadsafe(self.send_event.set)
|
| 187 |
+
|
| 188 |
+
empty_body: HTTPResponseBodyEvent = {
|
| 189 |
+
"type": "http.response.body",
|
| 190 |
+
"body": b"",
|
| 191 |
+
"more_body": False,
|
| 192 |
+
}
|
| 193 |
+
self.send_queue.append(empty_body)
|
| 194 |
+
self.loop.call_soon_threadsafe(self.send_event.set)
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
try:
|
| 198 |
+
from a2wsgi import WSGIMiddleware
|
| 199 |
+
except ModuleNotFoundError: # pragma: no cover
|
| 200 |
+
WSGIMiddleware = _WSGIMiddleware # type: ignore[misc, assignment]
|
falcon/lib/python3.10/site-packages/uvicorn/protocols/__pycache__/utils.cpython-310.pyc
ADDED
|
Binary file (1.95 kB). View file
|
|
|
falcon/lib/python3.10/site-packages/uvicorn/protocols/http/__init__.py
ADDED
|
File without changes
|