imports in matroid.pyx

18 views
Skip to first unread message

Rudi Pendavingh

unread,
Jun 6, 2015, 5:54:38 AM6/6/15
to sage-m...@googlegroups.com
Hi all,

In Sage version 6.8.beta3, there is a line
      from sage.matroids.catalog import *
in matroid.pyx, which was not there yet in 6.7.

That import is causing problems.  Things like Matroid(G) on a graph G won't work, since Sage now cannot import the name Matroid anymore.

The obvious bugfix is to simply delete that line from matroid.pyx again. But surely it was put there by somebody for a reason, and I have not been able to find out where and when that line got inserted. The tickets that were closed recently do not seem to insert it. 

So my first question: who put this import in matroid.pyx, and why? 
My second question: is there a faster way to trace the origin of a line of code than browsing through the closed tickets?

Cheers,
Rudi




Rudi Pendavingh

unread,
Jun 6, 2015, 7:42:27 AM6/6/15
to sage-m...@googlegroups.com
Hi all,

I now see my problem. The bad import is not part of 6.8.beta3, but of Chao Xu's work in progress, `Faster 3-connectivity'.
And I apparently merged `Faster 3-connectivity' with `develop' at some point, without realising that this merge would persist in my local branch `develop' after pulling it to restore.

So sorry for the noise. Still don't have git completely under control...

Cheers,
Rudi

Dima Pasechnik

unread,
Jun 6, 2015, 12:21:35 PM6/6/15
to sage-m...@googlegroups.com


On Saturday, 6 June 2015 12:42:27 UTC+1, Rudi Pendavingh wrote:
Hi all,

I now see my problem. The bad import is not part of 6.8.beta3, but of Chao Xu's work in progress, `Faster 3-connectivity'.
And I apparently merged `Faster 3-connectivity' with `develop' at some point, without realising that this merge would persist in my local branch `develop' after pulling it to restore.

So sorry for the noise. Still don't have git completely under control...

it took me a while to learn to never merge anything but most harmless into develop or master.
git checkout a new branch, merge there anything you like...
 

Dima Pasechnik

unread,
Jun 6, 2015, 12:24:16 PM6/6/15
to sage-m...@googlegroups.com


On Saturday, 6 June 2015 17:21:35 UTC+1, Dima Pasechnik wrote:


On Saturday, 6 June 2015 12:42:27 UTC+1, Rudi Pendavingh wrote:
Hi all,

I now see my problem. The bad import is not part of 6.8.beta3, but of Chao Xu's work in progress, `Faster 3-connectivity'.
And I apparently merged `Faster 3-connectivity' with `develop' at some point, without realising that this merge would persist in my local branch `develop' after pulling it to restore.

So sorry for the noise. Still don't have git completely under control...

it took me a while to learn to never merge anything but most harmless into develop or master.
git checkout a new branch, merge there anything you like...

it goes without saying that you have to merge the remote updates to develop, e.g. when a new beta is released...

Rob Beezer

unread,
Jun 6, 2015, 1:26:04 PM6/6/15
to sage-m...@googlegroups.com
On 06/06/2015 02:54 AM, Rudi Pendavingh wrote:
> So my first question: who put this import in matroid.pyx, and why?
> My second question: is there a faster way to trace the origin of a line of code
> than browsing through the closed tickets?

Dear Rudi,

I'm still working on my git-Fu, as well. Try

git blame matroid.pyx

and you get a lot of line-by-line info that would help answer the two questions
above.

Rob

Rudi Pendavingh

unread,
Jun 6, 2015, 2:24:17 PM6/6/15
to sage-m...@googlegroups.com
Dear Dima and Rob,

thank you for your encouragement and your advice. I just started work on the sage matroids package after a long pause. Writing code again is great fun, but git really is a force to be reckoned with... I keep thinking I understand it enough to keep out of trouble, but it simply gives you detailed control = abundant opportunities to shoot your own foot.

Anyway, `git blame' is an unforgettable name :)

All the best,

Rudi
Reply all
Reply to author
Forward
0 new messages