Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this project shall be dual licensed as above, without any
additional terms or conditions.

Sharpy is Apache-2.0 OR MIT; portions ported from CPython are under the CPython licence (SPDX `Python-2.0`), see [THIRD-PARTY-NOTICES.txt](THIRD-PARTY-NOTICES.txt).
Sharpy is Apache-2.0 OR MIT. Some packages also ship third-party code or data, credited with its licence text in [THIRD-PARTY-NOTICES.txt](THIRD-PARTY-NOTICES.txt), and their licence expressions add those licences (SPDX ids): `SharpyLang.Core` adds `Python-2.0` (CPython ports) and `Unicode-3.0` (Unicode case-folding data); `SharpyLang.Stdlib` adds `Python-2.0` (CPython ports) and `MIT` (PyYAML's resolver patterns and scalar-style rules); `sharpyc`, which ships both libraries, adds `Python-2.0`, `Unicode-3.0` and `MIT`.
221 changes: 213 additions & 8 deletions THIRD-PARTY-NOTICES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,151 @@ THIRD-PARTY NOTICES

Sharpy is dual-licensed under the Apache License, Version 2.0 and the MIT
License (see LICENSE, LICENSE-APACHE and LICENSE-MIT). Some files in this
repository contain code derived from third-party software that is distributed
under its own license. A component listed below is given with the Sharpy
files derived from it, the upstream source, and the full license text under
which it is used. The CPython list is the result of the audit in issue #2602
of the Sharpy repository, which read every Sharpy.Stdlib module that has a
CPython namesake, and the Sharpy.Core files that follow CPython's
repository contain code or data derived from third-party software that is
distributed under its own license. A component listed below is given with
the Sharpy files derived from it, the upstream source, and the full license
text under which it is used. The CPython list is the result of the audit in
issue #2602 of the Sharpy repository, which read every Sharpy.Stdlib module
that has a CPython namesake, and the Sharpy.Core files that follow CPython's
implementation, against their CPython sources. That audit covered CPython
only: code or data derived from other upstream sources was outside its
scope, and this file does not claim to list it.
only. Two other upstream sources, found in the review of that audit, are
also listed: the Unicode Character Database (a case-folding table in
Sharpy.Core) and PyYAML (two regular expressions in Sharpy.Stdlib's YAML
module). No other source was audited, and this file does not claim to list
every piece of code or data derived from a source other than CPython.


Unicode Character Database
==========================

Copyright © 1991-2026 Unicode, Inc.

Sharpy files derived from this source:

src/Sharpy.Core/StringExtensions.Format.cs (only the case-folding
data: the table s_caseFoldTable and the Cherokee ranges in
CaseFoldChar)

Upstream source: the Unicode Character Database, CaseFolding.txt
(https://www.unicode.org/Public/UCD/latest/ucd/CaseFolding.txt). The file
does not record which Unicode version the table was taken from; every
entry in it equals the full case folding of CPython 3.15.2's
str.casefold, which uses Unicode 17.0.0.

Derived portion: the full case foldings (status C and F) that differ from
.NET's char.ToLowerInvariant, written as a C# dictionary, and the
Cherokee mappings written as range checks.

The Unicode License V3 (SPDX Unicode-3.0; https://www.unicode.org/license.txt)
follows, verbatim from the first section of the LICENSE file in the
Unicode Consortium's ICU repository
(https://github.com/unicode-org/icu/blob/main/LICENSE, November 2026).
Apart from its copyright years it is word for word the Unicode-3.0 text
of the SPDX License List.

UNICODE LICENSE V3

COPYRIGHT AND PERMISSION NOTICE

Copyright © 1991-2026 Unicode, Inc.

NOTICE TO USER: Carefully read the following legal agreement. BY
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.

Permission is hereby granted, free of charge, to any person obtaining a
copy of data files and any associated documentation (the "Data Files") or
software and any associated documentation (the "Software") to deal in the
Data Files or Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, and/or sell
copies of the Data Files or Software, and to permit persons to whom the
Data Files or Software are furnished to do so, provided that either (a)
this copyright and permission notice appear with all copies of the Data
Files or Software, or (b) this copyright and permission notice appear in
associated Documentation.

THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
THIRD PARTY RIGHTS.

IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
BE LIABLE FOR ANY CLAIM, OR 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 THE DATA
FILES OR SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall
not be used in advertising or otherwise to promote the sale, use or other
dealings in these Data Files or Software without prior written
authorization of the copyright holder.


PyYAML
======

Copyright (c) 2017-2021 Ingy döt Net
Copyright (c) 2006-2016 Kirill Simonov

Sharpy files derived from this source:

src/Sharpy.Stdlib/Yaml/YamlScalarResolver.cs (only the regular
expressions Yaml11Int and Yaml11Float)
src/Sharpy.Stdlib/Yaml/YamlScalarStyle.cs

Upstream source: PyYAML 6.0.3, lib/yaml/resolver.py and
lib/yaml/emitter.py (https://github.com/yaml/pyyaml)

Derived portions:

- YamlScalarResolver.cs: Yaml11Int is the expression of the implicit
resolver for tag:yaml.org,2002:int, with its binary, octal, decimal and
hexadecimal arms (hexadecimal moved before octal) and without its
sexagesimal arm. Yaml11Float is the first two arms of the resolver for
tag:yaml.org,2002:float (digits with a required dot, and a leading
dot), without its sexagesimal, .inf and .nan arms. Both were rewritten
as .NET regular expressions, with a non-capturing group dropped and no
other change to what they match within those arms.

- YamlScalarStyle.cs: YamlScalarStyleAuthority.Choose is a C# port of
Emitter.analyze_scalar and Emitter.choose_scalar_style, reduced to the
plain, single-quoted and double-quoted styles: the same flag variables
(block and flow indicators, line breaks, special characters, leading
and trailing space, space followed by a break), the document-indicator
check, the leading and inner indicator character sets, and the order
of the style decision. It drops the block styles, the simple-key
context, canonical output, the line-break characters other than \n and
the allow_unicode handling (only C0 controls and DEL are special), and
takes the caller's resolver verdict in place of the event's implicit
flag.

The PyYAML license text follows, verbatim from the LICENSE file at
PyYAML's 6.0.3 tag
(https://raw.githubusercontent.com/yaml/pyyaml/6.0.3/LICENSE).

Copyright (c) 2017-2021 Ingy döt Net
Copyright (c) 2006-2016 Kirill Simonov

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


CPython
Expand Down Expand Up @@ -325,6 +461,75 @@ carries the .spy file's notice.
There is no copy_function, symlink or ignore handling, and errors are
raised as Sharpy's OSError family.

API documentation summaries adapted from CPython docstrings
-----------------------------------------------------------

Some API summaries in the files below (a .spy docstring, or a C#
<summary>) contain sentences taken word for word from CPython 3.15's
docstrings (compared against 3.15.2): those of the Python modules in its
Lib/, and the __doc__ strings of its built-in and C-implemented modules
(builtins, math, itertools, posix, _collections and the like). Only those
sentences are derived from CPython: unless a file is also listed above,
its code is Sharpy's own and it carries no PSF header. The sentences are
used under the PSF License Version 2, whose text follows this section. A
.spy file stands for itself and the C# generated from it.

Sharpy files holding these summaries:

src/Sharpy.Core/Any.cs
src/Sharpy.Core/Builtins/Exceptions.cs
src/Sharpy.Core/IList.cs
src/Sharpy.Core/Id.cs
src/Sharpy.Core/Partial.Dict/Dict.Methods.cs
src/Sharpy.Core/Partial.Iterator/Iterator.cs
src/Sharpy.Core/Partial.List/List.cs
src/Sharpy.Core/Partial.Set/Set.Methods.cs
src/Sharpy.Core/Reversed.cs
src/Sharpy.Core/StringExtensions.Split.cs
src/Sharpy.Core/StringExtensions.cs
src/Sharpy.Stdlib/Collections/ChainMap.cs
src/Sharpy.Stdlib/Collections/Collections.cs
src/Sharpy.Stdlib/Datetime/Datetime.cs
src/Sharpy.Stdlib/Heapq/Heapq.Merge.cs
src/Sharpy.Stdlib/Itertools/__Init__.cs
src/Sharpy.Stdlib/Logging/LoggingModule.cs
src/Sharpy.Stdlib/Pathlib/Path.cs
src/Sharpy.Stdlib/Pathlib/__Init__.cs
src/Sharpy.Stdlib/Secrets/Secrets.cs
src/Sharpy.Stdlib/spy/calendar_module.spy
src/Sharpy.Stdlib/spy/fnmatch_module.spy
src/Sharpy.Stdlib/spy/glob_module.spy
src/Sharpy.Stdlib/spy/heapq.spy
src/Sharpy.Stdlib/spy/itertools.spy
src/Sharpy.Stdlib/spy/logging_module.spy
src/Sharpy.Stdlib/spy/math_module.spy
src/Sharpy.Stdlib/spy/os_module.spy
src/Sharpy.Stdlib/spy/os_path_module.spy
src/Sharpy.Stdlib/spy/pathlib_module.spy
src/Sharpy.Stdlib/spy/pprint_module.spy
src/Sharpy.Stdlib/spy/shlex_module.spy
src/Sharpy.Stdlib/spy/shutil_module.spy
src/Sharpy.Stdlib/spy/statistics.spy
src/Sharpy.Stdlib/spy/subprocess_module.spy
src/Sharpy.Stdlib/spy/textwrap.spy

Upstream source: CPython 3.15 (https://github.com/python/cpython): the
docstrings of Lib/, and of the built-in and C-implemented modules.

Summary of changes: each sentence documents the Sharpy API of the same
name. It may differ from its CPython docstring in letter case, line
wrapping, reStructuredText markup (* and `) and a final full stop.

Verbatim sentences are what is credited here. The list above is the set
of files in which build_tools/tests/test_third_party_notices.py finds a
paragraph or sentence of a summary that equals, ignoring letter case,
whitespace, * and ` markup and a final full stop, a paragraph or sentence
of at least 30 characters of one of those docstrings (Lib's test
packages, idlelib, site-packages and CPython's test modules are not
read). Paraphrases of CPython docstrings, and text taken from CPython's
documentation (Doc/*.rst), are not matched, were not audited, and are not
listed.

The CPython license text follows, verbatim from the LICENSE.txt shipped with
CPython 3.15.2 (lib/python3.15/LICENSE.txt). It is the complete file.

Expand Down
Loading
Loading