We should rename 'master' to 'main'

103 views
Skip to first unread message

Sangyub Lee

unread,
Jul 17, 2023, 11:25:21 PM7/17/23
to sympy
I think that github decided to do that in 2020.
And the main reason to do this is that 'master' is agreed to be politically offensive terminology:

Rename offensive terminology (master) - Simon Pieters (kernel.org)

Aaron Meurer

unread,
Jul 18, 2023, 12:23:37 AM7/18/23
to sy...@googlegroups.com
I'm not opposed to doing this. Most other projects have also done it,
so it would be inline with that. It also has the advantage that "main"
is a much clearer term to newbies than "master".

But note that this is not a trivial thing to do, which is why it
hasn't happened yet. It's not as simple as just renaming the branch.
We also have to fix all the references to "master" everywhere,
including making sure that all our automation and release scripts
still work.

There's also an unfortunate downside of doing this, which is that
anyone who already has a clone of the repo and is using "git checkout
master; git pull" will have their workflows broken when master stops
being updated. I don't know if there's a clean way we can do anything
about that.

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/8037a96f-4d4c-48ca-9139-56bec7f5217en%40googlegroups.com.

Peter Stahlecker

unread,
Jul 18, 2023, 12:26:09 AM7/18/23
to sy...@googlegroups.com
Somehow it does not look like the most urgent problem to me - but then again I am old, white and male. 😊

--
Best regards,

Peter Stahlecker

Hanspeter “Hanspi” Schmid

unread,
Jul 18, 2023, 1:14:25 AM7/18/23
to sympy
Somehow I find this very disturbing. Why does everyone seem to be so sure that master must be understood (and therefore shunned) as half of master-slave instead of half of master-apprentice or master-bachelor or master-junior? Am I from now on forbidden to master a technique? Should I stop listening to master violinists? Do we have to abandon or rename Master programs after the Bachelor programs?

I totally agree that terms like 'master-slave flip-flop' must be changed. However, there have never been slave branches on github, and making this change totally means bringing the present political upheavalsof mainly one big country into a international, technical context where it really does not belong.

So yes, I am totally opposed to doing this. As long as you can still get a Master degree at a single American university, I do not even consider one second of the SymPy's development team well spent on this issue.

Peter Stahlecker

unread,
Jul 18, 2023, 1:30:56 AM7/18/23
to sy...@googlegroups.com
Perfect!!
This political correctness of the language, which has become a big issue in my mother tongue, German, only serves to distract from the real problems.

Matthew Brett

unread,
Jul 18, 2023, 6:03:06 AM7/18/23
to sy...@googlegroups.com
Hi,

In general I agree about speech policing - but in this particular case
- 'main' is the default in Git now, it is becoming the standard
everywhere else - and it's a perfectly reasonable renaming - "main" is
a good word for the - er - main branch - at least as good as "master"
- semantically.

Cheers,

Matthew
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CABKqA0aN6P32vXQzJ7zBE%2B96CQZWp5oJV8xMJ4dLQfco%2BjbkzQ%40mail.gmail.com.

Oscar Benjamin

unread,
Jul 18, 2023, 8:22:27 AM7/18/23
to sy...@googlegroups.com
On Tue, 18 Jul 2023 at 04:25, Sangyub Lee <syle...@gmail.com> wrote:
>
> I think that github decided to do that in 2020.
> And the main reason to do this is that 'master' is agreed to be politically offensive terminology:

I've been wondering for a long time now when someone would bring this up.

Having watched this discussion play out in cpython I definitely do not
want to import that kind of furious debate to the SymPy mailing list
but I will just say that the use of the word master in this context is
not really "agreed" to be politically offensive: there is definitely
not a consensus on this.

Rather there are several groups of people in these debates:

1. Those who think that the use of the word master in this context is
politically offensive.
2. Those who disagree but can see that the word might offend someone
who misunderstands its meaning.
3. Those who think that it does not matter much but are happy to go
along with group 1 to end the debate.
4. Those who disagree strongly and are not prepared to give an inch to group 1.

I think that most people are in group 3 but those people tend not to
contribute loudly to the debate which is why you see a lot more of
groups 1 and 4 when it comes up.

In any case main is becoming widely used and if it is going to be
standard practice in some sense then I think it makes sense to follow
that.

--
Oscar

Oscar Benjamin

unread,
Jul 18, 2023, 8:35:49 AM7/18/23
to sy...@googlegroups.com
On Tue, 18 Jul 2023 at 05:23, Aaron Meurer <asme...@gmail.com> wrote:
>
> But note that this is not a trivial thing to do, which is why it
> hasn't happened yet. It's not as simple as just renaming the branch.
> We also have to fix all the references to "master" everywhere,
> including making sure that all our automation and release scripts
> still work.

Flipping the name in Github is trivial I think. It is probably not
difficult for someone experienced to fix up the workflow tooling and
docs but there is a nonzero amount of work that someone would have to
do. Personally I have not cared enough about this to want to spend any
of my time doing it but I don't object to someone else doing it.

> There's also an unfortunate downside of doing this, which is that
> anyone who already has a clone of the repo and is using "git checkout
> master; git pull" will have their workflows broken when master stops
> being updated. I don't know if there's a clean way we can do anything
> about that.

This is the main reason that I have deliberately not brought this up
before. It is not just a case of one person making changes in GitHub
because it breaks every contributor's local clones. Our contributors
waste enough time with git problems and this is adding a new one that
many of them will need help with. The bulk of the work involved in
doing this is probably coaching contributors on how to fix these
problems. The exact way to fix it depends on how your local clone is
set up as well as how you use git (I am not sure how many contributors
actually use git from the command line now that various editors can do
it for you).

--
Oscar

Aaron Meurer

unread,
Jul 18, 2023, 12:55:53 PM7/18/23
to sy...@googlegroups.com
On Tue, Jul 18, 2023 at 6:22 AM Oscar Benjamin
<oscar.j....@gmail.com> wrote:
>
> I've been wondering for a long time now when someone would bring this up.
>
> Having watched this discussion play out in cpython I definitely do not
> want to import that kind of furious debate to the SymPy mailing list
> but I will just say that the use of the word master in this context is
> not really "agreed" to be politically offensive: there is definitely
> not a consensus on this.
>

I'm also not interested in having the political discussion here. The
politics are basically irrelevant at this point anyway because
everyone else is already moving to main, and it's the default for all
new repos on GitHub. So it's really just a question of what needs to
be done for us to do that too.

On Tue, Jul 18, 2023 at 6:35 AM Oscar Benjamin
<oscar.j....@gmail.com> wrote:
>
> This is the main reason that I have deliberately not brought this up
> before.

It's also why I never brought it up. We could do something like create
a master branch that automatically synchronizes with main. That would
help people who pull master and never realized we switched to main.
But it would also confuse a lot of people. I'm also not completely
sure how to set something like that up.

We could also push a commit to master that does something like

# in sympy/__init__.py
raise ImportError("The SymPy development branch has been renamed from
'master' to 'main'. It looks like you have been pulling commits from
the 'master' branch, but you need to start pulling commits from the
'main' branch instead. See https:... for more details")

But again, the fact that 'master' would still be there alongside main
could itself still confuse people.

I myself have been caught before by a project switching to main and
not realizing that my pull on an old clone wasn't actually doing
anything. I know enough about git and the master/main switch to
quickly figure out what was going on, but a person who is less
experienced would have taken longer to. So if there is a simple way to
do something about this, we should try to.

Another thing of interest is the symbolic-ref git command, which lets
you alias one branch name to another. So something like 'git
symbolic-ref refs/heads/master refs/heads/main' would make 'master' be
an alias to 'main' (or the reverse if you switch the arguments).
That's useful if you find some repos using master and others using
main to be confusing.

Aaron Meurer

Hanspeter “Hanspi” Schmid

unread,
Jul 18, 2023, 1:36:54 PM7/18/23
to sympy
I like the " raise ImportError " a lot. I think that would be a very good solution. The master branch could then be removed after a grace period of half a year or so, and then the confusion is gone.

I think if " See https:... for more details " has a nice how-to, everybody should be able to adapt quickly.

By the way, I also don't want the political discussion here. I just thought it was not worthwhile to change it. If you decide it is, though, you have my full support too.

David Bailey

unread,
Jul 22, 2023, 3:56:22 PM7/22/23
to sy...@googlegroups.com

I may be sticking my neck out here, but I have never seen a weaker justification for making a software change!

Perhaps the phrase "Mastering calculus" is likewise offensive.

Eliminating phrases that are offensive in that way will never end.

David


Reply all
Reply to author
Forward
0 new messages