Distributing
Distributing
3.9.13
31, 2022
1 3
2 5
3 7
4 Python 9
5               ...                                                                                                         11
    5.1   ...                                   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       11
    5.2   ...                                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       11
A 13
B                                                                                                                           25
    B.1   Python                    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .       25
C                                                                                                                           27
    C.1                       . . . . . . . . . . . . . . . . . . . . . . .   . . .   . . . . . . . . . . . . . . . . . .   27
    C.2                                 Python                    . . . . .   . . .   . . . . . . . . . . . . . . . . . .   28
          C.2.1             PYTHON 3.9.13         PSF               . . . .   . . .   . . . . . . . . . . . . . . . . . .   28
          C.2.2             PYTHON 2.0         BEOPEN.COM                     . . .   . . . . . . . . . . . . . . . . . .   29
          C.2.3             PYTHON 1.6.1         CNRI               . . . .   . . .   . . . . . . . . . . . . . . . . . .   30
          C.2.4             PYTHON 0.9.0         1.2 CWI                  .   . . .   . . . . . . . . . . . . . . . . . .   31
          C.2.5       ZERO-CLAUSE BSD LICENSE FOR CODE IN                     THE     PYTHON 3.9.13 DOCUMEN-
                      TATION . . . . . . . . . . . . . . . . . . . . . .      . . .   . . . . . . . . . . . . . . . . . .   31
    C.3                                       . . . . . . . . . . . . . . .   . . .   . . . . . . . . . . . . . . . . . .   31
          C.3.1       Mersenne Twister . . . . . . . . . . . . . . . . .      . . .   . . . . . . . . . . . . . . . . . .   32
          C.3.2                 . . . . . . . . . . . . . . . . . . . . . .   . . .   . . . . . . . . . . . . . . . . . .   32
          C.3.3                           . . . . . . . . . . . . . . . . .   . . .   . . . . . . . . . . . . . . . . . .   33
          C.3.4       Cookie        . . . . . . . . . . . . . . . . . . . .   . . .   . . . . . . . . . . . . . . . . . .   33
          C.3.5                   . . . . . . . . . . . . . . . . . . . . .   . . .   . . . . . . . . . . . . . . . . . .   34
          C.3.6       UUencode       UUdecode           . . . . . . . . . .   . . .   . . . . . . . . . . . . . . . . . .   34
          C.3.7       XML                     . . . . . . . . . . . . . . .   . . .   . . . . . . . . . . . . . . . . . .   35
          C.3.8       test_epoll . . . . . . . . . . . . . . . . . . . . .    . . .   . . . . . . . . . . . . . . . . . .   35
          C.3.9       Select kqueue . . . . . . . . . . . . . . . . . . .     . . .   . . . . . . . . . . . . . . . . . .   36
          C.3.10      SipHash24 . . . . . . . . . . . . . . . . . . . . .     . . .   . . . . . . . . . . . . . . . . . .   36
          C.3.11      strtod    dtoa . . . . . . . . . . . . . . . . . . .    . . .   . . . . . . . . . . . . . . . . . .   37
          C.3.12      OpenSSL . . . . . . . . . . . . . . . . . . . . .       . . .   . . . . . . . . . . . . . . . . . .   37
          C.3.13      expat . . . . . . . . . . . . . . . . . . . . . . . .   . . .   . . . . . . . . . . . . . . . . . .   40
          C.3.14      libffi . . . . . . . . . . . . . . . . . . . . . . . .    . . .   . . . . . . . . . . . . . . . . . .   40
          C.3.15      zlib . . . . . . . . . . . . . . . . . . . . . . . .    . . .   . . . . . . . . . . . . . . . . . .   41
                                                                                                                             i
     C.3.16 cfuhash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   41
     C.3.17 libmpdec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    42
     C.3.18 W3C C14N                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   42
D 45
47
ii
                                                      Distributing Python Modules,   3.9.13
                  distutils-sig@python.org
                                   Python
                  Python
         Python
Python
    :
Python
Contents                                                                                 1
Distributing Python Modules,   3.9.13
2                                       Contents
                                                                                      CHAPTER           1
• the Python Package Index is a public repository of open source licensed packages made available for use by
  other Python users
• Python Packaging Authority
                                     GitHub     Bitbucket
                                                                                                          3
Distributing Python Modules,   3.9.13
4                                       Chapter 1.
         CHAPTER   2
Python
                   5
Distributing Python Modules,   3.9.13
6                                       Chapter 2.
                                                                                          CHAPTER           3
                          Python
Python
                         pip                                            :
    : For POSIX users (including macOS and Linux users), these instructions assume the use of a virtual environ-
ment.
     Windows                                 Python                         PATH
Python
                                                                                                              7
Distributing Python Modules,   3.9.13
8                                       Chapter 3.
                                                                 CHAPTER   4
Python
Python
  •
  •
  • Uploading the project to the Python Package Index
  • The .pypirc file
                                                                           9
Distributing Python Modules,   3.9.13
10                                      Chapter 4.   Python
                                                                           CHAPTER     5
...
5.1 ...
   • check the Python Package Index to see if the name is already in use
   •                           GitHub Bitbucket
   •
   •
5.2 ...
  Python
    :
Python
                                                                                       11
Distributing Python Modules,   3.9.13
12                                      Chapter 5.   ...
                                                                                           APPENDIX                   A
>>>                            Python
...
          •                                                Python
          • Ellipsis
2to3     Python 2.x                 Python 3.x
          __annotations__
              variable annotation   function annotation    PEP 484        PEP 526
argument --                               function        method
          •                :                                         name=                                       **
                                             3     5             complex()                                   :
              complex(real=3, imag=5)
              complex(**{'real': 3, 'imag': 5})
          •             :                                                                        /
                    *   iterable                                     3    5                              :
              complex(3, 5)
              complex(*(3, 5))
                                                                                                                      13
Distributing Python Modules,                       3.9.13
calls
14                                                                                               Appendix A.
                                                                            Distributing Python Modules,         3.9.13
coercion --
                     int(3.15)                                          3         3+4.5
         int,          float                                                                  TypeError
                                                                                                    float(3)+4.5
              3+4.5
complex number --
                               -1                                                  i                   j Python
                                                                             j               3+1j         math
                                                  cmath
                                                                                                      contextvars
contiguous --                               C          Fortran                                             C     Fortran
C- Fortran
coroutine --
                                                                        async def                      PEP 492
coroutine function --                             coroutine                                    async def
                  await             async for        async with                                 PEP 492
CPython Python                                      python.org               ”CPython”
                      Jython        IronPython
decorator --                                                        @wrapper
                               classmethod()              staticmethod()
                                                                                         :
      def f(arg):
          ...
      f = staticmethod(f)
      @staticmethod
      def f(arg):
          ...
                                                       descriptors
dictionary --                                                                                        __hash__()
      __eq__()                             Perl              hash
dictionary comprehension --
                  results = {n: n ** 2 for n in range(10)}                                                 n      n **
      2                     comprehensions
                                                                                                                     15
Distributing Python Modules,                   3.9.13
                                                                list(dictview)                  dict-views
docstring --
                                                                                         __doc__
duck-typing --
      type()  isinstance()                         (                                                            )
        hasattr()       EAFP
EAFP                                                                 Python
                                                                                                   try       except
                             LBYL                      C
expression --
statement while
                                               :                       ,
                 io                                                        open()
file-like object --                file object
finder --                                                    loader
        Python 3.3                                      :                          sys.meta_path                      path entry
      finders     sys.path_hooks
                           PEP 302, PEP 420            PEP 451
floor division --                                                                                                       //
                      11 // 4                      2                                                     2.75           (-11)
      // 4              -3              -2.75                                       PEP 238
function --
                           parameter, method         function
function annotation --                                                        annotation
                                                                                  int                          int     :
                                    function
                 variable annotation     PEP 484
__future__ future          , from __future__ import <feature>                                                            Python
                                                     __future__                                                       feature
16                                                                                                 Appendix A.
                                                                   Distributing Python Modules,         3.9.13
generator expression --
                                      for                          if
                 :
generic function --
               Python
                                   frozenset
id()
                                                                                                            17
Distributing Python Modules,                 3.9.13
immutable --
                                                                     /
         interactive
interpreter shutdown --                                           Python
                                           __main__
iterable --                                                                                                  (    list,
      str        tuple)                                   dict,                           __iter__()
                       __getitem__()
                                for                                                    zip() map() ...
                                                 iter()
                                                                                  iter()
      for
        iterator   sequence          generator
iterator --                                                                       __next__()
                 next()                                                               StopIteration
                                                              __next__()                       StopIteration
                                     __iter__()
                          typeiter
key function --
      locale.strxfrm()
      Python                                                          min(), max(),
      sorted(), list.sort(), heapq.merge(), heapq.nsmallest(), heapq.nlargest()
         itertools.groupby()
                                                  str.lower()
                                lambda                    lambda r: (r[0], r[2])   operator
                                             attrgetter() itemgetter() methodcaller()
18                                                                                             Appendix A.
                                                                       Distributing Python Modules,          3.9.13
                       metaclasses
method --
                       argument (               self)            function   nested scope
method resolution order --
             Python 2.3                               2.3        Python
module --                   Python                                                                           Python
                           importing                    Python
             package
module spec --                                                                                      importlib.
    machinery.ModuleSpec
MRO           method resolution order
mutable --                                     id()                                             immutable
named tuple --
                                               time.localtime()              os.stat()
          sys.float_info:
          >>> sys.float_info[1]                                   # indexed access
          1024
          >>> sys.float_info.max_exp                              # named field access
          1024
                                                                                                        (         )
                                                                                                                19
Distributing Python Modules,                3.9.13
                                                                                                               (       )
      >>> isinstance(sys.float_info, tuple)                    # kind of tuple
      True
                                                                                                      tuple
                                                                                                 collections.
      namedtuple()
namespace --
                                                                                                builtins.open
            os.open()
                                         random.seed()            itertools.islice()
                      random       itertools
namespace package --                    PEP 420                                          package
                                             regular package                          __init__.py
                  module
nested scope --
nonlocal
            • positional-or-keyword
                                                                  foo        bar:
            • positional-only
                                                     /                              posonly1   posonly2:
            • keyword-only
                                                                                                           *
                             kw_only1    kw_only2:
            • var-positional
                                                                                       *                           args:
            • var-keyword
                                                                        **                       kwargs
20                                                                                      Appendix A.
                                                                         Distributing Python Modules,              3.9.13
      PEP                                                                                             Python
                                    PEP
                PEP 1
portion --                                                                                      zip
         PEP 420
positional argument --                       argument
provisional API --          API            API
-- API
API
                                                                                                                       PEP
      411
provisional package --                     provisional API
Python 3000 Python 3.x                                                  3
                     Py3k
Pythonic                                                  Python
                                                 Python                      for
                                                                             Python
            :
      for i in range(len(food)):
          print(food[i])
Pythonic :
qualified name --
                                                    PEP 3155
        :
                                                                                                                        21
Distributing Python Modules,                 3.9.13
       >>> class C:
       ...     class D:
       ...         def meth(self):
       ...              pass
       ...
       >>> C.__qualname__
       'C'
       >>> C.D.__qualname__
       'C.D'
       >>> C.D.meth.__qualname__
       'C.D.meth'
email.mime.text:
reference count --
                             Python                                            CPython                              sys
                          getrefcount()
regular package --                        package                      __init__.py
               namespace package
__slots__
22                                                                                        Appendix A.
                                                                      Distributing Python Modules,        3.9.13
type --                     Python
                     __class__                          type(obj)
type alias --
                                                    :
      def remove_gray_shades(
              colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:
          pass
typing.get_type_hints()
      class C:
          field: 'annotation'
int :
count: int = 0
                                        annassign
                function annotation    PEP 484      PEP 526
virtual environment --                                                               Python
              Python                                                        Python
                venv
virtual machine --                                                        Python
        bytecode
                                                                                                              23
Distributing Python Modules,     3.9.13
24                                                Appendix A.
                                                                                      APPENDIX          B
B.1 Python
Python Python -
                                                                                                         25
Distributing Python Modules,   3.9.13
26                                      Appendix B.
                                                                                     APPENDIX          C
C.1
                                                                          GPL
                   0.9.0   1.2   n/a          1991-1995   CWI
                   1.3   1.5.2   1.2          1995-1999   CNRI
                   1.6           1.5.2        2000        CNRI
                   2.0           1.6          2000        BeOpen.com
                   1.6.1         1.6          2001        CNRI
                   2.1           2.0+1.6.1    2001        PSF
                   2.0.1         2.0+1.6.1    2001        PSF
                   2.1.1         2.1+2.0.1    2001        PSF
                   2.1.2         2.1.1        2002        PSF
                   2.1.3         2.1.2        2002        PSF
                   2.2           2.1.1        2001        PSF
                                                                                                            27
Distributing Python Modules,    3.9.13
Guido
C.2 Python
Python                          PSF
     Python 3.8.6                                 PSF                 BSD
Python
prepared by Licensee.
    agrees to include in any such work a brief summary of the changes made␣
 ,→to Python
3.9.13.
USE OF PYTHON 3.9.13 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 3.9.13
    FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A␣
 ,→RESULT OF
28                                                      Appendix C.
                                                  Distributing Python Modules,       3.9.13
    Agreement does not grant permission to use PSF trademarks or trade name␣
 ,→in a
third party.
BEOPEN PYTHON 1
2. Subject to the terms and conditions of this BeOpen Python License Agreement,
   BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license
   to reproduce, analyze, test, perform and/or display publicly, prepare derivative
   works, distribute, and otherwise use the Software alone or in any derivative
   version, provided, however, that the BeOpen Python License is retained in the
   Software, alone or in any derivative version prepared by Licensee.
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR
   ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING,
   MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF
   ADVISED OF THE POSSIBILITY THEREOF.
C.2.                     Python                                                         29
Distributing Python Modules,        3.9.13
                                                                                      (   )
     granted on that web page.
2. Subject to the terms and conditions of this License Agreement, CNRI hereby
   grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
   analyze, test, perform and/or display publicly, prepare derivative works,
   distribute, and otherwise use Python 1.6.1 alone or in any derivative version,
   provided, however, that CNRI's License Agreement and CNRI's notice of copyright,
   i.e., "Copyright © 1995-2001 Corporation for National Research Initiatives; All
   Rights Reserved" are retained in Python 1.6.1 alone or in any derivative version
   prepared by Licensee. Alternately, in lieu of CNRI's License Agreement,
   Licensee may substitute the following text (omitting the quotes): "Python 1.6.1
   is made available subject to the terms and conditions in CNRI's License
   Agreement. This Agreement together with Python 1.6.1 may be located on the
   Internet using the following unique, persistent identifier (known as a handle):
   1895.22/1013. This Agreement may also be obtained from a proxy server on the
   Internet using the following URL: http://hdl.handle.net/1895.22/1013."
4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. CNRI
   MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE,
   BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY
   OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF
   PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
5. CNRI SHALL NOT BE LIABLE    TO   LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR
   ANY INCIDENTAL, SPECIAL,    OR   CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF
   MODIFYING, DISTRIBUTING,    OR   OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE
   THEREOF, EVEN IF ADVISED    OF   THE POSSIBILITY THEREOF.
30                                                               Appendix C.
                                                Distributing Python Modules,    3.9.13
                                                                                (    )
   sense to endorse or promote products or services of Licensee, or any third
   party.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted, provided that
the above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation, and that
the name of Stichting Mathematisch Centrum or CWI not be used in advertising or
publicity pertaining to distribution of the software without specific, written
prior permission.
C.2.5 ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON 3.9.13 DOCU-
      MENTATION
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
C.3
Python
C.3.                                                                                31
Distributing Python Modules,      3.9.13
_random http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html
C.3.2
32                                                                    Appendix C.
                                                Distributing Python Modules,       3.9.13
                                                                                   (    )
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
3. Neither the name of the project nor the names of its contributors
   may be used to endorse or promote products derived from this software
   without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
C.3.3
asynchat asyncore :
C.3.4 Cookie
http.cookies :
C.3.                                                                                   33
Distributing Python Modules,   3.9.13
                                                                                 (   )
pertaining to distribution of the software without specific, written
prior permission.
C.3.5
trace :
Permission to use, copy, modify, and distribute this Python software and
its associated documentation for any purpose without fee is hereby
granted, provided that the above copyright notice appears in all copies,
and that both that copyright notice and this permission notice appear in
supporting documentation, and that the name of neither Automatrix,
Bioreason or Mojam Media be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.
uu :
34                                                            Appendix C.
                                                Distributing Python Modules,       3.9.13
                                                                                   (    )
LANCE ELLINGHOUSE DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL LANCE ELLINGHOUSE CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
C.3.7 XML
xmlrpc.client :
SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT-
ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR
BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
OF THIS SOFTWARE.
C.3.8 test_epoll
test_epoll :
C.3.                                                                                   35
Distributing Python Modules,      3.9.13
                                                                                       (   )
the following conditions:
select kqueue :
Copyright (c) 2000 Doug White, 2006 James Knight, 2007 Christian Heimes
All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
C.3.10 SipHash24
<MIT License>
Copyright (c) 2013   Marek Majkowski <marek@popcount.org>
The above copyright notice and this permission notice shall be included in
                                                                                   (       )
36                                                                   Appendix C.
                                                              Distributing Python Modules,               3.9.13
                                                                                                         (         )
all copies or substantial portions of the Software.
</MIT License>
Original location:
   https://github.com/majek/csiphash/
/****************************************************************
 *
 * The author of this software is David M. Gay.
 *
 * Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose without fee is hereby granted, provided that this entire notice
 * is included in all copies of any software which is or includes a copy
 * or modification of this software and in all copies of the supporting
 * documentation for such software.
 *
 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
 * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
 * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
 *
 ***************************************************************/
C.3.12 OpenSSL
The modules hashlib, posix, ssl, crypt use the OpenSSL library for added performance if made available
by the operating system. Additionally, the Windows and macOS installers for Python may include a copy of the
OpenSSL libraries, so we include a copy of the OpenSSL license here:
 LICENSE ISSUES
 ==============
 The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
 the OpenSSL License and the original SSLeay license apply to the toolkit.
 See below for the actual license texts. Actually both licenses are BSD-style
 Open Source licenses. In case of any license issues related to OpenSSL
 please contact openssl-core@openssl.org.
 OpenSSL License
 ---------------
   /* ====================================================================
    * Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved.
    *
                                                                                                     (             )
C.3.                                                                                                              37
Distributing Python Modules,      3.9.13
                                                                                     (   )
      * Redistribution and use in source and binary forms, with or without
      * modification, are permitted provided that the following conditions
      * are met:
      *
      * 1. Redistributions of source code must retain the above copyright
      *    notice, this list of conditions and the following disclaimer.
      *
      * 2. Redistributions in binary form must reproduce the above copyright
      *    notice, this list of conditions and the following disclaimer in
      *    the documentation and/or other materials provided with the
      *    distribution.
      *
      * 3. All advertising materials mentioning features or use of this
      *    software must display the following acknowledgment:
      *    "This product includes software developed by the OpenSSL Project
      *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
      *
      * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
      *    endorse or promote products derived from this software without
      *    prior written permission. For written permission, please contact
      *    openssl-core@openssl.org.
      *
      * 5. Products derived from this software may not be called "OpenSSL"
      *    nor may "OpenSSL" appear in their names without prior written
      *    permission of the OpenSSL Project.
      *
      * 6. Redistributions of any form whatsoever must retain the following
      *    acknowledgment:
      *    "This product includes software developed by the OpenSSL Project
      *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
      *
      * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
      * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
      * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
      * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
      * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
      * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
      * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
      * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
      * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
      * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
      * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
      * OF THE POSSIBILITY OF SUCH DAMAGE.
      * ====================================================================
      *
      * This product includes cryptographic software written by Eric Young
      * (eay@cryptsoft.com). This product includes software written by Tim
      * Hudson (tjh@cryptsoft.com).
      *
      */
38                                                                 Appendix C.
                                                   Distributing Python Modules,   3.9.13
                                                                                  (      )
       * This library is free for commercial and non-commercial use as long as
       * the following conditions are aheared to. The following conditions
       * apply to all code found in this distribution, be it the RC4, RSA,
       * lhash, DES, etc., code; not just the SSL code. The SSL documentation
       * included with this distribution is covered by the same copyright terms
       * except that the holder is Tim Hudson (tjh@cryptsoft.com).
       *
       * Copyright remains Eric Young's, and as such any Copyright notices in
       * the code are not to be removed.
       * If this package is used in a product, Eric Young should be given attribution
       * as the author of the parts of the library used.
       * This can be in the form of a textual message at program startup or
       * in documentation (online or textual) provided with the package.
       *
       * Redistribution and use in source and binary forms, with or without
       * modification, are permitted provided that the following conditions
       * are met:
       * 1. Redistributions of source code must retain the copyright
       *    notice, this list of conditions and the following disclaimer.
       * 2. Redistributions in binary form must reproduce the above copyright
       *    notice, this list of conditions and the following disclaimer in the
       *    documentation and/or other materials provided with the distribution.
       * 3. All advertising materials mentioning features or use of this software
       *    must display the following acknowledgement:
       *    "This product includes cryptographic software written by
       *     Eric Young (eay@cryptsoft.com)"
       *    The word 'cryptographic' can be left out if the rouines from the library
       *    being used are not cryptographic related :-).
       * 4. If you include any Windows specific code (or a derivative thereof) from
       *    the apps directory (application code) you must include an acknowledgement:
       *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
       *
       * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
       * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
       * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
       * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
       * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
       * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
       * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
       * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
       * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
       * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
       * SUCH DAMAGE.
       *
       * The licence and distribution terms for any publically available version or
       * derivative of this code cannot be changed. i.e. this code cannot simply be
       * copied and put under another distribution licence
       * [including the GNU Public Licence.]
       */
C.3.                                                                                  39
Distributing Python Modules,    3.9.13
C.3.13 expat
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
                               and Clark Cooper
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
C.3.14 libffi
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
40                                                          Appendix C.
                                                Distributing Python Modules,        3.9.13
C.3.15 zlib
1. The origin of this software must not be misrepresented; you must not
   claim that you wrote the original software. If you use this software
   in a product, an acknowledgment in the product documentation would be
   appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
   misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
C.3.16 cfuhash
tracemalloc cfuhash :
C.3.                                                                                    41
Distributing Python Modules,    3.9.13
                                                                                      (   )
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
C.3.17 libmpdec
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
42                                                               Appendix C.
                                                Distributing Python Modules,   3.9.13
                                                                               (    )
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
C.3.                                                                               43
Distributing Python Modules,   3.9.13
44                                      Appendix C.
                                                                         APPENDIX   D
Python
Copyright © 2001-2022 Python Software Foundation. All rights reserved.
          © 2000 BeOpen.com
          © 1995-2000 Corporation for National Research Initiatives
          © 1991-1995 Stichting Mathematisch Centrum
                                                                                    45
Distributing Python Modules,   3.9.13
46                                      Appendix D.
                                               descriptor --       , 15
..., 13                                        dictionary --    , 15
2to3, 13                                       dictionary comprehension --                     ,
>>>, 13                                               15
__future__, 16                                 dictionary view --            , 16
__slots__, 22                                  docstring --            , 16
                                               duck-typing --           , 16
A
abstract base class --          , 13           E
annotation --       , 13                       EAFP, 16
argument --    , 13                            expression --       , 16
asynchronous context manager --                extension module --              , 16
                  , 14
asynchronous generator --              , 14    F
asynchronous generator iterator --             f-string -- f-       , 16
                      , 14                     file object --            , 16
asynchronous iterable --                       file-like object --                  , 16
        , 14                                   finder --      , 16
asynchronous iterator --             , 14      floor division --                  , 16
attribute --     , 14                          Fortran contiguous, 15
awaitable --               , 14                function --     , 16
                                               function annotation --                  , 16
B
BDFL, 14                                       G
binary file --                 , 14            garbage collection --            , 17
bytecode --      , 14                          generator, 17
bytes-like object --                   , 14    generator --      , 17
                                               generator expression, 17
C                                              generator expression --                  , 17
callback --      , 14                          generator iterator --                 , 17
C-contiguous, 15                               generic function --           , 17
class --    , 14                               generic type --          , 17
class variable --             , 14             GIL, 17
coercion --                 , 15               global interpreter lock --
complex number --         , 15                         , 17
context manager --                      , 15
context variable --                   , 15     H
contiguous --        , 15
                                               hash-based pyc --                 pyc, 17
coroutine --       , 15
                                               hashable --       , 17
coroutine function --                 , 15
CPython, 15
                                               I
D                                              IDLE, 18
decorator --            , 15                   immutable --          , 18
                                                                                              47
Distributing Python Modules,          3.9.13
48
                                           Distributing Python Modules,   3.9.13
U
universal newlines --              , 23
V
variable annotation --              , 23
virtual environment --              , 23
virtual machine --        , 23
Z
Zen of Python -- Python          , 24
49