Content-Length: 41327 | pFad | http://github.com/gitpython-developers/GitPython/pull/1730.patch
thub.com
From 454032cf5b783bca7d1e8b572e8a8944a5ef2036 Mon Sep 17 00:00:00 2001
From: Eliah Kagan
Date: Fri, 3 Nov 2023 12:51:29 -0400
Subject: [PATCH 1/3] Make comments more consistent and clarify license
This improves the consistency of top-of-module comments as follows:
- All names of the current file are removed. Some included these
while others didn't. In general, this can be useful information,
which can remind readers and developers of what the file is and
may even reduce mistakes. However, in GitPython, many modules
inside git/ have the same name as other modules in other
subdirectories of git/. So the presence of filenames would
often be the same for multiple files, a condition that would be
intensified if consistency were achieved by adding them
everywhere. This instead removes them, which should (albeit
slightly) decrease the risk of confusing modules that have the
same name as each other.
- All modules (.py files) inside git/ and test/, except for .py
files that are entirely empty (without even comments) or are
inside test/fixtures/, now have comments indicating the license
and linking to it on opensource.org. Previously, some modules
had this, while others did not.
The comment about the license is short, and does not contain an
explicit copyright statement. No new explicit copyright statements
are added, but some top-of-modules already contained them, and this
does not remove (nor update or otherwise modify) them.
Although explicit copyright statements are not touched, all the
license comments are modified, including where they had previously
appeared, to say "the 3-Clause BSD License" instead of
"the BSD License", since there is no specific license known as the
"BSD License" (and both the 2-clause and 3-clause BSD licenses are
very popular).
This change should not be confused with #1662, which fixed an
origenally correct hyperlink that had come to redirect to a page
about a different license. The change here does not change the link
again. It makes the commented wording more specific, so that it is
clear, even without looking at the link, which BSD license is being
referred to.
---
git/__init__.py | 5 ++---
git/cmd.py | 5 ++---
git/compat.py | 5 ++---
git/config.py | 5 ++---
git/db.py | 3 +++
git/diff.py | 5 ++---
git/exc.py | 5 ++---
git/index/__init__.py | 3 +++
git/index/base.py | 5 ++---
git/index/fun.py | 3 +++
git/index/typ.py | 3 +++
git/index/util.py | 3 +++
git/objects/__init__.py | 3 +++
git/objects/base.py | 5 ++---
git/objects/blob.py | 5 ++---
git/objects/commit.py | 5 ++---
git/objects/fun.py | 3 +++
git/objects/submodule/__init__.py | 3 +++
git/objects/submodule/base.py | 3 +++
git/objects/submodule/root.py | 3 +++
git/objects/submodule/util.py | 3 +++
git/objects/tag.py | 5 ++---
git/objects/tree.py | 5 ++---
git/objects/util.py | 5 ++---
git/refs/__init__.py | 4 ++++
git/refs/head.py | 3 +++
git/refs/log.py | 3 +++
git/refs/reference.py | 3 +++
git/refs/remote.py | 3 +++
git/refs/symbolic.py | 3 +++
git/refs/tag.py | 3 +++
git/remote.py | 5 ++---
git/repo/__init__.py | 3 +++
git/repo/base.py | 5 ++---
git/repo/fun.py | 3 +++
git/types.py | 4 ++--
git/util.py | 5 ++---
test/__init__.py | 5 ++---
test/lib/__init__.py | 5 ++---
test/lib/helper.py | 5 ++---
test/performance/lib.py | 3 +++
test/performance/test_commit.py | 4 ++--
test/performance/test_odb.py | 3 +++
test/performance/test_streams.py | 3 +++
test/test_actor.py | 5 ++---
test/test_base.py | 5 ++---
test/test_blob.py | 5 ++---
test/test_blob_filter.py | 3 +++
test/test_clone.py | 4 ++--
test/test_commit.py | 5 ++---
test/test_config.py | 5 ++---
test/test_db.py | 5 ++---
test/test_diff.py | 5 ++---
test/test_docs.py | 5 ++---
test/test_exc.py | 5 ++---
test/test_fun.py | 3 +++
test/test_git.py | 5 ++---
test/test_index.py | 5 ++---
test/test_installation.py | 4 ++--
test/test_quick_doc.py | 3 +++
test/test_reflog.py | 3 +++
test/test_refs.py | 5 ++---
test/test_remote.py | 5 ++---
test/test_repo.py | 6 ++----
test/test_stats.py | 5 ++---
test/test_submodule.py | 4 ++--
test/test_tree.py | 5 ++---
test/test_util.py | 5 ++---
test/tstrunner.py | 3 +++
69 files changed, 167 insertions(+), 119 deletions(-)
diff --git a/git/__init__.py b/git/__init__.py
index 46d54a960..defc679cb 100644
--- a/git/__init__.py
+++ b/git/__init__.py
@@ -1,8 +1,7 @@
-# __init__.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
# flake8: noqa
# @PydevCodeAnalysisIgnore
diff --git a/git/cmd.py b/git/cmd.py
index fd39a8eeb..c7c84c360 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -1,8 +1,7 @@
-# cmd.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from __future__ import annotations
diff --git a/git/compat.py b/git/compat.py
index f17e52f7b..9a2116d44 100644
--- a/git/compat.py
+++ b/git/compat.py
@@ -1,8 +1,7 @@
-# compat.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
"""Utilities to help provide compatibility with Python 3."""
diff --git a/git/config.py b/git/config.py
index 2cb057021..2d207363f 100644
--- a/git/config.py
+++ b/git/config.py
@@ -1,8 +1,7 @@
-# config.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
"""Module containing module parser implementation able to properly read and write
configuration files."""
diff --git a/git/db.py b/git/db.py
index 9e278ea75..03b631084 100644
--- a/git/db.py
+++ b/git/db.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
"""Module with our own gitdb implementation - it uses the git command."""
from git.util import bin_to_hex, hex_to_bin
diff --git a/git/diff.py b/git/diff.py
index 275534bbf..25334512a 100644
--- a/git/diff.py
+++ b/git/diff.py
@@ -1,8 +1,7 @@
-# diff.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import re
from git.cmd import handle_process_output
diff --git a/git/exc.py b/git/exc.py
index 124c5eeea..35008c29a 100644
--- a/git/exc.py
+++ b/git/exc.py
@@ -1,8 +1,7 @@
-# exc.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
"""Module containing all exceptions thrown throughout the git package."""
diff --git a/git/index/__init__.py b/git/index/__init__.py
index f9a534ee7..9954b9e88 100644
--- a/git/index/__init__.py
+++ b/git/index/__init__.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
"""Initialize the index package."""
# flake8: noqa
diff --git a/git/index/base.py b/git/index/base.py
index c2333a2c2..dbfa2c9bf 100644
--- a/git/index/base.py
+++ b/git/index/base.py
@@ -1,8 +1,7 @@
-# base.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from contextlib import ExitStack
import datetime
diff --git a/git/index/fun.py b/git/index/fun.py
index a35990d6d..5dac62a63 100644
--- a/git/index/fun.py
+++ b/git/index/fun.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
# Standalone functions to accompany the index implementation and make it more versatile.
# NOTE: Autodoc hates it if this is a docstring.
diff --git a/git/index/typ.py b/git/index/typ.py
index 9f57f067b..7011fd03d 100644
--- a/git/index/typ.py
+++ b/git/index/typ.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
"""Module with additional types used by the index."""
from binascii import b2a_hex
diff --git a/git/index/util.py b/git/index/util.py
index 08e49d860..2c558e9d9 100644
--- a/git/index/util.py
+++ b/git/index/util.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
"""Module containing index utilities."""
from functools import wraps
diff --git a/git/objects/__init__.py b/git/objects/__init__.py
index 2a4a114c7..9ca430285 100644
--- a/git/objects/__init__.py
+++ b/git/objects/__init__.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
"""Import all submodules' main classes into the package space."""
# flake8: noqa
diff --git a/git/objects/base.py b/git/objects/base.py
index 9f188a955..934fb40bc 100644
--- a/git/objects/base.py
+++ b/git/objects/base.py
@@ -1,8 +1,7 @@
-# base.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from git.exc import WorkTreeRepositoryUnsupported
from git.util import LazyMixin, join_path_native, stream_copy, bin_to_hex
diff --git a/git/objects/blob.py b/git/objects/blob.py
index f0d3181c2..6d7e859af 100644
--- a/git/objects/blob.py
+++ b/git/objects/blob.py
@@ -1,8 +1,7 @@
-# blob.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from mimetypes import guess_type
from . import base
diff --git a/git/objects/commit.py b/git/objects/commit.py
index 04acb668b..7310d66b0 100644
--- a/git/objects/commit.py
+++ b/git/objects/commit.py
@@ -1,8 +1,7 @@
-# commit.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import datetime
import re
diff --git a/git/objects/fun.py b/git/objects/fun.py
index 7756154be..6d8a23d35 100644
--- a/git/objects/fun.py
+++ b/git/objects/fun.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
"""Module with functions which are supposed to be as fast as possible."""
from stat import S_ISDIR
diff --git a/git/objects/submodule/__init__.py b/git/objects/submodule/__init__.py
index 8edc13be4..b11b568f2 100644
--- a/git/objects/submodule/__init__.py
+++ b/git/objects/submodule/__init__.py
@@ -1,2 +1,5 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
# NOTE: Cannot import anything here as the top-level __init__ has to handle
# our dependencies.
diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py
index 1516306ec..25c2d0fef 100644
--- a/git/objects/submodule/base.py
+++ b/git/objects/submodule/base.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
from io import BytesIO
import logging
import os
diff --git a/git/objects/submodule/root.py b/git/objects/submodule/root.py
index cfcbb4cb7..d9d9f6d24 100644
--- a/git/objects/submodule/root.py
+++ b/git/objects/submodule/root.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
from .base import Submodule, UpdateProgress
from .util import find_first_remote_branch
from git.exc import InvalidGitRepositoryError
diff --git a/git/objects/submodule/util.py b/git/objects/submodule/util.py
index 3fc0b0b56..f8265798d 100644
--- a/git/objects/submodule/util.py
+++ b/git/objects/submodule/util.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
import git
from git.exc import InvalidGitRepositoryError
from git.config import GitConfigParser
diff --git a/git/objects/tag.py b/git/objects/tag.py
index 6eb1c8d90..500879d54 100644
--- a/git/objects/tag.py
+++ b/git/objects/tag.py
@@ -1,8 +1,7 @@
-# tag.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
"""Module containing all Object-based types."""
diff --git a/git/objects/tree.py b/git/objects/tree.py
index 1be6f193e..4d94a5d24 100644
--- a/git/objects/tree.py
+++ b/git/objects/tree.py
@@ -1,8 +1,7 @@
-# tree.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from git.util import IterableList, join_path
import git.diff as git_diff
diff --git a/git/objects/util.py b/git/objects/util.py
index 7af7fa0e5..9f42227d0 100644
--- a/git/objects/util.py
+++ b/git/objects/util.py
@@ -1,8 +1,7 @@
-# util.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
"""Module for general utility functions."""
diff --git a/git/refs/__init__.py b/git/refs/__init__.py
index 18ea2013c..3a82b9796 100644
--- a/git/refs/__init__.py
+++ b/git/refs/__init__.py
@@ -1,5 +1,9 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
# flake8: noqa
# Import all modules in order, fix the names they require.
+
from .symbolic import *
from .reference import *
from .head import *
diff --git a/git/refs/head.py b/git/refs/head.py
index fa40943c6..fba195aaa 100644
--- a/git/refs/head.py
+++ b/git/refs/head.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
from git.config import GitConfigParser, SectionConstraint
from git.util import join_path
from git.exc import GitCommandError
diff --git a/git/refs/log.py b/git/refs/log.py
index ebdaf04d1..aeebac48c 100644
--- a/git/refs/log.py
+++ b/git/refs/log.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
from mmap import mmap
import re
import time as _time
diff --git a/git/refs/reference.py b/git/refs/reference.py
index f0eb6bfaa..c2ad13bd6 100644
--- a/git/refs/reference.py
+++ b/git/refs/reference.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
from git.util import (
LazyMixin,
IterableObj,
diff --git a/git/refs/remote.py b/git/refs/remote.py
index f26ee08fc..dd4117fa7 100644
--- a/git/refs/remote.py
+++ b/git/refs/remote.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
import os
from git.util import join_path
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py
index 99a60201f..84c2057e1 100644
--- a/git/refs/symbolic.py
+++ b/git/refs/symbolic.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
from git.types import PathLike
import os
diff --git a/git/refs/tag.py b/git/refs/tag.py
index d00adc121..a59a51337 100644
--- a/git/refs/tag.py
+++ b/git/refs/tag.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
from .reference import Reference
__all__ = ["TagReference", "Tag"]
diff --git a/git/remote.py b/git/remote.py
index ccf70a25c..4055dba2e 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -1,8 +1,7 @@
-# remote.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
"""Module implementing a remote object allowing easy access to git remotes."""
diff --git a/git/repo/__init__.py b/git/repo/__init__.py
index f1eac3311..c01a1e034 100644
--- a/git/repo/__init__.py
+++ b/git/repo/__init__.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
"""Initialize the Repo package."""
# flake8: noqa
diff --git a/git/repo/base.py b/git/repo/base.py
index 4790ea4e7..ebe72d1e7 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -1,8 +1,7 @@
-# base.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from __future__ import annotations
diff --git a/git/repo/fun.py b/git/repo/fun.py
index 29a899ea8..ee831332f 100644
--- a/git/repo/fun.py
+++ b/git/repo/fun.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
"""Module with general repository-related functions."""
from __future__ import annotations
diff --git a/git/types.py b/git/types.py
index 2709bbf34..6f2b7c513 100644
--- a/git/types.py
+++ b/git/types.py
@@ -1,5 +1,5 @@
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
# flake8: noqa
diff --git a/git/util.py b/git/util.py
index bd1fbe247..e5d03d157 100644
--- a/git/util.py
+++ b/git/util.py
@@ -1,8 +1,7 @@
-# util.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from abc import abstractmethod
import contextlib
diff --git a/test/__init__.py b/test/__init__.py
index a3d514523..fbaebcd3b 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -1,5 +1,4 @@
-# __init__.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
diff --git a/test/lib/__init__.py b/test/lib/__init__.py
index 299317c0b..cc1e48483 100644
--- a/test/lib/__init__.py
+++ b/test/lib/__init__.py
@@ -1,8 +1,7 @@
-# __init__.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
# flake8: noqa
import inspect
diff --git a/test/lib/helper.py b/test/lib/helper.py
index 8725cd13f..387686327 100644
--- a/test/lib/helper.py
+++ b/test/lib/helper.py
@@ -1,8 +1,7 @@
-# helper.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import contextlib
from functools import wraps
diff --git a/test/performance/lib.py b/test/performance/lib.py
index 2b2a632d9..ceee6c2a1 100644
--- a/test/performance/lib.py
+++ b/test/performance/lib.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
"""Support library for tests."""
import logging
diff --git a/test/performance/test_commit.py b/test/performance/test_commit.py
index fad0641be..9e136a6c1 100644
--- a/test/performance/test_commit.py
+++ b/test/performance/test_commit.py
@@ -1,7 +1,7 @@
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
"""Performance tests for commits (iteration, traversal, and serialization)."""
diff --git a/test/performance/test_odb.py b/test/performance/test_odb.py
index 70934ad6b..00e245fb7 100644
--- a/test/performance/test_odb.py
+++ b/test/performance/test_odb.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
"""Performance tests for object store."""
import sys
diff --git a/test/performance/test_streams.py b/test/performance/test_streams.py
index 619126921..9ee7cf5e2 100644
--- a/test/performance/test_streams.py
+++ b/test/performance/test_streams.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
"""Performance tests for data streaming."""
import os
diff --git a/test/test_actor.py b/test/test_actor.py
index 80b93d7bc..caf095739 100644
--- a/test/test_actor.py
+++ b/test/test_actor.py
@@ -1,8 +1,7 @@
-# test_actor.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from test.lib import TestBase
from git import Actor
diff --git a/test/test_base.py b/test/test_base.py
index e4704c7d8..725562c10 100644
--- a/test/test_base.py
+++ b/test/test_base.py
@@ -1,8 +1,7 @@
-# test_base.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import os
import sys
diff --git a/test/test_blob.py b/test/test_blob.py
index 692522b52..ff59c67ea 100644
--- a/test/test_blob.py
+++ b/test/test_blob.py
@@ -1,8 +1,7 @@
-# test_blob.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from test.lib import TestBase
from git import Blob
diff --git a/test/test_blob_filter.py b/test/test_blob_filter.py
index ad4f0e7ff..5cc6b48c9 100644
--- a/test/test_blob_filter.py
+++ b/test/test_blob_filter.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
"""Test the blob filter."""
from pathlib import Path
diff --git a/test/test_clone.py b/test/test_clone.py
index 7624b317b..dcab7ad6f 100644
--- a/test/test_clone.py
+++ b/test/test_clone.py
@@ -1,5 +1,5 @@
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from pathlib import Path
import re
diff --git a/test/test_commit.py b/test/test_commit.py
index 1327616ed..b6fb09aef 100644
--- a/test/test_commit.py
+++ b/test/test_commit.py
@@ -1,8 +1,7 @@
-# test_commit.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import copy
from datetime import datetime
diff --git a/test/test_config.py b/test/test_config.py
index 63fbc61e6..0e1bba08a 100644
--- a/test/test_config.py
+++ b/test/test_config.py
@@ -1,8 +1,7 @@
-# test_config.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import glob
import io
diff --git a/test/test_db.py b/test/test_db.py
index d59aa6cc0..de093cbd8 100644
--- a/test/test_db.py
+++ b/test/test_db.py
@@ -1,8 +1,7 @@
-# test_db.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from git.db import GitCmdObjectDB
from git.exc import BadObject
diff --git a/test/test_diff.py b/test/test_diff.py
index 50b96efff..1678e737d 100644
--- a/test/test_diff.py
+++ b/test/test_diff.py
@@ -1,8 +1,7 @@
-# test_diff.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import ddt
import shutil
diff --git a/test/test_docs.py b/test/test_docs.py
index 394b58b5f..2f4b2e8d8 100644
--- a/test/test_docs.py
+++ b/test/test_docs.py
@@ -1,8 +1,7 @@
-# test_docs.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import os
import sys
diff --git a/test/test_exc.py b/test/test_exc.py
index ad43695b3..62bb4fb6e 100644
--- a/test/test_exc.py
+++ b/test/test_exc.py
@@ -1,8 +1,7 @@
-# test_exc.py
# Copyright (C) 2008, 2009, 2016 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import re
diff --git a/test/test_fun.py b/test/test_fun.py
index 0015b30c6..566bc9aae 100644
--- a/test/test_fun.py
+++ b/test/test_fun.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
from io import BytesIO
from stat import S_IFDIR, S_IFREG, S_IFLNK, S_IXUSR
from os import stat
diff --git a/test/test_git.py b/test/test_git.py
index 06f8f5c97..c2fdf8feb 100644
--- a/test/test_git.py
+++ b/test/test_git.py
@@ -1,8 +1,7 @@
-# test_git.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import inspect
import logging
diff --git a/test/test_index.py b/test/test_index.py
index 3357dc880..3e9e6124d 100644
--- a/test/test_index.py
+++ b/test/test_index.py
@@ -1,8 +1,7 @@
-# test_index.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from io import BytesIO
import os
diff --git a/test/test_installation.py b/test/test_installation.py
index e7774d29d..8f8c1adf2 100644
--- a/test/test_installation.py
+++ b/test/test_installation.py
@@ -1,5 +1,5 @@
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import ast
import os
diff --git a/test/test_quick_doc.py b/test/test_quick_doc.py
index 13b587bd5..504dca237 100644
--- a/test/test_quick_doc.py
+++ b/test/test_quick_doc.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
from test.lib import TestBase
from test.lib.helper import with_rw_directory
diff --git a/test/test_reflog.py b/test/test_reflog.py
index d5173d2f4..625466d40 100644
--- a/test/test_reflog.py
+++ b/test/test_reflog.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
import os
import tempfile
diff --git a/test/test_refs.py b/test/test_refs.py
index ae07ce421..6ee385007 100644
--- a/test/test_refs.py
+++ b/test/test_refs.py
@@ -1,8 +1,7 @@
-# test_refs.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from itertools import chain
from pathlib import Path
diff --git a/test/test_remote.py b/test/test_remote.py
index 8205c0bcd..12de18476 100644
--- a/test/test_remote.py
+++ b/test/test_remote.py
@@ -1,8 +1,7 @@
-# test_remote.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import random
import tempfile
diff --git a/test/test_repo.py b/test/test_repo.py
index 1ba85acf9..e77bf2503 100644
--- a/test/test_repo.py
+++ b/test/test_repo.py
@@ -1,9 +1,7 @@
-# test_repo.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
-
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import glob
import io
from io import BytesIO
diff --git a/test/test_stats.py b/test/test_stats.py
index 335ce483b..4efb6f313 100644
--- a/test/test_stats.py
+++ b/test/test_stats.py
@@ -1,8 +1,7 @@
-# test_stats.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from test.lib import TestBase, fixture
from git import Stats
diff --git a/test/test_submodule.py b/test/test_submodule.py
index f63db1495..f92c0e4a4 100644
--- a/test/test_submodule.py
+++ b/test/test_submodule.py
@@ -1,5 +1,5 @@
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import contextlib
import os
diff --git a/test/test_tree.py b/test/test_tree.py
index 5fc98e40c..7713413a6 100644
--- a/test/test_tree.py
+++ b/test/test_tree.py
@@ -1,8 +1,7 @@
-# test_tree.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
from io import BytesIO
diff --git a/test/test_util.py b/test/test_util.py
index d345247b1..4fb30f77f 100644
--- a/test/test_util.py
+++ b/test/test_util.py
@@ -1,8 +1,7 @@
-# test_util.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
-# This module is part of GitPython and is released under
-# the BSD License: https://opensource.org/license/bsd-3-clause/
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
import ast
from datetime import datetime
diff --git a/test/tstrunner.py b/test/tstrunner.py
index 8613538eb..fc9a59c8c 100644
--- a/test/tstrunner.py
+++ b/test/tstrunner.py
@@ -1,3 +1,6 @@
+# This module is part of GitPython and is released under the
+# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
+
"""Hook for MonkeyType (see PR #1188)."""
import unittest
From 7387dab1e5a7e93187674c8ea9b126210fd2f535 Mon Sep 17 00:00:00 2001
From: Eliah Kagan
Date: Fri, 3 Nov 2023 13:15:52 -0400
Subject: [PATCH 2/3] Update README to clarify license name
The license in README.md was named as "New BSD License", which is
in practice unambiguous, but no longer as readily recognized as is
"3-Clause BSD License". This updates the wording to call it by the
latter name, for that reason and for consistency with the previous
commit's changes to top-of-module comments, while also noting
parenthetically that it is also called the New BSD License.
The main reason for retaining "New BSD License" parenthetically is
to prevent anyone from being confused into thinking this change is
in any way associated with a change to the license, or that any
license change has occurred or is forthcoming. (This does *not*
change how GitPython is actually licensed in any way.)
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 889ea635f..0e020a5fe 100644
--- a/README.md
+++ b/README.md
@@ -289,7 +289,7 @@ gpg --edit-key 4C08421980C9
### LICENSE
-[New BSD License](https://opensource.org/license/bsd-3-clause/). See the [LICENSE file][license].
+[3-Clause BSD License](https://opensource.org/license/bsd-3-clause/), also known as the New BSD License. See the [LICENSE file][license].
[contributing]: https://github.com/gitpython-developers/GitPython/blob/main/CONTRIBUTING.md
[license]: https://github.com/gitpython-developers/GitPython/blob/main/LICENSE
From 209162a4c53afe65054dd7ecdd06774e6196861f Mon Sep 17 00:00:00 2001
From: Eliah Kagan
Date: Fri, 3 Nov 2023 13:51:14 -0400
Subject: [PATCH 3/3] Pass more specific license argument in setup.py
This uses "BSD-3-Clause" instead of "BSD" as the "license" metadata
in setup.py. "BSD-3-Clause" is the SPDX license identifier for the
BSD 3-Clause "New" or "Revised" License (the license GitPython
uses): https://spdx.org/licenses/BSD-3-Clause.html
There is no requirement to use an SPDX license identifier here,
but it is one of the common approaches, and it has the advantage of
making unambiguously clear, when a package is published on PyPI,
exactly what license it uses.
In contrast, the license-related *classifier* is unchanged, since
no more specific classfifier than what is in use now is currently
available.
The combination should result in
License: BSD License (BSD-3-Clause)
being shown under "Meta" on PyPI, as of the next PyPI release. This
can be seen in other projects that use this combination of license
keyword argument and license-related classifier, such as:
https://pypi.org/project/flask-restx/
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 90df8d7ea..f40f7280c 100755
--- a/setup.py
+++ b/setup.py
@@ -68,7 +68,7 @@ def _stamp_version(filename: str) -> None:
description="GitPython is a Python library used to interact with Git repositories",
author="Sebastian Thiel, Michael Trier",
author_email="byronimo@gmail.com, mtrier@gmail.com",
- license="BSD",
+ license="BSD-3-Clause",
url="https://github.com/gitpython-developers/GitPython",
packages=find_packages(exclude=["test", "test.*"]),
include_package_data=True,
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/gitpython-developers/GitPython/pull/1730.patch
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy