Giter Site home page Giter Site logo

Comments (16)

msiemens avatar msiemens commented on July 28, 2024

Interesting. I suspect this is more due to a Git update than caused by the Python upgrade. I use Python 3.8 locally and tests started to fail for me too. I'll look into this…

from pygitup.

msiemens avatar msiemens commented on July 28, 2024

Seems like this is related to gitpython-developers/GitPython#1014 which in turn is caused by git/git@d18c950 which was published in Git v2.27.0. The issue has been fixed in GitPython v3.1.3 but we're using GitPython 2.x. Updating to GitPython 3.x means dropping Python 2 support. So I'll publish a release that drops Python 2 support in order to fix this issue.

from pygitup.

mhjacks avatar mhjacks commented on July 28, 2024

Thank you! That will work well for us as we don't support Python 2 in Fedora anymore.

from pygitup.

msiemens avatar msiemens commented on July 28, 2024

Should be fixed with v2.0.0 πŸ™ƒ

from pygitup.

mhjacks avatar mhjacks commented on July 28, 2024

I don't see setup.py in the new release tarball?

from pygitup.

msiemens avatar msiemens commented on July 28, 2024

Oh, weird. I forgot to publish the release to PyPI. The release there should contain the setup.py. I switched the build to Poetry which generates the setup.py when building the release artifacts.

from pygitup.

mhjacks avatar mhjacks commented on July 28, 2024

Ah, that makes sense. Thanks! I was unaware that Poetry did that. I'll work on packaging 2.0.0 for Fedora.

from pygitup.

mhjacks avatar mhjacks commented on July 28, 2024

OK, I'm working on packaging, and I've run a super-minor test problem (init.py in tests/ doesn't seem to have import os and the test suite complains about that). But there's also this:

% nosetests-3


..............................E...
======================================================================
ERROR: test suite for <module 'PyGitUp.tests.test_up_to_date' from '/home/mjackson/git-up-2.0.0/PyGitUp/tests/test_up_to_date.py'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/nose/suite.py", line 209, in run
    self.setUp()
  File "/usr/lib/python3.9/site-packages/nose/suite.py", line 292, in setUp
    self.setupContext(ancestor)
  File "/usr/lib/python3.9/site-packages/nose/suite.py", line 315, in setupContext
    try_run(context, names)
  File "/usr/lib/python3.9/site-packages/nose/util.py", line 471, in try_run
    return func()
  File "/home/mjackson/git-up-2.0.0/PyGitUp/tests/test_up_to_date.py", line 30, in setup
    repo.remotes.origin.pull()
  File "/usr/lib/python3.9/site-packages/git/remote.py", line 811, in pull
    res = self._get_fetch_info_from_stderr(proc, progress)
  File "/usr/lib/python3.9/site-packages/git/remote.py", line 708, in _get_fetch_info_from_stderr
    output.extend(FetchInfo._from_line(self.repo, err_line, fetch_line)
  File "/usr/lib/python3.9/site-packages/git/remote.py", line 708, in <genexpr>
    output.extend(FetchInfo._from_line(self.repo, err_line, fetch_line)
  File "/usr/lib/python3.9/site-packages/git/remote.py", line 292, in _from_line
    raise ValueError("Failed to parse line: %r" % line)
ValueError: Failed to parse line: '  git config pull.rebase false  # merge (the default strategy)'
-------------------- >> begin captured logging << --------------------
git.cmd: DEBUG: Popen(['git', 'init'], cwd=/tmp/PyGitUp.y1q5d8ld/master.up-to-date, universal_newlines=False, shell=None, istream=None)
git.cmd: DEBUG: Popen(['git', 'cat-file', '--batch-check'], cwd=/tmp/PyGitUp.y1q5d8ld/master.up-to-date, universal_newlines=False, shell=None, istream=<valid stream>)
git.cmd: DEBUG: Popen(['git', 'cat-file', '--batch'], cwd=/tmp/PyGitUp.y1q5d8ld/master.up-to-date, universal_newlines=False, shell=None, istream=<valid stream>)
git.cmd: DEBUG: Popen(['git', 'checkout', '-b', 'initial'], cwd=/tmp/PyGitUp.y1q5d8ld/master.up-to-date, universal_newlines=False, shell=None, istream=None)
git.cmd: DEBUG: Popen(['git', 'checkout', '-b', 'up-to-date'], cwd=/tmp/PyGitUp.y1q5d8ld/master.up-to-date, universal_newlines=False, shell=None, istream=None)
git.cmd: DEBUG: Popen(['git', 'clone', '-b', 'up-to-date', '-v', '/tmp/PyGitUp.y1q5d8ld/master.up-to-date/.git', '/tmp/PyGitUp.y1q5d8ld/up-to-date'], cwd=/tmp/PyGitUp.y1q5d8ld/master.up-to-date, universal_newlines=True, shell=None, istream=None)
git.repo.base: DEBUG: Cmd(['git', 'clone', '-b', 'up-to-date', '-v', '/tmp/PyGitUp.y1q5d8ld/master.up-to-date/.git', '/tmp/PyGitUp.y1q5d8ld/up-to-date'])'s unused stdout: 
git.cmd: DEBUG: Popen(['git', 'pull', '-v', 'origin'], cwd=/tmp/PyGitUp.y1q5d8ld/up-to-date, universal_newlines=True, shell=None, istream=None)
git.remote: DEBUG: Fetch head lines do not match lines provided via progress information
length of progress lines 6 should be equal to lines in FETCH_HEAD file 3
Will ignore extra progress lines or fetch head lines.
git.remote: DEBUG: info lines: ['  git config pull.rebase false  # merge (the default strategy)', '  git config pull.rebase true   # rebase', '  git config pull.ff only       # fast-forward only', '   4ee720c..78fba12  up-to-date -> origin/up-to-date', ' = [up to date]      initial    -> origin/initial', ' = [up to date]      master     -> origin/master']
git.remote: DEBUG: head info : ["78fba12789eaf1eb43fbf45239b0efdb553a062b\t\tbranch 'up-to-date' of /tmp/PyGitUp.y1q5d8ld/master.up-to-date/\n", "4ee720cca1268fb98eaef7f6cb4832d009703729\tnot-for-merge\tbranch 'initial' of /tmp/PyGitUp.y1q5d8ld/master.up-to-date/\n", "4ee720cca1268fb98eaef7f6cb4832d009703729\tnot-for-merge\tbranch 'master' of /tmp/PyGitUp.y1q5d8ld/master.up-to-date/\n"]
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 33 tests in 4.027s

Is this another case of "the output changed" or is it something more significant?

from pygitup.

msiemens avatar msiemens commented on July 28, 2024

That's strange. Seems like this is the exact issue that you had at the start. Could you post the output of running python -c 'import git; print(git.__version__)' in your build environment where PyGitUp is installed?

from pygitup.

mhjacks avatar mhjacks commented on July 28, 2024
% python -c 'import git; print(git.__version__)'
3.0.9

Which is interesting, because the package claims to be 3.1.0:
python3-GitPython-3.1.0-3.fc33.noarch

Clearly the package is installing 3.0.9 though:
% rpm -ql python3-GitPython-3.1.0-3.fc33.noarch
/usr/lib/python3.9/site-packages/GitPython-3.0.9-py3.9.egg-info
/usr/lib/python3.9/site-packages/GitPython-3.0.9-py3.9.egg-info/PKG-INFO
/usr/lib/python3.9/site-packages/GitPython-3.0.9-py3.9.egg-info/SOURCES.txt
/usr/lib/python3.9/site-packages/GitPython-3.0.9-py3.9.egg-info/dependency_links.txt
/usr/lib/python3.9/site-packages/GitPython-3.0.9-py3.9.egg-info/not-zip-safe
/usr/lib/python3.9/site-packages/GitPython-3.0.9-py3.9.egg-info/requires.txt
/usr/lib/python3.9/site-packages/GitPython-3.0.9-py3.9.egg-info/top_level.txt

from pygitup.

mhjacks avatar mhjacks commented on July 28, 2024

It appears we're past the initially reported issue, so I'm ready to close this (Fedora mislabeling a package version isn't really your problem). I see you also loosened the dependency on colorama. Thanks! Would you please consider adding the import os to the test suite as well?

from pygitup.

msiemens avatar msiemens commented on July 28, 2024

Would you please consider adding the import os to the test suite as well?

Where is it missing? As far as I can tell, the tests run without errors

from pygitup.

mhjacks avatar mhjacks commented on July 28, 2024

When I run nosetests on f32

I get this error:

% nosetests
..................................E
======================================================================
ERROR: test suite for <module 'PyGitUp.tests' from '/home/mjackson/git-up-2.0.1/PyGitUp/tests/__init__.py'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/nose/suite.py", line 228, in run
    self.tearDown()
  File "/usr/lib/python3.8/site-packages/nose/suite.py", line 351, in tearDown
    self.teardownContext(ancestor)
  File "/usr/lib/python3.8/site-packages/nose/suite.py", line 367, in teardownContext
    try_run(context, names)
  File "/usr/lib/python3.8/site-packages/nose/util.py", line 471, in try_run
    return func()
  File "/home/mjackson/git-up-2.0.1/PyGitUp/tests/__init__.py", line 43, in teardown
    os.chdir(join(basepath, '..'))
NameError: name 'os' is not defined

----------------------------------------------------------------------
Ran 34 tests in 4.596s

FAILED (errors=1)

I do not see an import os in this file:
https://github.com/msiemens/PyGitUp/blob/master/PyGitUp/tests/__init__.py so I suspect that's why I'm seeing this error. I could be wrong, though.

from pygitup.

msiemens avatar msiemens commented on July 28, 2024

Funny! Since PyGitUp 2.0 I switched to PyTest for running the tests and there everything runs fine. But running with nosetests throws an exception as in your example. I'll publish a post-release with a fix

from pygitup.

msiemens avatar msiemens commented on July 28, 2024

This should be fixed now with v2.0.1.post1

from pygitup.

mhjacks avatar mhjacks commented on July 28, 2024

Excellent! Thanks.

from pygitup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.