diff --git a/GitPython-2.1.11.1531661757.92a4819.tar.xz b/GitPython-2.1.11.1531661757.92a4819.tar.xz
new file mode 100644
index 0000000..ee42dc2
--- /dev/null
+++ b/GitPython-2.1.11.1531661757.92a4819.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:16131a0c8a9624f58288c2a09cba7b9ad467c884b536d15172cf38ff04416859
+size 10173064
diff --git a/GitPython-2.1.11.tar.gz b/GitPython-2.1.11.tar.gz
deleted file mode 100644
index 105ad2e..0000000
--- a/GitPython-2.1.11.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8237dc5bfd6f1366abeee5624111b9d6879393d84745a507de0fda86043b65a8
-size 428531
diff --git a/_service b/_service
new file mode 100644
index 0000000..0172ee6
--- /dev/null
+++ b/_service
@@ -0,0 +1,16 @@
+
+
+ 2.1.11
+ git://github.com/gitpython-developers/GitPython
+ git
+ yes
+ enable
+ enable
+ refs/tags/2.1.11
+
+
+ xz
+ *.tar
+
+
+
diff --git a/merged_pr_793.patch b/merged_pr_793.patch
new file mode 100644
index 0000000..474b5a5
--- /dev/null
+++ b/merged_pr_793.patch
@@ -0,0 +1,51 @@
+diff -ur GitPython-2.1.11-orig/git/objects/submodule/base.py GitPython-2.1.11/git/objects/submodule/base.py
+--- GitPython-2.1.11-orig/git/objects/submodule/base.py 2019-03-13 17:12:27.055299102 +0700
++++ GitPython-2.1.11/git/objects/submodule/base.py 2019-03-13 17:14:33.840773626 +0700
+@@ -1160,7 +1160,7 @@
+ try:
+ parser = cls._config_parser(repo, pc, read_only=True)
+ except IOError:
+- raise StopIteration
++ return
+ # END handle empty iterator
+
+ rt = pc.tree # root tree
+diff -ur GitPython-2.1.11-orig/git/repo/base.py GitPython-2.1.11/git/repo/base.py
+--- GitPython-2.1.11-orig/git/repo/base.py 2019-03-13 17:12:29.187300315 +0700
++++ GitPython-2.1.11/git/repo/base.py 2019-03-13 17:14:33.884774474 +0700
+@@ -714,7 +714,10 @@
+
+ stream = (line for line in data.split(b'\n') if line)
+ while True:
+- line = next(stream) # when exhausted, causes a StopIteration, terminating this function
++ try:
++ line = next(stream) # when exhausted, causes a StopIteration, terminating this function
++ except StopIteration:
++ return
+ hexsha, orig_lineno, lineno, num_lines = line.split()
+ lineno = int(lineno)
+ num_lines = int(num_lines)
+@@ -724,7 +727,10 @@
+ # for this commit
+ props = {}
+ while True:
+- line = next(stream)
++ try:
++ line = next(stream)
++ except StopIteration:
++ return
+ if line == b'boundary':
+ # "boundary" indicates a root commit and occurs
+ # instead of the "previous" tag
+@@ -749,7 +755,10 @@
+ # Discard all lines until we find "filename" which is
+ # guaranteed to be the last line
+ while True:
+- line = next(stream) # will fail if we reach the EOF unexpectedly
++ try:
++ line = next(stream) # will fail if we reach the EOF unexpectedly
++ except StopIteration:
++ return
+ tag, value = line.split(b' ', 1)
+ if tag == b'filename':
+ orig_filename = value
diff --git a/python-GitPython.changes b/python-GitPython.changes
index 6a053ac..57f49f6 100644
--- a/python-GitPython.changes
+++ b/python-GitPython.changes
@@ -1,3 +1,35 @@
+-------------------------------------------------------------------
+Fri Mar 15 13:52:47 UTC 2019 - tchvatal@suse.com
+
+- Update to version 2.1.11.1531661757.92a4819:
+ * Bump version to 2.1.11
+ * fix whitespace violation
+ * Update test_docs.py
+ * Dedent code blocks in tutorial.
+ * Allow pathlib.Path in Repo.__init__
+ * Fix small typo
+ * Fix exception on import in MacOS
+ * Bump to 2.1.10
+ * Add change in type support
+ * Get correcly rename change_type.
+- Simplify the service file and generating of the tarball
+ and base everything on a tag
+
+-------------------------------------------------------------------
+Wed Mar 13 12:09:51 UTC 2019 - John Vandenberg
+
+- Activate test suite and remove bcond test
+- Add merged_pr_793.patch already merged upstream to fix Python 3.7,
+ especially git submodules
+- Add test_blocking_lock_file-extra-time.patch to avoid an
+ indeterministic timing failure
+- Add test-skips.patch to skip one expected failure and workaround
+ two unknown failures
+- Remove test suite from the runtime package
+- Add doc/source/*.rst to %docs
+- Remove dependency on python3-mock
+- Set build dependency ddt minimum version 1.1.1
+
-------------------------------------------------------------------
Tue Dec 4 12:48:28 UTC 2018 - Matej Cepl
diff --git a/python-GitPython.spec b/python-GitPython.spec
index 41309bc..fc61cbd 100644
--- a/python-GitPython.spec
+++ b/python-GitPython.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-GitPython
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,31 +17,30 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-# Requires test files missing from the pypi source archive
-# See: https://github.com/gitpython-developers/GitPython/pull/788
-%bcond_with test
Name: python-GitPython
-Version: 2.1.11
+Version: 2.1.11.1531661757.92a4819
Release: 0
Summary: Python Git Library
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/gitpython-developers/GitPython
-Source: https://files.pythonhosted.org/packages/source/G/GitPython/GitPython-%{version}.tar.gz
+Source: GitPython-%{version}.tar.xz
+Patch0: test-skips.patch
+# Subset and rebase of merged https://github.com/gitpython-developers/GitPython/pull/793
+Patch1: merged_pr_793.patch
+Patch2: 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 setuptools}
+BuildRequires: %{python_module smmap2 >= 2.0.0}
BuildRequires: fdupes
+BuildRequires: git
BuildRequires: python-rpm-macros
+BuildRequires: python2-mock
Requires: git-core
Requires: python-gitdb2 >= 2.0.0
BuildArch: noarch
-%if %{with test}
-BuildRequires: %{python_module ddt}
-BuildRequires: %{python_module gitdb2 >= 2.0.0}
-BuildRequires: %{python_module nose}
-BuildRequires: %{python_module smmap2 >= 2.0.0}
-BuildRequires: git
-BuildRequires: python-mock
-%endif
%python_subpackages
%description
@@ -57,22 +56,35 @@ are 'cgit' and pure python, which is the default.
%prep
%setup -q -n GitPython-%{version}
+echo y | ./init-tests-after-clone.sh
+%autopatch -p1
%build
%python_build
%install
%python_install
+%python_expand rm -r %{buildroot}%{$python_sitelib}/git/test/
%python_expand %fdupes %{buildroot}%{$python_sitelib}
-%if %{with test}
%check
-%python_exec setup.py test
-%endif
+# While SKIP_GITHUB is fine, the two tests skipped with SKIP_LOCALHOST
+# should work as the test runner sets up a git daemon.
+export SKIP_GITHUB=true
+export SKIP_LOCALHOST=true
+export TRAVIS=true
+
+export LANG=en_US.UTF-8
+export GIT_PYTHON_TEST_GIT_REPO_BASE=${PWD}
+
+git config --global user.email "you@example.com"
+git config --global user.name "Your Name"
+
+%python_exec setup.py test --test-suite=git.test
%files %{python_files}
%license LICENSE
-%doc AUTHORS CHANGES README.md
+%doc AUTHORS CHANGES README.md doc/source/*.rst
%{python_sitelib}/*
%changelog
diff --git a/test-skips.patch b/test-skips.patch
new file mode 100644
index 0000000..3f65350
--- /dev/null
+++ b/test-skips.patch
@@ -0,0 +1,40 @@
+diff -u GitPython-2.1.11-orig/git/test/test_base.py GitPython-2.1.11/git/test/test_base.py
+--- GitPython-2.1.11-orig/git/test/test_base.py 2019-03-13 15:54:50.126688903 +0700
++++ GitPython-2.1.11/git/test/test_base.py 2019-03-13 16:11:54.287675238 +0700
+@@ -112,7 +112,7 @@
+ assert not rw_repo.config_reader("repository").getboolean("core", "bare")
+ assert osp.isdir(osp.join(rw_repo.working_tree_dir, 'lib'))
+
+- #@skipIf(HIDE_WINDOWS_FREEZE_ERRORS, "FIXME: Freezes! sometimes...")
++ @skipIf(os.environ.get('SKIP_LOCALHOST', 'false') == 'true', 'git-daemon connection error')
+ @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")
+diff -u GitPython-2.1.11-orig/git/test/test_remote.py GitPython-2.1.11/git/test/test_remote.py
+--- GitPython-2.1.11-orig/git/test/test_remote.py 2019-03-13 15:54:50.242689909 +0700
++++ GitPython-2.1.11/git/test/test_remote.py 2019-03-13 16:23:59.918147844 +0700
+@@ -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
+
++import os
+ import random
+ import tempfile
+ from unittest import skipIf
+@@ -397,7 +398,7 @@
+ TagReference.delete(rw_repo, new_tag, other_tag)
+ remote.push(":%s" % other_tag.path)
+
+- @skipIf(HIDE_WINDOWS_FREEZE_ERRORS, "FIXME: Freezes!")
++ @skipIf(os.environ.get('SKIP_LOCALHOST', 'false') == 'true', 'git-daemon connection error')
+ @with_rw_and_rw_remote_repo('0.1.6')
+ def test_base(self, rw_repo, remote_repo):
+ num_remotes = 0
+@@ -630,6 +631,7 @@
+ # will raise fatal: Will not delete all non-push URLs
+ assert_raises(GitCommandError, remote.delete_url, test3)
+
++ @skipIf(os.environ.get('SKIP_GITHUB', 'false') == 'true', 'GitHub connection error')
+ def test_fetch_error(self):
+ rem = self.rorepo.remote('origin')
+ with self.assertRaisesRegex(GitCommandError, "Couldn't find remote ref __BAD_REF__"):
diff --git a/test_blocking_lock_file-extra-time.patch b/test_blocking_lock_file-extra-time.patch
new file mode 100644
index 0000000..a7a717d
--- /dev/null
+++ b/test_blocking_lock_file-extra-time.patch
@@ -0,0 +1,13 @@
+--- 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
+@@ -167,9 +167,7 @@
+ self.failUnlessRaises(IOError, wait_lock._obtain_lock)
+ elapsed = time.time() - start
+ extra_time = 0.02
+- if is_win:
+- # for Appveyor
+- extra_time *= 6 # NOTE: Indeterministic failures here...
++ extra_time *= 6 # NOTE: Indeterministic failures here...
+ self.assertLess(elapsed, wait_time + extra_time)
+
+ def test_user_id(self):