From 25126db0ba9421e7be2d3bb3edd7ebe1d6fd1fe92c0226edfa03563384bf7420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 2 Apr 2020 09:46:33 +0000 Subject: [PATCH 1/2] - Update to version 3.1.0.1582544583.8c9da73: * Replace invalid bytes when decoding TagObject stream * Use UTF-8 encoding when getting information about a symbolic reference * Remove and replace references to nose with unittest in documentation * Remove nose from test requirements * Replace nose with unittest in tox configuration * Replace nose with unittest in Travis CI script * Added changelog for unreleased changes * Restrict gitdb2 version to <4 * Remove test.lib.asserts and use unittest.mock.patch directly * Replace assert_false with assertFalse * Replace assert_true with assertTrue * Replace raises with assertRaises * Replace assert_raises with assertRaises * Replace assert_not_equal with assertNotEqual * Replace assert_equal with assertEqual * Remove and replace assert_match with assertRegex * Remove old, no longer used assert methods * Remove references to old mock library in documentation * Remove outdated checks for unittest.mock existence * Fix Python version requirement in documentation * Remove badges for no longer existing Waffle site from README * Add support for Python 3.8 * Replace deprecated Logger.warn with Logger.warning * Replace deprecated assertRaisesRegexp alias with assertRaisesRegex * Replace deprecated assertNotEquals alias with assertNotEqual * Replace deprecated assertEquals alias with assertEqual in TestGit * Replace deprecated assertRegexpMatches alias with assertRegex * Replace deprecated failUnlessRaises alias with assertRaises in tests * Improve requirements.txt format OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-GitPython?expand=0&rev=30 --- GitPython-3.0.5.tar.gz | 3 -- GitPython-3.1.0.1582544583.8c9da73.tar.xz | 3 ++ _service | 4 +- python-GitPython.changes | 50 +++++++++++++++++++++++ python-GitPython.spec | 16 ++++---- test-skips.patch | 20 ++++----- test_blocking_lock_file-extra-time.patch | 10 +++-- 7 files changed, 78 insertions(+), 28 deletions(-) delete mode 100644 GitPython-3.0.5.tar.gz create mode 100644 GitPython-3.1.0.1582544583.8c9da73.tar.xz diff --git a/GitPython-3.0.5.tar.gz b/GitPython-3.0.5.tar.gz deleted file mode 100644 index f7d1c30..0000000 --- a/GitPython-3.0.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f81eb9841a323d06ac006f9d4dbef862b6c03e7769466075ce6e54fdec879b4 -size 11256711 diff --git a/GitPython-3.1.0.1582544583.8c9da73.tar.xz b/GitPython-3.1.0.1582544583.8c9da73.tar.xz new file mode 100644 index 0000000..2d6c5af --- /dev/null +++ b/GitPython-3.1.0.1582544583.8c9da73.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04779374b97f7861a47a3d70a149ab723c93c80239fcabff522bf183785ce9e7 +size 11154840 diff --git a/_service b/_service index 3fdbbf5..db8cc23 100644 --- a/_service +++ b/_service @@ -1,12 +1,12 @@ - 3.0.3 + 3.1.0 git://github.com/gitpython-developers/GitPython git yes enable enable - refs/tags/3.0.3 + refs/tags/3.1.0 xz diff --git a/python-GitPython.changes b/python-GitPython.changes index 8169b5c..d84d2f8 100644 --- a/python-GitPython.changes +++ b/python-GitPython.changes @@ -1,3 +1,53 @@ +------------------------------------------------------------------- +Mon Mar 30 10:40:09 UTC 2020 - tchvatal@suse.com + +- Update to version 3.1.0.1582544583.8c9da73: + * Replace invalid bytes when decoding TagObject stream + * Use UTF-8 encoding when getting information about a symbolic reference + * Remove and replace references to nose with unittest in documentation + * Remove nose from test requirements + * Replace nose with unittest in tox configuration + * Replace nose with unittest in Travis CI script + * Added changelog for unreleased changes + * Restrict gitdb2 version to <4 + * Remove test.lib.asserts and use unittest.mock.patch directly + * Replace assert_false with assertFalse + * Replace assert_true with assertTrue + * Replace raises with assertRaises + * Replace assert_raises with assertRaises + * Replace assert_not_equal with assertNotEqual + * Replace assert_equal with assertEqual + * Remove and replace assert_match with assertRegex + * Remove old, no longer used assert methods + * Remove references to old mock library in documentation + * Remove outdated checks for unittest.mock existence + * Fix Python version requirement in documentation + * Remove badges for no longer existing Waffle site from README + * Add support for Python 3.8 + * Replace deprecated Logger.warn with Logger.warning + * Replace deprecated assertRaisesRegexp alias with assertRaisesRegex + * Replace deprecated assertNotEquals alias with assertNotEqual + * Replace deprecated assertEquals alias with assertEqual in TestGit + * Replace deprecated assertRegexpMatches alias with assertRegex + * Replace deprecated failUnlessRaises alias with assertRaises in tests + * Improve requirements.txt format + * Remove checks for pathlib existence in TestRepo for Python < 3.4 + * Improve README Python requirement specificity + * Simplify Travis CI configuration + * Require latest gitdb version (with dropped python 2 support) + * Fix spelling in Dockerfile description LABEL + * Fix Repo.__repr__ when subclassed + * Apparently -s must be there, even if --sign-with is specified?? + * Sign with a different key for now, it's USB-C and can be used + * disable signing - don't have a USB-A to -C adapter :( + * Remove now unused is_invoking_git variable in test + * Fix requirements.txt formatting + * Remove unnecessary check for PermissionError for Python < 3.3 + * Improve setup.py python_requires + * Remove unnecessary check for logging.NullHandler for Python 2.6 + * Remove check for Python 2.7 +- Rebase patch test-skips.patch and test_blocking_lock_file-extra-time.patch + ------------------------------------------------------------------- Sat Nov 16 16:40:59 UTC 2019 - Arun Persaud diff --git a/python-GitPython.spec b/python-GitPython.spec index 8b0941b..96f65a5 100644 --- a/python-GitPython.spec +++ b/python-GitPython.spec @@ -1,7 +1,7 @@ # # spec file for package python-GitPython # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,25 +19,23 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-GitPython -Version: 3.0.5 +Version: 3.1.0.1582544583.8c9da73 Release: 0 Summary: Python Git Library License: BSD-3-Clause URL: https://github.com/gitpython-developers/GitPython -Source: GitPython-%{version}.tar.gz +Source: GitPython-%{version}.tar.xz Patch0: test-skips.patch Patch1: test_blocking_lock_file-extra-time.patch BuildRequires: %{python_module ddt >= 1.1.1} -BuildRequires: %{python_module gitdb2 >= 2.0.0} -BuildRequires: %{python_module nose} +BuildRequires: %{python_module gitdb >= 4.0.1} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module smmap2 >= 2.0.0} +BuildRequires: %{python_module smmap >= 3.0.1} BuildRequires: fdupes -BuildRequires: git +BuildRequires: git-core BuildRequires: python-rpm-macros -BuildRequires: python2-mock Requires: git-core -Requires: python-gitdb2 >= 2.0.0 +Requires: python-gitdb >= 4.0.1 BuildArch: noarch %python_subpackages diff --git a/test-skips.patch b/test-skips.patch index b97b64d..9bfc518 100644 --- a/test-skips.patch +++ b/test-skips.patch @@ -1,8 +1,8 @@ -Index: GitPython-3.0.2.1566444429.0765792/git/test/test_base.py +Index: GitPython-3.1.0.1582544583.8c9da73/git/test/test_base.py =================================================================== ---- GitPython-3.0.2.1566444429.0765792.orig/git/test/test_base.py -+++ GitPython-3.0.2.1566444429.0765792/git/test/test_base.py -@@ -112,7 +112,7 @@ class TestBase(TestBase): +--- GitPython-3.1.0.1582544583.8c9da73.orig/git/test/test_base.py ++++ GitPython-3.1.0.1582544583.8c9da73/git/test/test_base.py +@@ -111,7 +111,7 @@ class TestBase(TestBase): assert not rw_repo.config_reader("repository").getboolean("core", "bare") assert osp.isdir(osp.join(rw_repo.working_tree_dir, 'lib')) @@ -11,10 +11,10 @@ Index: GitPython-3.0.2.1566444429.0765792/git/test/test_base.py @with_rw_and_rw_remote_repo('0.1.6') def test_with_rw_remote_and_rw_repo(self, rw_repo, rw_remote_repo): assert not rw_repo.config_reader("repository").getboolean("core", "bare") -Index: GitPython-3.0.2.1566444429.0765792/git/test/test_remote.py +Index: GitPython-3.1.0.1582544583.8c9da73/git/test/test_remote.py =================================================================== ---- GitPython-3.0.2.1566444429.0765792.orig/git/test/test_remote.py -+++ GitPython-3.0.2.1566444429.0765792/git/test/test_remote.py +--- GitPython-3.1.0.1582544583.8c9da73.orig/git/test/test_remote.py ++++ GitPython-3.1.0.1582544583.8c9da73/git/test/test_remote.py @@ -4,6 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php @@ -23,7 +23,7 @@ Index: GitPython-3.0.2.1566444429.0765792/git/test/test_remote.py import random import tempfile from unittest import skipIf -@@ -410,7 +411,7 @@ class TestRemote(TestBase): +@@ -408,7 +409,7 @@ class TestRemote(TestBase): TagReference.delete(rw_repo, new_tag, other_tag) remote.push(":%s" % other_tag.path) @@ -32,9 +32,9 @@ Index: GitPython-3.0.2.1566444429.0765792/git/test/test_remote.py @with_rw_and_rw_remote_repo('0.1.6') def test_base(self, rw_repo, remote_repo): num_remotes = 0 -@@ -643,6 +644,7 @@ class TestRemote(TestBase): +@@ -641,6 +642,7 @@ class TestRemote(TestBase): # will raise fatal: Will not delete all non-push URLs - assert_raises(GitCommandError, remote.delete_url, test3) + self.assertRaises(GitCommandError, remote.delete_url, test3) + @skipIf(os.environ.get('SKIP_GITHUB', 'false') == 'true', 'GitHub connection error') def test_fetch_error(self): diff --git a/test_blocking_lock_file-extra-time.patch b/test_blocking_lock_file-extra-time.patch index 2c8b473..5051803 100644 --- a/test_blocking_lock_file-extra-time.patch +++ b/test_blocking_lock_file-extra-time.patch @@ -1,7 +1,9 @@ ---- GitPython-2.1.11/git/test-orig/test_util.py 2019-03-13 15:54:50.306690465 +0700 -+++ GitPython-2.1.11/git/test/test_util.py 2019-03-13 18:22:09.867649085 +0700 -@@ -171,9 +171,7 @@ - self.failUnlessRaises(IOError, wait_lock._obtain_lock) +Index: GitPython-3.1.0.1582544583.8c9da73/git/test/test_util.py +=================================================================== +--- GitPython-3.1.0.1582544583.8c9da73.orig/git/test/test_util.py ++++ GitPython-3.1.0.1582544583.8c9da73/git/test/test_util.py +@@ -165,9 +165,7 @@ class TestUtils(TestBase): + self.assertRaises(IOError, wait_lock._obtain_lock) elapsed = time.time() - start extra_time = 0.02 - if is_win: From 7083924f254c87210e53733a89ca68e5ecd7441961897970175823b4228a24c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 2 Apr 2020 11:14:31 +0000 Subject: [PATCH 2/2] - Disable three more tests on git submodules: * https://github.com/gitpython-developers/GitPython/issues/597 * test-skips.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-GitPython?expand=0&rev=31 --- python-GitPython.changes | 7 +++++++ python-GitPython.spec | 3 +-- test-skips.patch | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/python-GitPython.changes b/python-GitPython.changes index d84d2f8..44406ec 100644 --- a/python-GitPython.changes +++ b/python-GitPython.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Apr 2 11:03:10 UTC 2020 - Tomáš Chvátal + +- Disable three more tests on git submodules: + * https://github.com/gitpython-developers/GitPython/issues/597 + * test-skips.patch + ------------------------------------------------------------------- Mon Mar 30 10:40:09 UTC 2020 - tchvatal@suse.com diff --git a/python-GitPython.spec b/python-GitPython.spec index 96f65a5..522240e 100644 --- a/python-GitPython.spec +++ b/python-GitPython.spec @@ -85,7 +85,6 @@ git config --global user.name "Your Name" %doc AUTHORS CHANGES README.md doc/source/*.rst %dir %{python_sitelib}/git %{python_sitelib}/git/* -%dir %{python_sitelib}/GitPython-%{version}-py*.egg-info -%{python_sitelib}/GitPython-%{version}-py*.egg-info +%{python_sitelib}/GitPython* %changelog diff --git a/test-skips.patch b/test-skips.patch index 9bfc518..452fa54 100644 --- a/test-skips.patch +++ b/test-skips.patch @@ -40,3 +40,42 @@ Index: GitPython-3.1.0.1582544583.8c9da73/git/test/test_remote.py def test_fetch_error(self): rem = self.rorepo.remote('origin') with self.assertRaisesRegex(GitCommandError, "[Cc]ouldn't find remote ref __BAD_REF__"): +Index: GitPython-3.1.0.1582544583.8c9da73/git/test/test_submodule.py +=================================================================== +--- GitPython-3.1.0.1582544583.8c9da73.orig/git/test/test_submodule.py ++++ GitPython-3.1.0.1582544583.8c9da73/git/test/test_submodule.py +@@ -420,12 +420,13 @@ class TestSubmodule(TestBase): + def test_base_bare(self, rwrepo): + self._do_base_tests(rwrepo) + +- @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (3, 5), """ +- File "C:\\projects\\gitpython\\git\\cmd.py", line 559, in execute +- raise GitCommandNotFound(command, err) +- git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid') +- cmdline: git clone -n --shared -v C:\\projects\\gitpython\\.git Users\\appveyor\\AppData\\Local\\Temp\\1\\tmplyp6kr_rnon_bare_test_root_module""") # noqa E501 ++ #@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (3, 5), """ ++ # File "C:\\projects\\gitpython\\git\\cmd.py", line 559, in execute ++ # raise GitCommandNotFound(command, err) ++ # git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid') ++ # cmdline: git clone -n --shared -v C:\\projects\\gitpython\\.git Users\\appveyor\\AppData\\Local\\Temp\\1\\tmplyp6kr_rnon_bare_test_root_module""") # noqa E501 + @with_rw_repo(k_subm_current, bare=False) ++ @skipIf(os.environ.get('SKIP_LOCALHOST', 'false') == 'true', 'git-daemon connection error') + def test_root_module(self, rwrepo): + # Can query everything without problems + rm = RootModule(self.rorepo) +@@ -750,6 +751,7 @@ class TestSubmodule(TestBase): + # "FIXME: helper.wrapper fails with: PermissionError: [WinError 5] Access is denied: " + # "'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\test_work_tree_unsupportedryfa60di\\master_repo\\.git\\objects\\pack\\pack-bc9e0787aef9f69e1591ef38ea0a6f566ec66fe3.idx") # noqa E501 + @with_rw_directory ++ @skipIf(os.environ.get('SKIP_LOCALHOST', 'false') == 'true', 'git-daemon connection error') + def test_git_submodule_compatibility(self, rwdir): + parent = git.Repo.init(osp.join(rwdir, 'parent')) + sm_path = join_path_native('submodules', 'intermediate', 'one') +@@ -825,6 +827,7 @@ class TestSubmodule(TestBase): + # end for each dry-run mode + + @with_rw_directory ++ @skipIf(os.environ.get('SKIP_LOCALHOST', 'false') == 'true', 'git-daemon connection error') + def test_remove_norefs(self, rwdir): + parent = git.Repo.init(osp.join(rwdir, 'parent')) + sm_name = 'mymodules/myname'