-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround for #1 #2
Conversation
Thank you ! In a way, this fix just silences the error popping up in the destructor, but its not a fix. Soon I will have osx lion, so I should be able to reproduce it. |
Absolutely. I know very little about refcount and smmap, else I would have investigated further :) |
Any update on this? This bug has been preventing me from releasing the next version of some software for 2 months now. |
Thanks for bringing this up again, I didn't have it on my radar anymore. I just ran the unittests on OSX Lion, and to my surprise they did all pass. As I cannot reproduce the issue, I see no way of fixing the cause of the issue. If you run the unittests with nosetest, they should fail as well or show errors of any kind - this should help you to nail down the issue and fix it at its roots. These roots don't necessarily lie within smmap, as getrefcount is a default method that is expected to exist in any python installation. Good luck hunting ! |
I've tried to push up my own version to PyPi, but the setup.py throws up all over w/ extension issues. When you deploy a new version, are you doing something other than Can you explain why smmap is a dependency of gitpython in the first place? Ideally, I see no reason for gitpython to not be pure python. |
I don't think you can just push your own version of an existing project. What you could do though is to just include the code in your project directly. smmap is used by gitdb, which in turn is used by gitpython. smmap is pure python, but gitdb has a little optional c code. Async is a dependency coming in with gitdb as well, and it too has some optional c code. |
Dependency hell. |
Did you ever get a chance to look at this? I'm still having this error — 5 months later.
|
I couldn't reproduce the issue, see #2 (comment) . |
I think, sadly enough, that I'm going to have to formally fork GitPython to remove the metric fuckton of dependencies. |
I am sorry I could be of no help for you, but if it helps to reduce your mental pain at least, please note that I am intending to reduce the dependencies in the latest release of GitPython. The goal there is to remove all of them except for smmap - currently it still uses smmap and async. Getting your fix into GitPython should be as easy as forking it and using your smmap repository and revision for the smmap submodule in ext/smmap. |
so i did some looking in to this and the issue is more odd that it would seem. the issue is not that now, the weird part... if you replace line 55 of mmap.py with:
i think the 4 is right... the -2 that was there before and 2 of the 3 from the comment in in any case, calling i hope this is an acceptable solution... i know it doesn't find exactly why the error is being raised, but it does track down exactly where it is coming from, and removes it without hiding anything. |
@Autoplectic: thanks for digging around and finding this! |
so slight update. even though mmap.py contains:
both are
it works without error, and should logically be doing the same as using the call to also, running smmap's nosetests results in no errors, so whatever error this is, it's not covered by the tests. |
Thanks for sharing your discovery ! Thanks again ! |
Thanks a ton for this! Really looking forward to continuing development on legit now :) |
Any update on when you can release a fix for this? I'd really like to start working on my git module again :) |
So, apparently sometimes
getrefcount
is None. This was causing the strange hidden exception behavior.When an exception occurs in
__del__
methods, they get suppressed and printed to the terminal upon process exit.This simple try/except makes my problem go away, but is prob not the best way to fix it. :)